Log in

View Full Version : How to change the [url] tag link color?


Velocd
07-11-2002, 10:47 PM
The link color used by the [url] tag does not match my style postbit backgrounds, therefore I need to change the default [url] link color somehow. I'm referring to the [url] tag that members use in their posts. I would like to instead use a stylesheet custom link color I made, so I need to find the code being replaced by the [url] tag, so I can insert class="grey" at the end of the <a href="">. Thus everytime someone uses [url] tag, their link will be using my class="grey" attribute, to obtain that color.

Also when somebody simply types a url in, since it auto-parses it to url format, I need that to be of my class="grey" color.

How can I do these two things? Any help would be great. ;)

Logician
07-12-2002, 05:29 AM
In functions.php check after


// ###################### Start bbcodeparse #######################

You'll see the tag and replacement..

Velocd
07-12-2002, 03:40 PM
Well I took your advice, and found the right spot to insert the code (or at least I think), but it still isn't working :(

Here is what I found in functions.php, and my class="grey" tag is in there.


$replacearray = array(
"<ol type=\"\\5\">\\7</ol>",
"<ul>\\4</ul>",
"<li>",
"<a href=\"http://www.\\6\" target=\"_blank\" class=\"grey\">\\8</a>",
"<a href=\"\\5\" target=\"_blank\" class=\"grey\">\\7</a>",
"<a href=\"http://www.\\5\" target=\"_blank\" class=\"grey\">\\5</a>",
"<a href=\"\\4\" target=\"_blank\" class=\"grey\">\\4</a>",
"</normalfont><blockquote><pre><smallfont>code:</smallfont><hr>\\5<hr></pre></blockquote><normalfont>",
"</normalfont><blockquote><pre><smallfont>code:</smallfont><hr>\\5<hr></pre></blockquote><normalfont>",
"java script:",
"about :",
"vbscript :"

TheDutch
07-12-2002, 06:12 PM
Hi Velocd,

Search for: // ###################### Start checkurl #######################

And you'll find where to change the things :D

Yours,
Erwin

Velocd
07-12-2002, 09:11 PM
Thanks so much I found the code and it's all good now! ;)

Velocd
07-17-2002, 12:06 AM
I just discovered one more little problem. When using the
mailto tag, it still comes up as the default style. I tried looking for it's code in functions.php around where the
// ###################### Start checkurl #######################
is, but I couldn't find it anywhere! Any help please?

TheDutch
08-04-2002, 06:37 AM
Hi Velocd,

I think you mean the vBcode tag [*mail] you should do this:

1. goto your admin panel
2. goto custom vBcode
3. edit the [*mail] tag

Thats it :D

Michael2
02-23-2003, 01:00 AM
I need to make this change as well. Can someone tell me exactly what I need to change? I don't really understand what's been posted thus far. Here's what I have in functions.php under Start checkurl...


function checkurl($url, $hyperlink="") {
$righturl = $url;
if(!preg_match("![a-z]://!si", $url)) {
$righturl = "http://$righturl";
}
// remove threat of users including javascript in url
/*$righturl = preg_replace("/javascript:/si", "java script:", $righturl);
$righturl = preg_replace("/about:/si", "about :", $righturl);*/
$hyperlink = iif(trim($hyperlink)=="" or $hyperlink==$url, iif(strlen($url)>55,substr($url,0,35)."...".substr($url,-15),$url) ,$hyperlink);
return "<a href=\"$righturl\" target=\"_blank\">".str_replace('\"', '"', $hyperlink)."</a>";

Michael2
02-23-2003, 01:24 AM
I think I found some easier instructions if anyone needs them in the future, haven't actually tried it yet.

http://www.vbulletin.com/forum/showthread.php?threadid=26251&highlight=change+link+color

hollyboy
11-29-2005, 03:08 PM
The link color used by the [url] tag does not match my style postbit backgrounds, therefore I need to change the default [url] link color somehow. I'm referring to the [url] tag that members use in their posts. I would like to instead use a stylesheet custom link color I made, so I need to find the code being replaced by the [url] tag, so I can insert class="grey" at the end of the <a href="">. Thus everytime someone uses [url] tag, their link will be using my class="grey" attribute, to obtain that color.

Also when somebody simply types a url in, since it auto-parses it to url format, I need that to be of my class="grey" color.

How can I do these two things? Any help would be great. ;)


I need to know how to do this for vb 3.5
Thanks

peterska2
11-29-2005, 11:16 PM
In the

style manager > CSS

You have got 3 sets of 3 boxes in the bottom of each CSS class. Change the color in there.