Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 07-11-2002, 10:47 PM
Velocd's Avatar
Velocd Velocd is offline
 
Join Date: Mar 2002
Location: CA University
Posts: 1,696
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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.
Reply With Quote
  #2  
Old 07-12-2002, 05:29 AM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

In functions.php check after

PHP Code:
// ###################### Start bbcodeparse ####################### 
You'll see the tag and replacement..
Reply With Quote
  #3  
Old 07-12-2002, 03:40 PM
Velocd's Avatar
Velocd Velocd is offline
 
Join Date: Mar 2002
Location: CA University
Posts: 1,696
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 :" 
Reply With Quote
  #4  
Old 07-12-2002, 06:12 PM
TheDutch's Avatar
TheDutch TheDutch is offline
 
Join Date: Mar 2002
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi Velocd,

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

And you'll find where to change the things

Yours,
Erwin
Reply With Quote
  #5  
Old 07-12-2002, 09:11 PM
Velocd's Avatar
Velocd Velocd is offline
 
Join Date: Mar 2002
Location: CA University
Posts: 1,696
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks so much I found the code and it's all good now!
Reply With Quote
  #6  
Old 07-17-2002, 12:06 AM
Velocd's Avatar
Velocd Velocd is offline
 
Join Date: Mar 2002
Location: CA University
Posts: 1,696
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #7  
Old 08-04-2002, 06:37 AM
TheDutch's Avatar
TheDutch TheDutch is offline
 
Join Date: Mar 2002
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #8  
Old 02-23-2003, 01:00 AM
Michael2's Avatar
Michael2 Michael2 is offline
 
Join Date: Nov 2001
Posts: 188
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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>";
Reply With Quote
  #9  
Old 02-23-2003, 01:24 AM
Michael2's Avatar
Michael2 Michael2 is offline
 
Join Date: Nov 2001
Posts: 188
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #10  
Old 11-29-2005, 03:08 PM
hollyboy's Avatar
hollyboy hollyboy is offline
 
Join Date: Mar 2004
Posts: 318
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:53 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.10822 seconds
  • Memory Usage 2,262KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete