| Author |
Message |
Lurking
Beginner


Joined: Nov 03, 2003 Posts: 1
|
Posted: Tue Nov 04, 2003 2:44 pm Post subject: Random Photo Block Mod - Multiple Images |
|
|
I've taken the truly excellent NG-RandomImproved block and made a cheesy little mod to it, allowing multiple images from the gallery in the block.
It's not perfect, but it looks pretty good to me so far. See it at http://bruce.oec-sys.com and download it from there.
I'd love to see if someone can make it better. I also must say that the original block is terrific, and it was really nice to see something so easy to 'hack' into what I needed!
http://bruce.oec-sys.com [oec-sys.com] |
|
| Back to top |
|
|
AdBot
|
| Post subject: Random Photo Block Mod - Multiple Images |
|
|
|
|
|
| Back to top |
|
 |
dari
Site Admin


Joined: Mar 03, 2003 Posts: 6284 Location: Washington Township, NJ, USA
|
Posted: Tue Nov 04, 2003 2:52 pm Post subject: |
|
|
hey, that's a pretty sweet little mod you made
i'll have to see what i can do with it, maybe making it similar to the updated album block (horizontal/vertical switch, number of thumbs, etc)... _________________
 |
|
| Back to top |
|
|
achiral
Beginner


Joined: Oct 29, 2003 Posts: 16
|
Posted: Tue Nov 04, 2003 3:07 pm Post subject: |
|
|
| it would be really cool if you could incorporate the random photo and featured photo options into the one block |
|
| Back to top |
|
|
efurban
Beginner


Joined: Nov 01, 2003 Posts: 5
|
Posted: Thu Nov 06, 2003 5:39 pm Post subject: |
|
|
it'll be really nice if the original block size can be kept. We can do the scrolling thing
for the multiple pics.
I've seen it done somewhere before. |
|
| Back to top |
|
|
dari
Site Admin


Joined: Mar 03, 2003 Posts: 6284 Location: Washington Township, NJ, USA
|
Posted: Thu Nov 06, 2003 8:07 pm Post subject: |
|
|
i will definitely look into it
i am out of town from about 5PM Eastern Time (US) tomorrow until Sunday evening and won't have access to my development servers. But I will start to work on it Monday. _________________
 |
|
| Back to top |
|
|
Aylwin
Novice


Joined: Sep 16, 2003 Posts: 27
|
Posted: Fri Nov 07, 2003 12:27 am Post subject: |
|
|
Bruce, your timing couldn't be better! I absolutely love the random photo block and was just about to ask if anyone knew how to modify the block to display multiple photos. This is now fantastic!
edit
I just tried to install it but I got the following error:
Warning: rand() expects parameter 2 to be long, string given in /home/username/public_html/modules/gallery/random_support.php on line 236
ERROR: requested index [] out of bounds [9]
Fatal error: Call to a member function on a non-object in /home/username/public_html/modules/gallery/classes/Album.php on line 705
Help please?
edit |
|
| Back to top |
|
|
Stevesteve
Beginner


Joined: Sep 09, 2003 Posts: 13
|
Posted: Fri Nov 07, 2003 1:23 am Post subject: |
|
|
i'm getting the same error as above...
http://getitindia.net (bottom right corner).
any ideas? |
|
| Back to top |
|
|
Stevesteve
Beginner


Joined: Sep 09, 2003 Posts: 13
|
Posted: Fri Nov 07, 2003 1:42 am Post subject: |
|
|
found on the gallery.menalto.com forums.
in random_support.php find this line:
Code:
$choose = rand(1, $count);
and replace it with
Code:
$choose = rand(1, (int) $count);
fyi
http://gallery.menalto.com/modules.php? ... ighlight=2
I just tried it and it works for me  |
|
| Back to top |
|
|
Aylwin
Novice


Joined: Sep 16, 2003 Posts: 27
|
Posted: Fri Nov 07, 2003 1:55 am Post subject: |
|
|
Steve, I wish I saw your post before trying to fix it myself. I don't know anything about PHP so I had to go about it the hard way. I've gotten it working now but I did it by modify my existing random_support.php file by trial and error.
Well, as long as it works!
By the way, what if I want 2 rows (e.g. 3 x 2)? Is that an easy mod? |
|
| Back to top |
|
|
slackbladder
Moderator


Joined: Mar 29, 2003 Posts: 1038 Location: Cambs,UK
|
|
| Back to top |
|
|
Stevesteve
Beginner


Joined: Sep 09, 2003 Posts: 13
|
|
| Back to top |
|
|
Aylwin
Novice


Joined: Sep 16, 2003 Posts: 27
|
|
| Back to top |
|
|
Stevesteve
Beginner


Joined: Sep 09, 2003 Posts: 13
|
Posted: Tue Nov 18, 2003 11:17 pm Post subject: |
|
|
how easy was that!
Don't know how to make three rows but i know how to do four...... |
|
| Back to top |
|
|
Stevesteve
Beginner


Joined: Sep 09, 2003 Posts: 13
|
Posted: Mon Dec 08, 2003 9:51 pm Post subject: |
|
|
any ideas how to exclude a certain album from appearing in the random block? I have some photos that are not for kiddies so would prefer they were not shown in the block BUT still accessable via the gallery.
Cheers,
Steve |
|
| Back to top |
|
|
Stevesteve
Beginner


Joined: Sep 09, 2003 Posts: 13
|
Posted: Mon Dec 08, 2003 10:07 pm Post subject: |
|
|
| answered my own question...block only show pics viewable by EVERYONE, so just forced users to login to see that album. |
|
| Back to top |
|
|
|
|
|
|
|