Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: MOD Implementation
 Is there an Add User Manually mod?
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

DarlingBri
Junior Member

United Kingdom
378 Posts

Posted - 13 December 2005 :  18:12:34  Show Profile  Visit DarlingBri's Homepage
I need to be able to add users manually to the member set and trigger and email to each one in turn that says "Your username is X and your password is Y; here is the link to the forums" etc.

Does such a mod exist? Would it be hard to write if not?

Thanks :)

*****
"You know, there's nothing sexier than a girl geek on a big coding run." -Doonesbury

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 13 December 2005 :  18:31:37  Show Profile  Send ruirib a Yahoo! Message
Why don't you just use the registration page? A simple change would be needed to restrict access to admins only and that would be it.


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

DarlingBri
Junior Member

United Kingdom
378 Posts

Posted - 13 December 2005 :  19:47:46  Show Profile  Visit DarlingBri's Homepage
That sounds like a plan, but:

a) I don't know how to do that;
b) Wouldn't the admins then be logged in as the user they just created?

*****
"You know, there's nothing sexier than a girl geek on a big coding run." -Doonesbury
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 13 December 2005 :  20:21:04  Show Profile  Send ruirib a Yahoo! Message
Basically what you'd need would be something like this

if mlev < 4 then
   Response.Redirect "default.asp"
end if

at the top of register.asp (line# 47, first line of code, after the starting <%, just before the Dim strURLError statement).

Registration does not login anyone.


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

DarlingBri
Junior Member

United Kingdom
378 Posts

Posted - 15 December 2005 :  01:22:50  Show Profile  Visit DarlingBri's Homepage
Rock! THANK YOU! That totally works in a hack-happy way. It's great, as far as it goes, but after a bit of additional cleanup (removing policy.asp redirect, etc) I need the hack extended to clean up the process.

1/ If I enter users now using that hack, I get the standard red "There was a problem with your registration" notice although the user is successfully added and recieves a confirmation email.

a. An accurate "User has been added. Add another?" message and link should be displayed when registration is successful.
b. The current "Problem with your registration" error message should be displayed as now if there is a data entry error or conficting user name.

Is this a quick forum post kind of fix or should I email you directly, Ruirib, about this mod completion? I'm happy to chuck Paypal at you, I just need this sorted for my poor admins :)

*****
"You know, there's nothing sexier than a girl geek on a big coding run." -Doonesbury
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 15 December 2005 :  04:28:00  Show Profile  Send ruirib a Yahoo! Message
I won't have time now to deal with this. Maybe someone can help meanwhile. If this persists till the weekend, then I may be able to help.


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

DarlingBri
Junior Member

United Kingdom
378 Posts

Posted - 18 December 2005 :  04:23:13  Show Profile  Visit DarlingBri's Homepage
I would be very happy for the help whenever you can offer it. It's Sunday now and you're welcome to email me if you have any time. My email address is wandalusting AT gmail DOT com - thanks so much :)

Broke up the email address as to protect it from spam bots. No spaces are in the email Rui. - Davio

*****
"You know, there's nothing sexier than a girl geek on a big coding run." -Doonesbury
Go to Top of Page

phatmike11
Starting Member

USA
20 Posts

Posted - 30 May 2006 :  09:49:46  Show Profile  Send phatmike11 an AOL message  Send phatmike11 a Yahoo! Message
If you guys got this mod sorted out could you post it here? I am trying to do basically the same thing. I want admins to be able to click on a link on the admin page to add new users. When they click on the link it should bring up the registration form and allow them fill it out. When they are done it should send the user an e-mail letting them know their user name and password. However, if at all possible it would be nice to not have to activate them! Some of my admins (not by choice) are not the most technical people.
Go to Top of Page

phatmike11
Starting Member

USA
20 Posts

Posted - 30 May 2006 :  11:08:34  Show Profile  Send phatmike11 an AOL message  Send phatmike11 a Yahoo! Message
Ok I created a copy of the register.asp page and renamed it to register_admin.asp. I then changed the following

if mlev < 4 then
Response.Redirect "default.asp"
end if

