Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1] 2   Go Down

Author Topic: PunBB integration  (Read 31279 times)

0 Members and 1 Guest are viewing this topic.

Cailean

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
PunBB integration
« on: July 08, 2004, 08:28:31 am »

I use PunBB (www.punbb.org) as my forum app and would like to integrate it with Coppermine.  How does one go about creating a bridge for an unsupported BBS?  I took a quick look at the bridge folder and the xx.inc.php files it contains...  is it as easy as creating a similar one for PunBB and adding it to the list in init.inc.php?

Also, assuming I eventually get integrated, is there any around that sub-domain problem mentioned in the docs? (ie:  integrating board.site.com & gallery.site.com)
« Last Edit: August 09, 2004, 03:03:53 pm by Nibbler »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Bridge How-To?
« Reply #1 on: July 08, 2004, 08:34:21 am »

is it as easy as creating a similar one for PunBB and adding it to the list in init.inc.php?
Yes. Please share your brdige file once you're done.

Also, assuming I eventually get integrated, is there any around that sub-domain problem mentioned in the docs? (ie:  integrating board.site.com & gallery.site.com)
, no, since it's www-imanent: sub-domains are different domains as well. It's a restrcition for all cookies on all www-servers, that only the webserver/domain that set the cookie is allowed to read it. The only workaround would be some kind of web-bug (similar to those used by data-mining advertisment-cookies) that allow information to be passed over, but this would need some hacking and would still have to be adjusted for every domain/sub-domain, making it hard to implement for not-so-experienced users.

GauGau
Logged

Cailean

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: Bridge How-To?
« Reply #2 on: July 08, 2004, 09:24:54 am »

is it as easy as creating a similar one for PunBB and adding it to the list in init.inc.php?
Yes. Please share your brdige file once you're done.
I'm not sure I'm familliar enough with PunBB's inner workings to make the required changes but I'll see what I can do (with a little help from forums.punbb.org)

Also, assuming I eventually get integrated, is there any around that sub-domain problem mentioned in the docs? (ie:  integrating board.site.com & gallery.site.com)
, no, since it's www-imanent: sub-domains are different domains as well. It's a restrcition for all cookies on all www-servers, that only the webserver/domain that set the cookie is allowed to read it. The only workaround would be some kind of web-bug (similar to those used by data-mining advertisment-cookies) that allow information to be passed over, but this would need some hacking and would still have to be adjusted for every domain/sub-domain, making it hard to implement for not-so-experienced users.

I'd really hate to have to move my forum and gallery... is it possible for cookies to be set as www.site.com so that they can be used across all subdomains of site.com?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Bridge How-To?
« Reply #3 on: July 08, 2004, 09:41:55 am »

like I said: there's no way to spoof cookies. The only thing you could possibly come up with is a web-bug like the datamining guys do, but this will require some knowledge.

GauGau
Logged

Cailean

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: Bridge How-To?
« Reply #4 on: July 08, 2004, 09:48:28 am »

oh well, can't blame me for tryin' ... seems to make idea of subdomains musch less attractive ... thanks for your help.
Logged

Nibbler

  • Guest
Re: Bridge How-To?
« Reply #5 on: July 13, 2004, 04:56:58 pm »

If you set the cookie domain of the board's cookies to .domain.com (note the dot at the start) then they should be readable from subdomains, have been in my experience.
Logged

Cailean

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: Bridge How-To?
« Reply #6 on: July 24, 2004, 03:38:16 pm »

So this bridge thing is a lot more complicated than I imagined...  If anyone wants to help me out and write a bridge for one of the fastest fourm packages out there, please do!  PunBB code is found at: http://www.punbb.org

I cannot justify switching my photo gallery to Coppermine until I can integrate with punBB - and I'd really like to do that!
Logged

Nibbler

  • Guest
Re: Bridge How-To?
« Reply #7 on: July 24, 2004, 07:09:47 pm »

OK, I'll make one for you since I have nothing better to do.   :)

Prolly take a day or so though, I've never come across punbb before.
Logged

Nibbler

  • Guest
Re: Bridge How-To?
« Reply #8 on: July 25, 2004, 12:14:19 am »

Logged

Cailean

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: Bridge How-To?
« Reply #9 on: July 25, 2004, 06:03:48 am »

Man, people like you rock!  The world of opensource is filled with wonderfull folks! Nyah, nyah to the Micro-softies and their profit-driven bean-counters!

K, I'm done now...  It's been a long week.

Anywho, thanks again Nibbler - can't wait to test it!
Logged

Nibbler

  • Guest
Re: Bridge How-To?
« Reply #10 on: July 25, 2004, 05:41:22 pm »

Commited the bridge to be in Coppermine 1.4.

