vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Welcome to our newest member (https://vborg.vbsupport.ru/showthread.php?t=234655)

isman 01-31-2010 11:49 PM

Welcome to our newest member
 
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 [DATE]1265079867[/DATE] at [TIME]1265079867[/TIME] ---------------

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...

Quote:

<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:
PHP Code:

vB_Template::preRegister('header', array('newuserinfo' => $newuserinfo)); 



All times are GMT. The time now is 04:49 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00950 seconds
  • Memory Usage 1,719KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete