forum.coppermine-gallery.net
Support => cpg1.3.x Support => Older/other versions => cpg1.3 (BBS) Integration / Bridging => Topic started by: Cailean on July 08, 2004, 08:28:31 am
-
I use PunBB (www.punbb.org (http://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)
-
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
-
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 (http://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?
-
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
-
oh well, can't blame me for tryin' ... seems to make idea of subdomains musch less attractive ... thanks for your help.
-
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.
-
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!
-
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.
-
Test site: http://www.nibbler.lunarpages.com/punbb
-
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!
-
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.
-
@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
-
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
-
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
-
Demo setup is now restored, latest version of the bridge file will always be here (http://cvs.sourceforge.net/viewcvs.py/*checkout*/coppermine/devel/bridge/punbb.inc.php). Make sure you follow the instructions in the zip file for redirection to work.
-
Quick question:
1. I assume to have the link in punbb to coppermine, I just add a link to "/gallery" right?
-
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:
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:
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)
-
From the documentation that comes with coppermine (http://coppermine.sourceforge.net/manual.php#integrating):
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
-
Oh ok then. Thanks Gau Gau.. I'll try it out.
-
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
-
I didnt have any moderators in my test install, I'll go investigate, thanks.
-
Fixed that (in v1.2), and added option to treat punbb moderators as cpg admins (off by default). Make sure you go to the cpg groups page to allow the groups to be re-synced after you update.
-
I have an installation of punbb at http://www.zorbas.de/scripts/punbb-1.0.1/ (version is 1.1.5).
My coppermine gallery is installed at http://www.zorbas.de/scripts/gallery (just updated to 1.3.2)
I tried the integration and I do think that everything i did was right. At least i was following exactly the docu. When login at the gallery i get redirected to the login screen from the board. After successful login it takes me back to the gallery but i am not logged on...
I use the same database for all tables. Prefixes are cpg11d_ and zforum.
I can't find what I did wrong. Any suggestions - please... ???
-
When I click on login from your gallery I get the gallery login, so integration is not currently enabled. When you do enable it, please post a test login and pass.
-
Hi Nibbler,
sorry - yes I disabled it for not to confuse my visitors...
Now you should be able to try it:
user: nibbler
pw: iJRa0t7G
Of course now you have an account for the board but unfortunately it won't work for the gallery - until you maybe find my mistake...
Just read the following line from GauGau: "...we have a one question per thread policy on this board..."
Hope I do not cause any probs....
-
I can't see anything obviously wrong. Try the attached debug version of the bridge file. Rename your current briodge file to something else and use this one as punbb.inc.php instead. It should say what is going wrong at the top of the coppermine page. If you still have probs you can pm me ftp details and I'll take a look for you if you like.
-
thanks for this really helpful debug file!!
The Problem seem to be that the cookie '' can not be found...
Where do I give this !#*$&? - cookie a name that can be found???
-
The cookie settings should be in punbb's config.php, for example:
$cookie_name = 'punbb_cookie';
$cookie_domain = '';
$cookie_path = '/';
$cookie_secure = 0;
Add it if it's not there.
-
As other people allready stated I must say the same: You are a GENIOUS !!!
That was it: The cookie-name-line was missing in my config.php of the punbb
If I can do something for you when you visit Greece one time, just contact me: http://www.zorbas.de/webcam/
Thanks again!
-
Got a problem with integration. Did what the documents said but got a blank screen when got back to the coppermine part.
So what I did was I canged the bridge file, edited in the init. thingie for punbb and then put the redir.php to punbb-folder. And got a blank page, nothing else. When I comment out the row in init.inc.php coppermine goes on like nothing happened (a working, but on its own). It hasn't done anything to the databases over there...
Edit: Oh, got the problem already fixed. The only two things to edit in the bridge file was wrong, the path anyway... just changed the "../forum" thing to "../../forum" and it worked...
-
how about a link and test user account (non-admin)?
Joachim
-
does anyone know the best way to get them to share style sheets? coppermine is a bit fancier than punbb, so i'm going to stick with the 'classic' style, but i would like it to be the same colors as the forum, so sharing the same style.css would be perfect. thx for any ideas.
-
Sharing tje same stylesheet won't help, as both apps use different class names. You can make coppermine match the look of your bbs or vice versa by editing the stylesheet. If you insist on making them share the same stylesheet (not recommended), edit themes/yourtheme/template.html, find
<link rel="stylesheet" href="themes/yourtheme/style.css" />
and change the path to make it point to your bbs app's stylesheet. This is all plain html and css, no fancy php involved.
Joachim
-
maybe i can cut and past everything from one into the other so all the class names are addressed? I know i still have to change the colors to make sence, but then maybe.... hmmm, okay, maybe i'll just edit the stylesheet :D
-
Very useful! Thank you a lot Nibbler!
Will you upgrade this bridge to punbb1.2 (http://forums.punbb.org/viewtopic.php?id=5200&p=1)?
-
I've made one for coppermine 1.4, but I will make a 1.3 version if punbb 1.2 is final before cpg 1.4 is final.
-
Ok, I'll wait... ;D Thanks!