Random Image
Welcome to the homepage for my Random Image widget. Like my RSS photo widget, this takes advantage of the widget functionality built in to WordPress to display a random image (from a directory on your webserver) in the sidebar of your WordPress blog.
Notes for upgrading to version 1.3:
Due to changes in WordPress’ database structure, settings will not be copied over from earlier versions. I recommend taking note of your settings before upgrading to the newest version.
Notes for upgrading to version 1.2:
Because the plugin allows multiple instances, when you first upgrade, your widget will appear to be missing. It has been renamed from Random Image to Random Image-1. Once you drag the new widget to the pseudo-sidebar, you’ll be able to see your old settings. Next, you may need to change the directory name. In earlier versions, the directory would look like wp-content/plugins/random-image/. In future versions, the directory should be formatted in the more common /wp-content/pluging/random-image. Make sure your directory is shown in this format.
Installation:
1. Place the random_image.php file in the plugins subdirectory of your blog (/wp-content/plugins).
2. Create a new directory in the plugins subdirectory. (Unless you have a reason to call it something else, I suggest calling it random-image.) Your images will go in this directory.
3. Activate the plugin (from the blog “dashboard”, go to Plugins, and click the “Activate” link next to the plugin)
4. Edit settings by going to your blog “dashboard”, navigating to Presentation->Widgets, dragging the Random Image rectangle onto the pseudo-sidebar, and clicking on the “settings” indicator. You can change the title and number of images to be displayed. If you named your subdirectory random-image, you can leave the directory folder setting at the default. Otherwise, make the appropriate changes.
5. Click “Save Changes” and your new plugin should be working!
Download:
Revision history:
1.0: Initial release (2008-01-13)
1.1: Added link to image; links now point to absolute URL; minor layout corrections (2008-01-19)
1.2: Added the ability to run multiple instances of the widget; added an option to recursively scan subdirectories; added options to allow global, manual image links and captions (with thanks to Dave Stryker); changed syntax for directories (2008-03-20)
1.3: Compatibility with WordPress 2.5 (2008-04-05)
Wish list:
- A single function to enable image display outside the sidebar
- Access to files in subdirectories
- Ability to edit links
- Ability to edit title information