If you can't wait for it, then you can download it from the bottom of this post.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Bridge How-To?
« Reply #11 on: July 25, 2004, 08:03:35 pm »

@Nibbler: great work - I think the punbb community owes you a beer ;). Do you think the bridge file is ready to be released with cpg1.3.2 as well?

GauGau
Logged

cuteseal

  • Coppermine newbie
  • Offline Offline
  • Posts: 15
Re: Bridge How-To?
« Reply #12 on: August 09, 2004, 06:26:14 am »

Hi everyone!

I'm running a punbb install at www.shuttertalk.com (digital photography news and discussion forums)  and I think that integrated coppermine gallery would be awesome!


Pardon my apparent daftness - I looked at the test site that you put up Nibbler, but I can't figure out how it works --

Are individual users supposed to get their own galleries?  I created a test user, but when I clicked on the "Coppermine Photo Gallery" link in punbb, it just went to the coppermine gallery page.  How do users upload photos, etc.?


Thanks,
Julian
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Bridge How-To?
« Reply #13 on: August 09, 2004, 09:26:10 am »

Nibbler's demo page doesn't come with user interaction, it's a proof of concept. The bridge file integration only makes Coppermine use the bbs' user and groups management, but permissions what a user is allowed to do (have a personal gallery, upload to public albums etc.) is being set up in coppermine.
I recommend setting up Coppermine as standalone on your site, get it up and running and then test integration with punbb.

GauGau
Logged

Nibbler

  • Guest
Re: PunBB integration
« Reply #14 on: August 09, 2004, 05:44:20 pm »

Demo setup is now restored, latest version of the bridge file will always be here. Make sure you follow the instructions in the zip file for redirection to work.
Logged

cuteseal

  • Coppermine newbie
  • Offline Offline
  • Posts: 15
Re: PunBB integration
« Reply #15 on: August 10, 2004, 08:13:16 am »

Quick question:
1.  I assume to have the link in punbb to coppermine, I just add a link to "/gallery" right?
« Last Edit: August 10, 2004, 08:33:21 am by cuteseal »
Logged

cuteseal

  • Coppermine newbie
  • Offline Offline
  • Posts: 15
Re: PunBB integration
« Reply #16 on: August 10, 2004, 08:31:55 am »

Hi, I've set up a test install of coppermine, and it appears to be working.  I can login and logout using usernames in my punbb users list.

However, I'm now getting some mysql errors... this one's when trying to view album list:
http://www.shuttertalk.com/gallery/index.php?cat=1

Let me ask a question first up - does coppermine and punbb need to be installed in the same db?  I've installed them in separate dbs.

Ok the error:

Code: [Select]
While executing query "SELECT (category - 10000) as user_id,        '???' as user_name,        COUNT(DISTINCT a.aid) as alb_count,        COUNT(DISTINCT pid) as pic_count,        MAX(pid) as thumb_pid FROM cpg_albums AS a INNER JOIN cpg_pictures AS p ON p.aid = a.aid WHERE approved = 'YES' AND category > 10000  GROUP BY category ORDER BY category " on Resource id #7

mySQL error:

Code: [Select]
USER:
------------------
Array
(
    [ID] => f8fc8b065b1839aa76de81bd3c7ed575
    [am] => 1
)

==========================
USER DATA:
------------------
Array
(
    [user_id] => 2
    [user_name] => shuttertalk
    [status] => 2
    [groups] => Array
        (
            [0] => 1
        )

    [group_quota] => 0
    [can_rate_pictures] => 1
    [can_send_ecards] => 1
    [can_post_comments] => 1
    [can_upload_pictures] => 1
    [can_create_albums] => 1
    [pub_upl_need_approval] => 0
    [priv_upl_need_approval] => 0
    [upload_form_config] => 3
    [num_file_upload] => 5
    [num_URI_upload] => 3
    [custom_user_upload] => 0
    [disk_max] => 0
    [disk_min] => 0
    [ufc_max] => 3
    [ufc_min] => 3
    [has_admin_access] => 1
    [group_name] => Administrators
    [can_see_all_albums] => 1
    [group_id] => 1
)

