PDA

View Full Version : Code's Text Colors


Ad3pt
08-02-2005, 01:41 PM
I have a dark grey template. When someone makes a post and enters HTML and/or PHP (and other) CODE, it has a preset color configuration to its fonts. See example below:



<body value="attrib">
<table><tr><td>This is my table</td></tr></table>
<img src="dfkdropgk.png" alt="hello" />
<form method="get"><input type="text"></form>
<script type="text/javascript" language="javascript>alert("Hello");</script>
<a href="dmfrsdmfg.php">Click here</a>

How can I change these colors so it's more clearly visable on a dark grey background? I've edited the function below in the include/functions_bbcodeparse.php file....


function fetch_bbcode_html_colors()
{
global $bbcode_html_colors;
$bbcode_html_colors = array
(
'attribs' => '#0000FF',
'table' => '#008080',
'form' => '#FF8000',
'script' => '#800000',
'style' => '#800080',
'a' => '#008000',
'img' => '#800080',
'if' => '#FF0000',
'default' => '#000080'
);
}
fetch_bbcode_html_colors();


and it DOES change the colors, but it also creates an error with the forums.

The new error is when someone clicks on the "latest post" link. I get some error page saying something about the header file and cookies.....

This seems to be an ongoing and unanswerable issue with vBulletin. If anyone can help, PLEASE DO!!

Thanks, Ad3pt

Ad3pt
08-02-2005, 01:47 PM
Warning: Cannot modify header information - headers already sent by (output started at /home/adept/public_html/forums/includes/functions_bbcodeparse.php:1612) in /includes/functions.php on line 2946


This is the exact error I get. And the error only appears when I have edited the color codes in the "includes/functions_bbcodeparse.php" file. When I reset them back to what they originally were, the error no longer appears....

UGH!

Zero Tolerance
08-02-2005, 03:02 PM
Im no vB user....I would guess it could be a CSS issue if vB uses CSS for that or even in a lang file....

I'm sure nopp will be able to point ya in a better direction than I can on this issue

Greg
08-02-2005, 07:59 PM
You have white space in the php file before <?php or at the end of the file after ?> on the last line. The last line should be ?> with no carraige return after it. :)

Ad3pt
08-02-2005, 09:42 PM
You have white space in the php file before <?php or at the end of the file after ?> on the last line. The last line should be ?> with no carraige return after it. :)


Yeah, no... that didn't work. Still getting the error. And eventhough I don't create a carriage return, it puts a blank newline at the end after it's saved anyway.

Here is the function:

function fetch_bbcode_html_colors()
{
global $bbcode_html_colors;
$bbcode_html_colors = array
(

'attribs' => '#A0A0FF',
'table' => '#00FFFF',
'form' => '#FFC050',
'script' => '#FF8080',
'style' => '#FF80FF',
'a' => '#80FF80',
'img' => '#FF80FF',
'if' => '#FF0000',
'default' => '#FFFF00'
);
}


Is there anyway the header is calling this function in any way? And if so, where is the header file?

I've searched ALL OVER the web for this issue and I have come across like 3 or 4 others that have the same problem with vBulletin, so I'm sure it's not just a 'whitespace' issue. Like I said, this ONLY happens when someone clicks on the quick-jump to the Last Post of any forum.

Greg
08-02-2005, 10:52 PM
Get a new editor.

Ad3pt
08-03-2005, 01:01 AM
Get a new editor.

Awesome suggestion!! Will that make my site work the way I want it to!?

Thanks for the detailed response. I appreciate your expert opinion.

Ad3pt

Greg
08-03-2005, 01:56 AM
A good text editor will not tag your files with line returns. That will solve your problem.

bigH2O
08-03-2005, 02:08 AM
noppid, do I detect a note of sarcasm in Ad3pt's post? He he he.

I think what he was saying in his abrupt sort of way Ad3pt is that your editor is appending all sorts of nasty stuff (whitespace) that VB isn't expecting and therefore causing errors. Get a new editor is a suggestion to go simple. You gotta start with the basics.

It sounds like what you're doing as far as editing the color table should work, but if your editor is automatically appending whitespace when you save it, you'll be messed up. Get your hands on a editor that doesn't add anything you don't want added, and try from there. Something like UltraEdit or Crimson Editor.

If you still have problems come back and we'll start tearing into code.

bigH2O
08-03-2005, 02:13 AM
A good text editor will not tag your files with line returns. That will solve your problem.I guess my reply wasn't needed. But you posted this while I was generating my reply. I left mine up for the suggestions on the editors though. :eek:

Greg
08-03-2005, 02:25 AM
Yep, I detected the sarcasm too. But I'm not in a good frame of mind either, so I glossed over it.

I don't even know why I'm here this month, but it passes the time. I'll try and be more detailed, but I expect too much pre-knowledge sometimes.

bigH2O
08-03-2005, 02:39 AM
Hey man, I know what your going through... remember? Don't worry about it. I'll play babysitter and Vantim can bust balls. You can kick back with a cold beer and just watch the fun. We'll call you if we need you. K?

Give me a call. I wanna catch up on a few things.

Zero Tolerance
08-03-2005, 08:26 AM
As I stated in my first post in this thread...I have NO vB admin experience.....however I use notepad exclusively for editing my php files....its only a slight aggrivation to figure out the line numbers according to your display size and settings. Once you know how many lines your display will show at full size....then its easy to find teh approximate line number.

:D

lmnobs
08-03-2005, 11:44 PM
noppid, do I detect a note of sarcasm in Ad3pt's post? He he he.

I think what he was saying in his abrupt sort of way Ad3pt is that your editor is appending all sorts of nasty stuff (whitespace) that VB isn't expecting and therefore causing errors. Get a new editor is a suggestion to go simple. You gotta start with the basics.

It sounds like what you're doing as far as editing the color table should work, but if your editor is automatically appending whitespace when you save it, you'll be messed up. Get your hands on a editor that doesn't add anything you don't want added, and try from there. Something like UltraEdit or Crimson Editor.

If you still have problems come back and we'll start tearing into code.

Well he has to get passed AH#1 first after an apology and his new avatar is Cute.....