Italy is falling  and I’m riding it upside down

archives \ about / contact \ code / le penne altrui


 

August 4th 2007. Stray Random Quotes

Stray Random Quotes helps you collect and display random quotes on your blog. It comes with a easy to use management tool, a option page and a "widget". The quotes can be recorded with source, author and optional google links, then added to the blog with a widget, customizing your sidebar, or spewed all onto a given page.

Download

» Stray Random Quotes 1.6.1
~ 947 new downloads since August 4th, 2007

Note: the latest version of the plugin can always also be downloaded from the Wordpress Extend.

Installation & Usage

1. Upload the content of stray-quotes.zip to your /wp-content/plugins/ directory.
2. Activate the plugin through the 'Plugins' menu in WordPress.
3. Check out the options in "Settings" > "Stray Random Quotes" in the admin menu
4. Check out the management in "Manage" > "Quotes" in the admin menu
5. If you use widgets to customize the sidebar of your blog, Stray Random Quotes does come with a widget.
Just check "Design" > "Widgets" in the admin menu.
6. If you don't use the widget function, or you want random quotes to appear elsewhere other than the sidebar, use this in your theme: <?php if (function_exists('stray_random_quote')) stray_random_quote(); ?>.
7. To add a given quote instead of a random one use the following: <?php if (function_exists('stray_a_quote')) stray_a_quote(id);?>, where id is the id number of the quote as it appears on the management page.
8. To insert a random quote inside a post or a page, just write in the editor [random-quote] (Wordpress 2.5+ only).
9. To insert a given quote inside a post or a page, just write in the editor [quote id=xx] (Wordpress 2.5+ only), where xx is the id number of the quote as it appears on the management page.
10. To insert a list of all the quotes in a post or a page, just write in the editor [all-quotes]( Wordpress 2.5+ only). If you use an earlier version of Wordpress, you can still use <!--wp_quotes_page--> (Wordpress 2.3- only)..

Screenshots

screenshot_1.png
Your quotes are displayed in a management page, where from they can be edited or deleted, and where new quotes can be added.

screenshot_2.png
The option page offers many options to customize the apperance of the quotes.

screenshot_3.png
A random quote appears in the sidebar as one of the widgets.

Changelog

* 1.6.1 Fixed the fact that the plugin didn't really considered wordpress 2.3.x users. Now the compatibility is assured, although WP 2.3 cannot use the shortcodes (see 'installation'). Thanks to gnr for pointing the bug out! I also fixed a pretty significant bug in the first time run of the plugin, where it didn't insert a sample quote although a message said it did, and I fixed the html code of the management page, it was messed up.
* 1.6 Major update (hence the slight jump forward in numbering): First of all, it takes advantage of the new Wordpress 2.5 shortcuts API by adding three different shortcuts to easily insert quotes inside your posts. In addition, it gives you the option to link author and source of your quotes to Wikipedia (not only to Google anymore) in all the major languages. Talking about language, this plugin is now ready for translations so come forward if you're willing to translate it in your own language. Only english and italian are available so far. This version contains a bunch of minor fixes and code rewriting, and also a few new names for its functions (you shouldn't notice any difference, but check out the installation instructions).
* 1.53 Hopefully fixed a little mishap with the code that caused the "updated table" message to persist. Also a link that didn't work should be fixed. Thanks to c for pointing this bugs out. Also, I changed the name of the plugin to make it more to the point.
* 1.52 Finally managed to use "edit" and "delete" links instead of buttons in the list of quotes. Great personal achievement since I was never able to make this simple thing work. More minor fixes.
* 1.51 Minor fixes.
* 1.50 Stray Quotes refurbished in order to work under Wordpress 2.5. Apparently it now does.
* 1.48 Corrected a typo that caused the plugin to throw a fatal error when activated. Usual messing up, no comment. While I was there I adjusted the way the plugin updates and creates the new table. It should work more cleverly now (nothing noticeable though).
* 1.47 This is a minor update to the general layout of the option and management pages. Hoping everything is more readable and usable now. Also I corrected the function where the "add new" form would display the content of the last inserted quote. Now the form does not display anything. Let me know if you don't think this way it is better. Few minor potential bugs hopefully corrected as well. Please be aware that the plugin now comes with five files (three .php, one .css and one .htm) instead than a single .php (which was getting too big and cumbersome to edit). So after you upload the folder with the new files, remember to delete the single file leftover by the old version.
* 1.46 I am really but once again I must update this plugin. Few slipping lines and a inattentive copy and paste caused an atrocious bug in the last version. Instead of editing old quotes it added them as new ones. Should be fixed now. It won't happen again for at least... a while now -- I promise.
* 1.45 Sorry for the many updates. It's because now I have the time. Anyway this version fixes the general functionality of the plugin where it would do certain crucial things (like updating the table to a new version) only if the management page was opened. Now it does what it has to do no matter what page is opened or not opened. I can't believe it I haven't solved this before, but this is how it goes.
* 1.44 As requested, a new field has been added to management page. It is now possible to specify the source of the quote and, in the option page, the relative optional formatting elements. Few potential bugs fixed.
* 1.43 Added a new option to set the default visibility for new quotes. In the options page.
* 1.42 with this update Stray Quotes should discriminate more intelligently the elements that can be added to both the sidebar and the quotes page, so that the page isn't filled with non pertinent formatting. More details on the options page itself.
* 1.41 corrected a general malfunction in the widget title, where it didn't handle unicode characters and disappeared from the sidebar or the options unexpectedly. Now everything should work. Thanks to tiosolid who addressed the bug. This is a fix version with no new features, but updating is strongly recommended.
* 1.4 first release. Numbering follows version number of the "Random Quotes" zombierobot.com/wp-quotes plugin from which my plugin takes its first steps.


 
 


