PDA

View Full Version : Welcome to our newest member


isman
01-31-2010, 11:49 PM
I'm trying to move this to just under the login at the top of the page. It's been a while since I've done vbulletin, I think version 3.0. I can get the "Welcome to our newest member" text to show up but the user name does not appear after it.

Any suggestion are welcome.

Lynne
01-31-2010, 11:59 PM
You would have to copy the code to create the variable for the newest member into a plugin that gets called before the header template is rendered (I think the login is in the header.) And, of course, you'd have to preregister the variable for use also.

isman
02-01-2010, 11:40 PM
Wow. That seems like a round about way to do it. Has it changed that much that this is the best way to do it? I don't mean to be disrespectful, but can you explain why the plugin and not just copying the code?

--------------- Added 1265079867 at 1265079867 ---------------

I created this plugin with these details...

http://www.aparentsheart.com/images/pluginimage.png

Then I put this code in the header, just under the login...

<p style="color:black;text-bottom;line-height:3;">{vb:rawphrase welcome_to_our_newest_member_x, {vb:link member, {vb:raw newuserinfo}}, {vb:raw newuserinfo.username}}</p>

I'm obviously missing something here as all it shows is "Welcome to our newest memeber,"

This is much different than the version I'm used to working with. I can see this will take a bit to learn. Can you offer some advice here?

Lynne
02-02-2010, 03:32 AM
That is probaby the wrong hook location to use. I don't think that hook is on every page.

After you find the correct hook location (look for where the header is rendered and find a hook 'above' that), you will have to preregister the variable for use in that template:
vB_Template::preRegister('header', array('newuserinfo' => $newuserinfo));