MyBB Community Forums

Full Version: Gif a specific link a diffrent color
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
Hello,

I have a question wich I don't get to work.... I have in the header of my forum a welcome_block and there u see "Hello *username* welcome back!"

The username is a link and links to the profile page of the user, but this link is a color you don't see good in the header so I want to change that link...

If I need to change the color of that link, I need to change the link color on the global.css but then every link changes to that color and this I don't want, I only want to change the link color in the header/welcome_block..

I tryed to edit the language and put there a color but this don't works and the color is still the same as before. Also I tryed to edit the template of the header and put there the color code but also nothing changed.

So now the question is there someone that knows a code that I can put in the global.css that ONLY changes the link color from the welcome_block..

Here a screen from the link In need a diffrent color.
[attachment=28563]


Thanks helping me with this!!
You could always stylize the usernames in the welcome block.

http://community.mybb.com/thread-134292-...71614.html

And just change the color of their usernames.
Sorry but that is not where i'm looking for, do u read the hole message??

I want only have changed the color of that link not change a hole welcome_block or all usernames...

So annyone else with a sollution.......
In global.css, you'll need to create a new class and change the link colors in there.

Find the link coding in global.css, duplicate it but change the class name to something unique(not being used) and in the template, change the class="OLD" to class="NEW". Should do the job.
There is no class used only

{$lang->welcome_back} $lastvisit

So there is no new class te be created.... There is a diffrent and easyer way only I don't know at annymore Sad
Post your welcomeblock template here that you took that piece of code from
No problem, here u go Big GrinBig Grin

<div class="mainwrap">
<div class="top_bar">
	<ul>
		<li><a href="{$mybb->settings['bburl']}/member.php?action=logout&amp;logoutkey={$mybb->user['logoutkey']}" class="top_bar_lout"><span>{$lang->welcome_logout}</span></a></li>
		{$admincplink}
		{$modcplink}
		<li><a href="{$mybb->settings['bburl']}/usercp.php" class="top_bar_ucp"><span>{$lang->welcome_usercp}</span></a></li>
	</ul>
</div>
<div class="header_main"><div class="header_left"><div class="header_right">
			<div class="logo"><a href="{$mybb->settings['bburl']}/index.php"><img src="{$theme['logo']}" alt="{$mybb->settings['bbname']}" title="{$mybb->settings['bbname']}" /></a></div>
			<div class="header_side"><div id="panel">
<div style="background: transparent url({$mybb->user['avatar']}) 0 0 no-repeat;width:68px;height:68px;float:left"></div>
				<div class="panel_wrap">
					{$lang->welcome_back}<strong><br />
                                        welkom terug!</strong> Je laatste bezoek was: $lastvisit
			</div>
			</div></div>
			<div class="clear"></div>
		</div></div></div>
		<div id="navbar">
			<ul id="nav">
				<li><a href="http://www.galaxyfreaks.nl" title="Ga naar de startpagina"><img src="http://www.galaxyfreaks.nl/images/toplinks/home.png"  alt="home" />&nbsp;Home</a></li>
                                <li><a href="http://www.galaxyfreaks.nl/index.php" title="Ga naar het forum"><img src="http://www.galaxyfreaks.nl/images/toplinks/forum.png" alt="forum" />&nbsp;Forum</a></li>
				<li><a href="http://www.galaxyfreaks.nl/misc.php?page=firmwares" title="Onze firmware pagina"><img src="http://www.galaxyfreaks.nl/images/toplinks/firmware.png" alt="firmware" />&nbsp;Firmwares</a></li>
				<li><a href="http://www.galaxyfreaks.nl/memberlist.php" title="Bekijk onze complete ledenlijst"><img src="{$mybb->settings['bburl']}/images/toplinks/memberlist.png" alt="leden" />&nbsp;Leden</a></li>
                                <li><a href="http://www.galaxyfreaks.nl/misc.php?page=doneren" title="Steun het forum en geef een bijdrage"><img src="http://www.galaxyfreaks.nl/images/toplinks/donate.png" alt="doneer" />&nbsp;Doneer</a></li>
				<li><a href="http://www.galaxyfreaks.nl/misc.php?action=help" title="Tips en trucs om het forum te gebruiken"><img src="{$mybb->settings['bburl']}/images/toplinks/help.png" alt="help" />&nbsp;Help</a></li>
			</ul>
			<div id="search">
			<form action="{$mybb->settings['bburl']}/search.php" method="post">
				<div class="search_input_wrap"><input name="keywords" class="nav_search_input" title="Enter your search keywords" type="text" /></div>
				<input value="" name="submit-search" class="nav_search_button" type="submit" />
				<input type="hidden" name="action" value="do_search" />
			</form>
			</div>
			<div class="clear"></div>
		</div>
	</div>
</div>
<div id="container"><div class="container_wrap">
	<div class="mainwrap">
		<div class="subnav">
			<div class="float_right"><a href="{$mybb->settings['bburl']}/search.php">Uitgebreid {$lang->toplinks_search}</a></div>
			<a href="{$mybb->settings['bburl']}/search.php?action=getnew">{$lang->welcome_newposts}</a> | <a href="{$mybb->settings['bburl']}/search.php?action=getdaily">{$lang->welcome_todaysposts}</a> | <a href="{$mybb->settings['bburl']}/search.php?action=finduser&amp;uid={$mybb->user['uid']}">Eigen berichten</a> | <a href="{$mybb->settings['bburl']}/private.php">{$lang->welcome_pms}</a> {$lang->welcome_pms_usage}
		</div>

Thats the welcome_block for members Big Grin

greatings
Find
<span>{$lang->welcome_usercp}</span>
Change to
<span class="welcomeuser">{$lang->welcome_usercp}</span>

Add to global.css

.welcomeuser a {
color: HEX CODE HERE;
}
hmmm do this but still the link is the same color and not changed
link and test account please
Pages: 1 2 3