Click to See Complete Forum and Search --> : Reversing text issue... CSS or PHP?


Mouse77e
10-27-2006, 03:01 AM
I have been using a language filter to add tooltips (informative mousovers) to my site but I had an issue with the filter finding keywords within the added mousover script… erm… a little clearer? Well if I used “Duck” as a keyword and then I put the phrase “Donald Duck” into the mouesover explanation the function died so I tried this…

I reversed all the content with


<?php
$outputtext = strrev($inputtext);
echo $outputtext
?>

So “Donald ‘Fauntleroy’ Duck He usually wears a sailor shirt and cap — but no pants (except when he goes swimming). Although usually easygoing, Donald's most famous trait is his short and often explosive temper. Donald's famous voice, and semi-intelligible is one of the most identifiable voices in the world”

Became

“dlrow eht ni seciov elbaifitnedi tsom eht fo eno si elbigilletni-imes dna ,eciov suomaf sdlanoD .repmet evisolpxe netfo dna trohs sih si tiart suomaf tsom sdlanoD ,gniogysae yllausu hguohtlA .)gnimmiws seog eh nehw tpecxe( stnap on tub — pac dna trihs rolias a sraew yllausu eH kcuD yoreltnuaF dlanoD”

then I used a little CSS to put it right again…



.backwards {unicode-bidi:bidi-override; direction: rtl;}


Well I thought so… but have a look for yourself what happens… http://mouse.nodstrum.com/backwards.php

Any ideas??? Please

Mouse

Mouse77e
10-27-2006, 03:11 AM
thinking about it, now that i am at work and away from my PHP machine would
<?php echo strrev ("txet yM"); ?> work in the JavaScript/CSS tag???

Mouse