PDA

View Full Version : [fixed] Template = error_moderateuser


mishkan
Mon 18th Nov '02, 4:32pm
Couple of questions for this template... error_moderateuser.



(1) On my unhacked 2.2.8 board, the $username variable displays nothing. Just like in these two threads...

http://www.vbulletin.com/forum/showthread.php?s=&postid=320119&highlight=errormoderateuser#post320119

http://www.vbulletin.com/forum/showthread.php?s=&postid=275604&highlight=errormoderateuser#post275604

Has this issue been resolved?



(2) In addition to the $username variable, I want these user variables to be displayed... custom profile field #5, the user's email address, and the user's usergroupid.

I tried to accomplish this with the following html code, but it doesn't work. The 2nd column of the table is blank. What am I doing wrong?

< table width="100%" border="0" cellspacing="0" cellpadding="10">
< tr>
< td width="100">Real Name:</td>
< td>$post[field5]</td>
< /tr>
< tr>
< td width="100">Email:</td>
< td>$email</td>
< /tr>
< tr>
< td width="100">User Name:</td>
< td>$username</td>
< /tr>
< tr>
< td width="100">Group ID:</td>
< td>$usergroupid</td>
< /tr>
< /table>

Steve Machol
Mon 18th Nov '02, 4:43pm
1) Once again I tiered to duplicate this problem on my unhacked 2.2.8 test forum and couldn't the username showed up just fine. (See attached photo.)

2) I believe to get those variable parsed in this template requires hacking.

mishkan
Mon 18th Nov '02, 5:00pm
Originally posted by Steve Machol
1) Once again I tiered to duplicate this problem on my unhacked 2.2.8 test forum and couldn't the username showed up just fine. (See attached photo.)
Hi Steve. Thanks for trying to duplicate the problem. The fact that you couldn't duplicate it doesn't mean that the problem doesn't exist for me, of course. I will submit a support ticket, if you think that will help. But I already have one support ticket that has gone unresolved for days, as I'm still waiting for a programmer to take a look at that one. Please, don't take this as dumping on the programmers, who I know are very busy at this time with vB3. Please advise... what should I do?

Originally posted by Steve Machol
2) I believe to get those variable parsed in this template requires hacking.
Can you please verify this? And if your thinking is correct, then why are some variables easily displayed in templates by prefacing them with a doller sign symbol, while others are not? What differentiates the variables in this regard?

Thanks very much!

Steve Machol
Mon 18th Nov '02, 5:04pm
1) If you have not installed any hacks, fill out a support ticket at:

http://www.vbulletin.com/members/support_form.php

Be sure to include the login info to your Admin CP and FTP.

If you have installed hacks, then remove the hacks first before filling out the support request.

2) All vB variables are not automatically made available to every template. This requires modifying the index.php file. You can ask over at vbulletin.org.

mishkan
Mon 18th Nov '02, 5:23pm
(1) Yes, it's an unhacked 2.2.8 board. I'll submit the ticket today. Attached is a photo, showing this template as displayed at my board, with no $username, just in case it's helpful.

(2) Thanks for that info regarding the other variables. This is a very mysterious topic for me, and I feel very in the dark. I'll go inquire at vBulletin.org after this support ticket is resolved. I should get this template working correctly, before I try to add variables to it.

Even though this isn't resolved yet, many thanks for your time and help. :)

mishkan
Mon 18th Nov '02, 5:29pm
Hmmm... I just noticed... the text in your photo doesn't match the text in mine! I think you posted the display from template error_registeremail, instead of template error_moderateuser.

Before I submit that ticket, would you please take a second look at your forum? Please set your forum so that new users are moderated, and then look at the output from the error_moderateuser template? Thanks.

Steve Machol
Mon 18th Nov '02, 5:53pm
You are absolutely correct. My bad!

I am going to move this to the Bugs forum for a developer to look at.

Scott MacVicar
Mon 18th Nov '02, 7:19pm
confirmed and just after 2.2.9 RC was released it will appear in 2.2.9 final i guess.

open register.php

look for
$DB_site->query("UPDATE user SET usergroupid=4$dotitle WHERE userid='$u'");

above this add

$username = $userinfo['username'];

mishkan
Tue 19th Nov '02, 7:08pm
Steve and Scott, thank you! :)

Freddie Bingham
Tue 19th Nov '02, 7:44pm
Just change the template to use $userinfo['username']

Scott MacVicar
Tue 19th Nov '02, 7:48pm
freddie that will break the other time the template is used when they are registering and the admin only requires moderation and not email verification.

line 531 on register.php

mishkan
Sun 24th Nov '02, 2:39am
I opened the register.php file with Notepad. I'm attaching a photo of what the file looks like. There aren't the normal type of carriage returns that I'm accustomed to seeing. Instead, there are these tiny rectangular boxes, and the next line of text does not drop down to a new physical line.

So now I'm at a loss as to what to do. :(
Please tell me how do I change the register.php file?
Thanks.

Paul
Sun 24th Nov '02, 4:02am
Originally posted by mishkan
I opened the register.php file with Notepad. I'm attaching a photo of what the file looks like. There aren't the normal type of carriage returns that I'm accustomed to seeing. Instead, there are these tiny rectangular boxes, and the next line of text does not drop down to a new physical line.

Windows uses a different type of line break than other operating systems (that's what those little boxes are). Opening the file in WordPad will allow you to view the file as was intended. Many other text editors will better support this feature. Notepad simply does not.

Hope this helps,
Paul

mishkan
Sun 24th Nov '02, 4:26am
Originally posted by LoveShack
Opening the file in WordPad will allow you to view the file as was intended.
Paul, thank you! :) Okay, I'm off to make my very first change ever to a php file. Wish me luck. ;)

Paul
Sun 24th Nov '02, 4:31am
No problem! :cool:

Just make sure you:
Backup your files before editing them. If you're using WordPad, be sure to save the file without formatting. Upload your file to your server using ASCII instead of binary.Good luck,
Paul

mishkan
Sun 24th Nov '02, 5:04am
Originally posted by LoveShack
Just make sure you:
Backup your files before editing them. If you're using WordPad, be sure to save the file without formatting. Upload your file to your server using ASCII instead of binary

It worked! :D :D :D

This is quite a milestone for me. And thanks for the checklist... very appreciated, as it's so easy to forget to do those essential things!

Can you picture me jumping on my desk, doing a little victory dance?
:eek: :p :D