Welcome, Guest. Please login or register.
Did you miss your activation email?
May 25, 2012, 03:13:35 AM

Login with username, password and session length
Search:     Advanced search
Interested in joining the WebsiteBaker team?
For more Information read here or on our new website.
155476 Posts in 21708 Topics by 7734 Members
Latest Member: rofroodoOvego
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: PHP + CSS Dynamic Text Replacement  (Read 1022 times)
thorn

Offline Offline

Posts: 980


WWW
« on: January 09, 2009, 12:25:48 AM »

Hello,

there is a new frontend-filter available, using this
http://code.google.com/p/pcdtr/
for dynamic text replacements (will replace text with a PNG-Image).
No need for Javascript, its all done through CSS.



http://www.websitebaker2.org/forum/index.php/topic,12243.msg75118.html#msg75118

Requires:
PHP5.2
frontendfilter-module (Some english translations are still missing)

To define what to replace by an image, just open the CSS-Editor (the "ab"-Icon on the Admin-Tool's overview), and enter some CSS-rules.

You have to copy the fonts to use to modules/opf_pcdtr/pcdtr/.
Use the file-name (without .tff) as name for font-family:, instead of the real font's name, i.e. if the file-name is "times.ttf" use font-family: "times"; and not font-family: "Times New Roman";

thorn.
« Last Edit: January 09, 2009, 12:27:56 AM by thorn » Logged

snark
Guest
« Reply #1 on: September 23, 2009, 03:52:45 PM »

when using this feature a link always gets a line underneath.. is this easy to solve
Logged
Stefek
WebsiteBaker Org e.V.

Offline Offline

Posts: 4884



« Reply #2 on: September 23, 2009, 04:25:43 PM »

is this easy to solve
Well, yes.

Just replace in your CSSdeclaration:
   text-decoration: underline;
with:
   text-decoration: none;

Kind regards,
Stefek
Logged

"In a time of universal deceit, telling the truth becomes a revolutionary act."
- George Orwell, Nineteen eighty-four (1984)
Stefek
WebsiteBaker Org e.V.

Offline Offline

Posts: 4884



« Reply #3 on: September 23, 2009, 04:31:54 PM »

is this easy to solve
Well, yes.

Just replace in your CSSdeclaration:
   text-decoration: underline;
with:
   text-decoration: none;

Kind regards,
Stefek
Hm.. I checked this.. but it doesn't seem to work with Links.

How do you implement the psdtr Script?
Do you use the frontent output filter admin?
Which Version (WB)?

Kind regards,
Stefek
Logged

"In a time of universal deceit, telling the truth becomes a revolutionary act."
- George Orwell, Nineteen eighty-four (1984)
snark
Guest
« Reply #4 on: September 23, 2009, 06:23:42 PM »

offcourse I know about css, thanks anyway

it works with links but the cache keeps bringin up the old cached image... I now have a menu with half underlined and half non underlined

!@#$

I guess if you delete the cached it will be oke.. will try that tommorrow

Logged
Stefek
WebsiteBaker Org e.V.

Offline Offline

Posts: 4884



« Reply #5 on: September 23, 2009, 06:34:19 PM »

Yes, thats right.. the cache...

My CSS looks like that now:

h2{
    font-family: Brody;
    font-size:18pt;
    color:#2F751F;
    background-color:#fff;
}
h2 a{
    font-family: Brody;
        font-size:18pt;
    color:#2977C7;
    text-decoration:none;
}
h2 a:hover{
    color:#eeb43f;
        font-size:18pt;
    text-decoration:none;
}
 and the headline2 Links work without underline.

Good advice to force your browser to refresh all images:
-> Just change the font-size.

Regards,
Stefek
Logged

"In a time of universal deceit, telling the truth becomes a revolutionary act."
- George Orwell, Nineteen eighty-four (1984)
snark
Guest
« Reply #6 on: September 23, 2009, 06:54:39 PM »

that's a mighty trick!


do you happen to know a way to have the thing work on a menu-current tag?

it just won't work for me
« Last Edit: September 23, 2009, 07:45:19 PM by snark » Logged
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!