| Author |
Message |
JeremyNell
Knowledgeable User


Joined: Oct 09, 2003 Posts: 48
|
Posted: Fri Oct 31, 2003 12:07 pm Post subject: error when activating random image block |
|
|
block-NG-RandomImproved
OK, I have tried to get the Random image block going, but I get this error:
============
Warning: fopen("/block-random.cache", "w") - Permission denied in /usr/www/users/africd/jeremynell.com/modules/gallery/platform/fs_unix.php on line 55
Warning: Unable to open '/usr/www/users/africd/jeremynell.com/albums/jeremysworld/unknown.thumb.jpg' for reading: No such file or directory in /usr/www/users/africd/jeremynell.com/modules/gallery/platform/fs_unix.php on line 26 |
|
| Back to top |
|
|
AdBot
|
| Post subject: error when activating random image block |
|
|
|
|
|
| Back to top |
|
 |
dari
Site Admin


Joined: Mar 03, 2003 Posts: 6271 Location: Washington Township, NJ, USA
|
Posted: Fri Oct 31, 2003 12:09 pm Post subject: |
|
|
ah yes, make sure your album directory is read/writable by webserver (chmod 666 should do it). i think this has been addressed here before, try searching the forums. _________________
 |
|
| Back to top |
|
|
JeremyNell
Knowledgeable User


Joined: Oct 09, 2003 Posts: 48
|
Posted: Fri Oct 31, 2003 12:12 pm Post subject: |
|
|
| but it is set at 777 - surely that should work?? |
|
| Back to top |
|
|
dari
Site Admin


Joined: Mar 03, 2003 Posts: 6271 Location: Washington Township, NJ, USA
|
Posted: Fri Oct 31, 2003 12:23 pm Post subject: |
|
|
post the config lines from the block files...i think i nkow the problem _________________
 |
|
| Back to top |
|
|
dari
Site Admin


Joined: Mar 03, 2003 Posts: 6271 Location: Washington Township, NJ, USA
|
Posted: Fri Oct 31, 2003 12:24 pm Post subject: |
|
|
stick:
Code: › global $gallery;
underneath Code: › <?php _________________
 |
|
| Back to top |
|
|
JeremyNell
Knowledgeable User


Joined: Oct 09, 2003 Posts: 48
|
Posted: Fri Oct 31, 2003 12:25 pm Post subject: |
|
|
this is the whole block file:
=============
if (eregi("block-NG-AlbumList.php",$_SERVER['PHP_SELF'])) {
Header("Location: index.php");
die();
}
$GALLERY_BASEDIR = "/usr/www/users/africd/jeremynell.com/modules/gallery/";
define(ALBUM_BASEADDR, "http://jeremynell.com/albums/");
define(SERVER_ADDR, "http://jeremynell.com/");
require_once($GALLERY_BASEDIR . "init.php");
require_once($GALLERY_BASEDIR . "random_support.php");
define(CACHE_FILE, $gallery->app->albumDir . "/block-random.cache");
define(CACHE_EXPIRED, 86400);
/* VALID VALUES FOR $selector:
* "DAILY"
* "HOURLY"
* "RANDOM"
*/
$selector = "HOURLY";
if($selector=="DAILY"){
$content = daily_photo();
}
else if ($selector=="HOURLY"){
$content = hourly_photo();
}
else if ($selector=="RANDOM"){
list($album, $index) = get_random_photo_id();
$content = random_photo($album, $index,0);
}
?> |
|
| Back to top |
|
|
JeremyNell
Knowledgeable User


Joined: Oct 09, 2003 Posts: 48
|
Posted: Fri Oct 31, 2003 12:33 pm Post subject: |
|
|
ok, it works now.
How do I remove the text underneath the thumbnail? |
|
| Back to top |
|
|
dari
Site Admin


Joined: Mar 03, 2003 Posts: 6271 Location: Washington Township, NJ, USA
|
|
| Back to top |
|
|
|
|
|
|
|