PHPNuke Blocks Gallery Random-block for PHPNuke
Posted on Friday, January 24, 2003 @ 10:29:12 CST So you want your random-block.php file to work with phpNuke 6.0 and Gallery 1.3.3? Do you want the clicked picture to open in the nuke context, instead of in a new window? If you answered "yes", then just follow these directions. UPDATED: I've just upgrade to phpNuke 6.5 and Gallery 1.3.4-cvs-b15 and the random block still works as described in this article.
UPDATED: Here are some common error messages that you may get:
-
If you get complaints about invalid arguments for the "foreach()" method in session.php, you might want to make the following replacements:
$_HTTP_SESSION_VARS ==> $_SESSION
-
If you have the random block on the left side of your site and get SQL errors, or errors about redeclaring fscopy(), try moving it to the right side of your site. That fixed the problem for me.
- If you get errors stating that mysql_fetch_row was given an invalid resource, and it only appears when you're logged in as a normal user to your phpNuke site (ie, not as admin), follow these steps (thanks to Sundie from the Gallery forums for these). For Gallery 1.3.3+, edit the following files as indicated (as always, make backups first, and 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";
This article has been superceded by this one.
|
| | |
Average Score: 3.5 Votes: 4

|
|
Associated Topics
 |
Re: Gallery Random-block for PHPNuke (Score: 1) by starachna on Saturday, May 31, 2003 @ 08:27:10 CDT (User Info | Send a Message) | shot for the block !! tis way cool !!
thanx for having it open source !!
www.3am.co.za [www.3am.co.za]
ZA PSY TRANCE |
|
Re: Gallery Random-block for PHPNuke (Score: 1) by Pointless on Friday, August 01, 2003 @ 20:43:57 CDT (User Info | Send a Message) | | Terrible, simply terrible. Will have to try the hacked version elsewhere. |
|
| 
|