Nukemods Forum  
» Log in
User Name:

Password:

Not a member yet?
Register Now!
» Online Users: 55
5 members and 50 guests
bea9qgchcomberc, deb5tdtconskd9o, peardir46, ral6qkeighqenpa, whyjjinternetvi
Most users ever online was 611, 03-21-2008 at 10:10 PM.
» .::.
» .:.

Go Back   Nukemods Forum > NM Staff > Purged Topics

Reply
 
LinkBack Thread Tools Display Modes
Problem with the Random Picture Block
Old
  (#1 (permalink))
Junior Member
 
Status: Offline
Posts: 94
Join Date: Jan 2003
Location: Brooklyn
Problem with the Random Picture Block - 04-10-2003, 01:31 AM

I followed the dirctions in the Readme file, I pasted all the code where it needed to go, then following the directions I added the link into the block and activated.... all it did was show the block with the link in it as text...

so I avtivated the "Block-random.php" then that block showed a random image but it had this error above it:

Warning: Invalid argument supplied for foreach() in /home/bayridge/public_html/modules/gallery/session.php on line 55

and when you click on the random image the image goes to a non existant page because my galleries are stored here:

http://www.bayridgenights.com/images/gallery/album01/

Not, Here

http://www.bayridgenights.com/modules/gallery/album01/

So what can i do to correct all of these problems ?
  Send a message via AIM to Br00klynzzfinest  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#2 (permalink))
Junior Member
 
Status: Offline
Posts: 94
Join Date: Jan 2003
Location: Brooklyn
04-10-2003, 02:47 PM

ok, I worked out the directory issue... no biggy, but that Warning: Invalid argument supplied for foreach() in /home/bayridge/public_html/modules/gallery/session.php on line 55

error wont die.
  Send a message via AIM to Br00klynzzfinest  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#3 (permalink))
Senior Member
 
Status: Offline
Posts: 2,905
Join Date: Sep 2002
04-10-2003, 03:53 PM

Worked yout the directory issue? So you got the block-random.php put in the right place?
It does not go in the blocks folder. It goes in the modules/gallery folder
If you renamed your gallery, you need to change the name in the link in the block also.

Code:
http://your.server/modules.php?op=modload&name=your-gallery-name&file=index&include=block-random.php
replace your-gallery-name with your Gallery module's name.
If you did not change the name of the gallery module, then it should simply be gallery.
Also replace your.server with your servers name.

mikem
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#4 (permalink))
Junior Member
 
Status: Offline
Posts: 94
Join Date: Jan 2003
Location: Brooklyn
04-10-2003, 05:04 PM

Ok... got it all done.. I go into the admin panel make the block by pasting in this link

Code:
http://www.bayridgenights.com/modules.php?op=modload&name=gallery&file=index&include=block-random.php
But the block shows with the link text in the block...

  Send a message via AIM to Br00klynzzfinest  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#5 (permalink))
Senior Member
 
Status: Offline
Posts: 2,905
Join Date: Sep 2002
04-10-2003, 05:40 PM

OK now for the next thing.
Make sure you pasted the code into your theme.php in the correct spot. Paste your entire function sidebox from your theme.php here so I can see it with your code.
Also, make sure you albums directory is CHMOD 777 so that the block-random.cache can be written to it.

mikem
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#6 (permalink))
Junior Member
 
Status: Offline
Posts: 94
Join Date: Jan 2003
Location: Brooklyn
04-10-2003, 06:22 PM

It was already 777

Code:
/************************************************************/
/* Function themesidebox()                                  */
/*                                                          */
/* Control look of your blocks. Just simple.                */
/************************************************************/

        if (@file_exists($content)) {
                $fp = fopen ($content, "r");
                $content = fread($fp, filesize($content));
                fclose ($fp);
                $content = "?>$content<?";
                $content = eval($content);
        } else if (eregi("^http", $content)) { 
                $fp = fopen ($content, "r"); 
                $content = fread($fp, 65535); 
                fclose ($fp); 
        }

function themesidebox($title, $content) {
    $tmpl_file = "themes/DarkBlue/blocks.html";
    $thefile = implode("", file($tmpl_file));
    $thefile = addslashes($thefile);
    $thefile = "\$r_file=\"".$thefile."\";";
    eval($thefile);
    print $r_file;
}
  Send a message via AIM to Br00klynzzfinest  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#7 (permalink))
Senior Member
 
Status: Offline
Posts: 2,905
Join Date: Sep 2002
04-10-2003, 08:09 PM

Your code is pasted wrong.

here:
Code:
/************************************************************/ 
/* Function themesidebox()                                  */ 
/*                                                          */ 
/* Control look of your blocks. Just simple.                */ 
/************************************************************/ 



function themesidebox($title, $content) { 
        if (@file_exists($content)) { 
                $fp = fopen ($content, "r"); 
                $content = fread($fp, filesize($content)); 
                fclose ($fp); 
                $content = "?>$content<?"; 
                $content = eval($content); 
        } else if (eregi("^http", $content)) { 
                $fp = fopen ($content, "r"); 
                $content = fread($fp, 65535); 
                fclose ($fp); 
        } 
    $tmpl_file = "themes/DarkBlue/blocks.html"; 
    $thefile = implode("", file($tmpl_file)); 
    $thefile = addslashes($thefile); 
    $thefile = "\$r_file=\"".$thefile."\";"; 
    eval($thefile); 
    print $r_file; 
}
mikem
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#8 (permalink))
Junior Member
 
Status: Offline
Posts: 94
Join Date: Jan 2003
Location: Brooklyn
04-11-2003, 12:58 AM

Thank you very much for all your help. Its working great.
  Send a message via AIM to Br00klynzzfinest  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Random Quote Block lt_s7orm Nuke 7.x - Blocks 2 03-18-2005 09:10 AM
Random Picture Block freeby Site design 1 07-13-2003 02:47 AM
Gallery Random Picture Block missing mikititan Nuke 6.5 to 6.9 - Blocks 1 05-07-2003 12:20 PM
Randoom Picture Block teamjesus Nuke 6.5 to 6.9 - Blocks 2 04-21-2003 03:34 AM
random picture block samson Purged Topics 2 12-02-2002 09:38 PM




vBulletin Skin developed by: vBStyles.com


LinkBacks Enabled by vBSEO 3.3.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31