This plugin/widget lets you add and show random quotes to your WordPress blog with ease. The plugin uses MySQL to store quotes.
You can specify an image for each quote, default image for quotes, and the option to disable images altogether.
Installation
This section describes how to install the plugin and get it working.
1. Upload directory «xmasb_quotes» to the `/wp-content/plugins/` directory
2. Activate the plugin through the ‘Plugins’ menu in WordPress
3. Add the widget to your sidebar
4. That’s it!
By default the plugin looks for an image in the folder named «images» with a name that matches the author and extension «.gif», eg. if the author is «Bart», the plugin will look for the file named «bart.gif». If an image is found it is used, else the quotes is shown without an image or default image if specified.
You can add, edit and delete quotes under Edit – XmasB Quotes.
The options for each quote:
Quote – The actual quote.
Author – The author of the quote. This is optional.
Image – The image to be used. If left blank, the name of the author will be used to search for an image. If not found, and default image is specified, the default image will be used.
Visible – Set this to «No» if you want to hide a quote without deleting it.
Set more general options under «Options – XmasB Quotes».
Options available:
Show Images – Uncheck this to disable images shown with quotes.
Default Image – If specified this image will be used if no image is found for author or specified image for quote. If left blank, quotes without images will not show an image.
Show link to author – Shows a link to xmasb.com and my plugin in the widget. Turn off if you want to.
The title for the Widget is set directly in the Widget under «Presentation – Widgets».
Title – The title to show with the Widget. Default is XmasB Quotes.
For easier management of version and statistics the plugin is hosted at WordPress.org.
This blog is using the Widget as you can see to the right.
You can also take a look at at the readme file for the plugin (XHTML formatted).

