The inside info on the Random Block

bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Tue, 2002-08-20 03:16

Ok, here's the good, the bad and the ugly about the Random block.

The good:

    <LI> You can find the Random Block <!-- BBCode Start --><A HREF="http://gallery.menalto.com/modules.php?op=modload&name=phpWiki&file=index&pagename=Contributed%20Code&" TARGET="_blank">here</A><!-- BBCode End -->.
    <LI> It works with PostNuke, PHP-Nuke and in standalone mode.
    <LI> While it has a few issues, it's pretty fast and reliable

The bad: The current random block code is known to:

    <LI> Inflate session count numbers on PostNuke
    <LI> be hard to use on some sites because of the way it uses include("http://..."); calls

The ugly:
I have no time to support this code. I know that it's got issues and could be rewritten, but there are plenty of people who could work on that. Instead, I'm focussing on getting G2 in gear so that we can all have a better Gallery. I'm sure y'all understand this. If somebody out there wants to:

    <LI> Be a moderator for this forum and provide assistance
    <LI> Take over as the owner for this code (it would be a big plus if you own all three implementations -- PostNuke, PHP-Nuke and standalone)

You should send me a private message, since I'm probably not going to be spending much time even reading this forum.

-Bharat[/]

[/]

[/]

 
jokker
jokker's picture

Joined: 2002-10-02
Posts: 9
Posted: Thu, 2002-10-03 22:33

Why i cant download the random Block?

The link is not working!!!
Please where can i download RANDOM BLOCK???

 
SamBeckett
SamBeckett's picture

Joined: 2002-09-29
Posts: 146
Posted: Tue, 2003-03-18 19:59

yes. please update this for use with phpnuke 6.5
the link doesnt work :mad:

 
dmolavi
dmolavi's picture

Joined: 2002-12-05
Posts: 573
Posted: Mon, 2003-04-14 12:36

http://www.yankeesinthesouth.org
links to both the block-random.php and the fix for phpNuke 6.5 (for gallery 1.3.3 and 1.3.4-cvs)

 
Cyklone
Cyklone's picture

Joined: 2003-04-02
Posts: 4
Posted: Mon, 2003-04-14 19:35

LOL dmolavi.. you have to reg to get it? Jeez, don't you peeps have anything to return for getting things for free, instead of just trying to build your userbase.

Got a better one anyway from a "no reg req" site.

Bang me and call me Sally!

 
Riasah

Joined: 2003-05-23
Posts: 2
Posted: Fri, 2003-05-23 05:48

I've tried registering twice now with YankeesInTheSouth (using two different usernames and two different email addresses) and no luck, I never get the automated confirmation email :(

Does anyone know where I could get the fix for this, I am currently using PHP-Nuke v.6.5 and Gallery v. 1.3.4-cvs-34

Have tried all of the tips and hints listed on this forum but am still getting the:

Quote:
Warning: Invalid argument supplied for foreach() in /home/mywebsitefileshere/html/blocks/block-Random_Photo.php on line 151

Any help in this matter would be so greatly appreciated :D

 
Doctor_WHO
Doctor_WHO's picture

Joined: 2003-02-23
Posts: 26
Posted: Sun, 2003-06-01 21:45
Cyklone wrote:
LOL dmolavi.. you have to reg to get it? Jeez, don't you peeps have anything to return for getting things for free, instead of just trying to build your userbase.

Got a better one anyway from a "no reg req" site.

Bang me and call me Sally!

Mind sharing where you got the better one? The registration on dmolavi's site is not working for me either.

 
waveboy

Joined: 2003-05-31
Posts: 2
Posted: Wed, 2003-06-04 03:33
Riasah wrote:
I've tried registering twice now with YankeesInTheSouth (using two different usernames and two different email addresses) and no luck, I never get the automated confirmation email :(

Does anyone know where I could get the fix for this, I am currently using PHP-Nuke v.6.5 and Gallery v. 1.3.4-cvs-34

Have tried all of the tips and hints listed on this forum but am still getting the:

Quote:
Warning: Invalid argument supplied for foreach() in /home/mywebsitefileshere/html/blocks/block-Random_Photo.php on line 151

Any help in this matter would be so greatly appreciated :D

I also have this problem ........... :cry:
I am using php 4.3.2 and Gallery 1.3.3 ...............

 
beckett
beckett's picture

Joined: 2002-08-16
Posts: 3474
Posted: Wed, 2003-06-04 17:57

I'm not sure what random block you're using, but I know in the case of the original random block, there is a small bug that causes an equivalent error. To fix it, change this line:
    $choose = rand(1, $count);
to:
    $choose = rand(1, (int) $count);

-Beckett (

)

And if you're using PHP-Nuke 6.5, you shouldn't be using Gallery 1.3.3. You should be using Gallery 1.3.4, which contains updated code to handle changes in PHP-Nuke after version 6.

 
waveboy

Joined: 2003-05-31
Posts: 2
Posted: Thu, 2003-06-05 17:37

Thank for your help ~~ :wink:

 
HnyBear

Joined: 2003-06-30
Posts: 2
Posted: Mon, 2003-06-30 05:29

I am having some issues as well. I receive one of two respones once in awhile.

The first is when the Random Block trys to pull up a pic sometimes

ERROR: requested index [6] out of bounds [2]
Fatal error: Call to a member function on a non-object in /home/drugzcla/public_html/Photos/classes/Album.php on line 675

The second is when you click on certain pics. They work in the gallery but not from the block. Most do this is only a few pics making this error.

Fatal error: Call to a member function on a non-object in /home/drugzcla/public_html/Photos/view_photo.php on line 80

I have made the small adjustment in the block you have addressed but that didn't appear to help or hurt it.

I am running gallery 1.3.4 and phpnuke 6.5

 
skyttegaard

Joined: 2003-07-21
Posts: 14
Posted: Wed, 2003-07-23 20:15
HnyBear wrote:
I am having some issues as well. I receive one of two respones once in awhile.

The first is when the Random Block trys to pull up a pic sometimes

ERROR: requested index [6] out of bounds [2]
Fatal error: Call to a member function on a non-object in /home/drugzcla/public_html/Photos/classes/Album.php on line 675

The second is when you click on certain pics. They work in the gallery but not from the block. Most do this is only a few pics making this error.

Fatal error: Call to a member function on a non-object in /home/drugzcla/public_html/Photos/view_photo.php on line 80

I have made the small adjustment in the block you have addressed but that didn't appear to help or hurt it.

I am running gallery 1.3.4 and phpnuke 6.5

Your second error occurs when gallery_random picks a thumbnail that corresponds to a nested album in stead of a photo.
I've just posted another entry about this:
http://gallery.menalto.com/index.php?name=PNphpBB2&file=viewtopic&t=1134&postdays=0&postorder=asc&start=23