Home of the facelift image replacement forums
You are not logged in.
It looks like recaptcha is easily thwarted either by cheap labor or some other means, because I am still getting tons of spam signups.
I'm closing registrations again, if you would like to register, please email me at cory.mawhorter@ephective.com and use the subject line "Forum Registration". Give me your name and all the standard stuff in that email.
I will just have to do manual registrations until I have more time to spend on this problem.
-Cory, 2010-03-15
For some reason, FLIR has problems on my blog rendering quotation marks. I'm not sure exactly why. I've checked to see if it is the font I am using - SV Basic Mono - but quotes show up fine.
Here is an example post: http://www.pinkonbrown.org/2008/12/29/s … -tarvuism/
And screenshot:
As you can see, it fails miserably. It didn't seem to be doing this on my personal test server, but does on the main server. I haven't changed anything and I don't really have any special settings. Any ideas?
Offline
This is a problem with the way FLIR handles the quote entities generated by wordpress. Instead of using the quotation mark on the keyboard, wordpress converts them to opening and closing quotation marks... so instead of
Say "Hebbo" to Tarvuism!
You get:
Say [&]#8220;Hebbo[&]#8221; to Tarvuism!
Which converts to...
Say “Hebbo” to Tarvuism!
This causes problems with FLIR which uses PHP to decipher character entities. A work around would be to stop WP from making this change or alternatively you could edit the generate.php file to replace these entities on the backend. I could give you instructions if you'd like.
Offline
I will be changing all the quotes to single quotes (which I hope will work) and notify my authors until future notice.
You note that you have an edit that can fix this issue - I would be very happy if you could share. Thank you so much for your help.
Offline
In generate.php you can add a line before the line:
Around line 128:
$FLIR['text'] = $FLIR['original_text'] = strip_tags(html_entity_decode_utf8($FLIR['text']));
Add:
// add more entities to the array as needed, this will replace actualy quotes with the quote character "
// the brackets are added to [&]#8220; to prevent the forum from displaying the entity
$FLIR['text'] = str_replace(array('[&]#8220;', '[&]#8221;'), array('"', '"'), $FLIR['text']);
$FLIR['text'] = $FLIR['original_text'] = strip_tags(html_entity_decode_utf8($FLIR['text']));Offline
I am having the same problems with my Wordpress blog. I edited the Generate file as you indicated above, but I'm still having the same errors. Here is an example:
http://www.addictivethoughts.com/2008/1 … tler-2008/
I'm not the most knowledgeable when it comes to PHP, though. I just copied and pasted the script you posted into the Generate file where you had indicated. Do I need to make any actual alterations to the script you provided?
Offline
One more problem I noticed: the FLIR plugin automatically converts "quoted"/indented text to images, too. Usually just a big mess of distorted text in varying size. Here's an example: http://www.addictivethoughts.com/2008/1 … -the-past/ (there's quoted text above halfway down the page)
Any advice on how to stop that from happening? I like your plugin a lot and appreciate the work you've done, but I think if I can't figure this out I'll probably uninstall it until the next update or whatever (no offense), because I guess I just don't know enough on my own in terms of PHP to fix this.
Offline
Looks like you've already disabled the plugin but I can still understand your problems.
I am having the same problems with my Wordpress blog. I edited the Generate file as you indicated above, but I'm still having the same errors. Here is an example:
If you copied the text exactly as I had it above it won't work. You need to remove the brackets around the entities... array('[&]#8220;', '[&]#8221;')
One more problem I noticed: the FLIR plugin automatically converts "quoted"/indented text to images, too. Usually just a big mess of distorted text in varying size. Here's an example: http://www.addictivethoughts.com/2008/1 … -the-past/ (there's quoted text above halfway down the page)
FLIR will only replace the elements it is told to replace. I'd recommend double checking what you've set FLIR to replace. Sometimes a duplicate ID or classname could cause problems.
Offline
I had the same issue with quotes. I do not understand PHP very well, so I had some problems making this fix also.
I didn't understand what you me you meant here:
You need to remove the brackets around the entities... array('[&]#8220;', '[&]#8221;')For me this is a bracket "[" and I did not know which bracket you meant.
What I did do was take out the parenthesis "( )" and it worked. This is the line now:
$FLIR['text'] = str_replace array('[&]#8220;', '[&]#8221;', array('"', '"'), $FLIR['text']);
(The changes on generate.php are now near line 255)
the original was:
$FLIR['text'] = str_replace(array('[&]#8220;', '[&]#8221;'), array('"', '"'), $FLIR['text']);see: http://kennethbsmith.com/blogwp/2008/09 … e-job-bub/
Post tile is "Nice Job Bub"
WAIT!, I see that it is not working now in Safari.
I commented out the above fix for now - Feb 22, 2009
Any suggestions?
Last edited by akamaxbuz (2009-02-22 16:51:35)
Offline
Hey Cory,
Love the script!
Any updates since the last post? A quick fix for those using Wordpress is to put this line in your functions.php file.
<?php remove_filter('the_title', 'wptexturize'); ?>It'll disable wordpress from converting the curly quotes.
I'd prefer the curly quotes, as it's proper typographic practice. Is there any way to access them? Or, is FLIR incapable of producing those characters?
Last edited by george (2009-06-12 16:21:24)
Offline
[...] as it's proper typographic practice.
Don't get me started on this ;p
The problem is that PHP's html_entity_decode doesn't really understand most numeric entities. So you will have to intercept them, and replace them with their actual character equivilent, or straight quotes--and the typeface has to support them, of course (which most don't).
Follow the instructions above and this line will convert to straight quotes:
$FLIR['text'] = str_replace(array('[&]#8220;', '[&]#8221;'), array('"', '"'), $FLIR['text']);
Remove the brackets [ and ] from around the & (ampersand) signs and that should work. The reason the brackets are there is because if they're not, the forum software will convert the text to the entity.
If you want to convert to curly quotes:
$FLIR['text'] = str_replace(array('[&]#8220;', '[&]#8221;'), array('“', '”'), $FLIR['text']);
Offline
FLIR v2.0b1+ adds a plugin that is capable of doing this automatically. I do not maintain the Wordpress plugin, however, and it takes Dan a little bit of time to implement new versions.
You could also try using FancyFonts instead, but that requires ImageMagick.
Offline