Seite 1 von 1

Link Farbe ändern

Verfasst: 05.01.2008 15:38
von fromex
Hallo,

ich möchte die Linkfarbe des:"Bei Antworten zu diesem Thema benachrichtigen" Links ändern.

Habe dem {S_WATCH_TOPIC} in der viewtopic_body.tpl auch schon eine eigene Klasse zugeordnet mit:

.red { font-size : 10px; color : #323FEA; }
a.red:hover { color: #323FEA; text-decoration: underline; }
a.red:link { color: #323FEA; text-decoration: underline; }
a.red:active { color: #323FEA; text-decoration: underline; }
a.red:visited { color: #323FEA; text-decoration: underline; }

aber es verändert sich absolut nichts. Woran kann das liegen?

Verfasst: 21.01.2008 23:39
von mark2
Wie sieht denn der komplette code von der Zeile in der viewtopic_body.tpl aus?

Ist css in dem entsprechendem Style aktiviert?

Verfasst: 22.01.2008 06:43
von fromex
Danke für deine Antwort. Hier die entsprechende Passage:

Code: Alles auswählen

<table width="100%" cellspacing="2" border="0" align="center">
  <tr> 
	<td width="40%" valign="top" nowrap="nowrap" align="left"><span class="red">{S_WATCH_TOPIC}</span>
	
	<br /><br />

Verfasst: 22.01.2008 11:58
von mark2
So wird das leider nichts. Denn der Link wird in der php erstellt und in der tpl wird der Link nur als variable übergeben. Du kannst zwar die Schriftgröße mit deiner class beeinflussen aber nicht die Farbe.

Du musst die span class="red" direkt in die viewtopic.php einbauen damit das funktioniert. Und zwar an diese Stelle

Code: Alles auswählen

/ Topic watch Information
//
$s_watching_topic = '';
if ( $can_watch_topic )
{
	if ( $is_watching_topic )
	{
		$s_watching_topic = "<a href=\"viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&unwatch=topic&start=$start&sid=" . $userdata['session_id'] . '">' . $lang['Stop_watching_topic'] . '</a>';
		$s_watching_topic_img = ( isset($images['topic_un_watch']) ) ? "<a href=\"viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&unwatch=topic&start=$start&sid=" . $userdata['session_id'] . '"><img src="' . $images['topic_un_watch'] . '" alt="' . $lang['Stop_watching_topic'] . '" title="' . $lang['Stop_watching_topic'] . '" border="0"></a>' : '';
	}
	else
	{
		$s_watching_topic = "<a href=\"viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&watch=topic&start=$start&sid=" . $userdata['session_id'] . '"><span class="red">' . $lang['Start_watching_topic'] . '</span></a>';
		$s_watching_topic_img = ( isset($images['Topic_watch']) ) ? "<a href=\"viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&watch=topic&start=$start&sid=" . $userdata['session_id'] . '"><img src="' . $images['Topic_watch'] . '" alt="' . $lang['Start_watching_topic'] . '" title="' . $lang['Start_watching_topic'] . '" border="0"></a>' : '';
	}
}
In einer Zeile habe ich den code bereits eingebaut. Leider verändert sich die Farbe der Link underline nicht. Damit die underline auch noch farbig wird mußt du in der css deinen code noch so ändern

Code: Alles auswählen

.red { font-size : 10px; color : #323FEA; text-decoration: underline; } 
a.red:hover { color: #323FEA; text-decoration: underline; } 
a.red:link { color: #323FEA; text-decoration: underline; } 
a.red:active { color: #323FEA; text-decoration: underline; } 
a.red:visited { color: #323FEA; text-decoration: underline; } 

Verfasst: 22.01.2008 16:44
von fromex
whow, vielen dank. super hilfe. hat alles geklappt! :grin: