Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 05-20-2002, 07:48 PM
ehjay's Avatar
ehjay ehjay is offline
 
Join Date: Nov 2001
Location: chicago
Posts: 102
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Colored usernames within thread?

I've seen the colored who's online hack, and it's additional colored buddylist hack, but I've searched but couldn't find a hack to allow for the usernames within a thread to be color coded as well, based on a similiar idea as the who's online hack.

1 color for admins, 1 for supermods, etc.

so instead of AJ.. you'd see AJ or something like that.

does this exist? if so, where? if not, i'd think it to be a hack someone could make.
Reply With Quote
  #2  
Old 05-21-2002, 12:28 AM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

have answered already to your PM

if it worked so, i'll post it into the small releases ^^

if not, like i've said in the pm tell me, i'll work on it
Reply With Quote
  #3  
Old 05-21-2002, 01:18 AM
ehjay's Avatar
ehjay ehjay is offline
 
Join Date: Nov 2001
Location: chicago
Posts: 102
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

the code you gave me I got to work, but I can't seem to implement this for multiple usergroups correctly.

any idea how i might set this up for the other user groups as well?
Reply With Quote
  #4  
Old 05-21-2002, 09:21 AM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

humm, it should work, for all usergroups if it works for one....

sure you have implemented the other groups correctly?
Reply With Quote
  #5  
Old 05-21-2002, 10:53 AM
ehjay's Avatar
ehjay ehjay is offline
 
Join Date: Nov 2001
Location: chicago
Posts: 102
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

eh.. i think so.
what code would you use?
Reply With Quote
  #6  
Old 05-21-2002, 11:02 AM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hmm like this way:
PHP Code:
if ($post[usergroupid]==6) { 
$post[username]="<font color=red>".$post[username]."</font>"

if (
$post[usergroupid]==|| $post[usergroupid]==7) { 
$post[username]="<font color=blue>".$post[username]."</font>"

if (
$post[usergroupid]==9) { 
$post[username]="<font color=gray>".$post[username]."</font>"

and so on for all of your usergroups you want to change the color.
just directly below if($post[userid]!=0) {
...
Reply With Quote
  #7  
Old 05-21-2002, 08:50 PM
ehjay's Avatar
ehjay ehjay is offline
 
Join Date: Nov 2001
Location: chicago
Posts: 102
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

see when i try to run that, it gives me a parse error on that first line.

but if i try it with just an if statement, converting admin users to red, it'll work.. ?
Reply With Quote
  #8  
Old 05-21-2002, 09:11 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hmm, i have tested it now on my board, and all works perfect

i just copied the lines i have written directliy after
PHP Code:
if ($post[userid]!=0) { 
and there is no parse error...

look at the attached screeny

can you please post 5 lines before and after the lines i have said you should add?
Attached Images
File Type: jpg bild2.jpg (41.6 KB, 0 views)
Reply With Quote
  #9  
Old 05-21-2002, 09:28 PM
ehjay's Avatar
ehjay ehjay is offline
 
Join Date: Nov 2001
Location: chicago
Posts: 102
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

humm, still won't work..

before:
PHP Code:
 if (!$forum[allowicons] or $post[iconid]==0) {
        if (
$showdeficon) {
            
$post[icon]='<img src="{imagesfolder}/icons/icon1.gif" border="0" alt="">';
        }
    } else {
        
/*
        unset ($iconwidth);
        unset($iconheight);
        $imginfo=@getimagesize($post[iconpath]);
        if ($imginfo[2]==1 or $imginfo[2]==2) { // We have a .gif or .jpg
        $iconwidth = "width=\"$imginfo[0]\"";
        $iconheight = "height=\"$imginfo[1]\"";
        }
        */
        
$post[icon]="<img src=\"$post[iconpath]\" alt=\"$post[icontitle]\" border=\"0\">";
    } 
after:
PHP Code:
 unset($onlinestatus);
        if (
$post['lastactivity'] > $datecut and !$post['invisible'] and $post['lastvisit'] != $post['lastactivity']) {
            eval(
"\$onlinestatus = \"".gettemplate("postbit_online")."\";");
        } else {
            eval(
"\$onlinestatus = \"".gettemplate("postbit_offline")."\";");
        } 
Reply With Quote
  #10  
Old 05-21-2002, 09:34 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hmm, its exactly the same as my lines:

PHP Code:
    if (!$forum[allowicons] or $post[iconid]==0) {
        if (
$showdeficon) {
            
$post[icon]='<img src="{imagesfolder}/icons/icon1.gif" border="0" alt="">';
        }
    } else {
        
/*
        unset ($iconwidth);
        unset($iconheight);
        $imginfo=@getimagesize($post[iconpath]);
        if ($imginfo[2]==1 or $imginfo[2]==2) { // We have a .gif or .jpg
        $iconwidth = "width=\"$imginfo[0]\"";
        $iconheight = "height=\"$imginfo[1]\"";
        }
        */
        
$post[icon]="<img src=\"$post[iconpath]\" alt=\"$post[icontitle]\" border=\"0\">";
    }

    if (
$post[userid]!=0) {
    
if (
$post[usergroupid]==6) { 
$post[username]="<font color=red>".$post[username]."</font>"

if (
$post[usergroupid]==|| $post[usergroupid]==7) { 
$post[username]="<font color=blue>".$post[username]."</font>"

if (
$post[usergroupid]==9) { 
$post[username]="<font color=gray>".$post[username]."</font>"
}
        unset(
$onlinestatus);
        if (
$post['lastactivity'] > $datecut and !$post['invisible'] and $post['lastvisit'] != $post['lastactivity']) {
            eval(
"\$onlinestatus = \"".gettemplate("postbit_online")."\";");
        } else {
            eval(
"\$onlinestatus = \"".gettemplate("postbit_offline")."\";");
        } 
this are the lines, where the hack is integrated....

can you please post also the exact errormessage?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:44 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.04800 seconds
  • Memory Usage 2,304KB
  • Queries Executed 12 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (5)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (1)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • postbit_attachment
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete