Graphischen Text über CSS

Hier bekommst Du deutschsprachigen Support bezüglich offizieller Module für phpwcms. Keine Fehlermeldungen oder Erweiterungswünsche bitte!
Post Reply
NadineL
Posts: 1
Joined: Tue 26. Oct 2010, 20:16

Graphischen Text über CSS

Post by NadineL »

Hallo,

ich würde gerne eine Class in meiner .CSS definieren, die mir dann alle mit dieser Class versehenen Inhalte auf meiner Webseite als graphischen Text ausspuckt. Das GT Modul an sich funktioniert einwandfrei, das habe ich in einem Artikel bereits getestet.

In meiner CSS habe ich folgendes eingefügt:

Code: Select all

.gt_azure:before { content:"{GT:Azure_Headline}"; }
.gt_azure:after { content:"{/GT}"; }
Das soll also den Text "{GT:Azure_Headline}" vor und "{/GT}" hinter die Inhalte der Class gt_azure setzen, damit dann im Endeffekt daraus graphischer Text wird. In der Theorie doch gar nicht mal so doof :wink:
Klappt aber nicht, denn er schreibt mir einfach nur die {GT} Tags vor und hinter meinen Text und wandelt es nicht um. Was mir dabei aufgefallen ist, ist dass die {GT} Tags, die ich mit before und after einfüge, sich nicht wie normaler Text selektieren lassen. Liegt das daran? Und kann man irgendwas an den before und after Tags in der CSS ändern, um das Problem zu umgehen?

Habe in diesem Thread gesehen, dass man zwar z.B. Artikeltitel automatisch als GT anzeigen lassen kann (und was von der Idee mit before und after ähnlich ist), aber das bringt mir ja nichts, wenn ich eine neue Class für besondere Inhalte in meiner CSS definieren will.

Gibt es über CSS vielleicht doch eine Möglichkeit, graphischen Text über eine Class zu verwenden?

Danke,
Nadine
User avatar
Oliver Georgi
Site Admin
Posts: 9892
Joined: Fri 3. Oct 2003, 22:22
Contact:

Re: Graphischen Text über CSS

Post by Oliver Georgi »

Nutze so etwas nicht mehr. Es ist besser, nur noch @font-face zu nutzen.
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
User avatar
cyppher.nl
Posts: 138
Joined: Wed 19. May 2004, 18:38
Location: Hilversum, Netherlands

Re: Graphischen Text über CSS

Post by cyppher.nl »

3 options:
- Cufon (javascript based image replacement by extracting css font rendering properties, considered best option nowadays)
- @font-face (include actual font in webpage, use only if you have the publication rights of the font)
- sIFR (Flash based font rendering, including font in SWF-file. used to be good, nowadays considered as deprecated).

The GT replacement tag is server-side replacement. CSS if front-end (client side) rendering, so the GT tag will never be replaced by server because CSS is parsed in the browser, not in the CMS. GT should be removed from phpwcms as it is deprecated.
How do you do? And how do you do your wife?
pepe
Posts: 3954
Joined: Mon 19. Jan 2004, 13:46

Re: Graphischen Text über CSS

Post by pepe »

Nothing should be removed from the phpwcms core-code, until there is no better system integrated, with which a newBee can work :!:
User avatar
cyppher.nl
Posts: 138
Joined: Wed 19. May 2004, 18:38
Location: Hilversum, Netherlands

Re: Graphischen Text über CSS

Post by cyppher.nl »

pepe wrote:Nothing should be removed from the phpwcms core-code, until there is no better system integrated, with which a newBee can work :!:
So, even while GT reptag is deprecated because there are much better options (both cms user friendly as website user friendly), it should still be a module in phpwcms?

Obviously a newbee like the topic-starter is confused about this feature in the cms. I'd recommend to strip it out, and easily implement a Cufon / @font-face module, by serving a form to upload a font and select corresponding styles. But again, that's my opinion. Keep the CMS in line with today's standards.
How do you do? And how do you do your wife?
User avatar
Oliver Georgi
Site Admin
Posts: 9892
Joined: Fri 3. Oct 2003, 22:22
Contact:

Re: Graphischen Text über CSS

Post by Oliver Georgi »

yepp, @font-face is good enough and much easier to handle, compatible with most common browsers today. The copyright problem for @font-face is nearly the same as with any other font replacing techniques. But small sites with lower page visits can use free services available also for commercial fonts or just use open source fonts.
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
Post Reply