January 15, 2008 at 2:33 am
what is the “Directory folder on server”, could you tell me a bit further please
January 15, 2008 at 6:36 am
Hi, if you access your web server via FTP or HTTP, you should see several subdirectories with names like wp-admin and wp-content. Once you’ve placed the plugin in the wp-content\plugins directory, you need to create a new directory for the images. This new directory name should be typed in the (redundantly named) directory folder field in the widget’s setup form. Let me know if this helps or not.
Plugins | WordPress Studios said,
January 16, 2008 at 1:40 am
[...] Download for free [...]
January 19, 2008 at 9:53 am
Noticed a bug (or a feature?): Images show only on the home page, and on none of the other pages.
I’ve tried with a single image, multiple images, with a title, and without a title…
I’m using wordpress 2.3.2, without the blog functionality (ie, as a website).
Otherwise, thanks for the widget…
January 19, 2008 at 10:29 am
Hi Joseph,
Can you see other sidebar elements on other pages?
My initial thought is that what you are seeing is theme-related. The Dusk theme I’m using shows the sidebar on the “front” page as well as in individual posts and individual pages; the WordPress default theme shows the sidebar in pages but not posts.
The display of other pages in your theme is by no means written in stone–if the theme doesn’t show the sidebar and you’d like it to, you can almost certainly add it.
In any case, I’d be interested to know which theme you are using. I’d be happy to see what I can come up with on my test site.
January 19, 2008 at 12:35 pm
I’ve tried it with the default theme, as well as with Fresh ( http://www.ilemoned.com/archives/wptheme-fresh ).
I’ve added a basic pages widget to the sidebar, but that seems to display fine, on all pages. In Kubrick and Fresh, the images are visible only on the home view… but not on other pages. The page list widget is visible, though.
January 19, 2008 at 12:36 pm
You can view it at http://indway.usmin.us (test site)
January 19, 2008 at 1:34 pm
Pretty slick, congratulations, but i was wonder, now that i installed the random image widget and it`s working just fine i have the following two questions:
How can i display not only .jpg or .gif images but .swf movies too?
and, how can i add a link to each one of the images???
Thank you.
January 19, 2008 at 4:35 pm
Joseph:
I believe that the problem you’re having is due to the way I created links, which doesn’t work with the “website” format. I’ve changed the way I handle links and posted an update (available from the link at the top of the page.) Let me know if this helps!
Ruben:
I think my update should take care of the link (unless you’d like to link to an unrelated file or URL). In fact, I’ve added the Shutter Reloaded plugin for LightBox-style display of images to illustrate this. As far as the SWF movies, I’ll have to get back to you on that!
Thank you both for your feedback!
January 20, 2008 at 4:38 am
Works like a charm!
Tested on pages and sub-pages… on the default template as well.
Thanks!
January 21, 2008 at 5:01 am
Hey,
first of al, lovely widget. However, i don’t really like the huge red bar, is there a way to change it? i looked in the .php file, only it didn’t got any clearer.
hope ye can help me,
Alex
January 21, 2008 at 10:12 am
Okay… I probably look like a nit-picker here, but I happen to like this plugin. Hence the dissection, and a question: How do i disable the images from being linked?
January 21, 2008 at 2:15 pm
Hey Alex,
I think the red bar you’re talking about (the border around the images, right?) is definitely coming from the stylesheet for the theme. Probably the easiest way to change it is to edit the widget code to eliminate the border just for the photos. It shouldn’t be too hard. Just open up the
random_image.phpfile and edit line 101, which startsecho '<a href="' . $item_url . '"After
padding: 3px 3px 3px 3px;(before the ” ), add
border: none;I think this should work for you, but let me know if you’re still having problems!
January 21, 2008 at 4:33 pm
Joseph,
Getting rid of the linked URL is easy, too. On the same line I referenced in the above comment, remove the portion that says:
<a href="' . $item_url . '">Just below that, edit the line that says:
echo ' /></a>';to remove the
</a>Let me know if this doesn’t work!
Random Image widget_Wordpress plugin said,
January 22, 2008 at 1:25 pm
[...] http://www.district30.net/random-image-widget [...]
January 22, 2008 at 2:33 pm
Thank you so much Cellus
Awsome
January 24, 2008 at 4:02 pm
Hey
How can I combine random image widget with any lightbox plugin? o_o Thx
January 24, 2008 at 10:51 pm
My recommendation is to use the Shutter Reloaded plugin, which will work on images in the sidebar out of the box.
If you still prefer Lightbox2, you could also modify the .php file. On line 101, insert
rel="lightbox"right after
echo '<a href="' . $item_url . '"(Note the space at the beginning of the new code.)
Either way should work as long as you are using version 1.1 of the plugin. I believe some form of the code modification should work for any other Lightbox-style plugins out there but let me know if you’re having trouble with any specific plugin.
January 25, 2008 at 10:23 am
I downloaded the random image widget and installed it. I created the image folder here http://cjganttphotography.com/blog//blog/wp-content/plugins/random-image-widget/random-image and then ftp some images to that folder. I still cannot get the widget to work
January 25, 2008 at 5:02 pm
Hi Charles,
One thing I see that might cause problems is the extra “/blog.” I think you may need to adjust your folder setting to point to “wp-content/plugins(…)” The version 1.1 code finds the root path of the blog from WordPress’ settings.
Let me know if you’re still having trouble-
Update:
Charles, I took another look at your site and saw that you made the recommended change but that you still can’t see the photo. Make sure that the setting has a “/” at the end and you should be golden.
January 27, 2008 at 5:40 pm
>Hi Cellus!
thanks for the great widget!
It works really fine but i’ve got one question.
i’d like a link to my photoblog, which code do i need to paste into the php file?
I can’t find it
That would be really great if you can help me to fix it
January 27, 2008 at 5:46 pm
hehe always the same: ok girl - one more hint - then i’ll go to bed (its 11:45p.m here) - and what?? we have it!
Sorry for spaming your commentlist
thanks and best wishes from Switzerland!
zasa
January 30, 2008 at 12:31 pm
I’m currently using your script,
simple, nice and it works.
But unfortunately I intended to have it showing a rondom pic from my album which is organized into folders but unfortunately your script does not search for all pics under subfolders but just on that folder…
I think it could be an interesting thing to put on the wish list
keep the good work
January 30, 2008 at 8:27 pm
Thanks for the comments, Ricardo. I’ll definitely put adding access to subfolders on the wishlist.
February 10, 2008 at 5:36 am
Hi Cellus;
It is working fine with WP 2.1.3.
I would like the link of each random image it would go to a concrete page of the blog, instead of opening in a new window.
Like a jump to http://www.my_blog.com/?page_id=7
It is posssible to get this with a simple modification?
Thanks for the support.
February 10, 2008 at 5:49 am
.. I wonder if this might work:
echo ‘
Regards,
February 10, 2008 at 5:54 am
Sorry for disturbing.. following the last hint, I’ve found the solution.
Regards
February 10, 2008 at 7:17 am
Cool plugin. Out of the box it worked great. One little point that in the Wordpress Plugin in page when you click the link of the plugin name it takes you to a 404 page on your site.
Second, on your page the Shutter Reloaded works sweet…. I cannot get mine to do the same. Which of the five settings (in Shutter Reloaded) should I use? Right now it always opens in a new page, which I don’t want to do if possible. If I have Lighbox 2 plugin loaded also maybe that is problem? (I have used that for posts up to now.)
Kaz
February 10, 2008 at 7:24 am
Oops.. shoulda looked before I opened mouth. (or used keyboard) as I wrote the last post I thought about the other Lightbox plugin… I just deactivated it and the Random Image and Shutter are now working perfectly! Hmm… wonder what that did to the posts that used the Lightbox 2 to display? Will have to look.
Kaz
February 12, 2008 at 3:42 pm
Should this plugin work on a wordpress blog running on IIS? I installed it and think I have everything configured correctly, but can’t get anything to display.
Allen
February 13, 2008 at 12:50 am
Allen,
You should have no problem running on IIS (as long as everything else is running smoothly, which it appears to be.)
Usually if there is a display problem, you can see the widget at least trying to display something. (Search for random_image in the page source, and you should find it, for example.) Are you able to set up the widget on the widgets page? If not, make sure it is activated. If you are getting it to setup, it may be failing based on a setting (probably the file path, which *might* be different (try changing the direction of the slashes from “\” to “/”) on an IIS server.)
If neither of those solutions get you anywhere, send me another message and we can look at other solutions.
February 15, 2008 at 9:29 am
I can’t find random_image anywhere in the source. I do have it activated and have tried it at several different locations. It actually seems to break the page sometimes, but it’s not quite consistent, and it’s usually only the home page. I tried this
/wp-content/plugins/random-image-widget/random-image/ and this \wp-content\plugins\random-image-widget\random-image\ for the directory and they seem to act the same. Here is the full url to one of the images http://www.bigrockalpacafarm.com/wp-content/plugins/random-image-widget/random-image/blogrotate-01.jpg which does work. Is the path relative to where the widget code is or from the root of the site?
I appreciate the help because I think it would be great to add more pictures to the site. I need to do more static ones, but I think ones that change would be great.
Allen
February 15, 2008 at 5:45 pm
@Allen
I think if one picture works you have it right, just put the other pictures you want to display in the same directory. It doesn’t search for all your pictures in different locations. You are not expecting it to “dyanamically exchange” pictures are you? It only changes when the page refreshes by random selection of one photo from the directory. Are all the photos you are trying to jpg’s? (I am not sure what all types may display properly.)
Kaz.
February 16, 2008 at 12:09 am
Hi Allen, based on the photo that’s working, the correct path should be
wp-content/plugins/random-image-widget/random-image/It’s possible that the extra slash at the beginning could cause a problem (it’s natural for me to include the leading slash, too, so maybe this is something I’ll improve in the next version.)
In any event, I’d be interested in looking at the source code when you see the broken page–if that happens again and you’re willing, you could email it to me at wallace6_80210 AT yahoo.com
@Kaz:
Thanks for the supplemental comment! How did things turn out re lightbox 2 and shutter reloaded?
February 16, 2008 at 12:17 am
Hi,
Worked great except my images are blurry. They are jpeg thumbs at 75 p but don’t display sharp.
Sorry I’m new to this — is there an exact image size or?
Also, is there a way to make the image box or title a link?
Thanks,
John
February 16, 2008 at 3:21 pm
Hi John,
Yes, the plugin automatically resizes the images to 150 pixels in the largest dimension. If the images are a different size than this, the appearance won’t be perfect although its much more noticeable with images that are smaller than 150 pixels. In fact, large images generally look fine.
There are a few options:
If you need help with how to proceed, feel free to ask. Other than my other plugin, there isn’t really any way to assign links although this is something I’m working on for a future version.
February 18, 2008 at 12:22 pm
I’ve sent you an email with some additional info in. No I’m not expecting it to change dynamically while the page is displayed. I put a static link to one of the pictures on the page just to verify to myself that the path and security was all okay when accessing the pictures. There are about 6 or 8 jpgs files in the directory.
Allen
Patrícia said,
February 18, 2008 at 8:35 pm
hey! just here to say that i love this widget and it works really well!
thanks!
February 28, 2008 at 4:54 pm
Very nice plugin. Two questions though.
1) Is there any way to have the plugin use images on my web server that aren’t in the wordpress installation directory? I have photos albums in a directory that I would like the plugin to use but they are outside the wordpress structure. I tried using the absolute path, but that didnt work. ie.
wordpress is installed here: public_html/wordpress
my photo albums are here: public_html/albums
web server root dir is: public_html/
2) Does the plugin recurse directories?
…and one suggestion. It would be nice to have an option to specify where the thumbnails link to instead of displaying the full size original image. This way you could link to the photo album that contain the images for example.
Thanks for any help you can provide, and for a nice plugin.
-dave
February 28, 2008 at 10:22 pm
Hello Dave,
Thanks for the comment! I have a couple of answers:
1: Yes, you should be able to access higher levels of your web server’s directory structure by using “
..”In your case, you should be able to access the albums directory by using:
..\albums\2: The plugin does not recurse directories. This is a popular request that I’ll almost certain add to the next version.
Finally, I hope to add the capability of comments and/or alternate links soon although I’m torn between various ways of addressing that problem.
February 29, 2008 at 5:17 pm
Thanks, that worked. Don’t know why I didnt think of that. Anyway, I appreciate the answers and look forward to the next version.
-dave
March 3, 2008 at 4:47 pm
cellus,
I modified your plugin scipt slightly so now it has the option to add a “link to URL” from the widgets options. So now when you click on an image you can have it link to any URL. I’m not a PHP expert but if you’d like to have a look, send me an email and I’ll send it out.
Thanks again for a great plugin and your answers to my questions.
Dave Stryker
dave at strykeronline dot com
March 5, 2008 at 4:57 pm
Great little widget. Installed, tweaked to remove the image border and link (as per earlier comments), resized the image display and voila - works a treat.
Wishlist - how about the ability to title the images displayed?
Many thanks
March 6, 2008 at 12:03 am
Consider it added–thanks for the comment!
March 15, 2008 at 1:50 am
Cellus,
I was just wondering if I is possible to have more than 10 random photos showing? Can I change the number somewhere or perhaps have two installations of the widget?
Thank you very much, by the way. People like me couldn’t ‘build’ websites without people like you!
Pierrot
March 16, 2008 at 10:22 am
Hello Pierrot,
You can modify the code to allow more than 10 photos fairly easily. Open the photo_sb.php file and find the line that looks like:
for($list_val=1; $list_val <= 10; $list_val ++) {In version 1.1, you’ll find this at line 180. You can change the “10″ to any number you like; once you save the file, the pull-down on the options page will show the additional options.
In the meantime, I’m working on adding the ability for multiple instances for the next version.
cees said,
March 23, 2008 at 7:46 pm
hi there,
first i want to say the random-image-widget is awesome. Thanx cellus!
And second: is it possible to change the color of the border?
I looked for the color in the php script, but couldnt find an editable color.
Is there anyone who can help me with this,
Thank you very much,
cheers
cees
March 23, 2008 at 7:59 pm
cees,
Glad you’re enjoying the widget! The border isn’t specifically controlled by the plugin. Instead, it is relying (for the most part) on the style attributes from your theme’s style sheet. You could either specifically get rid of the border by adding
border: none;to thestyle=statement on line 105, or by adjusting it in the .CSS file for the theme.Hope this helps!
March 24, 2008 at 6:06 am
hello,
is there a possibility when we want more than 1 image to show, to get them on several columns and not on at the botton of the other?
cees said,
March 24, 2008 at 2:03 pm
hi cees, thx for the answer cellus.
but i like to have my color changed from blue to red.
can you give me a hint how to do this.
the possibility of deleting the border is great, but i want more….. sorry
any suggestions? …. what about this kind of hints: border: color: #CC0000…
but thats not working….
anyone?
thx a lot
grtz cees
March 24, 2008 at 9:59 pm
@henri: This isn’t something I’ve played around with much since the 150px width image in most sidebars lends itself to the vertical format. In fact, the code isn’t forcing images to be arranged vertically; if you shrank the images sufficiently, they would display side by side until they used up the column width (although this isn’t really a satisfying solution.) Are you envisioning this in the sidebar, or are you hoping to use the random function elsewhere on your page?
@cees: You’re close. I would try this:
...<img style = "padding: 3px 3px 3px 3px; border: thin solid #CC0000;" src="...The padding is negotiable. I thought things looked better with a little more space between images (and the padding should move to a div block someday). In case you haven’t come across it yet, there is a lot of good info on the style attributes that are available, on the W3Schools pages on CSS.
cees said,
March 26, 2008 at 5:19 pm
awesome, it worked, cellus!!
thx a lot…….
cheers!
March 27, 2008 at 11:35 am
How can I add this in my sidebar without using the widget?
March 27, 2008 at 9:56 pm
Joakim,
Right now, I’m honestly not sure that there is an easy way to do this. I would start by copying the entire function
disp_random_imageinto your theme’ssidebar.phpfile in the appropriate location. This should include everything between lines 54 and 115. Next, remove the code that was originally in lines 68-71 and line 115. Finally, add a line near the top of the block that says$number=1;(or replace the 1 with a higher widget number if desired). You may have some trouble with the sorting algorithm. You could either remove the two lines that startusortor add the lines from 166 to 170 to thesidebar.phpfile as well.Once I get a good idea how WP 2.5 affects this widget, I plan to tackle this problem to make it a little simpler!
March 30, 2008 at 2:14 am
great widget…1 small problem.
i upgraded to wp 2.5 & am using k2 (rc2). when i activate this plugin i get the following error message.
Fatal error: Call to undefined function: wp_register_sidebar_widget() in /home/content/ ….. /wp-content/plugins/random_image.php on line 149
it worked as it should w/ wp 2.3.
thanks in advance…
March 30, 2008 at 10:53 am
brian,
i’m finding a few issues with WP 2.5 and I’m hoping to get a new version posted soon. I’ll see if I can play around with K2 and figure your issue out at the same time. Thanks for letting me know.
March 30, 2008 at 7:54 pm
many thanks…big fan of this plugin & can’t wait to get it running again!
April 3, 2008 at 1:23 pm
wordpress 2.5 - widget does’t work =(
April 3, 2008 at 1:40 pm
Sorry. widget doesn’t work only on index page….
April 5, 2008 at 4:40 pm
Hey Cellus,
I’m using your life saving widget on two sites - Wordpress 2.3 and 2.5.
2.3 works like a charm. 2.5 crashes my entire site! I get an error establishing database message and have to disable the plugin at server level.
Any ideas?
Thanks!!!
April 5, 2008 at 8:28 pm
Pierrot,
Have you upgraded to version 1.3 for the widget on the WP 2.5 installation ? If not, this would be my first suggestion. If you have already upgraded, then there is definitely something strange (although the errors you describe sound more severe than what I’ve been seeing and hearing about). In that case, I’d suggest reverting to 1.1 and I’ll take a close look at things.
April 5, 2008 at 8:41 pm
Apologies to everyone for the week delay in providing a 2.5-compatible version. The changes in 2.5 caught me off-guard.
April 8, 2008 at 8:50 pm
Hello!
I’ve tried everything to get this plugin to work with 2.5. I have 3 .png images with transparent backgrounds in my /wp-content/plugins/random-image directory. When I use the pluging with that directory, I get an empty square with a red ‘x’ in the corner and the html has src=”" (or maybe src=” “) where the image should be. When I set the directory to /wp-content/plugins and allow it to search for pictures in all subdirectories, it will display .gif images. Does this plug in not work with .png images?
April 8, 2008 at 9:29 pm
Hey Paladin,
Version 1.3 doesn’t work with .PNG images as-is. It’s not difficult to add that functionality, though (I guess I’ve just been lazy).
You may be able to make the change in the “Plugin Editor.” (If not, any text editor will work as well.) Find line 140, which looks like:
if ($file_extention == 'jpg' or $file_extention == 'gif') {and add
or $file_extention == 'png'between ‘gif’ and the closing parenthesis.
(And yes, I misspelled extension in case you’re thinking that looks wrong.)
Let me know how it works. I’ll need to correct the plugin’s response when it can’t find any supported images.
April 8, 2008 at 9:59 pm
After looking through the code, I see that it does indeed only include gif and jpg images. One suggestion I have is to add ‘png’ files as well. Once I added that to the loop, the script started working with my images. Two other suggestions I have based on the modifications I made to your script for my site:
1) Make using href an option, which when toggled off makes an unlinked image display
2) Make the image scaling user selectable, and include a 100% option
This will make the script perfect for what I am using it for… to insert a random image of a set size into a space on my website.
April 16, 2008 at 11:48 pm
How can I add a bit of space under the column heading and between the pics? With my theme, the bottom of one pic touches the top of the next. I just want a couple line breaks in there. Thx.
Great widget!! Works well!
April 17, 2008 at 3:55 pm
Cellus,
Love version 1.3 it’s great to have all these new features. 2 slight issues I’m having:
1) If you look back at posts # 39 & 40 you’ll see I was using ../albums/ as the path to my images. For some reason I can no longer get this to work. Took a look through the code but I didn’t see any reason why this wouldn’t work. any ideas?
2) And when the plugin finds no images it centers everthing in my Sidebar. Almost like there is an unclosed tag. When it finds images the sidebar is displayed correctly.
Any help on this would be appreciated.
Thanks,
Dave Stryker
BTW - thanks for the credit in the version history
April 17, 2008 at 10:38 pm
Jeff: There are a couple of ways to do this. First, check line 93, which begins
echo '"><img style = "padding: 3px 3px 3px 3px;"The padding attribute contains information on how much space the browser should give the image. The first and third numbers should increase your vertical spacing. However, I notice on your page, the spacing is set to 1px for each element. Hard coding as we’re doing here should override the style sheet settings. In case it doesn’t you could hard code the line breaks. The quick way to do this would be to modify line 98 to say:
echo $show_caption ? '<p>' . $caption . '</p>' : '<p></p>';(adding a line break with
<br />won’t do anything because there isn’t a line of text to break.)Dave: I changed the path so that the preferred format is to begin with a ‘\’, which felt more natural to me (version 1.2 updated the database automatically but alas, I didn’t have the chance to do that with 1.3). Changing to ‘\..\albums’ should work.
As for the unclosed tag when no images are found, you are absolutely right. I will put that on the list of things to correct in the next version. Thanks for the tip!
April 18, 2008 at 2:32 pm
Cellus,
One little character makes all the difference. Thanks
Dave
April 23, 2008 at 8:45 pm
Hi Cellus,
Love the idea of your plugin but I’ll ask you a question which defeats it’s purpose (LOL). I’m putting together a “Newspaper” type of site using WP and would like to use the widget to display only the latest photo (picture of the day) from a gallery folder (I’m thinking of using DM-Alblums, unless you can recommend another good gallery plugin) and when the user clicks on the photo, it would take him to the photo gallery page.
Cheers,
Gene
April 23, 2008 at 11:15 pm
Gene,
It sounds like you’d like to do two things a little differently than what the default behavior allows: Display a particular photo from a dynamic source (rather than a random photo) and to have a particular link attached to that photo.
The link will be simple: Once you get the gallery set up, you can use the options page to point to the URL of whichever gallery page you’d like.
As for the second part, things get complicated. The list of images is randomized by the usort() function; you could bypass this by commenting out lines 70 and 71 (the two lines that start:
usort($images, ri_random_compare);) by adding “//” in front of each line.This would work fine if you could guarantee that the first image in the directory was always the one you wanted, but in all likelyhood, that won’t be the case. If you’re lucky, the most recent file will be the last file (alphabetically) in the directory, in which case you could comment out the lines as above and add (either above or below those lines) the new line:
rsort($images);If this doesn’t do the trick, all is not lost. It’s possible (though slightly more complicated) to sort by file modification date. Since this is becoming a frequent request, it’s something I’ll probably add soon anyway, but if you’re still having trouble, let me know and I’ll try to get you an advance update!
I’d like to hear your thoughts on DM-Albums. I’ve been considering a plugin gallery for another site I manage.
(I have more on the usort function in the comments of my other plugin.)
April 23, 2008 at 11:54 pm
Thanks for the quick reply.
All right, I’ll do the above code changes so things will be ready when I find a suitable gallery plugin or program. I’ve been looking at NEXTgen because it seems to have all the bells and whistles I’d like (even the sidebar widget) but I’m holding back on installing it on account that it’s still in development and according to what I read on WP, still buggy on 2.5.
As far as DM-Albums go, it’s really nice once you get it up and running but still a little buggy compared to the previous version, Frank (the author) is still squashing bugs since he made it 2.5 compatible.
“It’s possible (though slightly more complicated) to sort by file modification date. Since this is becoming a frequent request, it’s something I’ll probably add soon anyway, but if you’re still having trouble, let me know and I’ll try to get you an advance update!”
Sorting by date would be fantastic and BTW, what other “reliable” gallery software do you currently use? I tried all 2.5 compatible gallery plugins I could find on WP but they’re all on the “quirky” side. In conclusion, I was considering using a standalone package and link my site (and “Photo of the Day”) to it.
Cheers,
Gene
April 24, 2008 at 7:38 pm
Off-topic but:
Maybe you should give NextGen gallery a try, I downloaded the latest version and tried it on a test site and it works good, even has the sidebar widget.
Thanks,
Gene
April 24, 2008 at 9:39 pm
Actually, come to think of it, I did try NextGen gallery, although I was looking at another aspect of it. It looked well-done although at that time there were still a few aesthetic things that I think he was working on. I don’t think the sidebar was available yet. I’m glad that it’s working as a solid plugin–I’ll have to update it on my test site.
April 25, 2008 at 4:51 pm
It has come a long way in a short time and there are updates (bugfixes and improvements) on a regular basis. Mind you, the sidebar widget could be improved on (clicking on the thumbnail would take you to the gallery, not the single pic,, layout, etc.)…
Cheers,
Gene
April 28, 2008 at 2:36 am
Aloha!
I am attempting to use version 1.3 with Wordpress MU 1.3, and it’s not working. Before I spend anymore time troubleshooting it, can you tell me whether there is any known reason why it wouldn’t work with WPMU?
I’ve triple checked my handiwork against your installation instructions — all seems right. It seems to activate successfully. However, no go.
Two things I’ve noticed: 1) my settings on the “settings” indicator on the Random Image rectangle under Presentation->Widgets don’t seem to save — although they seem to save properly, when I go back to check, they are not there, and 2) the widget does not appear on the sidebar anywhere — I’ve checked the page source and there is nothing showing up from Random Image.
At this point I’ve little notion where to look next in trouble shooting this. I am hoping you can make some suggestions and hopefully get me pointed in the right direction.
Thanks!!
–Kawika
April 29, 2008 at 5:15 pm
Salut Marcel,
Have you gave NextGEN a shot yet? As I mentioned in a previous post, it works great but one thing that could be improved on is the sidebar widget.
I tried yours for showing pics from my ngg gallery and it worked like a charm, maybe it would be a good idea for a project to improve on the native ngg widget and make it more configurable? There are already a few people writing additional plugins for ngg and Alex appreciates the help.
A la prochaine,
Gene
April 29, 2008 at 10:08 pm
Kawika, it’s taken awhile, but I can say I really haven’t found any reason to believe that WPMU should be any different. I have a couple of ideas that might help.
First, I’ve found that saving widget settings seems to be a multi-step process. In my installations, it seems that I have to click “Change” on the widget settings, then “Save Changes” on the sidebar settings.
Otherwise, the only thing I can suggest is reverting to an earlier version, before the multiple-instance feature was added. Let me know what you find…
Gene, haven’t had a chance to dig into it yet, but I will when I upgrade my test blog soon…I will definitely check out the sidebar widget. I’d actually really like to integrate some of the jQuery stuff he uses in a future version anyway…sounds like it might be a good opportunity to take a closer look at it!
April 30, 2008 at 3:37 pm
“Gene, haven’t had a chance to dig into it yet, but I will when I upgrade my test blog soon…I will definitely check out the sidebar widget. I’d actually really like to integrate some of the jQuery stuff he uses in a future version anyway…sounds like it might be a good opportunity to take a closer look at it!”
Sounds good to me, I’m quite sure that by using the best features of the two plugins (plus whatever else yo may think of), you’ll come out with something darn useful.
Cheers,
Gene
May 7, 2008 at 12:15 pm
hi there .thanks for plugin:
Does anybody know if tis script is compatible with Wordpress 2.5.1 ?
Thanks in advance for any help on this!
best regards
May 20, 2008 at 3:09 pm
First off, this is sweet, works as intended. How novel.
A couple of things to consider in a future build-
a check mark to turn off the image linking to the image url. I know I can manually delete it, but I and others are hesitant to monkey with code.
a check mark to load a clickable link with a _blank attribute to it, so the link opens a new window.
Other than that, it works like a charm.
One thing I was curious about- just how does it select random images? I’ve got artwork from different artists in individual folders, and it appears, from a quick look, that it goes through one directory, and when it hits the last image, changes to the next directory of images. I know nothing of how this works, and no idea if it is possible, but it would be cool if it jumped from directory to directory .
Thanks for a cool plugin, it’s exacly what I was looking for.
Oh, you can see it in action at http://knoxvillefirstfriday.com/
May 20, 2008 at 10:29 pm
Hey Steve,
Thanks for the comments and suggestions. I’d like to make things a little fancier, with per-image links and captions, but I haven’t really decided on the best way to do that. I’ll keep the suggestions for disabling the link in the image and opening images in a new window in mind when I do work on it.
You gathered correctly as to how the plugin finds images–it does indeed pick one image out of all the available directories. Are you asking whether the plugin could cycle through directories so that you could guarantee that each subsequent page load would pull a picture from the next artist? Offhand, I’m not sure that would be easy to do, but it’s certainly worth a try!
May 26, 2008 at 7:30 pm
Really like this plugin, although could I please ask for one small enhancement?
I like how people can click on the thumbnail to view a larger version of the image, but I don’t like how it loads the image on the same browser window.
Could we have the option to load the image on a new window/tab please?
Sebastian said,
May 30, 2008 at 3:50 am
Nice plugin! Really easy setup with Shutter Reloaded - your hint really helped there.
Keep up the good work!
June 12, 2008 at 11:44 pm
Here is a quick tip (which should make its way into the FAQ in the next version)
If you’re having trouble displaying an image even though it appears the plugin is finding the images, check the image file’s permissions. If the web browser doesn’t have read permissions, it can’t show the image. On unix-style systems, I recommend using chmod to change permissions to 644.
You may also have trouble showing files if they aren’t a supported type; this can be modified in the code. Feel free to contact me if you aren’t sure how to add a file type or if you’re uncomfortable working with code. Some files (like RAW) can’t be displayed in any case.
June 19, 2008 at 9:49 am
Hi Cellus, I Think your plugin is great. Is there an easy way of determining a different link for each picture?
Best regards,
Paula
June 20, 2008 at 5:03 pm
Paula,
Thanks for the comment. There isn’t a way to create per-photo captions or links yet (unless you just want it to link to the photo), but this is something I’m working on as we speak. Let me know if you have any ideas on how you’d expect to add or change links. Otherwise, keep checking for updates.
June 21, 2008 at 4:41 am
Hi Cellus,
Thanks for your answer. Unfortunately, I am not a developer so I cannot give you any ideas on how to map each image with a different URL. I don’t know… maybe it could be possible to include a .txt file in the images folder specifying an URL for each image (this is probably a ridiculous suggestion though…). =/
Best regards,
Paula
June 27, 2008 at 10:41 am
I just wanted to say this is a great widget. I do our compaines website and found it very useful. I did however add a little to the code I thought I would share. I added the lightbox code to display the linked image in a lightbox, I also coupled the main page with a no right click script to protect the images. While our blog is not live yet you can see it at http://www.glutzphotography.com/blog
June 28, 2008 at 10:42 pm
Brandon, thanks for the comment. I like the script! You might be interested in some work I’ve been doing with jQuery, etc, to add the ability to scroll through images, so look for that in a future version. I enjoy seeing the sites that have incorporated this plugin!
July 10, 2008 at 11:10 pm
Man, your plugin is just what I’ve looking for a long time, thanks a lot
July 16, 2008 at 6:52 pm
Hi, excellent plugin, but i don’t know use it with lightbox2 plugin.
I’m using version 1.3 of your plugin, and so your old instructions “On line 101, insert
rel=”lightbox”
right after
echo ‘<a href=”‘ . $item_url . ‘” are bad.
How i do resolve it?
I think line 101 is now line 93, but the same i don’t know how (and if) to paste the code.
Can you help me, please? If possible without using shutter reloaded.
Thanks,
marco.
July 18, 2008 at 7:52 pm
marco, I apologize–my response to your messages will be a little slow. I recently moved and have run into administrative difficulties getting internet access.
I’ll take a look at the code and get back to you soon!
July 19, 2008 at 5:45 am
Oh, thanks, I wait patiently, anything trouble, thanks.
And greetings fot your affairs.