Thanks for this great plugin: I see the random quotes and the authors, but not the images… I guess I do something wrong: I do put the complete HTML IMG tag, am I right?
Only the name of the picture file should go in the field for picture. if you have picture for Homer Simpson called «homer.jpg», than «homer.jpg» is what you should type in the field. The image must off course be in the images folder.
Hello! I do not want the quote to pull into the sidebar, but rather, into a special place in the footer. Therefore, I do not want to add the widget but want to pull the quote in manually. Can you please tell me what the code snippet is for me to place in my footer? Thank you! I love this app!
Oops, never mind! I forgot I already asked you this and I looked back through the comments and you’ve answered. Thank you, I just tried it and it works perfectly. You’re the best!
How do i get rid of the quotation marks that appear with the quotes ?
I’ll have to look into it, Vince. If I remember correctly they are hard coded, so you must probably edit the code.
I’ll look into it, but won’t be able to respond before next week I’m afraid.
It’s nice to have IMAGE with Quote .
Thanks for your great idea .
I wonder if I could quote in Chinese , in the future .
(I issued the Chinese in the image)
Works great, thank you
New version (1.3.2) is out. Thanks to Fat Cow for the translation to Belorussian.
How to add this plugin to the sidebar??
Is it ? Appearance >> Widgets
Or does it have any php code?
Sorry for the late respond. you should find a widget named XmasB Quotes under Appearance >> Widgets. You can also edit the title for your quotes there.
I love this plugin but since I’ve updated it, I»m getting the little quotation marks around the text and I would like to remove those, as I»m not using it for «quotes.» I’ve looked in the code but I’m not finding the proper area to remove them. Can someone help? Thank you!
Take a look at the options under «Tools» and «XmasB Quotes». There you should find fields for setting what should be printed before and after image, author and quote. Default is to use quotes around, well, the quote.
My blog uses url rewriting. http://www.blog.com/wordpress published as http://www.blog.com.
Plugin doesn’t work.
I added wordpress at start of $plugin_path and replace get_option(«siteurl») by get_option(«home»). A very bad way … think you can do better. Thanks.
Hi – I haven’t been upgrading the plugin because it used to wipe out all of my quotes that I added. Does it still do this? Thanks for the info!
@Davin
This was fixed a while ago. I use the automatic upgrade on this blog for every new version I put out.
@Davin
) Kjetil
No – not if you keep a copy of your old plugins/xmasb-quotes/images folder.
So based on this advice, I went ahead and upgraded to the latest version. My quotes weren’t deleted. But my pictures were!! Any way to recover those??
@Davin
Except from a backup? I’m sorry to say no. I was sure the folders wasn’t overwritten, but this obviously isn’t the case. I will look into it and update as soon as I find a solution.
I have several thousand quotes on this page, with very few pictures, so I haven’t noticed that the image folder was indeed overwritten. My fault for not checking properly.
Hello
Tried your plugin. Could be really nice but problem with images. I usually use an external image bank (flickr) but your plugin would not accept an url.
So I tried as you mention it to upload the images inside my blog. Tough luck ! The plugin doesn’t find the image either. I tried with the name of the picture alone, the url, everything I could think of.
I know I should be editing your code, but javascript is too difficult for me.
Is there a simple way to have your plugin simply pick a URL for the image ?
@Peter
The plugin searches for images in the «images» folder. If noe image is specified for a quote, the plugin searches for an image with the same name as the author. If this is not found, the default image is used.
If you specify an image, the image must reside in the «images» folder, and the image specified must include file extension. I hope this helps.
I’ve been meaning to update the plugin for easier management. Hopefully I will find time soon. Thanks for using my plugin.
Thanks for answering.
I guess the right folder is the xmasb-quotes/images folder ?
(and not the main WordPress folder)
Must the image be manually uploaded into this folder then ?
@Peter
«xmasb-quotes/images» is the right folder. At this time the images must be manually uploaded, yes.
I downloaded the plug in for one site and it works great, but for another it puts */* before quotation marks and apostrophes.
Any ideas?
@Patrick
I would guess you have different settings under «options – XmasB Quotes». Try looking there first.
Now the second site is doing the thing with */* in quotes.
What do you mean by «settings under options-XmasB Quotes»? I didn’t change anything from the way it was before, but could I be missing something.
I have XmasB under Tools and Settings in the dashboard sidebar. Should I be looking somewhere else?
Thanks for all your help!
@Patrick
The page to edit quotes is found under «Tools and settings» in the dashboard sidebar, as you have seen. But the options for the widget is found under «Options» in the dashboard sidebar. There you should find options for showing pictures as well as HTML to be user before and after certain elements.
The standard url for this page is http://yoursite.com/wp-admin/options-general.php?page=xmasbquotes.php, just replace yoursite.com with, well, your site.
Good luck, and thanks for using my plugin/widget.
Actually, I’m getting *\* before quotation marks and apostrophes and not a forward slash like I wrote before (not sure if this makes a difference).
I also don’t have a dashboard category tab called Options. All the settings in Tools and Settings for XmasB have been unchanged (the html and picture options are accessed through the Settings tab).
Maybe I need to uninstall and re-install?
@Patrick
What version of WordPress are you using?
There should be two seperate pages in your dashboard for the XmasB Quotes plugin; One for adding and editing quotes (found under tools) and one for setting options such as custom html around elements (found under options/settings). I’m not sure if it is «options» or «settings» as I have a norwegian dashboard.
Yes, I have Settings, sorry.
The only change is No image is selected. Other than that all the settings remain the same.
For now, I’m just italicizing the quote text to make it stand out.
labatterie,
What’s your point? I’ve tried the default settings and multiple configurations.
Perhaps it’s a conflict with another plugin or with the CSS?
@Patrick
Sorry about that. Was obviously some sort of spam. I approved it from my mobile. Guess I was to fast.
Can you provide the url for the second site?
Is there anyway to display the quotes on a page. My client would like to have a viewable archive of all the quotes
Sorry, no. The only page showing all the quotes are found in the dashboard for the moment. I might add this though, as it is fairly simple to implement.
The quote shows up on all of my page sidebars. Is there a way to limit it to the the main blog page. I have a plugin for doing that but it doesn’t seem to have a setting for your plugin.
@Tom Martin
Currently this is not possible. At least not from plugin itself. It is however not hard to implement either. I will try to include this (and a few other features) in the next update.
This might be an easy fix: Widget Context
cool plugin
Hi. Great plug in! I tried several and this is the only one which doesn’t give js error messages upon activation. Thanks. Sorry I probably didn’t fill in the form right, I only speak English and what you want is written in Norwegian.
Using WP 3.0 and your latest, 1.3.4.
When I have to use an apostrophe in a quote it adds a back slash like this: couldn\’t
Any idea how to stop that? My boss writes the quotes so it’s not like I can avoid apostrophes, LOL.
Also, are you available for hire to tweak your code to do what we’d like it to with images?
Thanks!
No problem with English here, I have a separate page for the Norwegians.
The problem with the apostrophe should be an easy fix. I have located the problem, but I don’t have access to the code before next week (I’m on holiday). I will fix this when I can, hopefully within a week or so.
See my mail regarding hired work.
Thanks for using my plugin!
Thanks for fixing your terrific plug in so fast! I’m glad you confirmed that I was right when I thought it was a server side issue and not your very clean code.
I’ve installed your new version 1.3.5 and it works PERFECTLY with the version of PHP that our hosting company is running on the server.
Thank you! You ROCK!
No problem, Skully. I will look into your other questions soon. Just got back to work, so I need to prioritize, but think I can give you something soon. And I will probably make it a public change, so you don’t need to tweak your example of the code every time there’s an update.
Hei Yngve! I have added your neat plugin to my WP site http://www.lillebjorn.no It works fine; except for the missing pictures!
I have everything installed by your book. But no pics.
My work-around:
Since I have my WP installation in a subdirectory /WP I added an extra httpdocs/wp-content/plugins/xmasb-quotes/images to the root. All directories empty except for /images. This works. But I do not like the clutter. Where can I adjust the path to wp/wp-content… etc in your plugin to avoid this work-around?
@Lillebjorn
Thanks for letting me know. This should have been fixed in version 1.3.9. Please let me know if you still experience problems.
I’ve been using your plugin for a couple of years and it works great! Only issue I have is that everytime I automatically upgrade it, I lose all my images. I have my images saved in a different folder now, and when the upgrade is complete I just copy them back to the images folder, but it would be nice to automate this so any added images are kept.
Thanks!
This is the best of the best «quotes» plug-in!
I have been looking for a way to connect images to quotes for a long time. Thank you for creating this!
The only thing missing (for me anyway) is the ability to place it where you wish, outside of a sidebar. It would be a nice addition to an otherwise superb quotes plug-in.
@Carlos
I’m working on a fix for this. I will try to get a fix out soon!
@Chris
Try the shortcut [XmasBRandomQuote].
If you need to use php, there is a function «xmasb_print_random_quote()» for this. Be sure to test if the function exists before calling it, so you won’t get problems if you should disable or uninstall the plugin later.
I will add a shortcut for easy adding of quotes as well in a later version.It seems I had already done this!Hi,
I’ve translated your plugin to Dutch, any email address where I can send the translation files to ? thx!
Hi Rene,
I’ve sent you an email with my details. Thanks in advance!
Hello Yngve,
I have translated your plugin to Spanish. Let me know how to email it your way.
Thanks a lot, Carlos! I have sent you an email you can reply to.
great plugin !!
Thanks, Martin! Glad you like it.
Hi Yngve, first off great plug-in. I do have one little problem you could consider. I sometimes have a theme where I can make multible sidebars, and most other sidebar widgets can be pulled over and used in several sidebars. But the Xmas quote plug-in can only be used in one sidebar.
It would be great if it was possible for at to be used on more than one sidebar.
If not possible still great work and thanks for a great plug-in.
Best regards Thomas Frost
I did a little research today, and found that WordPress has added a new API for Widgets back in version 2.8. This makes the functions I’ve used deprecated, so I will try to update the code soon. Multiple Widgets should then be available as well.
That sounds awesome. Thumps up from Sveg, Sweden (100km from the border of Norway)
/Thomas
I can’t get the images to show with the quotes. I have tried everything. At first they were .jpgs then I changed them to .gifs. The I labelled them with first and last name like I have quote arthor. What should I do?
Sorry for the late reply. I assume you have the images in the «images» folder?
I see from your homepage that you have solved this. Good for you!
Can the optional image be a full path or do images have to be in the images folder. I want to show images that are not related to the author and need to reference other images.
In the current version (v1.5.2) only the images folder is being used. But I will put this on my todo-list. Can’t make any promises as the when I will implement this, but it should be fairly easy to solve. I will most likely test for url starting with «http» when deciding where to search for images. Just don’t hotlink images.
Just writing to thank you for making this plugin and keeping it free. It helps me display marketing messages to my readers.
Thanks, Abraham. If you make too much money from it, it is possible to donate…
You can find the link in the bottom of this post.
When I make profit online I will donate for sure.
At this time online business is just taking money from my pocket.
In that case I wish you good luck!