==========================
Queries:
------------------
Array
(
    [0] => SELECT extension, mime, content FROM cpg_filetypes;
    [1] => SELECT id AS user_id, username AS user_name, status FROM `shutter_forum`.shutterusers WHERE username='shuttertalk' AND password='[edited]'
    [2] => SELECT MAX(group_quota) as disk_max, MIN(group_quota) as disk_min, MAX(can_rate_pictures) as can_rate_pictures, MAX(can_send_ecards) as can_send_ecards, MAX(upload_form_config) as ufc_max, MIN(upload_form_config) as ufc_min, MAX(custom_user_upload) as custom_user_upload, MAX(num_file_upload) as num_file_upload, MAX(num_URI_upload) as num_URI_upload, MAX(can_post_comments) as can_post_comments, MAX(can_upload_pictures) as can_upload_pictures, MAX(can_create_albums) as can_create_albums, MAX(has_admin_access) as has_admin_access, MIN(pub_upl_need_approval) as pub_upl_need_approval, MIN( priv_upl_need_approval) as  priv_upl_need_approval FROM cpg_usergroups WHERE group_id in (1)
    [3] => SELECT group_name FROM  cpg_usergroups WHERE group_id= 1
    [4] => DELETE FROM cpg_banned WHERE expiry < 1092119315
    [5] => SELECT * FROM cpg_banned WHERE ip_addr='128.88.255.34' OR ip_addr='128.88.255.34' OR user_id=2
    [6] => SELECT name, parent FROM cpg_categories WHERE cid = '1'
    [7] => SELECT cid, name, description, thumb FROM cpg_categories WHERE parent = '1'  ORDER BY pos
    [8] => SELECT aid FROM cpg_albums as a WHERE category >= 10000
    [9] => SELECT (category - 10000) as user_id,        '???' as user_name,        COUNT(DISTINCT a.aid) as alb_count,        COUNT(DISTINCT pid) as pic_count,        MAX(pid) as thumb_pid FROM cpg_albums AS a INNER JOIN cpg_pictures AS p ON p.aid = a.aid WHERE approved = 'YES' AND category > 10000  GROUP BY category ORDER BY category
)

==========================
GET :
------------------
Array
(
    [cat] => 1
)

==========================
POST :
------------------
Array
(
)

==========================
VERSION INFO :
------------------
PHP version: 4.3.8 - OK
------------------
mySQL version: 4.0.20-standard
------------------
Coppermine version: 1.3.1
==========================
Module: gd
------------------
GD Support enabled
GD Version bundled (2.0.23 compatible)
FreeType Support enabled
FreeType Linkage with freetype
GIF Read Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
XBM Support enabled
==========================
Module: mysql
------------------
Active Persistent Links 0
Active Links 2
Client API version 3.23.49
MYSQL_MODULE_TYPE builtin
MYSQL_SOCKET /var/tmp/mysql.sock
MYSQL_INCLUDE no value
MYSQL_LIBS no value
==========================
Module: zlib
------------------
ZLib Support enabled
Compiled Version 1.2.0.7
Linked Version 1.2.0.7
==========================
Server restrictions (safe mode)?
------------------
Directive | Local Value | Master Value
safe_mode | Off | Off
safe_mode_exec_dir | no value | no value
safe_mode_gid | Off | Off
safe_mode_include_dir | no value | no value
safe_mode_exec_dir | no value | no value
sql.safe_mode | Off | Off
disable_functions | no value | no value
file_uploads | On | On
include_path | .:/usr/lib/php:/usr/local/lib/php | .:/usr/lib/php:/usr/local/lib/php
open_basedir | no value | no value
==========================
email
------------------
Directive | Local Value | Master Value
sendmail_from | no value | no value
sendmail_path | /usr/sbin/sendmail -t -i | /usr/sbin/sendmail -t -i
SMTP | localhost | localhost
smtp_port | 25 | 25
==========================
Size and Time
------------------
Directive | Local Value | Master Value
max_execution_time | 30 | 30
max_input_time | -1 | -1
upload_max_filesize | 2M | 2M
post_max_size | 55M | 55M
==========================
Page generated in 0.088 seconds - 10 queries in 0.003 seconds - Album set : AND aid IN (1)
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: PunBB integration
« Reply #17 on: August 10, 2004, 09:57:20 am »

From the documentation that comes with coppermine:
Quote
It is also recommended that you use the same database for your board and Coppermine (in fact it is even mandatory!).
Although it is possible (in theory), it's rather hard to accomplish. I recommend using the same db.

GauGau
Logged

cuteseal

  • Coppermine newbie
  • Offline Offline
  • Posts: 15
Re: PunBB integration
« Reply #18 on: August 10, 2004, 10:00:04 am »

Oh ok then.  Thanks Gau Gau.. I'll try it out.
Logged

cuteseal

  • Coppermine newbie
  • Offline Offline
  • Posts: 15
Re: PunBB integration
« Reply #19 on: August 12, 2004, 06:08:01 am »

Hey Nibbler...

Nice work with the bridge.  The morphue theme works well with punbb.

I noticed a problem - the "Moderators" group wasn't in the bridge file and was some php errors if a moderator tried to use the gallery.

I've fixed it on mine but you might have to update your package.


Regards,
Julian
Logged
Pages: [1] 2   Go Up
 

Page created in 0.026 seconds with 19 queries.