Home | Support Forums | Your Account | Gallery [2] | Downloads | News | Site Map ]
Nuked Gallery
  Create a FREE account or Login   As a guest, you don't have access to our FULL navigation system.
 Forum FAQForum FAQ   StatisticsStatistics   SearchSearch   UsergroupsUsergroups   FavoritesFavorites  

error when activating random image block

 
Post new topic   Reply to topic    NukedGallery.net Forum Index » PHP-Nuke Issues » Blocks View previous topicPrinter friendly versionView next topic
Author Message
JeremyNell

Knowledgeable User
Knowledgeable User


Joined: Oct 09, 2003
Posts: 48

PostPosted: Fri Oct 31, 2003 12:07 pm    Post subject: error when activating random image block Reply with quote

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
Offline View user's profile Send private message
AdBot
   Post subject: error when activating random image block  

Back to top
dari

Site Admin
Site Admin


Joined: Mar 03, 2003
Posts: 6271
Location: Washington Township, NJ, USA

PostPosted: Fri Oct 31, 2003 12:09 pm    Post subject: Reply with quote

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
Offline View user's profile Send private message Visit poster's website
JeremyNell

Knowledgeable User
Knowledgeable User


Joined: Oct 09, 2003
Posts: 48

PostPosted: Fri Oct 31, 2003 12:12 pm    Post subject: Reply with quote

but it is set at 777 - surely that should work??
Back to top
Offline View user's profile Send private message
dari

Site Admin
Site Admin


Joined: Mar 03, 2003
Posts: 6271
Location: Washington Township, NJ, USA

PostPosted: Fri Oct 31, 2003 12:23 pm    Post subject: Reply with quote

post the config lines from the block files...i think i nkow the problem
_________________
Back to top
Offline View user's profile Send private message Visit poster's website
dari

Site Admin
Site Admin


Joined: Mar 03, 2003
Posts: 6271
Location: Washington Township, NJ, USA

PostPosted: Fri Oct 31, 2003 12:24 pm    Post subject: Reply with quote

stick:
Code: › global $gallery;

underneath
Code: › <?php

_________________
Back to top
Offline View user's profile Send private message Visit poster's website
JeremyNell

Knowledgeable User
Knowledgeable User


Joined: Oct 09, 2003
Posts: 48

PostPosted: Fri Oct 31, 2003 12:25 pm    Post subject: Reply with quote

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
Offline View user's profile Send private message
JeremyNell

Knowledgeable User
Knowledgeable User


Joined: Oct 09, 2003
Posts: 48

PostPosted: Fri Oct 31, 2003 12:33 pm    Post subject: Reply with quote

ok, it works now.

How do I remove the text underneath the thumbnail?
Back to top
Offline View user's profile Send private message
dari

Site Admin
Site Admin


Joined: Mar 03, 2003
Posts: 6271
Location: Washington Township, NJ, USA

PostPosted: Fri Oct 31, 2003 12:36 pm    Post subject: Reply with quote

remove these lines from random-support.php:
Code: ›
$content .= "<br><center>From: <a href=\"".$albumURL."\">".$album->fields["title"]."</a></center>";

$content .= "<br><center>From: <a href=\"".$line[1]."\">".$line[2]."</a></center>";

$content .= "<br><center>From: <a href=\"".$albumURL."\">".$album->fields["title"]."</a></center>";

$content .= "<br><center>From: <a href=\"".$albumURL."\">".$album->fields["title"]."</a></center>";

$content .= "<br><center>From: <a href=\"".$line[1]."\">".$line[2]."</a></center>";

$content .= "<br><center>From: <a href=\"".$albumURL."\">".$album->fields["title"]."</a></center>";

$caption = $album->getCaption($index);
                        if ($caption) {
                                $content.="<br><center>".$caption."</center>";
                        }
                        $content .= "<br><center>From: <a href=\"".$albumURL."\">".$album->fields["title"]."</a></center>";

_________________
Back to top
Offline View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    NukedGallery.net Forum Index » PHP-Nuke Issues » Blocks View previous topicPrinter friendly versionView next topic

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours

Powered by phpBB © phpBB Group



Sponsors: Web HostingDedicated ServersDomain NamesDomain Name RegistrationDedicated Web HostingSearch Engine OptimisationSEOWeb Design New YorkSEO Web DesignWeb hosting AustraliaSEO

6th year online! 2003-2008
Legal • Use of this site consitutes agreement to the Acceptable Use Policy
Hosted by Implosion WorksSourceForge.net Logo • Theme by TonicMedia