italyisfalling.com/category/wordpress-things/feed/ The plugins are apart from the rest of the website. Here's a > dedicated RSS feed < to keep you updated on them.


// recent comments:





 

65 Responses to “Stray Random Quotes” :



Audrey said

Fantastic! I’ve been looking for a quote plugin that will actually work (the only ones I’ve found are for earlier versions of WP.) I’ll give this one a try, and let you know if I have any issues. Thanks!



corpodibacco said

Thanks to you Audrey, please do let me know of any issue –or suggestion — you may have with this plugin.



Audrey said

Couple of things:

*I’m using WP 2.2.2, and it seems like the widget isn’t working for me. (Plain old not showing up.)
* Same for the added in sidebar code, which I tried placing in my footer to no avail. (for the record, this is an issue I had with the quotes plugin you’ve based this on.)
*The quotes page works a treat (it didn’t work in the old version of this plugin), but has “Random Quote” over every single quote, and quite a huge amount of padding below each quote. It looks to me as though there isn’t any CSS I can modify for the quotes page to fix this- any thoughts?

Thanks again for taking up work on this plugin, I’d sort of written it off. :)



Audrey said

Wanted to add (sorry for the double post) That the added in sidebar code is currently resting just below my sidebar code in my template, and that I turned off all plugins except this one to make sure it wasn’t a plugin conflict. No dice. Is this simply not designed for 2.2?



corpodibacco said

Audrey, sorry for the problems…!
Actually It’s strange, ’cause I am running 2.2.1 on my blog and the plugin works fine.

I have tested it also on the 2.2.2 version on a another blog I use for testing, with a standard installation and default template, and it works fine there too.

So… before you write my plugin off… are you sure you are doing everything right? What do you mean exactly by “just below the sidebar code”? Would you mind sending to me your sidebar.php file with the inserted wp_quotes_random(); function? My email is corpodibacco [at] [the famous google email service] .com. I’ll give it a look and try to work the problem out…

About the quotes page, it spews out the quotes with the custom formatting you set in the option page. I know that that’s meant for the sidebar, and obviously this can cause ugly results in the quotes page. This is a known limitation I really should take care of in the next version. Sorry about it.



TioSolid said

Hi, nice plugin but the widget support is buggy as hell man! When you change the widget title it sometimes appears, sometimes not. if you use unicode like ç or á in the title, it just disappear! While in the plugin admin page, you add a new title, click update and the title box (in the admin page) appears filled with the text you choose. When you refresh your page to see the changes, the title isnt there, and when you check back in the admin page, the title field is empty again o.0



corpodibacco said

TioSolid, thanks for pointing this atrocious bug out.
I hope I corrected the problem. Everything should be okay with this version 1.41 –now available for downloading.



TioSolid said

