Stray Quotes Z

This is an adjusted version of Stray Random Quotes plugin (version 1.9.9) originally written by ico for displaying and rotating quotes and expressions anywhere on a WordPress blog:

Get it! Stray Quotes Z  (version 1.9.9.z3/22.05.2010, 287.89 KB)

The reason I forked it is the apparent “offlinety” of the author since July 2009: no new posts on his blog, no updates to his plugins, no replies to e-mails.

I do hope this is temporary. Meanwhile, I am using his plugin on several websites — with these improvements:

  • simple search functionality (search on quote body by a single keyword or phrase);
  • solution to the issue with escaping backslashes in WordPress 2.9;
  • exclusion of invisible quotes from stray-all shortcode’s output when using multiple categories;
  • fix of several small but annoying bugs producing “undefined constant/variable” notices in development environments.

Use the download link at the beginning of this article to get the adjusted version. It has not been uploaded to WordPress plugin repository, you will have to install it manually! Make sure to disable the original plugin first.

Please note that I am providing no guarantees, support or further by-request development of this plugin.

VKFacebookGoogle+OdnoklassnikiTwitterLiveJournalShare

13 comments to Stray Quotes Z

Nathanael replied on January 31, 2012 at 14:47

Thanks, the quotes issue was really nasty.

Nathanael replied on September 27, 2012 at 12:11

Hi, thanks!

I found and fixed a small glitch with mixed htts/https-handling. When WordPress is running on a http-URL, but a user calls it via https, the stray_ajax.js file is loaded via https and will thus be blocked in Chrome or lead to a warning-box in IE. Solution is simple:

replace the code in line 28
define("WP_STRAY_QUOTES_PATH", WP_PLUGIN_URL . "/" . STRAY_DIR);
with
if ( isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off' )
{
define("WP_STRAY_QUOTES_PATH", str_replace('http://', 'https://', WP_PLUGIN_URL) . "/" . STRAY_DIR);
}
else
{
define("WP_STRAY_QUOTES_PATH", WP_PLUGIN_URL . "/" . STRAY_DIR);
}

Greets from Germany,
Nathanael

Oldie replied on October 15, 2012 at 23:59

Nathanael, thanks,
I’ll look into it.

zonebattler replied on October 24, 2013 at 07:15

Thanks, I really appreciate your work! I use the plugin for displaying a set of image links to previous article, which requires HTML snippets with lots of quotation marks in it. I had to edit all of my new “quotes” by deleting the unwanted backslashes directly in the database with phpMyAdmin, which is a cumbersome (and dangerous) task. Thanks for settling the issue! 🙂

Greetings from Germany,
Ralph

Oldie replied on November 2, 2013 at 01:04

Ralph, thanks and welcome. I really wish I had more time to “stick into” this fork…

zonebattler replied on September 7, 2014 at 21:31

Hi again, Oldie,

I’m still using your great plugin in several blogs for displaying random image links as stated above.

Unfortunately, after updating WordPress itself to the brand new version 4.0, it is no longer possible to add new quotes! While the plugin indeed does add a new line to the data base, the content and its parameters (category and visilbility) are NOT stored and the new entry is NOT accessible and editable. The only workaround is to edit the incomplete new line in the wp_stray_quotes table manually with phpMyAdmin, which is of course very cumbersome…

I understand that you may not find the time and/or motivation to keep the plugin up to date. However, there are still some people out there who would be *very* happy if you could provide a working solution once again. 🙂

Many thanks and greetings from Germany,
Ralph

Oldie replied on September 10, 2014 at 18:05

Hi Ralph,

Thanks for your feedback. The plugin has been forked:
https://github.com/XaviIvars-Wordpress/xv-random-quotes

The developer who took over seems to be very motivated. He asked me for permission to merge all my modifications into his version, and is now discussing with WP stuff the options of putting the plugin back to WP repository.

I will forward your request to him, and let’s hope he will make more people happy. 😉

Cheers,
Oldie

Xavi Ivars replied on September 24, 2014 at 22:36

Hi Ralph,

As Oldie mentioned, I’ve started working on a fork. In fact, I had exactly the same problem you are describing (even in 3.9), and I got it fixed

https://github.com/XaviIvars-Wordpress/xv-random-quotes

It’s fully backwards compatible with StrayQuotes, you just need to deactivate the StrayQuotes and activate the new one. I’m currently working on fixing some problems the code in order to be able to publish the plugin in WordPress.org’s plugin repository.

zonebattler replied on October 3, 2014 at 22:01

Hi Oldie and Xavi,

sorry for not answering earlier, but I didn’t see your latest comments before (I wrongly thought that I would get an email notification if somebody entered a new comment on the topic).

I just dropped by and was immediately “electrified” when I saw that Xavi has written and published a new plugin fork. I tried it out immediately and yes, it works! Yeehah! Great work, I’m so happy that there is no need anymore to patch database fields manually to keep the old version running somehow…

Thank you both Oldie and Xavi, for passing on the original work of ico and keeping it all alive. I’m sure that I’m not the only one who appreciates it!

In case you are interested to see how I use the plugin, see my two blog projects

http://www.zonebattler.net

and

http://www.medienpraxis.tv

which are structurally identical: In the sidebar to the right, you can see a column of four (randomly chosen) thumbnail images which are linked to the respective articles where the images are a part of. These are my “quotes”, HTML snippets containing image links. Who said that quotes can only consist of plain text?! 😉

Thanks again and greetings from Germany,
Ralph

Xavi Ivars replied on August 24, 2015 at 13:51

Hi Oldie,

Finally I got some time to cleanup the plugin, and I managed to get it approved into the WordPress repository (I had to change how all ajax calls were done)

Just in case you’re interested, or you want to add it as a note in the description fo the post: http://wordpress.org/plugins/xv-random-quotes/

Oldie replied on August 26, 2015 at 19:58

Xavi, I’m glad you’ve finally hit the main milestone! Well done!

Anthony Blears replied on July 5, 2016 at 05:54

Great work guys, I just wish I’d read this post before rewriting all the database calls in Stray Quotes to use $wpdb->prepare instead of mysql_real_escape_string :/

Leave a comment

Allowed HTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Categories

Tags

Ads I

Think About It

“In heaven all the interesting people are missing.” — Friedrich Nietzsche

Ads II

Puns & Slips

“На любого невидимку найдется порошковый огнетушитель.” — Старый