vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=246)
-   -   Miscellaneous Hacks - Change link color only in post and/or cms articles (https://vborg.vbsupport.ru/showthread.php?t=259966)

AURFSCAN 03-06-2011 10:00 PM

Change link color only in post and/or cms articles
 
1 Attachment(s)
Was looking how to change link colors only in posts and found how todo this here on the forum posted by Lynne.

add to additional.css

Code:

/* change link color in posts and sigs*/
.postcontent a {color:#356fb7;}
.signature a {color:#275187;}

/* change link hover color*/
.postcontent a:hover {color: red;}
.signature a:hover {color: red;}



Also here is the code for cms article and article homepage preview


Code:


/* change link colors in cms articles*/
.article a {color: #336699;}
.article_preview_contents a {color: #336699;}

.article a:hover {color: #CC0000;}
.article_preview_contents a:hover {color: #CC0000;}


change colors to suit you





:)

Randomm 03-07-2011 03:11 AM

worked like a charm (ver 4.0.8 p1)
rated, installed
thanks

EDIT:
If you want to make your links BOLD add this code at the bottom

post - .postcontent a {font-weight: bold;}
sig - .signature a {font-weight: bold;}

XiTCLUB 03-07-2011 06:39 PM

thanks..

snatta 03-07-2011 07:49 PM

Thumbs up!

If I want it underlined, what is the code when?

AURFSCAN 03-07-2011 08:18 PM

Underline

Code:


text-decoration: underline;


eg.


Code:


.postcontent a {color:#356fb7; text-decoration: underline;}


:)

snatta 03-07-2011 08:42 PM

Perfect, thanks.
=========

Is it possible to take it a bit longer?

I thought if you could make some code that allows it come up a box when doing mouseover, I would for example like that it said that:

"You are about to leave ****** Forum

The page you are about to visit is not ****** Forum.
****** Forum takes no responsibility for the material you find on the linked URL."

..or something like that .. :rolleyes:

OldSchoolDSL 03-08-2011 01:14 AM

Installed and working

4.1.2 :)

Overbr 03-08-2011 10:36 AM

tks man ! great work

Asterix_ita 03-09-2011 04:34 AM

thanks

working 4.1.2

iyama 03-23-2011 08:20 AM

I just find out that vb4 has already this option and more under stylevar>link ;)

link color-Undeline-aboveline-blink et cetera

AURFSCAN 03-23-2011 07:32 PM

Quote:

Originally Posted by iyama (Post 2176474)
I just find out that vb4 has already this option and more under stylevar>link ;)

link color-Undeline-aboveline-blink et cetera


forum wide yes...just for posts no

djbaxter 03-23-2011 10:23 PM

It also doesn't allow the option for bolding the link in the standard stylevar, which helps to highlight a link in certain styles.

wombycat 10-03-2011 05:20 AM

Quote:

Originally Posted by iyama (Post 2176474)
I just find out that vb4 has already this option and more under stylevar>link ;)

link color-Undeline-aboveline-blink et cetera

yeah that works in my forums but not on my cms. This mod worked perfectly on 4.1.6

BajaBoatOwners 10-27-2011 01:59 AM

I guess I'm not as knowledgeable about Vbulletin 4.0 as I thought. Where are you guys editing this? It won't let me edit where I thought I could.

FreakyG'sMom 01-16-2012 03:43 AM

Quote:

Originally Posted by BajaBoatOwners (Post 2261892)
I guess I'm not as knowledgeable about Vbulletin 4.0 as I thought. Where are you guys editing this? It won't let me edit where I thought I could.

Admin -> Cpanel -> Style Manager -> (pick skin template) -> Choose 'Edit Templates'

Find 'CSS Templates' in the list, double click it. Nested templates will appear underneath. Double click on 'Additional.CSS'

The editor will open up. Add the styles as suggested in the previous posts, then save.

For example:

Code:

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
/* THE FOLLOWING CONTROLS HOW A URL LINK LOOKS WITHIN A THREAD POSTING.                */
/* THE FIRST CONTROLS URL LINKS, THE SECOND URLS IN SIGNATURES                        */
/* THE FIRST TWO VARIABLES CONTROL HOW A LINK LOOKS BY DEFAULT. THE SECOND TWO  */
/* CONTROL HOW THOSE SAME TWO LINKS EACH LOOK WHEN HOVERED BY THE MOUSE POINTER */
/* Last Edited for Production on        01-15-12                                */
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
.postcontent a {
        color:#1E639D;
}
.signature a {
        color:#1E639D;
}
.postcontent a:hover {
color: red;
}
.signature a:hover {
color: red;
}
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/

You'll notice that I comment everything I add to the CSS. That way, I can reference my notes later, or others who edit afterwards can also follow.

Good luck :)

zeus_r6 01-18-2012 04:45 PM

Awesome! Used this mod to underline links in posts only as they aren't in my current style :)

xertox 01-19-2012 11:29 PM

Installed and rated. Nice work!

Killabee 01-22-2012 02:18 PM

thanks nice easy fix :)

Rabby 02-09-2012 09:19 AM

Thanks, installed and just working as expected :)
Rated!

CouponWCents 05-27-2012 11:43 PM

What about hyperlinks? This works great for whole links but not hyperlinks.

djbaxter 05-28-2012 12:21 AM

What's the difference between links and hyperlinks as you are sing those terms?

AshenTemper 06-13-2012 05:12 PM

So, I attempted this. I edited the additional.css for the Style I'm using as such:

Code:

.postcontent a {
        color: #FF00FF;
        text-decoration: none;
        font-weight: bold;
}

.postcontent a:link {
        color: #FF00FF;
        text-decoration: none;
        font-weight: bold;
}

.postcontent a:visited {
        color: #FF00FF;
        text-decoration: none;
        font-weight: bold;
}

.postcontent a:active {
        color: #FF00FF;
        text-decoration: none;
        font-weight: bold;
}

.postcontent a:hover {
        color: #c1272d;
        text-decoration: underline;
        font-weight: bold;
}

But it just doesn't seem to be taking. Instead, it is just using the global body link colors instead. Here is the site I'm working on:

http://stoicstudio.com/forum/showthr...ull=1#post2756

You'll note the first word (Acromage) is a link but it's not pink (just using pink so its an obvious change and then making it something better).

Any ideas what I'm doing wrong?

AshenTemper 06-13-2012 06:11 PM

I fixed my own issue. For some reason, moving that to the top of the additional.css file made it work. Probably means I failed at closing something somewhere that I'll have to look into.

But another thumbs up from me - works great on 4.1.12!

zascok 07-20-2012 12:40 PM

yep this is fun as far as you don't have an image inserted into thread. Underlined images don't look pretty at all

BigAl205 03-18-2013 07:57 AM

I wanted links in the postbit underlined so it would stand out, so I changed the link decoration in the stylevar. Unfortunately, I thought it made the forum home look too busy. I'm glad I found this.


All times are GMT. The time now is 05:20 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.01975 seconds
  • Memory Usage 1,764KB
  • 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
  • (6)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (25)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete