PDA

View Full Version : Help needed with moderated user signup......


Hooper
Thu 15th Aug '02, 6:02pm
Anyone have any suggestions?

Moderated User Registration (http://www.vbulletin.com/forum/showthread.php?s=&postid=335828)

It was suggested I post in here, but my fingers hurt. :D

Mike Sullivan
Thu 15th Aug '02, 10:56pm
Unfortunately that's a pretty large change and we're trying to keep non-bug code changes to an absolute minimum for 2.2.7. Were there ever to be a 2.3.0 (not being planned; hypothetical :)), I would look into this.

But, unfortunately I can't see it making into 2.2.7. Sorry.

I know you said 3.0 probably isn't an option, but the whole moderating registrations section has been much improved there.

Hooper
Fri 16th Aug '02, 2:33am
<--edited because of the extreme frustration in words and flaring nostrils-->

Hooper
Fri 16th Aug '02, 5:54am
Membership moderation problem (http://www.vbulletin.com/forum/showthread.php?s=&postid=335828)

======FIX=====

Create two templates:

emailsubject_denied =the email subject
email_denied =the email you send if denied


Open /admin/user.php, find this line:

doformfooter("Process Users","Reset",4);

Add this block right BEFORE that line:

maketableheader("Send this email to denied users:","",1,4);
$gettemp=$DB_site->query_first("SELECT template FROM template WHERE title='emailsubject_denied' AND (templatesetid=-1 OR templatesetid=1) ORDER BY templatesetid DESC"); //kludgy!!
$template=$gettemp[template];
echo "<tr class='".getrowbg()."'><td>Subject:</td><td colspan='3'><input type=text name=\"emailsubject_denied\" size=50 value=\"".htmlspecialchars($template)."\"></td></tr>\n";

$gettemp=$DB_site->query_first("SELECT template FROM template WHERE title='email_denied' AND (templatesetid=-1 OR templatesetid=1) ORDER BY templatesetid DESC"); //kludgy!!
$template=$gettemp[template];

echo "<tr class='".getrowbg()."'><td>Body:</td><td colspan='3'><textarea rows=10 cols=50 name=\"email_denied\">".htmlspecialchars($template)."</textarea></td></tr>\n";


And now replace this code:
if ($val==1) {

$user=$DB_site->query_first("SELECT username,email FROM user WHERE userid=$key");
$username=unhtmlspecialchars($user[username]);

eval("\$message = \"".ereg_replace("\"","\\\"",$email)."\";");
eval("\$subject = \"".ereg_replace("\"","\\\"",$subject)."\";");

mail ($user[email],$subject,$message,"From: $webmasteremail");

$DB_site->query("UPDATE user SET usergroupid=2 WHERE userid=$key");
}



With this code:
if ($val==1) {

$user=$DB_site->query_first("SELECT username,email FROM user WHERE userid=$key");
$username=unhtmlspecialchars($user[username]);

eval("\$message = \"".ereg_replace("\"","\\\"",$email)."\";");
eval("\$subject = \"".ereg_replace("\"","\\\"",$subject)."\";");

mail ($user[email],$subject,$message,"From: $webmasteremail");

$DB_site->query("UPDATE user SET usergroupid=2 WHERE userid=$key");
} else {
$user=$DB_site->query_first("SELECT username,email FROM user WHERE userid=$key");
$username=unhtmlspecialchars($user[username]);

eval("\$message = \"".ereg_replace("\"","\\\"",$email_denied)."\";");
eval("\$subject = \"".ereg_replace("\"","\\\"",$emailsubject_denied)."\";");

mail ($user[email],$subject,$message,"From: $webmasteremail");
}

=================================

This allows the non accepted member/registration to receive the appropriate email. This will also hold the applicant registerant within the moderated hold queue. After the email has been sent all that is necessary is to delete the user. I'm currently testing this to ensure it works correctly. If I find any issues, I'll post them.

Steve, If you could send the other gentleman who put in the support request about this to take a look and see if this works for him as well it would be appreciated. Thanks.

Additional Note: Where "OR templatesetid=1" in the above code, you'll need to make sure that you hover over the main template set name you are using in your admin CP so you can see what the templatesetID is. Change the number to whatever your templatesetID is. Mine was 2. So I had to change the 1 to a 2. You'll know if you have it right or not because your email text that you add to your deny templates won't show up in the "send this email to denied users" box as shown in the picture below. You'll have a blank white box even though you have entered text into the new deny templates you created.

If the text shows up in the box, then you have the templatesetid correct in the above code fix.

Hooper
Sun 1st Sep '02, 6:10am
Didn't add this to 2.27 that just came out.

I even post the fix 14 days ago and you don't add it. I upgrade and have to hack a fix in that was created for 2.26.


I'm sorry but I just don't get this.

Steve Machol
Sun 1st Sep '02, 2:30pm
Originally posted by Hooper
Didn't add this to 2.27 that just came out.

I even post the fix 14 days ago and you don't add it. I upgrade and have to hack a fix in that was created for 2.26.

Originally posted by Ed Sullivan
Unfortunately that's a pretty large change and we're trying to keep non-bug code changes to an absolute minimum for 2.2.7. Were there ever to be a 2.3.0 (not being planned; hypothetical ), I would look into this.

But, unfortunately I can't see it making into 2.2.7. Sorry.

Hooper
Sun 1st Sep '02, 5:16pm
I'm sorry Steve, but the fix was created in 6 and a half minutes.

Everytime I ask for help with somthing not working with vBulletin, this is what I get told. I then find someone that I know to help with the issues and have them do a fix for me. Sometimes paid, sometimes not, I have to get outside sources to help fix issues with vBulletin at times. This was not a big fix. It took hardly any time at all.

I don't complain much. But when I ask for support and have to get someone else outside of Jelsoft to support the product, it does make me a bit perterbed. Then I post a fix myself that resolves the situation, and it's not added to the next version.