PunBB Resource

Your ultimate PunBB resource!

Keywords:

    (Extended)

You are not logged in.

#51 2006-02-04 16:15:53

XuMiX
Member
From: Russia::Novosibirsk
Registered: 2005-04-07
Posts: 27

Re: PBB Gallery 2.0 Beta

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

 

#52 2006-02-04 23:11:17

pogenwurst
Member
From: U.S.A.
Registered: 2005-10-30
Posts: 45

Re: PBB Gallery 2.0 Beta

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


Looking for a certain modification for your forum? Please take a look here before posting.

Offline

 

#53 2006-02-05 07:14:36

XuMiX
Member
From: Russia::Novosibirsk
Registered: 2005-04-07
Posts: 27

Re: PBB Gallery 2.0 Beta

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 sad...
my site is too modified smile
wait an hour, i'll correct it all smile

Last edited by XuMiX (2006-02-05 07:22:40)

Offline

 

#54 2006-02-05 07:22:28

XuMiX
Member
From: Russia::Novosibirsk
Registered: 2005-04-07
Posts: 27

Re: PBB Gallery 2.0 Beta

reuploaded
you may have to add some localisations keys to lang/English/gallery.php

Offline

 

#55 2006-02-05 22:26:19

kuki
New member
Registered: 2006-01-31
Posts: 4

Re: PBB Gallery 2.0 Beta

hey. your modmod looks great. but it doesn't work on my board hmm

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 22:27:41)

Offline

 

#56 2006-02-06 06:21:15

XuMiX
Member
From: Russia::Novosibirsk
Registered: 2005-04-07
Posts: 27

Re: PBB Gallery 2.0 Beta

kuki wrote:

hey. your modmod looks great. but it doesn't work on my board hmm

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

Code:

define('PUN_DEBUG', 1);

in include/common.php
and then say whats going wrong

Offline

 

#57 2006-02-06 06:24:25

XuMiX
Member
From: Russia::Novosibirsk
Registered: 2005-04-07
Posts: 27

Re: PBB Gallery 2.0 Beta

BTW, what is going wrong with the query ??

Offline

 

#58 2006-02-06 08:43:19

IdleFire
Member
From: Australia
Registered: 2005-06-09
Posts: 41
Website

Re: PBB Gallery 2.0 Beta

kuki - I'm having the same problems as you, however I have found that keeping the old gallerypost.php file seems to do the trick.

Offline

 

#59 2006-02-06 08:46:46

IdleFire
Member
From: Australia
Registered: 2005-06-09
Posts: 41
Website

Re: PBB Gallery 2.0 Beta

XuMiX - here's what's going wrong:

Code:

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:

Code:

PHP version    4.3.11

Last edited by IdleFire (2006-02-06 09:09:21)

Offline

 

#60 2006-02-06 10:27:21

XuMiX
Member
From: Russia::Novosibirsk
Registered: 2005-04-07
Posts: 27

Re: PBB Gallery 2.0 Beta

line 159:

Code:

$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:

Code:

            $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

 

#61 2006-02-06 10:28:56

XuMiX
Member
From: Russia::Novosibirsk
Registered: 2005-04-07
Posts: 27

Re: PBB Gallery 2.0 Beta

Also, note my MySQL version:
Code:

PHP version    4.3.11

That is your PHP version smile

Offline

 

#62 2006-02-06 10:59:31

IdleFire
Member
From: Australia
Registered: 2005-06-09
Posts: 41
Website

Re: PBB Gallery 2.0 Beta

Haha, whoops, copied the wrong thing tongue

I'll make the changes and upload in a second.

Offline

 

#63 2006-02-06 11:13:48

XuMiX
Member
From: Russia::Novosibirsk
Registered: 2005-04-07
Posts: 27

Re: PBB Gallery 2.0 Beta

BTW i'm reuploading the archive after each change, so you can just download it and replace files

Offline

 

#64 2006-02-11 06:41:44

hcs
Member
From: Russia
Registered: 2006-02-11
Posts: 68
Website

Re: PBB Gallery 2.0 Beta

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

 

#65 2006-02-11 08:24:15

XuMiX
Member
From: Russia::Novosibirsk
Registered: 2005-04-07
Posts: 27

Re: PBB Gallery 2.0 Beta

$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

 

#66 2006-02-23 02:37:40

quaker
Member
From: Bama,USA
Registered: 2006-02-23
Posts: 968
Website

Re: PBB Gallery 2.0 Beta

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!


My stuff or my style might sux, but atleast I'm willing to help when I can.
Don't be stupid and help ! We are the stupid one's !!!

Offline

 

#67 2006-03-04 06:45:19

XuMiX
Member
From: Russia::Novosibirsk
Registered: 2005-04-07
Posts: 27

Re: PBB Gallery 2.0 Beta

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

 

#68 2006-03-04 17:23:24

pogenwurst
Member
From: U.S.A.
Registered: 2005-10-30
Posts: 45

Re: PBB Gallery 2.0 Beta

XuMiX,

Code:

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)


Looking for a certain modification for your forum? Please take a look here before posting.

Offline

 

#69 2006-03-04 17:32:51

pogenwurst
Member
From: U.S.A.
Registered: 2005-10-30
Posts: 45

Re: PBB Gallery 2.0 Beta

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


Looking for a certain modification for your forum? Please take a look here before posting.

Offline

 

#70 2006-03-05 06:54:15

HitMan
Member
Registered: 2006-02-18
Posts: 10

Re: PBB Gallery 2.0 Beta

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-05 06:55:04)

Offline

 

#71 2006-03-06 05:35:32

XuMiX
Member
From: Russia::Novosibirsk
Registered: 2005-04-07
Posts: 27

Re: PBB Gallery 2.0 Beta

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

Code:

    function fetch_array($query_id = 0)
    {
        return ($query_id) ? @<your_db_type>_fetch_array($query_id) : false;
    }

place it somewhere after

Code:

    function fetch_assoc($query_id = 0)
    {
        return ($query_id) ? @<your_db_type>_fetch_assoc($query_id) : false;
    }

Last edited by XuMiX (2006-03-06 05:41:57)

Offline

 

#72 2006-03-06 18:39:06

ango
Member
From: Germany
Registered: 2006-03-06
Posts: 21

Re: PBB Gallery 2.0 Beta

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 Ive 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 18:40:31)


My PunBB Arcade Mod & Game Packs 1-9 (update 01-06-2007):
Test and download here !

Offline

 

#73 2006-03-07 05:23:21

XuMiX
Member
From: Russia::Novosibirsk
Registered: 2005-04-07
Posts: 27

Re: PBB Gallery 2.0 Beta

oh... yeah... sad((
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

 

#74 2006-03-07 12:09:51

ango
Member
From: Germany
Registered: 2006-03-06
Posts: 21

Re: PBB Gallery 2.0 Beta

Ok, ive 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.
Its 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 12:24:21)


My PunBB Arcade Mod & Game Packs 1-9 (update 01-06-2007):
Test and download here !

Offline

 

#75 2006-03-07 12:33:59

XuMiX
Member
From: Russia::Novosibirsk
Registered: 2005-04-07
Posts: 27

Re: PBB Gallery 2.0 Beta

i'll check it, i wont be at work tomorrow, so wait a bit

Offline

 

Board footer

Based on PunBB
© Copyright 2002–2005 Rickard Andersson

© Copyright 2004–2006 Kristoffer Jansson

User contributed files are property of their respective owners.