vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   How to change the [url] tag link color? (https://vborg.vbsupport.ru/showthread.php?t=40949)

Velocd 07-11-2002 10:47 PM

How to change the [url] tag link color?
 
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

PHP Code:

// ###################### 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.

PHP Code:

$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...

Quote:

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/showt...nge+link+color

hollyboy 11-29-2005 03:08 PM

Quote:

Originally Posted by Velocd
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


All times are GMT. The time now is 05:12 PM.

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.01037 seconds
  • Memory Usage 1,748KB
  • 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
  • (1)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