Darstellung von externen Links ändern (CSS)

hotch
Moin zusammen,

ich möchte mit folgendem CSS3-Code meinen externen Links im Forum ein kleines Image ([IMG]http://www.bmw-treff-ally.de/images/styles/avarice/extern.gif[/IMG]) voranstellen:

code:
1:
2:
3:
4:
5:
6:
7:
.tablea a[href^="http"]:before {
content:url(images/styles/avarice/extern.gif);margin-right:5px; 
}

.tableb a[href^="http"]:before {
content:url(images/styles/avarice/extern.gif);margin-right:5px; 
}


Klappt auch soweit ganz gut, nur daß sich in Tabelle A und Tabelle B eben auch die Profilgrafiken befinden (www, ICQ usw). Diesen wird, da externe Links, auch die Grafik vorangestellt.

Wie kann ich dies umgehen? Ich habe bereits gehört, daß man evtl. für die Profilgrafiken eine weitere Klasse erstellen kann, die dann mit den Standardeinstellungen versehen wird. Wie ist das realisierbar?

Gibt es noch weitere Alternativen?

Gruß
hotch
mkkcs
mach es doch so,

Template css bearbeiten

tablea und tableb (alle xxx_fc, und link Zuweisungen auch !)heraussuchen und kopieren

wieder einfügen und table_a und table_b nennen, dann in die Templates gehen, und da wo die Profil-Links sind oder halt da wo Du die Grafik nicht haben möchtest, einfach tablea in table_a und tableb in table_b umbenennen !

so hast Du ganz normale Farbzuweisungen über tablea/tableb drinn, aber halt nicht die Zuweisung der Link-Grafik !
hotch
Danke für den Tipp. Hätte aber gleich noch eine Frage dazu.

So habe ich z. B. folgenden Code:

code:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
.inposttable {
 <if($style['inposttablebgcolor']!="")><then>background-color: {$style['inposttablebgcolor']};</then></if>
 {$style['inposttablemore']}
}

.tableb {
 <if($style['tablebfontcolor']!="")><then>color: {$style['tablebfontcolor']};</then></if>
 <if($style['tablebbgcolor']!="")><then>background-color: {$style['tablebbgcolor']};</then></if>
 {$style['tablebmore']}
}


Muß bei .inposttable noch ein if eingefügt werden für table_b?

Was wird bei .tableb geändert? Nur der Klassenname selber oder auch z. B. 'tablebfontcolor' zu 'table_bfontcolor'?
mkkcs
inposttable brauchst Du nicht ändern!

nur bei der .tableb Zuweisung, muß Du jetzt eine .table_b kopieren !

es sagt ja nur aus wenn 'tablebfontcolor' nicht leer ist, setze Schrift-Farbe
und das gleich beim Hintergrund !
hotch
Nochmal für planlose wie mich... Ich würde demzufolge in das Template css folgendes einfügen:

code:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
.table_b {
 <if($style['tablebfontcolor']!="")><then>color: {$style['tablebfontcolor']};</then></if>
 <if($style['tablebbgcolor']!="")><then>background-color: {$style['tablebbgcolor']};</then></if>
 {$style['tablebmore']}
}

<if($style['tablebfontcolor']!="")><then>
.tableb_fc {
 color: {$style['tablebfontcolor']};
}
</then></if>

.table_b a:link, .tableb a:visited, .tableb a:active { 
 <if($style['tableblinkcolor']!="")><then>color: {$style['tableblinkcolor']};</then></if>
 <if($style['tableblinkdeco']!="")><then>text-decoration: {$style['tableblinkdeco']};</then></if>
 {$style['tableblinkmore']}
}
.table_b a:hover { 
 <if($style['tableblinkhovercolor']!="")><then>color: {$style['tableblinkhovercolor']};</then></if>
 <if($style['tableblinkhoverdeco']!="")><then>text-decoration: {$style['tableblinkhoverdeco']};</then></if>
 {$style['tableblinkhovermore']}
}

.table_a {
 <if($style['tableafontcolor']!="")><then>color: {$style['tableafontcolor']};</then></if>
 <if($style['tableabgcolor']!="")><then>background-color: {$style['tableabgcolor']};</then></if>
 {$style['tableamore']}
}

<if($style['tableafontcolor']!="")><then>
.tablea_fc {
 color: {$style['tableafontcolor']};
}
</then></if>

.table_a a:link, .tablea a:visited, .tablea a:active {
 <if($style['tablealinkcolor']!="")><then>color: {$style['tablealinkcolor']};</then></if>
 <if($style['tablealinkdeco']!="")><then>text-decoration: {$style['tablealinkdeco']};</then></if>
 {$style['tablealinkmore']}
}
.table_a a:hover { 
 <if($style['tablealinkhovercolor']!="")><then>color: {$style['tablealinkhovercolor']};</then></if>
 <if($style['tablealinkhoverdeco']!="")><then>text-decoration: {$style['tablealinkhoverdeco']};</then></if>
 {$style['tablealinkhovermore']}
}
mkkcs
wenn Du jetzt noch aus den tableb_fc ein table_b_fc machst, dann sollte das funzen.

und dann in den Templates, wo Du die Buttons hast, mußte dann nurnoch anstatt tablea > table_a usw setzen
und wenn Du ein <tr class="xx_fc" hast und darunter den TD-Tag mit den Buttons da natürlich auch !
hotch
Gut... dann muß ich mir das Template thread nochmal ansehen und das entsprechend modifizieren, wie von Dir beschrieben.

Werde das mal testen. Auf jeden Fall schonmal herzlichen Dank für die Hilfe.
mkkcs
da sind dann aber noch die Templates:

- thread_postbit
- memberlist_xxxxx
- profile
- board
- board_cat
usw. das ist ne ganze Menge !
hotch
Oh man... das ist ja doch ne ganze Menge.

Einen anderen Lösungsansatz gibt es wahrscheinlich nicht, oder?
mkkcs
oder willst Du nur externe Links die als Forum drinn stehen mit der Grafik versehen ?`
und ggf. Links in Postings ?

dann würd ich einfach bei gehen, und dann eine neue Class definieren

.externer Link
und darin Deine Grafik reinsetzen, und diese dann in das index_boardbit in die Anzeige des "Externen" Link rein setzen, und dann nochmal schauen, wie der bbcode URL umgesetzt ist, und dort dann hart vercodet die Grafik mit reinsetzen !
hotch
Korrekt. Ich möchte externe Links mit der Grafik versehen.

Habe jetzt im Designpack bei weitere css folgende Klasse definiert:

code:
1:
2:
.link_extern a[href^="http"]:before {
content:url(images/styles/avarice/extern.gif);margin-right:5px; }



Diese Klasse muß ja nun an entsprechender Stelle eingebunden werden. Bei mir wäre das bei den Postings bzw. in den Threads.

Betrifft dies wirklich die index_boardbit?