MyBB Community Forums

Full Version: Color of inserted links
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Just changed the template and now the color of inserted links is the same as the normal text. I tried to change the color in template settings, but it changes all links' color, also threads and headers. Is there any place for changing only the color of the links the users insert to the posts?
There is no way of doing that so far
I found this thread searching for the same answer, but I do have something that helps a little... I just want to make the links that users post bold, but it should be the same for you.

I added a "bad word" filter (2 actually) and set it up so that
[url
is changed to
[b][url

I then added one so that
url]
is changed to
url][/b]

I would imagine you could just use the color tag where I have used bold. This would also only work if they used the tags, but I thought I would mention it anyway. There may (and probably is) a better/simpler solution, but until I find it, this is what I am going to use.
hello there,

Create a new CSS class using the Theme manager.

Then in ./inc/class_parser.php find

$link = "<a href=\"$fullurl\" target=\"_blank\">$name</a>";
replace it with
$link = "<a href=\"$fullurl\" target=\"_blank\" class=\"newclass\">$name</a>";

change newclass to the name of the class you have just created.

or simply just replace that line with
$link = "<a href=\"$fullurl\" style=\"color:#FF0000\" target=\"_blank\">$name</a>";

Here there is now need to create a new class.. just change the color hex code
Regards
see I told you there would be a better way Smile

thanks zaher!