Support Forums | Demo Gallery [1.x] [2.x] | 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  

Can some plz take a look at random block

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

Beginner
Beginner


Joined: Jul 30, 2003
Posts: 5

PostPosted: Sat Aug 09, 2003 11:29 am    Post subject: Can some plz take a look at random block Reply with quote

I have been browsing through the forums looking for answers but I have not seen one that has the same problem... I finally got the gallery and the random block up. however the random block shows this messge.... above the picture....

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

It is on my homepage at http://www.***.com(earsed after i figure out how dumb i was Smile If you do'nt mind check it out and tell me how i maybe able to fix it. Thx. I've tried messing with the session file.. but when i do i only make it worse. Any Help Appreciated. Thx.


Last edited by bopile on Sat Aug 09, 2003 12:12 pm; edited 1 time in total
Back to top
Offline View user's profile Send private message
AdBot
   Post subject: Can some plz take a look at random block  

Back to top
bopile

Beginner
Beginner


Joined: Jul 30, 2003
Posts: 5

PostPosted: Sat Aug 09, 2003 12:03 pm    Post subject: Re: Can some plz take a look at random block Reply with quote

some more info.. I posted $_HTTP_SESSION_VARS ==> $_SESSION all around the error but then it just produces parse errors...

below is the lines.. it is refering too.... where do i put this $_HTTP_SESSION_VARS ==> $_SESSION Thanks.


/* Start a new session, or resume our current one */
session_start();
/* emulate register_globals for sessions */
if (!$gallery->register_globals) {
foreach($HTTP_SESSION_VARS as $key => $value) {
eval("\$$key = & \$HTTP_SESSION_VARS[\"$key\"];");
}
}
Back to top
Offline View user's profile Send private message
bopile

Beginner
Beginner


Joined: Jul 30, 2003
Posts: 5

PostPosted: Sat Aug 09, 2003 12:11 pm    Post subject: Reply with quote

ok.. i'm a dummy. found your old code.... for future ppl looking replace the old code with that i posted about with this at the emulate register line.....


/* emulate register_globals for sessions */
if (!$gallery->register_globals) {
foreach($_SESSION as $key => $value) {
eval("\$$key = & \$_SESSION[\"$key\"];");
}
}


Works now.
Back to top
Offline View user's profile Send private message
slackbladder

Moderator
Moderator


Joined: Mar 29, 2003
Posts: 1038
Location: Cambs,UK

PostPosted: Sat Aug 09, 2003 1:14 pm    Post subject: Reply with quote

Bopile - Nice site BTW. Good to see a nuke site not looking too much like a nuke site! Laughing

I notice you have an OUT OF BOUNDS error - try deleting your block-random.cache - it's wrong.
Back to top
Offline View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
bopile

Beginner
Beginner


Joined: Jul 30, 2003
Posts: 5

PostPosted: Mon Aug 11, 2003 12:43 pm    Post subject: Reply with quote

-Thanks for the info... I read through the forums and saw that the cache file need to be deleted. So i did that under the albums directory. However it continued about an hour later in getting that rand() to long error in albums.php. I could not figure it out.. and assume i had an older version of random block... so i downloaded the improved random block and reinstalled everything. so far so good. but i'll be able to tell more in a day when it does a couple refreshes. I noticed some ppl posting about the last picture in the album giving you this error. I hope that's what improved random block fixed.

Again my website is www.vicksburgsoccer.com I reposted it b/c of the above compliment. I really like gallery over copermine. That's why i'm tring hard to get this random box to work.

I'm working on an alumni php page for my site where past people can put where they used to play with some info like years and email in a db. I'm not saying i'll ever get it working correctly. But if anyone else has ever seen a block like that .. please give me a msg or something, so i can have a template to view.

I got my fingers crossed on the gallery. I appreciate you guys working so hard on this for everyone. thx. from me.
Back to top
Offline View user's profile Send private message
slackbladder

Moderator
Moderator


Joined: Mar 29, 2003
Posts: 1038
Location: Cambs,UK

PostPosted: Mon Aug 11, 2003 2:08 pm    Post subject: Re: Can some plz take a look at random block Reply with quote

Hi,

Add this:

Code: › $count = floatval($count);


in front of:

$choose = rand(1, $count);

in your random_support.php (around line 196)
Back to top
Offline View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
dari

Site Admin
Site Admin


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

PostPosted: Mon Aug 11, 2003 2:10 pm    Post subject: Re: Can some plz take a look at random block Reply with quote

good one Smile
i had that problem a while ago, had fixed it (with your solution), but then in the muck of things, the old block file got overwritten, and i never ran into the problem again (thus i couldn't dig up the fix). i don't know why it sometimes returns a string and other times a valid float/int/whatever that's needed...
Back to top
Offline View user's profile Send private message Visit poster's website
bopile

Beginner
Beginner


Joined: Jul 30, 2003
Posts: 5

PostPosted: Mon Aug 11, 2003 5:48 pm    Post subject: Reply with quote

thx. slackbladder.. that seemed to fix this of rand() to long error problem... again.. i hope it does'nt come back Smile

Also on the alumni php note..... I found a php/mysql code and just fixed the html to fit my site. It's not a true block.. but it works... as a page within a module.

Thx again for all that has worked on gallery. keep up the good work and thx for the replies to my questions.
Back to top
Offline View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    NukedGallery.net Forum Index » PHP-Nuke Integration » 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: Dedicated ServersDomain NamesWeb HostingDomain Name RegistrationDedicated Web HostingWeb Design New YorkCompare VoIPseo packagesSEO CompanyNew York Yellow PagesFind LocationsVOIP Phone ServiceNeckermannOnline internetSEORestaurant Locator • Get great HP coupons from CouponSnapshot • Search for great dell coupons at CouponSnapshot.com.au • Graduation DressesAndroid TabletSEO IndiaBuy Phen375fuel filter

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