Thank you very much for fixing the widget bug! Downloading the new version right now. Just one more thing: Is there any way to let the “Visible: Yes” option, enabled by default?



2xKnight said

Thanks for the plugin. I’ve been looking for a good way to run random quotes in my header. This is nearly perfect for me. The only thing I’d add would be an optional field that displays after the author if it’s filled in that says where the quote is from.

Then this…

“I know you did send me back, but I’m back, back from the future.”
– Marty McFly, Back to the Future

Would be this…

“I know you did send me back, but I’m back, back from the future.”
– Marty McFly from Back to the Future



corpodibacco said

@TioSolid: let me know if everything’s okay with the bug. About the visible thing, you’ll be glad to know that a new version is out with a new option that allows you to do set the default visibility in the option page.

@2xKnight: I hear you and if I could rewrite this plugin from scratch I’d add that field and maybe others. Unfortunately when I first wrote this plugin I also wanted to maintain a compatibility with the DB table that the “Random Quotes” plugin used, which means that I cannot add a new field in the table without breaking that compatibility. I will look into ways to update automatically an old table into a new one with different fields, but since it is something I have to learn how to do I cannot assure you there will be a solution anytime soon…



TioSolid said

For updating the table, use the old’ good SQL:

ALTER TABLE wp_quotes ADD COLUMN name_of_col_here VARCHAR(30);

And thanks for the new update :D



corpodibacco said

As you might have realized, the new version 1.44 includes the update requested by 2xKnight, the source of the quote and its optional formatting elements… hope you like it…



Mr.Mark said

First of all i wanna thank you for making us able to finally post our own quotes on the website this easily.

only one thing … i updated your plugin on my website but apparently the plugin isn’t updating properly. in the new plugin it actually should be displaying “by [author]“, but my plugin still displays “– [author]“. can you help me out here to get this working?

this issue also occurs when i want to change the plugin file to get the styling better. the plugin apparently doesn’t save the changes.



corpodibacco said

@Mr. Mark, I’m sorry for the problem… but I am not able to replicate it apparently. Version 1.44 should save the changes normally, it does so for me. I’ll try to understand the problem better… in the meantime, what you can do is to deactivate and activate the plugin, and then open the management page, since it is this page that causes the update of the table to the new version.
If you already did so and it made no difference… ugh. I’m working on it.



Audrey said

Hey, sorry to leave you hanging!

I’d like to install the newest version of this before I panic, but I’m getting a “exceeded PHP limit” warning from your web host when I try.

Thanks for picking up work on this again, and your concern- I’ll email my sidebar code to you soon.



Audrey said

Okay, I’m back, having managed to get a download of the most recent plugin installed and up. :)

Unfortunately, the Widget still isn’t working for me. I get the title, but no text underneath- check it on the sidebar, under “words” :

http://www.audreysargent.com/

Do you think this could be because it’s still accessing the old database created by the original version of this plugin, from before your work on it?

For the record, I’m more than willing to troubleshoot this if it gets it working better for the community at large. I’m not quite uber enough to write my own plugins yet, but I love to help out those who are. :)



TOm said

Hi!
Wonderful plugin! I had a minor problem which got solved in the new version, great!
Another minor one is this: after adding a few quotes of mine, I deleted the default three. Well, now my list starts at 4! Any suggestion?

