vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Glowing usernames based on postcount? (https://vborg.vbsupport.ru/showthread.php?t=26163)

Baratator 11-09-2001 05:46 PM

// begin glowing admin attempt
$post[specialusername] = $post[username];


if ($userinfo[usergroupid] == 5) { $post[specialusername] = "<table style=\"filter:glow(color=orange, strength=4)\"><tr><td>$post[username]</td></tr></table>"; };

// end attempt


so this is what i added

but always the same thing :
PHP Code:

// begin glowing admin attempt
    
$post[specialusername] = $post[username];


      if (
$userinfo[usergroupid] == 5) { $post[specialusername] = "<table style=\"filter:glow(color=orange, strength=4)\"><tr><td>$post[username]</td></tr></table>"; };

// end attempt 

does nothing and

PHP Code:

// begin glowing admin attempt
    
$post[specialusername] = $post[username];


      { 
$post[specialusername] = "<table style=\"filter:glow(color=orange, strength=4)\"><tr><td>$post[username]</td></tr></table>"; };

// end attempt 

Makes all user titles glow in orange...

Palmer ofShinra 11-10-2001 10:33 AM

This is the code I got working about a month ago

In admin/functions.php
FIND:
PHP Code:

// ###################### Start getpostbit #######################
function getpostbit($post) {
// sorts through all the stuff to return the postbit template

    // user
    
global $bbuserinfo,$ignore;
    
// showthread
    
global $counter,$firstnew,$sigcache,$highlight,$postid,$forum;
    
// global options
    
global $showdeficon,$showonline,$displayemails,$enablepms,$allowsignatures,$wordwrap,$dateformat,$timeformat,$logip,$replacewords,$postsperday,$avatarenabled,$registereddateformat,$viewattachedimages;
    
// database
    
global $DB_site

UNDER IT ADD
PHP Code:

// begin glowing admin 
    
$post[specialusername] = $post[username];

    
$usergroupid=$post[usergroupid];
    if (
$usergroupid == 6) { $post[specialusername] = "<table style=\"filter:glow(color=blue, strength=6)\"><tr><td><font size='-1' color='white'><b>$post[username]</b></font></td></tr></table>"; }

    if (
$usergroupid == 5) { $post[specialusername] = "<table style=\"filter:glow(color=blue, strength=4)\"><tr><td><font size='-1' color='white'><b>$post[username]</b></font></td></tr></table>"; }
// end glowing admins 

This works for supermods and admins... Supermod usergroupid is 5, admin is 6.

Baratator 11-10-2001 12:53 PM

okay so if i find the id of the other groups i cant make it all glows differently :)

Thx a lot :)

Palmer ofShinra 11-11-2001 01:08 AM

To figure out usergroupids

In the Admin CP, click Modify under User Groups and Permissions.

Next to each usergroup, RIGHT click on the word EDIT and choose "Copy Shortcut" or whatever your system says to copy the link URL.

Then paste it into notepad... it'll look something like this

http://your.site.com/board/admin/use...&usergroupid=5

Notice the last number... 5. That's the usergroupid number.
In this case, this is for Super Mods.

Warlord 01-21-2002 03:40 AM

With help from Palmer of Shinra, we have adapted this to work on 2.2.1...

Find this:

PHP Code:

// ###################### Start buildpostbit #######################
function getpostbit($post) {
// sorts through all the stuff to return the postbit template

    // user
    
global $bbuserinfo,$session,$ignore,$cookietimeout;
    
// showthread
    
global $counter,$firstnew,$sigcache,$highlight,$postid,$forum;
    
// global options
    
global $showdeficon,$displayemails,$enablepms,$allowsignatures,$wordwrap,$dateformat,$timeformat,$logip,$replacewords,$postsperday,$avatarenabled,$registereddateformat,$viewattachedimages

And add this below it:

PHP Code:

// begin glowing admin 
    
$post[specialusername] = $post[username];

    
$usergroupid=$post[usergroupid];
    if (
$usergroupid == 6) { $post[specialusername] = "<table style=\"filter:glow(color=red, strength=6)\"><tr><td><font size='-1' color='white'><b>$post[username]</b></font></td></tr></table>"; }

    if (
$usergroupid == 5) { $post[specialusername] = "<table style=\"filter:glow(color=orange, strength=8)\"><tr><td><font size='-1' color='white'><b>$post[username]</b></font></td></tr></table>"; }

    if (
$usergroupid == 7) { $post[specialusername] = "<table style=\"filter:glow(color=blue, strength=8)\"><tr><td><font size='-1' color='white'><b>$post[username]</b></font></td></tr></table>"; }
// end glowing admins 

Then go edit your postbit template and change this:

[username]

to this:

[specialusername]

________________________________________________


This makes your usernames glow as follows:

Mods glow in blue
Super Mods in orange
Admins in red.


(I'm going to post this in Finshed hacks with credits due to Palmer of Shinra and everyone else who has put input into this hack)

Lucrecia 05-31-2002 10:48 PM

Is there anyway to have it so members can choose their own colors in their profile?


All times are GMT. The time now is 03:23 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.01344 seconds
  • Memory Usage 1,763KB
  • 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
  • (6)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete