vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Username markup for newest user? (https://vborg.vbsupport.ru/showthread.php?t=282215)

Boofo 04-29-2012 03:32 PM

Username markup for newest user?
 
Is there a way to use the username markup in this line in the stats section of the forumhome? I have tried almost everything and I can't get it to use the html markup.

Quote:

Welcome to our newest member, Boofo

Lynne 04-29-2012 04:13 PM

You could add:
HTML Code:

#wgo_stats a {color: red;}
However, that turns all the links in that section to red (will only cause issues for you if you have the blog enabled). I think you would need to actually add your own class in there so you can target that link specifically.

Boofo 04-29-2012 04:56 PM

Is there a way to make the class follow whatever the html markup is for that user?

Lynne 04-29-2012 10:19 PM

Hmmm, I don't know that the usergroup is cached for that user. Actually, I just looked and it isn't (only the userid and username are in the database table). So, you would either need to modify the datastore to save the usergroup also (and modify the usergroup if the user gets moved or promoted) or do a query to grab that information.

Boofo 04-29-2012 10:47 PM

Since I use that line in my forumhome stats mod, I could add it to the cron job with the rest of the stats, I suppose. It would only be one extra query every 15 minutes, so I could live with that.

You wouldn't happen to know what the query for that would be, would you?

Lynne 04-29-2012 11:14 PM

Something along the lines of "select usergroupid from user where userid = $userid" I would guess. (of course, add in table prefixes and change the variable)

Boofo 04-29-2012 11:31 PM

I'm not sure it would be that easy, though. Here is what we have to work with:

Code:

$newuserinfo = array(
        'userid'  => $vbulletin->userstats['newuserid'],
        'username' => $vbulletin->userstats['newusername']
);


Lynne 04-30-2012 01:34 AM

Then you have the userid - $newuserinfo['userid']. So, I think you can throw that into the query.

Boofo 04-30-2012 02:00 AM

Actually, we don't even need to run a query. This pulls up the right info in the forumhome_start hook without any query:

Code:

var_dump($vbulletin->userstats['newuserid']);
var_dump($vbulletin->userstats['newusername']);


Now we just need to figure out how to use fetch_musername with that to get it to show the html markup.

krystikel 06-05-2012 12:18 PM

Just wondering if you got any further with this? I'd like to be able to have the newest member use the html markup as well...


All times are GMT. The time now is 08:30 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.01579 seconds
  • Memory Usage 1,726KB
  • 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
  • (2)bbcode_code_printable
  • (1)bbcode_html_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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