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  

Updated Gallery Block Problem/Question
Goto page Previous  1, 2, 3
 
Post new topic   Reply to topic    NukedGallery.net Forum Index » PHP-Nuke Integration » Blocks View previous topicPrinter friendly versionView next topic
Author Message
dari

Site Admin
Site Admin


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

PostPosted: Mon Jun 23, 2003 9:03 pm    Post subject: Reply with quote

ok, let me sleep on it and i'll dig through some code tomorrow and see what i can come up with. if you can email me your block file, i can take a look at it as well.
Back to top
Offline View user's profile Send private message Visit poster's website
AdBot
   Post subject:  

Back to top
dari

Site Admin
Site Admin


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

PostPosted: Wed Jun 25, 2003 9:29 am    Post subject: Re: Updated Gallery Block Problem/Question Reply with quote

the error has been fixed. it stemmed from a couple of things. First, the user was being hosted on a virtual hosted system, so the values for WEB_DIR,etc had to be hardcoded in. Second, a coding error on our part here. We neglected to check to see if the count of parent albums was zero. This raised a huge SQL error. here is the fix.
in the block-updatedGallery.php file, find the line that reads:
Code: ›         while(!$the_end) {

immediately above that line, add:
Code: › if(count($parentCountList) != 0) {

and close out the if block by adding a
Code: › }
after the lines reading
Code: ›                 else $k = key($parentCountList);
        }

the final chunk of code will look like this:
Code: › if(count($parentCountList) != 0) {
   while(!$the_end) {
      $myAlbum = new Album();
      $myAlbum->load($k);
      echo "setting up gallery database, name= ".$myAlbum->fields['name'];
      $res = sql_query("UPDATE ".$prefix."_gallery SET num_children = ".$parentCountList[$k]." WHERE album_name = '".$myAlbum->fields['name']."'", $dbi) or die(mysql_error());
      $s = next($parentCountList);
      if ($s == false) $the_end = true;
      else $k = key($parentCountList);
   }
}
Back to top
Offline View user's profile Send private message Visit poster's website
krathis

Beginner
Beginner


Joined: Jun 01, 2003
Posts: 2

PostPosted: Sat Jul 05, 2003 9:19 am    Post subject: Re: Updated Gallery Block Problem/Question Reply with quote

Fresh Install of: Nuke 6.7 and Gallery 1.3.4
Existing: PHP 4.3.2 , Apache 1.3.2.7

When a user is not logged in, the block is correctly displayed and says to log in..when the user logs in, the following error is displayed:

"Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/k/public_html/includes/sql_layer.php on line 286"

The block header is displayed along with the updated gallery folder, however the block border is not drawn and everything else is misaligned due to the error.

I took a look at the file and couldnt find anything that was funky. Shocked
I've also looked around here and tried all the suggestions I could find--No luck. Any ideas?

Thanks,
Bob

P.s. Finally got random block 'stabilized'. It only works correctly on the right side, and when its not the first block at the top. Wink Otherwise it errors out. Anyone else have this problem?


Last edited by krathis on Sun Jul 13, 2003 11:26 am; edited 1 time in total
Back to top
Offline View user's profile Send private message
dari

Site Admin
Site Admin


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

PostPosted: Mon Jul 07, 2003 7:32 am    Post subject: Reply with quote

ok, there are only two instances of calling that function in the block:
Code: ›         while($row=sql_fetch_row($res)) {
        $visitTime = sql_fetch_row($visitinfo,$dbi);


my best guess is that the query is returning a null result. did you run the addfields.php file to update your nuke database?
Back to top
Offline View user's profile Send private message Visit poster's website
krathis

Beginner
Beginner


Joined: Jun 01, 2003
Posts: 2

PostPosted: Mon Jul 07, 2003 9:52 am    Post subject: Re: Updated Gallery Block Problem/Question Reply with quote

Ah ha! I am POSITIVE I ran the add_fields scripts and got a successful result. However, after your comment, I went in a looked at the db and found the field were in fact, not there. I ran it again, and it "took", and now everything seems groovy.

Thanks,

Bob
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
Goto page Previous  1, 2, 3

 
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