Now for the big request ;-)
What may be of good use for whatever reason would be an export-the-quotes function. Like to save the list in a plain txt (or xml or html or csv) file. It’s a good thing to be able to backup the quotes anyway, and it would be great if there was an import function as well (given you can already do it by means of myphpadmin, as explained at http://lorelle.wordpress.com/)

Thank you anyway!!



Nick said

Hi, this looks exactly like what I’m looking for but when I try to activiate the plugin, I get the message that “Plugin could not be activated because it triggered a fatal error.”.

I’ve tried de-activating all other plugins but can’t seem to get it to work.

I’ve got WP set up locally but it should still work, right?

Any ideas?

Thanks



corpodibacco said

@Nick : You are right. This version of the plugin has a bug — so typical. I also am having problems to find it and kill it actually.
I didn’t realize it at first because the bug shows itself only to first time users, it must be something within the function that checks and creates the table for the quotes in the database for the first time.
This function worked fine in previous versions so I didn’t test it when I resealed this. My bad.
As I said, right now I really don’t understand what’s wrong and what I did wrong here.
Anyway I WILL solve the problem soon.

Please come back to check for updates to the plugin. Sorry for this (quite typical) messing up of mine.

To everyone else who may have this same problem: sorry guys. That’s me. I’m working on it.



corpodibacco said

OK, as you can see the problem should be solved now. Everyone who downloaded 1.47 and had problems should try 1.48. No more fatal errors there I hope.



Sulquendi said

Very nice plugin.

Only problem i encounter with it is : users need to be admins to add a quote, which is a problem since i’m not the only one to manage them and everyone is used to update them on my former blog :(



corpodibacco said

Sulquendi, what do you mean everyone used to update them? Are you talking about the old “Random Quote” plugin or of an earlier version of my plugin or of some other tool?
On the blogs I manage no one except administrator can access any of the plugins from the admin interface: it seems wordpress normal behavior. Are you using or have you considered using a plugin to manage what users can or cannot do? There’s some of them out there, like Role Manager.
If you know of plugins that can be accessed from the admin interface by different levels of users please let me know: I need to know how they do that. :)



Sulquendi said

corpodibacco, here is what i was looking for : changing “9″ into another level of rights like “5″ in the code below :

//build sumenu entries
function stray_quotes_add_pages() {
add_options_page(’Stray Quotes’, ‘Stray Quotes’, 9, basename(__FILE__), ’stray_quotes_options’);
add_management_page(’Stray Quotes’, ‘Stray Quotes’, 9, basename(__FILE__), ’stray_quotes_manage’);
}

Users that can access the Wordpress control panel but who are not admins (editors, authors…) can now access the Stray Quotes plug-in, which is what i was looking for :)



WebNobbi said

Thank you for this very good plugin! I’m testing it but there is a question:
Is it possible to sort the quotes in my overview-side by author? I’m not a great php-freak… :-(



corpodibacco said

@WebNobbi: it is possible… I’ll try to include that function in the next release.



james r said

How can I separate the quote from the author?

I have:

I do not understand your notes on using “



corpodibacco said

mmmh, the code got deleted. Sorry about it. I don’t understand what you mean by “separate”. You can invert their order if you want…



Alenônimo said

Cool! I was searching something to replace Random Quotes. Nice plugin!



james r said

At the moment my quotes appear like this:

“Reading furnishes the mind only with materials of knowledge; it is thinking that makes what we read ours.”
by (John Locke.1632 - 1704)

I do not want a line return after the quote, I want the aurthor to follow straight on like this:

“Reading furnishes the mind only with materials of knowledge; it is thinking that makes what we read ours.” by (John Locke.1632 - 1704)

How can I do that please?



corpodibacco said

go to options > stray quotes. there probably is a ‘br’(break line tag) where it says ‘quote only’ > ‘after’. delete it.



Martin said

Very nice plugin! I have a suggestion for you: How about adding an excerpt field, or enable the ability to ‘crop’ the quote after x-number of words/characters. Keep up the good work!



james r said

Thanks for the reply corpodibacco :-)

I never realised that in ‘options > stray quotes’, that there were fields to EDIT.
I’m using Safari on OS X and the fields do not show up in boxes, so I never made that jump of logic.
Maybe you could add this into your information…

” You can edit the HTML before and after your stray quotes by editing the values…..”

Cheers, James R.



WebNobbi said

Hi corpodibacco,

sorry for my silence… :-(
So I’ll wait for the next version with probable this function ;-).

Thank you very much to think about it :-) !



2xKnight said

I was posting in a forum about this plugin and thought I’d check for updates. I’m very glad I did. Thanks for taking my suggestion. I updated to 1.48 and edited my entries. I gotta say, I love this plugin.

The reason I was posting to a forum about it is this. This plugin has actually helped a little bit with my traffic. As long as the quotes entered are relevant to the site it can help with search results.



Jeffrey said

I LOVE this plugin! I also LOVE your theme. is it available for download or are you keeping it original? ;-)

if ur keepin it to yourself, care to pass on some tips in creating a similar transparent header/top menu that sticks to the top of the screen (not the top of the page)?



Johannes said

Hi!