When I click submit i get an error message that looks nasty and then but the member shows up as a pending member on the menu at the top.

I need to:
1.) stop the nasty error message from happening when it reaches
2.) On the register_admin.asp page I do not want to require validation from an admin once and admin has manually added the user. It should simply send out the users user name and password. I tried adding strEmailVal = "0" at the top of the page and even a couple other places just in case an include were to try and override it but it still puts them in the pending member list.
Go to Top of Page

phatmike11
Starting Member

USA
20 Posts

Posted - 30 May 2006 :  12:51:50  Show Profile  Send phatmike11 an AOL message  Send phatmike11 a Yahoo! Message
Ok I figured out some more of this problem.

1.) you have to change the following line (around 712 after adding
the mlev mod).
change
<form action=""register.asp?mode=DoIt""
to
<form action=""register_admin.asp?mode=DoIt""

That then allows them to be added successfully but it is not sending them an e-mail with their username and password and you still get the error from problem number 1 above (error message is spit out).
Go to Top of Page

phatmike11
Starting Member

USA
20 Posts

Posted - 30 May 2006 :  13:29:36  Show Profile  Send phatmike11 an AOL message  Send phatmike11 a Yahoo! Message
Ok to get the e-mail to send properly you have to do the following

ARound line 615 change the following line from
if strEmail = "1" and strRestrictReg = "0" then

to
if strEmail = "1" then

This will send the e-mail I added this to the e-mail to send the user their username as well
strMessage = strMessage & "Username: " & Request.Form("Account") & vbNewline & vbNewline

right above (line 633)
strMessage = strMessage & "Password: " & Request.Form("Password") & vbNewline & vbNewline

Now if I can figure out how to stop the error message from spitting out everytime I will be good. It has something to do with the mode="doit" I think.

A quick update --> The error is occuring after the submit button is hit and a confirmation screen comes up. Somewhere a meta refresh is being injected into the page "<meta http-equiv="Refresh" content="5; URL= ">" I can't figure out where in the world this is coming from I have searched the code and can't figure out where it's being injected. I think that when this script fires it is getting an error because of the form being blank. Any suggestions?

Edited by - phatmike11 on 30 May 2006 14:06:37
Go to Top of Page

phatmike11
Starting Member

USA
20 Posts

Posted - 31 May 2006 :  10:58:06  Show Profile  Send phatmike11 an AOL message  Send phatmike11 a Yahoo! Message
Final reply hopefully To get rid of the red error message you do the following
Around line 694 you will see the following
if strAutoLogon = 1 then
Response.Redirect "default.asp"
else
Response.Write " <meta http-equiv=""Refresh"" content=""5; URL=" & chkString(Request.Form("refer"),"refer") & """>" & vbNewLine
end if

I changed this to:
if strAutoLogon = 1 then
Response.Redirect "default.asp"
elseif strNoErrors = "1" then
Response.Write " <meta http-equiv=""Refresh"" content=""5; URL=/register_admin.asp?mode=Register"">" & vbNewLine
else
Response.Write " <meta http-equiv=""Refresh"" content=""5; URL=" & chkString(Request.Form("refer"),"refer") & """>" & vbNewLine
end if

I then added strNoErrors = "1" to the block that sends out the e-mail to the user because that means that the user has sucessfully been added. THis was line 636 for me and it looks like this

'################################### E-mail Validation Mod #################################
strEmailVal = "0"
if strEmailVal = "1" then
strMessage = strMessage & "Please click on the link below to complete your registration." & vbNewline & vbNewLine
strMessage = strMessage & "If the link is split or broken, you will need to copy and paste the entire link into your web browser." & vbNewline & vbNewLine
strMessage = strMessage & strForumURL & "register.asp?actkey=" & actkey & vbNewline & vbNewline
else
'######################################################################################
strMessage = strMessage & "Username: " & Request.Form("Account") & vbNewline & vbNewline
strMessage = strMessage & "Password: " & Request.Form("Password") & vbNewline & vbNewline
strNoErrors = "1"
end if '<---- E-mail Validation Mod - 1 line #############
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.25 seconds. Powered By: Snitz Forums 2000 Version 3.4.07