Home
Scripts
Contributions (Pro Mod Access)
FAQ's
Downloads
Support Forum
  SnailSource.com [Logo]
Calendar LiteCalendar Lite (Demo)
Calendar ProCalendar Pro (Demo)
LinksLinks Pro (Demo)
Log in to check your private messagesForum
RegisterRegister
Log inLog in
Log in to check your private messagesLog in to check your private messages SearchSearch FAQFAQ ProfileProfile MemberlistMemberlist UsergroupsUsergroups Join GroupsJoin Groups

Random Photo Block?
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9  Next
 
Post new topic   Reply to topic   printer-friendly view    SnailSource.com Forum Index -> Gallery->phpBB2 Integration Support printer-friendly view
View previous topic :: View next topic  
Author Message
Tobias



Joined: 29 Sep 2002
Posts: 12



Hlp* 0.10
PostPosted: Wed Nov 06, 2002 4:19 pm    Post subject: Reply with quote Direct link

@fishfreek

I was talking about index.php, not index.tpl Very Happy

You have to split the code, the "select random picture" must be included in your portal code, the caching code must be called by a cronjob or anything else.

That is just how I would try to do it, but I do not have the time right now and maybe not enough experience ;-(

Tobi
Back to top
View user's profile Send private message
SlatFats



Joined: 30 Sep 2002
Posts: 2



Hlp* 0.10
PostPosted: Sun Nov 10, 2002 7:50 am    Post subject: Reply with quote Direct link

I have a question. I got this mod to work after many searches on the gallery website. But, I still have a question. How random is this random mod. I don't think it has shown my newest photos and I have reloaded about 100 times now and I only have about 50 - 70 pictures in the EVERYBODY sections. So, will it show my new pictures. So far it is only showing pictures that were in the gallery before I installed this mod.

***EDIT***
Sorry, I think it took about 150 Reloads and then one of my new pictures was displayed. Very Happy Good Work Guys!
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address
spectre



Joined: 01 Aug 2002
Posts: 22



Hlp* 0.10
PostPosted: Sun Nov 10, 2002 10:07 pm    Post subject: Good Reply with quote Direct link

Glad it finally worked for ya. Guess random is as random does Very Happy .
Back to top
View user's profile Send private message Visit poster's website
SlatFats



Joined: 30 Sep 2002
Posts: 2



Hlp* 0.10
PostPosted: Mon Nov 11, 2002 4:08 am    Post subject: Reply with quote Direct link

Quote:

Warning: php_network_getaddresses: getaddrinfo failed: No address associated with hostname in /home/b-side/public_html/flipped/includes/template.php(127) : eval()'d code on line 260

Warning: Failed opening 'http://flipped.b-sidegraphics.com/modules.php?op=modload&name=gallery&file=index&include=block-random.php' for inclusion (include_path='') in /home/b-side/public_html/flipped/includes/template.php(127) : eval()'d code on line 260


I go this error. I didn't do any changes to anything, it just showed up two consecutive times. After that it seems to be working fine. I don't know if it might be something about my server not responding or not. I'm guessing that that is the case but it makes no sense that two files on the same server had trouble talking to each other. Any ideas?
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address
technoart



Joined: 15 Nov 2002
Posts: 1
Location: West Virginia: Wonderland of the East Coast


Hlp* 0.10
PostPosted: Tue Nov 19, 2002 9:35 pm    Post subject: Reply with quote Direct link

bigbear wrote:
I sort of figured out why it doesn't work for some pictures, but do not know how to go about fixing it...

Code:
forum/phpBB2/modules.php?set_albumName=3D_album&id=unknown&op=modload&name=gallery&file=index&include=view_photo.php


Sometimes gallery cannot get the name of the file, which causes it to have the id=unknown string. Is there a minimum amount of characters that must be used for a JPEG file in order for gallery to work correctly? (This random photo block)


I just installed the Gallery module this weekend, and just today noticed this problem you'd mentioned was happening, err... sometimes! (About 1 in 10 for me.)

Here's a quick hack that has cured the problem for me (once I have more time to study what is going on in the script, I'll post again...)...

