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)

Palmer ofShinra 11-03-2001 10:00 PM

This is a simple little hack taht allows users to specify a color by name or hex code in theor profile.

If they do (we'll use limegreen as the color they chose for examples) then all their posts from that point on will have
[color=limegreen ] and [/color ] surrounding them.

It does not retroactively affect previous posts. Only new ones.
If they post as limegreen for a day, then change to red, all their limegreen posts stay that way.

The hack involves adding 3 lines of code to 2 different files (same 3 lines for both files) and creating a Custom Profile field.

TheComputerGuy 11-04-2001 10:12 AM

Do you have like a screen shot of it

Palmer ofShinra 11-04-2001 06:21 PM

You can't take a meaningful screenshot of this...

All it does is make all of a user's posts show up in a certain color automatically.

That's all.

Diva 11-05-2001 04:00 AM

Does this also show the colors in the 'Whos online area?

Reeve of shinra 11-05-2001 10:35 AM

All this does is automatically place the [color=??] tag around the entire post so the user doesn't have to type it out each and every time. It becomes a default choice.

Mike Gaidin 11-06-2001 03:19 AM

Nice one. :D

I installed it and it works great.

Twizted 11-08-2001 12:17 AM

for some reason... i either don't understand the code or im just stupid -.-

newayz, here is the part i don't get..

STEP 3:

In newreply.php

Find:
============
} else {
if ($attachmentid and !$foruminfo[moderateattach]) {
$DB_site->query("UPDATE thread SET attach = attach + 1 WHERE threadid = '$threadid'");
}
============

And in newthread.php

Find:
============
// subscribe to thread
if ($email and $bbuserinfo['userid']!=0) {
if (!$checkid=$DB_site->query_first("SELECT subscribethreadid FROM subscribethread WHERE userid=$bbuserinfo[userid] AND threadid=$threadid")) {
$DB_site->query("INSERT INTO subscribethread (subscribethreadid,userid,threadid) VALUES (NULL,$bbuserinfo[userid],$threadid)");
}
}
============

STEP 4:

Directly underneath those, before the query, add this (same code for both files)

// attempt at auto-surround post with tags
if ($bbuserinfo[changeme]!="") {
$message = "[color=".$bbuserinfo[changeme]."]".$message."[/color]";
}
============

can someone show me an example of where to stick step 4 at?? like an exact example of where it goes... b/c im stuck... :mad:

Parse error: parse error in /home/twisteda/public_html/forum/newreply.php on line 249

that comes up when i go to new reply...

Twizted 11-08-2001 12:18 AM

btw... does this work for vbulletin 2.2.0???

that is what im tryin to install it on now

Mike Gaidin 11-08-2001 12:29 AM

Yes, it works great with 2.2.0.

heretic 11-08-2001 09:23 PM

Not for me. I have 2.2.0 and for some reason, all the tags ended up

blahblahblah

instead of (well, mine would be)

blahblahblah


All times are GMT. The time now is 08:13 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.00982 seconds
  • Memory Usage 1,725KB
  • 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
  • (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
  • (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