Thanks for making this plugin! I like it a lot and am just building it into my theme. Just a quick suggestion: I’d really love it if there were two more fields for each quote, a comment field and an URL field. Sometimes I just like to write something down with the quote that I wouldn’t want to display, like the page number for quotes from books. That’s were a comment field would come in handy. ;-) The URL field could be used to link to more information, e.g. to Wikipedia for quotes by people or to my own review of a book… I could probably modify the plugin myself, but I don’t really like to do that if I don’t have to (too much trouble when the plugin gets an update). So is there any chance that you would incorporate this in a future version?! 0:-)

Greetings,
Johannes



Hamish said

Hey, dude…

Thanks for the plugin. However, I need a modification. Instead of the google search link, I want to give a custom link for every quote.

Can I do this?

I tried adding the and tags in the ‘Source’ box to get the links in place, but it doesn’t seem to be working.

Can you help me out on this?

Thanks



Graham Smith said

Hi there
Before posting I have read through the other comments hoping to find someone with a similar problem.
I can install it fine, the options come up in the management area etc.

The built in quote even displays on the home page, http://www.imjustcreative.com

But… It does not allow me to save any new quotes the info, it comes up with a ‘Cannot load stray_quotes.php.’ when I go to save.

Also I am unable to save any changes from the Options menu.

I have read your Read Me. And I certainly have installed it correctly.

My WP is 2.3.1 and is a few days old installation only. So I only have a few plugins, Feedsmith and Askimet.

It looks like a relatively small problem, but Im just not that familiar with PHP etc.

Any advice would be greatly appreciate.

Thanks in advance
Graham



corpodibacco said

@Hamish, @Graham Smith, @Johannes and all the others who have desiderata or encounter bugs using this plugin: It sucks but I don’t have the time right now to work on it. I am very sorry about it but this is how it is. As soon as I will find the time to do it, I will start listening to inputs and work to make the plugin better. Thanks for understanding.



Paul said

Dumb questions probably, but how can I change the way the quotes look? Where do I edit the CSS? Thanks for the help. Love the plugin!



CircleReader said

First, corpodibacco, thanks for a wonderful plugin–it’s a simple, effective tool. Like the WordPress people say, “Code is poetry.”

The plugin is displaying some poetic quotes (and others) on my blog, but when I try to activate it (the most recent version) on my test install of the new WordPress 2.5, it gives me a message that it cannot be activated because it triggers a fatal error.

I understand that other duties demand your attention (and I hope things are going well!); but when you do find a moment to have a look at it’s compatibility with WP2.5, I am sure there are many users like myself who would be glad to keep using your software!



Ditto said

I am also getting the ‘fatal error’ notice with 2.5. Thanks!



Couchmouse said

I just upgraded WP to 2.5 and switched from Random Quotes 1.3 to Stray Quotes 1.5 and it is working without any problems. I am not running it as a widget but using the code in the header.php



Couchmouse said

FYI: Your straystyle.css, line 32 is calling for anchor_symbol.gif in the path wp-includes/js/tinymce/themes/advanced/images/anchor_symbol.gif

This gif is no longer included in WP 2.5 and the path has changed to wp-includes/js/tinymce/themes/advanced/img/

If you want to use this gif you will have to provide it with your package and change the path.



corpodibacco said

wow, couchmouse, you’re right, thanks. I’ll fix it.



c said

Oh, wow, how nice that you’ve picked up development on the Random Quotes plugin. I was dreading re-entering all of my quotes! Though along those lines, I imagine threre are a number of people who’d like some kind of bulk-import function if a convenient standard format could be arrived at.

I guess the one thing that’s missing for me is bulk editing. Since I’ve just upgraded from Random Quotes (without source fields) it’s obvious to me that what the plugin needs is the ability to select several quotes and assign them all the same source or author, instead of manually going into each individual quote and editing it. Tedium! It’s a one-time task, but boy, when you’ve got a few hundred quotes it gets tiresome.

Thanks for your work on the plugin!



corpodibacco said

@c, the bulk editing sure would be a great thing. I don’t know if I’ll have the time to work on it. but i’ll think about it. Thanks to you for using the plugin.



Christopher Sisk said

Wonderful plugin. Thanks so much.

Feature request:

Is it possible to move the add new quote form to the Write menu instead of the Manage menu and when adding a new quote, giving an option to also publish the quote as a post in a set category? So when you add a new quote it goes into rotation and gets published to the blog as a new post at the same time.



