Your ultimate PunBB resource!
You are not logged in.
CREATE TABLE <prefix>gallery_posts (
id INT(10) NOT NULL AUTO_INCREMENT,
poster VARCHAR(200) DEFAULT '' NOT NULL,
poster_id INT(10) DEFAULT 1 NOT NULL,
poster_ip VARCHAR(15),
message TEXT NOT NULL,
posted INT(10) DEFAULT 0 NOT NULL,
image_id INT(10) DEFAULT 0 NOT NULL,
KEY(id)
);
this is correct
Offline
Thanks, XuMiX.
Sorry to be annoying, but I have another problem. gallery.php yields this error:
Fatal error: Call to undefined method DBLayer::query_params() in C:\Documents and Settings\Brian\Desktop\serverdocs\puntest\forum\gallery.php on line 614
Offline
pogenwurst wrote:
Thanks, XuMiX.
Sorry to be annoying, but I have another problem. gallery.php yields this error:Fatal error: Call to undefined method DBLayer::query_params() in C:\Documents and Settings\Brian\Desktop\serverdocs\puntest\forum\gallery.php on line 614
shit
...
my site is too modified ![]()
wait an hour, i'll correct it all ![]()
Last edited by XuMiX (2006-02-04 22:22:40)
Offline
reuploaded
you may have to add some localisations keys to lang/English/gallery.php
Offline
hey. your modmod looks great. but it doesn't work on my board ![]()
tried to upgrade vom orgininal punbbgallery with the query - doesnt work.
then uploaded your gallery.php and gallerypost.php - the functions are there as i can see. but i can't see the images and thumbs.. and when i want to view an image he always says "unable to fetch pictureslist". the same with posting a new image "unable to upload...."
http://groundsofanarchy.de/gallery.php
is it possible to run your version without deleting the whole database?
Last edited by kuki (2006-02-05 13:27:41)
Offline
kuki wrote:
hey. your modmod looks great. but it doesn't work on my board
tried to upgrade vom orgininal punbbgallery with the query - doesnt work.
then uploaded your gallery.php and gallerypost.php - the functions are there as i can see. but i can't see the images and thumbs.. and when i want to view an image he always says "unable to fetch pictureslist". the same with posting a new image "unable to upload...."
http://groundsofanarchy.de/gallery.php
is it possible to run your version without deleting the whole database?
what exact functions don't work ? please, uncomment
define('PUN_DEBUG', 1);in include/common.php
and then say whats going wrong
Offline
BTW, what is going wrong with the query ??
Offline
XuMiX - here's what's going wrong:
PunBB reported: Unable to fetch pictures list Database reported: This version of MySQL doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery' (Errno: 1235)
Also, note my MySQL version:
PHP version 4.3.11
Last edited by IdleFire (2006-02-06 00:09:21)
Offline
line 159:
$result = $db->query('SELECT id, poster_id, posted FROM '.$db->prefix.'gallery_img WHERE cat_id='.$cur_cat['id'].' AND (id IN(SELECT id FROM '.$db->prefix.'gallery_img WHERE cat_id='.$cur_cat['id'].' AND id<'.$pid.' ORDER BY id DESC LIMIT 2) OR id IN(SELECT id FROM '.$db->prefix.'gallery_img WHERE cat_id='.$cur_cat['id'].' AND id>'.$pid.' ORDER BY id ASC LIMIT 2)) ORDER BY id ASC') or error('Unable to fetch pictures list', __FILE__, __LINE__, $db->error());replace with:
$result = $db->query('SELECT id FROM '.$db->prefix.'gallery_img WHERE cat_id='.$cur_cat['id'].' AND id<'.$pid.' ORDER BY id DESC LIMIT 2');
$prev_arr = $db->fetch_array($result);
$prev_ids = implode(', ', $prev_arr);
$result = $db->query('SELECT id FROM '.$db->prefix.'gallery_img WHERE cat_id='.$cur_cat['id'].' AND id>'.$pid.' ORDER BY id ASC LIMIT 2');
$next_arr = $db->fetch_array($result);
$next_ids = implode(', ', $prev_arr);
$result = $db->query('SELECT id, poster_id, posted FROM '.$db->prefix.'gallery_img WHERE cat_id='.$cur_cat['id'].' AND (id IN('.$prev_ids.') OR id IN('.$next_ids.')) ORDER BY id ASC') or error('Unable to fetch pictures list', __FILE__, __LINE__, $db->error());Sorry guys, i have postgresql database, so i had to adapt a lot
Offline
Also, note my MySQL version:
Code:
PHP version 4.3.11
That is your PHP version ![]()
Offline
BTW i'm reuploading the archive after each change, so you can just download it and replace files
Offline
File: gallery_post.php
Line: 364
PunBB reported: Unable to update gallery
Database reported: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT MAX(id) FROM gallery_img WHERE id=1' at line 1 (Errno: 1064)
How to correct?
Offline
$db->query('UPDATE '.$db->prefix.'gallery_cat SET num_img=num_img+1, last_post='.$now.', last_poster=\''.$db->escape($username).'\', last_poster_id='.$pun_user['id'].', last_img_id=(SELECT MAX(id) FROM '.$db->prefix.'gallery_img) WHERE id='.$cid) or error('Unable to update gallery', __FILE__, __LINE__, $db->error());
Offline
i got a small problem where can i find what page to add my link to the forum.
http://hntshosting.com
im running a mod version that i got WP and punbb intergrated!
Offline
here is the new link to *fixed-modified* gallery, the old one is dead
http://xumix.fanstvo.com/PBB_gallery_2.0Beta_mod.zip
DEMO: http://hostel.nstu.ru/resources/gallery.php
Offline
XuMiX,
last_img_id INT(10) NOT NULL default '1',
is found twice in the installer.
In addition, I'm getting this error:
An error was encountered
File: C:\Documents and Settings\Brian\Desktop\serverdocs\puntest\forum\install_mod.php
Line: 72
PunBB reported: Unable to create table one_gallery_perms.
Database reported: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NOT NULL, poster_id INT(10) DEFAULT 1 NOT NULL, poster_ip VARCHAR(15),' at line 3 (Errno: 1064)
Offline
Ok, I managed to get the gallery installed, but now I'm getting this error when trying to view an image:
Fatal error: Call to undefined method DBLayer::fetch_array() in C:\Documents and Settings\Brian\Desktop\serverdocs\puntest\forum\gallery.php on line 160
Offline
I have error:
An error was encountered
File: /home/y/77/public_html/install_mod.php
Line: 37
PunBB reported: Unable to create table gallery_cat.
Database reported: Duplicate column name 'last_img_id' (Errno: 1060)
Last edited by HitMan (2006-03-04 21:55:04)
Offline
pogenwurst, HitMan, install is fixed now.
--
Fatal error: Call to undefined method DBLayer::fetch_array() in C:\Documents and Settings\Brian\Desktop\serverdocs\puntest\forum\gallery.php on line 160
add this code to your include/dblayer/<your_db_type>.php
function fetch_array($query_id = 0)
{
return ($query_id) ? @<your_db_type>_fetch_array($query_id) : false;
}place it somewhere after
function fetch_assoc($query_id = 0)
{
return ($query_id) ? @<your_db_type>_fetch_assoc($query_id) : false;
}Last edited by XuMiX (2006-03-05 20:41:57)
Offline
Hi,
same problem like Kuki and IdleFire. No thumbs and images are displayed, also the "a href" link on the thumbs in the main gallery index are not working.
Here is what I´ve done:
I ´ve installed pbb gallery 2.0 beta. Uploaded 25 pictures in 4 categories.
I like your mod so i decided to upgrade my existing gallery.
Ive updated my Db:
ALTER TABLE punbb.gallery_cat ADD last_img_id INT(10) NOT NULL default '1';
and
CREATE TABLE punbb.gallery_posts (
id INT(10) NOT NULL AUTO_INCREMENT,
poster VARCHAR(200) DEFAULT '' NOT NULL,
poster_id INT(10) DEFAULT 1 NOT NULL,
poster_ip VARCHAR(15),
message TEXT NOT NULL,
posted INT(10) DEFAULT 0 NOT NULL,
image_id INT(10) DEFAULT 0 NOT NULL
);
... Ive got an mysql error on the line 1 : id INT(10) NOT NULL AUTO_INCREMENT
"only one AUTO_INCREMENT ....." so i removed the "AUTO_INCREMENT" and the querry was ok.
Hope it make no odds.
Then Ive made all steps describes in your readme.txt.
Screen of the main index:
http://img384.imageshack.us/img384/7131/11qa1.jpg
This is the categorie index:
http://img384.imageshack.us/img384/1416/25ib.jpg
and this the picture show screen, without the picture :-( only the picture name is displayed
http://img384.imageshack.us/img384/2691/35xy.jpg
Last edited by ango (2006-03-06 09:40:31)
Offline
oh... yeah...
((
So, check th paths in gallery options, and then check, that uploaded dir is located in your website root dir(so it would be accessed like http://qwe.qwe.com/uploaded/)
or, if you can, you may create an alias in apache for it
Offline
Ok, i´ve changed the "uploaded" path and the images and thumbs are displayed now.
But I`m getting now an error if the last picture in each category is clicked.
It´s the same error Pogenwurst reported:
File: D:\HP\forum\forum\gallery.php
Line: 165
PunBB reported: Unable to fetch pictures list
Database reported: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') OR id IN()) ORDER BY id ASC' at line 1 (Errno: 1064)
Failed query: SELECT id, poster_id, posted FROM gallery_img WHERE cat_id=3 AND (id IN() OR id IN()) ORDER BY id ASC
Think the variable "cur_cat" and "prev_cat" is empty and thats the reason why the sql query fails.
Code at line 165: ... WHERE cat_id='.$cur_cat['id'].' AND (id IN('.$prev_ids.') ...
Maybe thats the reason that only one thumb (with the next id) above the picture is displayed?
Last edited by ango (2006-03-07 03:24:21)
Offline
i'll check it, i wont be at work tomorrow, so wait a bit
Offline