This dosen't seem to work
jadowd - March 7, 2008 - 17:29
| Project: | Random Images |
| Version: | 5.x-1.1 |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
The file path is not working for this module. I have the block created, but the best that I get is IE's little red X. I can pull up properties on the image, but it displays that the image is comong from "http://random_images_block/lady_w_cane.jpg"
It looks to me that the actual image transfer it's self is broken as it does not seem to know to get the image from the remote server. If you see the link, perhaps you will know what I mean.
How can this be fixed.
thanks in advance.

#1
I get the same problem. Help!
#2
Same issue for Drupal 5.7, PHP 5.2.4, MySQL 5.0.45 here. Nothing shows under any browser.
I'm using a zen theme (standard starterkit modification) and tried placing the random images block into both left-hand sidebar and content regions, using both relative and fully-qualified URLs in Random Images settings.
The only clue I have that it's even trying to work is by looking at a view source which shows:
<div id="block-random_images-1" class="block block-random_images region-odd even region-count-1 count-10"><div class="block-inner">
<div class="content">
<div class='random_image_container'>
</div>
</div>
</div>
</div>
Should also point out that after you save settings in Random Images, the URL of the page you are on is something like http://www.EXAMPLESITE.com//admin/settings/random_images/list_blocks (note the two slashes in a row before admin).
#3
I'm having issues too, using 5.7 in a heavily customized zen theme. Except I wasn't luckly enough to get the little red X. Instead, my whole site crashed, saying something about not being able to find views_cache.inc (from the Views module). Anyway, I went into the database and disabled the block, which fixed the site, but I'm very confused as to why this module would have any effect on the Views module, which incidentally, I'm not currently using (though it is enabled).
Anyway, this seems like a really great module, I just don't have the php expertise to troubleshoot...
#4
I went ahead and tried this again... same thing. Here's the message I get:
Fatal error: require_once() [function.require]: Failed opening required './sites/all/modules/views/views_cache.inc' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/mydomain/public_html/highlandnaz/fhl/sites/all/modules/views/views.module on line 621
So yeah, I have no clue what that means, but it only happens when I enable the random image block.
#5
I used this module on my site and it worked great, but I was having a problem with the Efficient theme, imagecache and image field. So I've been recreating my site on my desktop, beginning with those elements. I now have those elements working, but when I try to add a random images block, the whole site goes to a blank white page.
#6
I seem to have the same issue as #2 silurius. The Random Image block that comes with Drupal only shows one image and works just fine as is. It automatically finds the right path to my images, http://www.mysite.com/files/images. I need a block to show 4-8 thumbs.
I downloaded, installed and activated the Random Images Module, went through the simple set-up steps and assigned a path. First starting with just the images folder, but have used full root urls and every combination in between. And to no avail, no thumbs. For the life of me I can't seem to figure out what the issue is.
Anyone have any ideas?
#7
I'm no programmer but I have hacked it to work, if you scroll down in the module code and find line (125)
$output .= "<img class=\"random_image_image\" src='$base_path/$image_url' />";Because the base path is just '/' its putting in an extra / in the path and not displaying, simply remove the '/' from the middle of the line so it would become:
$output .= "<img class=\"random_image_image\" src='$base_path$image_url' />";Hope this helps
#8
no joy for me. I still got a blank page. tried with a dot between both variables and nothing. I'll just assume the module doesn't work, and look for something else.
#9
Try and view the source of the page, look at which path the module is writing out for the image, you should be able to work out where its going wrong.
#10
Got mine to work by changing that line from:
$output .= "<img class=\"random_image_image\" src='$base_path/$image_url' />";to:
$output .= "<img class=\"random_image_image\" src='".$base_path.$image_url."' />";my 'Images Path' in specified for the block is "sites/default/files/random_pics/"
Sack
#11
Thanx Sack.
Worked for me.
#12
the dev 5.x-1.x-dev version works fine for me (after trying the 1.1 version and getting the white screen - even trying the replace method above)