Log in

View Full Version : Change vBCode color


SloppyGoat
07-26-2002, 11:40 PM
How is this done? I've been told I'd have to edit functions.php, but what line and where? Anyone know? I need it to default to white, or something besides black anyway. :confused:

SloppyGoat
07-27-2002, 07:59 PM
BUMP

Admin
07-28-2002, 05:25 AM
What color are you talking about?

SloppyGoat
08-13-2002, 12:34 AM
The color of the default text, when I use the Code button in a post. It defaults to black, so it seems.

SloppyGoat
08-13-2002, 12:35 AM
See, unless you add a color tag, it looks like nothing on a black background. If you could direct me to where I can change that, I'd be much obliged. :)

SloppyGoat
08-15-2002, 11:38 PM
Bump! :p

michealo
08-16-2002, 06:09 PM
for the code tags, just add in a html color code <font color=red> </font> in the vB Code replacement field

and then they do [code] xxxx [ /code]

the color would be set automatically

SloppyGoat
08-16-2002, 06:25 PM
Ok, thanks. But where exactly do I add that color tag? Templates? That's what I can't seem to find. I can't seem to find anything about it, or I don't know what to look for. :nervous: :paranoid:

michealo
08-16-2002, 07:12 PM
Custom vB Codes under adminCP

i changed my quote tag to do this very thing

unless that [code] tag is internal, it should show up there

if not, somone with more knowledge will have to help

SloppyGoat
08-16-2002, 07:51 PM
Yeah, it's not under custom codes. It's hidden elsewhere, I suppose. Anyone? :cross-eyed:

SloppyGoat
09-03-2002, 02:22 AM
bump :dead:

Logician
09-03-2002, 11:24 AM
admin/functions.php:


"</normalfont><blockquote><pre><smallfont>code:</smallfont><hr>\\5<hr></pre></blockquote><normalfont>",
"</normalfont><blockquote><pre><smallfont>code:</smallfont><hr>\\5<hr></pre></blockquote><normalfont>",

SloppyGoat
09-03-2002, 04:04 PM
Thanks! I'll look for it.

SloppyGoat
11-03-2002, 12:56 AM
Ok, sorry....I'm a bit in the dark here. What do I need to change in that line?

Erwin
11-03-2002, 04:35 AM
Change the first <normalfont> to <normalfont color=red> or whatever you want it to be.

SloppyGoat
11-03-2002, 06:01 PM
Nope, I'm doing something wrong then. No matter where I add the "color=red", it still shows as black. :(

Logician
11-03-2002, 08:57 PM
Doesn't regular HTML help either?
<font color="#FF0000"> </font>

Erwin
11-03-2002, 09:32 PM
From memory, the code in functions for the quote vBCode occurs TWICE. Make sure you make the changes for BOTH times the quote code appears.

SloppyGoat
11-04-2002, 06:01 PM
Man, I did change it in both places. I tried the smallfont and also the normalfont. No change. It just stayed black. Can you give me a working example? :paranoid: I'd use normal html, but I'm not sure where to put it, or what to replace. :surprised:

Erwin
11-05-2002, 01:03 AM
And you're sure you don't have a custom vBCode setup for quote in your Admin CP that may be interfering? When I say both places, they are in 2 very different places in functions php, not the ones that are side by side.

SloppyGoat
11-05-2002, 01:53 AM
Oh, well....I changed it in the two that are listed above.....just those two lines. I'm no code guru, so I don't exactly know what I'm looking for here. I've edited quite a few things, but this one has me baffled. :surprised: It's not that important, really. It just bugs me that you have to use a damn color tag to change it from black. :(

SloppyGoat
12-04-2002, 04:15 AM
Bump....exact line refs would be much appreciated.

SloppyGoat
12-12-2002, 10:56 PM
Bump! :(

SloppyGoat
02-21-2003, 09:21 PM
Bump! Supposedly, this requires php hacking, according to vB. No one knows the answer? :(
I'm assuming, since the vbcode color doesn't appear to be in the html, that I'll actually have to define the color of the $vbcode variable somewhere in the php.

SloppyGoat
02-26-2003, 07:20 AM
Bump

SloppyGoat
04-02-2003, 12:28 PM
Somebody has to know where this can be changed. Once again, I ask....where can I change the default code color? See, I have black on a black background. It's very irritating.

https://vborg.vbsupport.ru/attachment.php?s=&postid=284167

SloppyGoat
04-03-2003, 05:20 AM
Can one of you gurus take a second and help me out here? This has gone unsolved since 06/2002, when I first started asking about it at vb.com. :confused: I'm going to make the jump from asking to pleading and begging now. Please! Oh please! :nervous:

SloppyGoat
04-03-2003, 11:19 PM
I know no one likes impatient people, but it's been almost a year, so BUMP.

SloppyGoat
04-06-2003, 11:15 PM
Bump

SloppyGoat
04-09-2003, 08:26 PM
Bump

amykhar
04-09-2003, 08:35 PM
Enough with the bumps already.

Look for this:

// ###################### Start stripbrsfromcode #######################

and find the normalfont section in that function and modify it to your heart's content.

SloppyGoat
04-09-2003, 09:28 PM
Ok, thanks for replying. And sorry about all the bumps. It's tough not knowing php. :(

Is there anything I need to know about tags in php? Someone in another thread was saying it had to be something like this:

<font color=\"red\">

Is that correct? Between the normalfont tags?

[edit] It worked!! WOOOHOOOOO!!! Thank you so much! I'd give ya a big hug if I could. :D If there's anything I can do for ya, just ask. ;)

But I found out something rather strange. Maybe you can help explain this one. I was convinced that the code font color couldn't be changed without hacking, until now.

This makes no sense at all. I was talking to another vB admin, and she said that that particular text color changes when custom styles/templates are used. Her code color defaults to white, and she has no idea why....since she never hacked that line. That would mean it can't possibly be in functions.php, correct? I mean, templates can't change php code, correct? Do you think there's some easier way to change it? I'd assume there's a template or style that can be changed, in light of this new info.