PDA

View Full Version : Links Automatically bolded with a specific color.


Loyalty4Life
02-07-2004, 07:14 AM
Please look at this link for an example:

http://www.basketballboards.net/forum/showthread.php?threadid=76656&forumid=14

Do you see how the link in the first post is in bold with a dark blue color? Can this be done with vB3? Could someone show us how to do it? I'd really love to have this on my site!

Any help is appreciated. Thanks. :)

Xenon
02-07-2004, 10:29 PM
open file functions_bbcodeparse.php

find function handle_bbcode_url

there find

if ($type == 'url')
{
// standard URL hyperlink
return "<a href=\"$rightlink\" target=\"_blank\">$text</a>";
}

and there you can change everything :)

Loyalty4Life
02-07-2004, 11:33 PM
So...

if I wanted to have the exact same thing on bbb.net, only have the color be #006600, can you show me what to edit and what to add? I'd really appreciate it! :)

sabret00the
02-08-2004, 12:04 AM
not sure if i understood you properly but going off of xenon's instructions, open up the
file functions_bbcodeparse.php with notepad or whatever and then in there do a find (control and f) function handle_bbcode_url, there you should be able to follow the below quite comfortably :)

if ($type == 'url')
{
// standard URL hyperlink
return "<a href=\"$rightlink\" target=\"_blank\">$text</a>";
}


and replace with
if ($type == 'url')
{
// standard URL hyperlink
return "<a href=\"$rightlink\" target=\"_blank\"><font color="#006600">$text</font></a>";
}


don't forget to back up your files pre-hacking

Xenon
02-08-2004, 12:31 AM
sabre, you have to escape (\) your quotes within the string ;)

Loyalty4Life
02-08-2004, 12:37 AM
After many trial and error periods, I was able to get it to work by taking out the quotation marks.

Thanks fellas for the help!

Loyalty4Life
02-08-2004, 01:16 AM
Hmmm... I have a question. It now works, but I'd like it to be slightly modified. I'd like there to be no underline when not hovered, but have an underline when hovered. Can anyone tell me how to do it?

Loyalty4Life
02-08-2004, 05:57 PM
Xenon? :(

NTLDR
02-08-2004, 06:10 PM
There is no need to bump posts untill at least 24 hours have past. Thank you.

Loyalty4Life
02-15-2004, 07:09 AM
Alright, I think I've waited more than 24 hours. ;) Any help with how to remove the underline from the links? Thanks.

squawell
02-15-2004, 08:16 AM
i like this idea,but how should make it only work for admin??thankz...

ImportPassion
02-16-2004, 02:36 AM
Hmmm... I have a question. It now works, but I'd like it to be slightly modified. I'd like there to be no underline when not hovered, but have an underline when hovered. Can anyone tell me how to do it?
change
<a href=\"$rightlink\" target=\"_blank\">

to read
<a href=\"$rightlink\" target=\"_blank\" style=\"text-decoration:none\">