Quote:
-------------------------
Look for...
-------------------------
if (isset($index)) {
$id = $album->getPhotoId($index);
echo ""."<a href=" . "../phpBB/" . makeAlbumUrl($album->fields["name"], $id) .">"
.$album->getThumbnailTag($index)
."</a>";
-----------------------
Replace with......
-----------------------
if (isset($index)) {
$id = $album->getPhotoId($index);

if ($id == "unknown"){

echo ""."<a href=" . "../phpBB/". makeAlbumUrl($album->fields["name"])." > "
.$album->getThumbnailTag($index)
."</a>";

} else {

echo ""."<a href=" . "../phpBB/" . makeAlbumUrl($album->fields["name"], $id) .">"
.$album->getThumbnailTag($index)
."</a>";
}


NOTE: Modify the "a href="<PATH>" as required for _your_ setup!
_________________
http://www.WVForums.com
Discover a scenic wonderland,
yet-to-be-discovered by most Americans
Back to top
View user's profile Send private message Visit poster's website
kenisswell



Joined: 08 Aug 2002
Posts: 22



Hlp* 0.10
PostPosted: Fri Nov 29, 2002 11:39 am    Post subject: error Reply with quote Direct link

I also get an error some of the time. This is when the home page loads.


Warning: rand() expects parameter 2 to be long, string given in /home/virtual/site185/fst/var/www/html/yors/phpBB2/modules/gallery/block-random.php on line 138
ERROR: requested index [] out of bounds [2]
Fatal error: Call to a member function on a non-object in /home/virtual/site185/fst/var/www/html/yors/phpBB2/modules/gallery/classes/Album.php on line 571


block-random.php line 138: $choose = rand(1, $count);
album.php line 571: usort($this->photos, create_function('$a,$b', $func));


check it out www.yors.org

If I refresh the page 5 or 10 times the photo comes up. Its wierd.

Help

ken
_________________
Ken S
Back to top
View user's profile Send private message
kenisswell



Joined: 08 Aug 2002
Posts: 22



Hlp* 0.10
PostPosted: Fri Nov 29, 2002 11:55 am    Post subject: Re: error Reply with quote Direct link

Hey what do you know I found the solution to my errors (here).

Heres the jist of the solution. Do this to fix this error:
# Edit block-random.php

#
#-----[ FIND ]------------------------------------------
#
function choosePhoto($album) {
global $cache;

$count = $cache[$album->fields["name"]];
#
#-----[ AFTER, ADD ]------------------------------------------
#
$count += 0;

DONE! Very Happy

Ken
_________________
Ken S
Back to top
View user's profile Send private message
spectre



Joined: 01 Aug 2002
Posts: 22



Hlp* 0.10
PostPosted: Fri Nov 29, 2002 9:23 pm    Post subject: Excellent Reply with quote Direct link

Great job searching. I've read that some with PHP 4.22 are having this problem. Glad you found the fix.
Back to top
View user's profile Send private message Visit poster's website
synapse



Joined: 03 Jan 2003
Posts: 9



Hlp* 0.10
PostPosted: Tue Jan 07, 2003 1:47 am    Post subject: Reply with quote Direct link

I tried that and now I get an

Code:
No highlight!
error

it says

Code:
Fatal error: Call to a member function on a non-object in /home/synaptic/public_html/forum/modules/gallery/view_photo.php on line 77


when I click on it.

Any help?

Thanks!

-Dan
Back to top
View user's profile Send private message
Heartless_King



Joined: 29 Dec 2002
Posts: 8
Location: United Kingdom


Hlp* 0.10
PostPosted: Tue Mar 04, 2003 4:48 am    Post subject: Reply with quote Direct link

Is there anyway to make it only look at one album? Not just make a random pic from all of them? Thanx.

King Cool
_________________
Leader and Founder of the Heartless Crew
"Keep it Heartless... Always"
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    SnailSource.com Forum Index -> Gallery->phpBB2 Integration Support All times are GMT + 1 Hour
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9  Next
Page 7 of 9

 
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

This board is protected by Phpbbantispam
Board Security

15557 Attacks blocked

Powered by phpBB © 2001, 2005 phpBB Group