vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   ColoredOnlineUserHack (https://vborg.vbsupport.ru/showthread.php?t=22539)

maverick1236 07-12-2001 12:26 AM

You just saved me a lot of work!!
TX for the swift response!!!!!!!!

TWTCommish 07-12-2001 04:52 AM

This can be made more efficient. Example: change this code...

Code:

if ($farbe == 2 ) {
        $username = "<font color=blue>".$username."</font>"; // Color for Member
 }
 if ($farbe == 5 ) {
        $username = "<font color=darkred>".$username."</font>"; // Color for Supermoderator
 }
 if ($farbe == 6 ) {
        $username = "<font color=red>".$username."</font>"; // Color for Administrator
 }
 if ($farbe == 7 ) {
        $username = "<font color=green>".$username."</font>"; // Color for Moderator
 }

...into this...

Code:

  switch ($farbe) {
    case 2:
      $color = "blue";
      break;
    case 5:
      $color = "darkred";
      break;
    case 6:
      $color = "red";
      break;
    case 7:
      $color = "green";
      break;
  }

  $username = "<font color=\"$color\">$username</font>";

I didn't look at the code in significant detail, but I think this can be used in both instances...both times you use that if/else code above, that is. At the very least, you can put it in a function to save some space. :)

Rune1027 07-12-2001 04:55 AM

Thats great, but How did you get the hypercells? That was a cool hack from UBB that I have missed :(

Afterburner 07-12-2001 08:27 AM

Quote:

Originally posted by Rune1027
Thats great, but How did you get the hypercells? That was a cool hack from UBB that I have missed :(
what do you mean with hypercells ?

mojotim 07-12-2001 08:37 AM

he means how do you get your cells to highlight when the cursor is over them. Prob DHTML, right?

Afterburner 07-12-2001 09:43 AM

you have do mofify e.g.

Forum Display Templates
--> forumdisplay_forumbit_level1_post

to:

PHP Code:

<tr align="center">
    <
td bgcolor="{firstaltcolor}" align="left" valign="top" colspan="2">
    <
table cellpadding="0" cellspacing="0" border="0">
    <
tr>
        <
td valign="top"><img src="{imagesfolder}/$forum[onoff].gif" border="0" alt=""></td>
        <
td><img src="images/clear.gif" width="9" height="1" alt=""></td>
        <
td><a href="forumdisplay.php?s=$session[sessionhash]&forumid=$forum[forumid]"><normalfont><b>$forum[title]</b></normalfont></a><br>
        <
smallfont>$forum[description]</smallfont></td>
    </
tr>
    </
table>
    </
td>
    <
td bgcolor="{secondaltcolor}"><normalfont>$forum[replycount]</normalfont></td>
    <
td bgcolor="{firstaltcolor}"><normalfont>$forum[threadcount]</normalfont></td>
    <
td bgcolor="{secondaltcolor}"><smallfont>$forum[lastpostinfo]</smallfont></td>
    <
td bgcolor="{firstaltcolor}"><smallfont>$forum[moderators]</smallfont></td>
</
tr

that means the table looks like:

PHP Code:


    
<td bgcolor="#F1F1F1" align="left" onMouseover="this.style.backgroundColor='#AEDEFF'" onMouseout="this.style.backgroundColor='#EEEEEE'"><ilayer width="100%"><layer width="100%" onMouseover="this.bgColor='#AEDEFF'" onMouseout="this.bgColor='#EEEEEE'"><a href="forumdisplay.php?s=&forumid=4"><font face="verdana, arial, helvetica" size="2" ><b>FreeTV,MoreTVPubsPCTV</b></font></a>
    <
br><font face="verdana,arial,helvetica" size="1" >Hier k?nnt ihr alles posten was mit FreeTVMoreTVPubs und PCTV zu tun hat</font></layer></ilayer></td

If the HTML Site of your board is generated


the important code
in the <td> tag you have to insert:

PHP Code:

 onMouseover="this.style.backgroundColor='#AEDEFF'" onMouseout="this.style.backgroundColor='#EEEEEE'"

below the <td> tag this:

PHP Code:


<ilayer width="100%"><layer width="100%" onMouseover="this.bgColor='#AEDEFF'" onMouseout="this.bgColor='#EEEEEE'"

infront of the </td> tag insert this code:

PHP Code:

</layer></ilayer

thats all
replace:

#AEDEFF
#EEEEEE

with your own color

I hope I don?t forgot anything

Chin San 07-12-2001 01:24 PM

ya...cool...:D :D :D

rmusic 07-12-2001 01:43 PM

Quote:

Originally posted by Afterburner
you have do mofify e.g.

Forum Display Templates
--> forumdisplay_forumbit_level1_post

to:

PHP Code:

<tr align="center">
    <
td bgcolor="#F1F1F1" align="left" valign="top" colspan="2">
    <
table cellpadding="0" cellspacing="0" border="0">
    <
tr>
        <
td valign="top"><img src="images/$forum[onoff].gif" border="0" alt=""></td>
        <
td><img src="images/clear.gif" width="9" height="1" alt=""></td>
        <
td><a href="forumdisplay.php?s=$session[sessionhash]&forumid=$forum[forumid]"><normalfont><b>$forum[title]</b></normalfont></a><br>
        <
smallfont>$forum[description]</smallfont></td>
    </
tr>
    </
table>
    </
td>
    <
td bgcolor="#DFDFDF"><normalfont>$forum[replycount]</normalfont></td>
    <
td bgcolor="#F1F1F1"><normalfont>$forum[threadcount]</normalfont></td>
    <
td bgcolor="#DFDFDF"><smallfont>$forum[lastpostinfo]</smallfont></td>
    <
td bgcolor="#F1F1F1"><smallfont>$forum[moderators]</smallfont></td>
</
tr

that means the table looks like:

PHP Code:


    
<td bgcolor="#F1F1F1" align="left" onMouseover="this.style.backgroundColor='#AEDEFF'" onMouseout="this.style.backgroundColor='#EEEEEE'"><ilayer width="100%"><layer width="100%" onMouseover="this.bgColor='#AEDEFF'" onMouseout="this.bgColor='#EEEEEE'"><a href="forumdisplay.php?s=&forumid=4"><font face="verdana, arial, helvetica" size="2" ><b>FreeTV,MoreTVPubsPCTV</b></font></a>
    <
br><font face="verdana,arial,helvetica" size="1" >Hier k?nnt ihr alles posten was mit FreeTVMoreTVPubs und PCTV zu tun hat</font></layer></ilayer></td

If the HTML Site of your board is generated


the important code
in the <td> tag you have to insert:

PHP Code:

 onMouseover="this.style.backgroundColor='#AEDEFF'" onMouseout="this.style.backgroundColor='#EEEEEE'"

below the <td> tag this:

PHP Code:


<ilayer width="100%"><layer width="100%" onMouseover="this.bgColor='#AEDEFF'" onMouseout="this.bgColor='#EEEEEE'"

infront of the </td> tag insert this code:

PHP Code:

</layer></ilayer

thats all
replace:

#AEDEFF
#EEEEEE

with your own color

I hope I don?t forgot anything


forgive me but i dont understand this
because i would also loike to have this if you dont mind

orca 07-12-2001 02:34 PM

Hey, Afterburner, es scheint dass mehr und mehr EX-UB2K Benutzer zu vBulletin wechseln ;). Bin seit 2 Monaten auch hier :).

ThomasP 07-13-2001 09:07 AM

Coole Sache, das :D
Weiter so,
-Tom


All times are GMT. The time now is 01:45 AM.

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.02149 seconds
  • Memory Usage 1,815KB
  • 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
  • (10)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete