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.
PHPNuke Blocks
Updated Gallery Files for phpNuke 6.5

Posted on Wednesday, April 09, 2003 @ 13:40:47 CDT
So you've upgraded your site to phpNuke 6.5 and have everything working the way you want it. Your Gallery is perfect. Then, you try to view it as a normal, registered user....

THIS PATCH IS FOR VERSIONS OF GALLERY < 1.3.4-cvs20. AS OF 1.3.4-cvs20, THESE CHANGES HAVE BEEN INCORPORATED INTO GALLERY.

It seems that a common error message that pops up with the upgrade to phpNuke 6.5 is:

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource...
Well, it has to do with the new database table structure in phpNuke 6.5 and the fact that Gallery hasn't been updated (nor should it be) to reflect this change. Choose the file you need to download:
For Gallery 1.3.4-cvs:Grab the updated files.
For Gallery 1.3.3:Grab the updated files.
This is a tar file, with four files included:
  • gallery/init.php
  • gallery/classes/nuke5/AdminUser.php
  • gallery/classes/nuke5/User.php
  • gallery/classes/nuke5/UserDB.php
Simply untar the file and replace your files with these. The errors will disappear.
In case you're wondering, the changes made are (note that line numbers are approximate, the given numbers are for 1.3.3, and for 1.3.4cvs versions differ slightly):
  • gallery/init.php:
    155c155
    CHANGE:
    < $gallery->session->username = $user_info["uname"];
    TO:
    > $gallery->session->username = $user_info["username"];

    189c189
    CHANGE
    < $gallery->session->username = $user_info["uname"];
    TO
    > $gallery->session->username = $user_info["username"];


  • gallery/classes/nuke5/User.php:
    33,35c34,36
    CHANGE
    < $results = $this->db->query("select uname, name, email from " .
    < $this->prefix . "users " .
    < "where uid='$uid'");
    TO
    > $results = $this->db->query("select username, name, user_email from " .
    > $this->prefix . "users " .
    > "where user_id='$uid'");

    46,48c47,49
    CHANGE
    < $results = $this->db->query("select uid, name, email from " .
    < $this->prefix . "users " .
    < "where uname='$uname'");
    TO
    > $results = $this->db->query("select user_id, username, user_email from " .
    > $this->prefix . "users " .
    > "where username='$uname'");


  • gallery/classes/nuke5/UserDB.php:
    38c38
    CHANGE
    < $results = $db->query("select uid from " . $this->prefix . "users");
    TO
    > $results = $db->query("select user_id from " . $this->prefix . "users");


  • gallery/classes/nuke5/AdminUser.php:
    48c48
    CHANGE
    < $this->uid = "admin_$aid";
    TO
    > $this->user_id = "admin_$aid";
· More about Gallery Topics
· News by dari


Most read story about Gallery Topics:
Updated Gallery Files for phpNuke 6.5


Average Score: 4.95
Votes: 21


Please take a second and vote for this article:

Excellent
Very Good
Good
Regular
Bad



 Printer Friendly Printer Friendly

 Send to a Friend Send to a Friend



Re: Updated Gallery Files for phpNuke 6.5 (Score: 1)
by Brander on Sunday, April 13, 2003 @ 18:52:31 CDT
(User Info | Send a Message)
Thanks for the files, works great now.




Re: Updated Gallery Files for phpNuke 6.5 (Score: 1)
by hanskind on Monday, April 14, 2003 @ 15:26:09 CDT
(User Info | Send a Message)
Hi,

I uploaded the files, but still getting nthe same error:

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/hsphere/local/home/wwwuser/kindfamily.nl/html/modules/gallery/classes/database/mysql/Database.php on line 35

Does the file Database.php needs any modifications?

rgds

Hans Kind.



Re: Updated Gallery Files for phpNuke 6.5 (Score: 1)
by Hadron on Saturday, April 19, 2003 @ 15:49:31 CDT
(User Info | Send a Message)
Thanks for the changes. Saved me some work. :)



Re: Updated Gallery Files for phpNuke 6.5 (Score: 1)
by RandyO on Monday, April 21, 2003 @ 21:14:36 CDT
(User Info | Send a Message)
Thank you guys!! So much appreciated a fix@!!



Re: Updated Gallery Files for phpNuke 6.5 (Score: 1)
by charkra on Wednesday, May 14, 2003 @ 19:44:49 CDT
(User Info | Send a Message) http://www.crimsonstrife.com
Thanks for this - I had all bar the init.php file when I found your link . I do have a question though - I currently have registered users who can do stuff with the gallery - BUT , I only want team members to be able to post up on the gallery. (hierachy is : Admin,Team,Reg'd Users,All else). The team members are defined by a group in the nuke_bbgroups database table

So I could in essense do a SQL to select those ONLY people , But I do not know where to place it. i.e.
$results = $this->db->query("select b.username, b.user_email from " .
$this->prefix . "bbuser_group a ," .
$this->prefix . "users b " .
"WHERE group_id in (4,14) and a.user_id = b.user_id");

Where 4 and 14 are the groups I would like to have access to post.
If you or anyone else has ideas please let me know or has done something similar.



Re: Updated Gallery Files for phpNuke 6.5 (Score: 1)
by tomb99 on Thursday, July 31, 2003 @ 21:03:53 CDT
(User Info | Send a Message)
This hack don't work with Gallery 1.3.4 ML-33 (multi language) and Phpnuke 6.5

With and without this modification I'm receiving error :

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in
home/......./classes/database/mysql/Database.php on line 35

Can you help me with this ?





Sponsors: Dedicated ServersDomain NamesWeb HostingDomain Name RegistrationAustralian Web HostingNeckermannLook For GadgetsSwag Listings

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