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)
-   -   Automatic Post Coloring (https://vborg.vbsupport.ru/showthread.php?t=32104)

Austin Dea 05-04-2002 08:54 PM

Oh my god. You took out 6 characters.

Oh wow, that's still wrong. Should be

<p><normalfont><font color="$post[field5]">$post[message]</font></normalfont></p>

So I guess you took out 13 characters =P.

KuraFire 05-05-2002 08:14 AM

Austin Dea, what're you talking about??

<p><normalfont color="$post[field5]">$post[message]</normalfont></p>

works just fine, no need for 2 font tags (<normalfont> is a font tag, you can just add ` color="whatever"` to it...).

However, doing this through Template changes only, will mess things up if a user doesn't enter anything in the field. If the field is left blank, with some browsers the font color will be made BLACK. If you're running a black-bg board with white text, that's not a fun thing. :)

The idea of this hack is nice, but it can be improved easily. In showthread.php, find:

PHP Code:

while ($post=$DB_site->fetch_array($posts) and $counter++<$perpage) { 

add beneath that:

PHP Code:

if($post[fieldX]!=""){
 
$color_on "<font color=\"$post[fieldX]\">";
$color_off "</font>";
}else{
$color_on "";
$color_off "";


Now add
$color_on and $color_off around $post[message] and it'll work.

If a user doesn't enter anything, their posts will be default color. If they do, their posts (ALL their posts, including their former posts, made before you implemented this hack) will show up in the chosen color.

Austin Dea 05-05-2002 03:33 PM

I know it works just fine, I was just saying that the one I posted needed fixing =P.

And if you don't enter anything on my boards, it puts it as the default color...and on at least 3 other board I've seen using this method :).

MrBojangle1 05-05-2002 07:58 PM

Well i like this hack i have it installed on my vB it is worth getting

KuraFire 05-06-2002 08:37 AM

AD: yes, but some (older) browsers might mess it up.

Anyhoo, the hack at the top, by Palmer, is just plain bad. Afterlab has it installed on FFR, and in my browser all users who use the hack, will have their posts show up in default color, TIMES NEW ROMAN. No colors, nothing, just an ugly TNR font. Quite annoying... :(

ZiRu$ 05-06-2002 08:25 PM

seems like a good hack! I'll install it later! Good Work! I'd like the "Different Fonts" add-on too.......

JackDawson 06-05-2002 03:10 PM

Great Hack! Thx ..

Jacky

Diva 07-21-2002 09:23 PM

KuraFire, I was wondering about one section of your updated version. Where you say:
Quote:

Now add
$color_on and $color_off around $post[message] and it'll work.
Where exactly am I to place this? I love this hack, but I would like all posts to change colors.

Thanks bunches in advance.

[D]Vincent 08-01-2002 09:21 AM

You're suppose to put it in Admin CP > Templates > Modify > Style that you want to modify > Postbit Templates > postbit and then find the $post[message] and do as he said.

ZiRu$ 08-01-2002 03:08 PM

Quote:

Originally posted by ZiRu$
seems like a good hack! I'll install it later! Good Work! I'd like the "Different Fonts" add-on too.......
I shall Re-Install it again :)


All times are GMT. The time now is 01:47 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.01096 seconds
  • Memory Usage 1,739KB
  • 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_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