CircleReader said

Thanks so much for picking this up again!



AJ said

I’ll preface this by saying that I’m a novice when it comes to code, so this question probably has an obvious answer. Question: How can I make the quote, author, and source appear on one line without a return? I wanted to stick the random quotes on a single line in my header, but I can’t figure out how to get rid of that automatic return before the author.

Thanks, this plugin looks awesome!



corpodibacco said

AJ, have you tried settings>stray quotes?
In the field where it says “Author only” > “Before author”, try deleting the “br” tag. That should work…



corpodibacco said

@Christopher Sisk: everything is possible… but it sounds complicated! I’ll think about it if I find the time :)



Cynthia Armistead said


c said

Hi! Just upgraded to 1.5.2 and I found a little bug. The message on the Manage > Stray Quotes page about having renamed my table persists… I assumed it would go away after a while, but I’ve been using Stray Quotes for almost 2 weeks now. It’s cool if you intend to leave it — though a bit odd to always say “I’ve just renamed your table” — but the link to the Options page is broken.

My blog installation isn’t at root, but in a wordpress/ directory. The Options link points to http://www.example.com/wp-admin/options-general.php?page=stray_quotes.php when, in my case, it should be pointing to http://www.example.com/wordpress/wp-admin/options-general.php?page=stray_quotes.php. I’m not a plugin author, but I assume there’s a variable somewhere you should be accessing to give you the proper path.



corpodibacco said

Hey c, you are right, as always cleaning the code I created new problems. Anyway, it should be fixed now. Try 1.53 when you can and let me know…. Thanks.



gnr said

Is 1.6 no longer Wordpress 2.3.x compatible? (shortcode api is Wordpress 2.5 feature)



corpodibacco said

@gnr, you’re right, it isn’t. I fixed it now. Please try 1.6.1, it works with both WP 2.3 and 25, although 2.3 users cannot use the new shortcodes. Thanks for letting me know of this, I kind of forgot 2.3 users…!



gnr said

Yes, It works again, thanks!



gnr said

There is something wrong with wp-admin->options section. For example I can’t access pagebar2’s options page when stray quotes is activated, when I turn it off pagebar2’s options page works again. (WP 2.3.3)



Alenônimo said

This plugin isn’t quite UTF-8 compatible. It messes up all accented characters at the Options page, where you can customize the tags.



Jorg said

Is there an option to have the plugin display a given quote for 24hrs, then rotate to the next quote ID, i.e. of you want to have one quote per day, and not a new, random quote each time a user visits your website?



husows said

Support for UTF8??



bassbadz said

your plugin is great very very great, i love this plugin thank you for makeing a good plugin ^_^



Simon said

Hi,

I think similar to a user below, I’d like to know how to change the ‘random quote’ title above each quote. Or to set a general format for the text to appear in, e.g. a font. Is this possible?



Simon said

Scuse my ignorance, I’ve sorted it. A brilliant widget :)

Leave a Reply :

Links to this post :

Nico Nemil | Web Developer | Web Designer | Graphics Artist » WordPress Plugin Releases for 8/5 // blog.rightreading.com » Stray Quotes // WP Plugins DB » Plugin Details » Stray Quotes // Iconique.net : Au sujet des plugins Wordpress utilisés… // Enfranchised Mind » New Theme Coming Up // Header quotes. » FanaticSpace.com - Blog // George Carlin Quotes added to the Random Quotes Widget | ★ Visitronix ★ // Der wilde Garten | links for 2007-08-06 // Wordpress plugin to display random quotes | Flickr toolbox // Matthew’s Weblog » Blog Archive » More migrating fun // schapendonk.org » Cleaning up, new design // WordPress 2.3 compatiblity Plugins | Dreamer's Blog // Au sujet des plugins WordPress utilisés | iconique.net // Blog | Isso é só um blog » 7 Plugins para Wordpress // The Best Blogging Software (WordPress) + The Top 60 WordPress Plugins | Midas Oracle .ORG // WP Plugin Archive » Stray Random Quote

Italy is falling is an italian blog in english language // not entirely irresponsible // it was born on the first of july 2005 // it is based on wordpress 2.5.1 // it is ad-free // it resisted 36,417 spamming attempts // template, graphics and content are © italyisfalling.com 2008 according to this creative commons license // all is made with ~love