This tutorial is no longer needed as Coppermine includes a bridge wizard which makes things simple. For more information see the documentation, specifically the section (http://coppermine-gallery.net/demo/cpg14x/docs/index.htm#integrating) on bridges. If you still have problems please start a new post in Portals, Bridges, and Integrations (http://www.simplemachines.org/community/index.php?board=33.0)
Coppermine is an easily setup, fast, feature-rich photo gallery script with MySQL database, user management, private galleries, automatic thumbnail creation, ecard feature and a template system for easy customization to match the rest of a site.
To start, you'll need to download Coppermine (http://sourceforge.net/project/showfiles.php?group_id=89658). Once downloaded, follow these instructions to properly integrate Coppermine with your SMF forum.
In /include/init.inc.php, find:
// define('UDB_INTEGRATION', 'smf');
Replace with:
define('UDB_INTEGRATION', 'smf');
In /bridge/smf.inc.php, find:
$path = '../smf';
Replace /smf with the directory you have your SMF forum installed in. If SMF is installed in your root directory, remove smf leaving you with $path = '../';.
Once all necessary changes have been made, upload Coppermine to its own directory (examples: /coppermine, /gallery, /album). Once uploaded, run install.php. Make sure you install Coppermine on the same database as that of your SMF forum. Once installed, your new Coppermine gallery will be up and ready for use :).
Will these steps work with a coppermine site that is already uploaded and ready to use?
Quote from: IamV on July 10, 2005, 03:31:39 PM
Will these steps work with a coppermine site that is already uploaded and ready to use?
It should.
-Dan The Man
great! thank you very much ;D
Quote from: IamV on July 10, 2005, 09:12:43 PM
great! thank you very much ;D
No problem :).
-Dan The Man
Quote from: OIDanTheManIO on July 10, 2005, 03:42:23 PM
Quote from: IamV on July 10, 2005, 03:31:39 PM
Will these steps work with a coppermine site that is already uploaded and ready to use?
It should.
-Dan The Man
Dan, the bridge/smf.inc.php file has the following warning near the top:
WARNING : Do not activate this bridge if you already have pictures or usergroups in your gallery.
Does this mean that existing pictures will be erased?
Quote from: rvforumite on July 10, 2005, 11:44:17 PM
Dan, the bridge/smf.inc.php file has the following warning near the top:
WARNING : Do not activate this bridge if you already have pictures or usergroups in your gallery.
Does this mean that existing pictures will be erased?
Oh, I didn't catch that. I guess you have to bridge Coppermine with SMF using a fresh install :-\.
-Dan The Man
Quote from: OIDanTheManIO on July 10, 2005, 11:57:14 PM
Oh, I didn't catch that. I guess you have to bridge Coppermine with SMF using a fresh install
I wonder why that is ? Does that mean I'd have to delete and re-upload all my photos in Coppermine? Sounds like a real PITA.
Quote from: rvforumite on July 11, 2005, 12:14:53 AM
I wonder why that is ? Does that mean I'd have to delete and re-upload all my photos in Coppermine? Sounds like a real PITA.
It probably would be. It's probably not worth it. Keep what you've got now.
-Dan The Man
Thanks Dan. Too bad, I was really hoping to do the integration.
Quote from: rvforumite on July 11, 2005, 01:44:09 AM
Thanks Dan. Too bad, I was really hoping to do the integration.
It *might* still be possible though. You may wish to check the Coppermine forums and ask if anyone knows a way to bridge it *after* it was created.
http://coppermine.sourceforge.net/board/
-Dan The Man
I am running CPG 1.4.1 and I had Pix in it when I Bridged it over I did not loose any of them nor did I loose any of my Members.
Dan FYI a topic in the Coppermine support forum stated that the only issue with integrating with an existing Coppermine installation would be the loss of association between existing photos and the name of the uploader. I went ahead and implemented your code for the integration. It appears that my association with (aka ownership of) the photos I'd previously uploaded is intact.
Haven't yet given it a full workout, but the only "issue" I see so far is if I log out from Coppermine, it takes me to SMF and I get the following (SMF) message:
An Error Has Occurred!
Session verification failed. Please try logging out and back in again, and then try again.
If I follow the instruction in the above message, I'm logged into SMF cleanly. Is this expected behavior?
Thanks Taz. See my comments to Dan.
Quote from: taz on July 11, 2005, 10:42:36 AM
I am running CPG 1.4.1 and I had Pix in it when I Bridged it over I did not loose any of them nor did I loose any of my Members.
Glad to hear it :).
Quote from: rvforumite on July 11, 2005, 11:33:09 AM
Dan FYI a topic in the Coppermine support forum stated that the only issue with integrating with an existing Coppermine installation would be the loss of association between existing photos and the name of the uploader. I went ahead and implemented your code for the integration. It appears that my association with (aka ownership of) the photos I'd previously uploaded is intact.
Haven't yet given it a full workout, but the only "issue" I see so far is if I log out from Coppermine, it takes me to SMF and I get the following (SMF) message:
An Error Has Occurred!
Session verification failed. Please try logging out and back in again, and then try again.
If I follow the instruction in the above message, I'm logged into SMF cleanly. Is this expected behavior?
That error message you're receiving should be of normal behavior. It still logs you out, just with an error message. It's happened to me ever since I first used Coppermine with SMF.
-Dan The Man
the issue would be: When you bridge coppermine, it now uses the SMF user table and the coppermine user number becomes associated with the SMF user number (10000+SMF user number)
RV... you should remove the login/logout buttons from Coppermine and only use the SMF login/logout...
(note: Coppermine MAY have issues with the change in password functions in SMF 1.1b3)
And last.... just FYI, in the basic setup, it is better to use your absolute path than the relative path... (instead of ../smf, use /home/user/public_html/smf)
Quote from: OIDanTheManIO on July 11, 2005, 11:47:31 AMThat error message you're receiving should be of normal behavior.
Thanks for confirmation Dan.
Thanks Kindred.
Quote from: Kindred on July 11, 2005, 12:01:43 PMyou should remove the login/logout buttons from Coppermine and only use the SMF login/logout...
Which Coppermine file has the login/logout buttons code?
[/quote]
not sure, I have not actually played with any of the coppermine template files myself.... but it looks like it would be theme.php in the themes/themename directory.
Quote from: Kindred on July 11, 2005, 02:05:36 PMit looks like it would be theme.php in the themes/themename directory.
That's where they were. Thanks. I also took out the Register and Profile buttons.
Quote from: rvforumite on July 11, 2005, 05:07:55 PM
Quote from: Kindred on July 11, 2005, 02:05:36 PMit looks like it would be theme.php in the themes/themename directory.
That's where they were. Thanks. I also took out the Register and Profile buttons.
Yes, That is where mine is at
Do they need to be in the same sub-domain? Or can they be in 2 seperate sub-domains?
I tried these steps and was not able to access the admin config settings, nor was I able to upload. So I'm guessing that it wasn't connecting to my SMF members list.
http://coppermine.sourceforge.net/manual.php#integrating
Quote from: IamV on July 12, 2005, 06:03:08 PM
Do they need to be in the same sub-domain? Or can they be in 2 seperate sub-domains?
http://coppermine.sourceforge.net/manual.php#integrating_cookie_start
Thank you very much once again Owdy! :D
I did it & got almost all of it working perfectly. However, for some reason most member levels are not getting the permission to upload. So far only Admins & GMods have the ability to upload. And yes, I did go into groups & set up the permission levels for uploading etc...
In looking through smf.inc.php I see the following section that I am sure is the right spot to change:
// Comment this out if you want to default user's group to 'Registered'
// rather than using Post Count based groups.
define('USE_POST_GROUPS', 1);
Does anyone know exactly what it is I change there to make it so that my member groups switch to 'registered'
It's alright - problem solved.
I was using IE & it wasn't showing all the options for each member group in groups. When I switched to Firefox, I was able to see and access all the options and set them correctly. ;)
is there any way to fix the error message?
as stated... remove the login/logout buttons from the Coppermine theme...
you should be logging in via SMF.
i am now absolutely confused on how to do this :(
i cant even think where to look for files at this point...
been a tough week for web development lol
<meanders off to contemplate this>
Morga
Quote from: morga on July 14, 2005, 12:47:43 PM
i am now absolutely confused on how to do this :(
i cant even think where to look for files at this point...
been a tough week for web development lol
<meanders off to contemplate this>
Morga
It's a lot easier than you think. Just follow the directions in my first post.
-Dan The Man
Just a note to all does who want to try cpg 1.4.1, all these (below) steps have been eliminated in cpg 1.4.1, just user Bridge Manager Wizard found in Admin Tools of cpg.
Quote from: OIDanTheManIO on July 09, 2005, 04:59:26 PM
In /include/init.inc.php, find:
// define('UDB_INTEGRATION', 'smf');
Replace with:
define('UDB_INTEGRATION', 'smf');
In /bridge/smf.inc.php, find:
$path = '../smf';
How do I integrate them when they are running on seperate servers?
I don't believe that you can integrate SMF and Coppermine on separate servers...
why not?
Quote from: Sanosuke on July 15, 2005, 11:57:28 AM
why not?
It's just the way things work.
-Dan The Man
Is there a mod for XML SOAP services?
Quote from: Sanosuke on July 15, 2005, 11:57:28 AM
why not?
Cookies, cookies, cookies... You can't set a cookie on foo.com and then access that cookie on bar.com. You can have different databases (the current release requires a little modification) though.
Just a word of thanks to Dan,
Normally I use Fantistico to install these things (smf, coppermine etc,.) & it is pretty good for that, but! this integration between smf & coppermine was something I wanted to try out. So, just installed them both on a site without using Fantistico and have the integration thing working like a charm.
The instructions on the Coppermine web site confused me a little at first, but after following Dans brief instructions, they seem a lot clearer now somehow. (well,,,PHP Numpty here)
Cheers Dan!
Ped
(credit where credit is due)
Quote from: Ped on July 15, 2005, 05:45:41 PM
Just a word of thanks to Dan,
Normally I use Fantistico to install these things (smf, coppermine etc,.) & it is pretty good for that, but! this integration between smf & coppermine was something I wanted to try out. So, just installed them both on a site without using Fantistico and have the integration thing working like a charm.
The instructions on the Coppermine web site confused me a little at first, but after following Dans brief instructions, they seem a lot clearer now somehow. (well,,,PHP Numpty here)
Cheers Dan!
Ped
(credit where credit is due)
You're welcome :). I'm glad everything went smoothly for you :).
-Dan The Man
Beware folks: Contrary to what you may be told, SMF 1.1.B3 is not compatible with the Coppermine Bridge yet. I have now spent over 22 hours working to get our gallery up and running. As the gallery is an integral part of the site (and you cannot regress SMF back to older versions), we now have to find either an alternative gallery or alternative forum (Hope not).
gerrymore,
before making blanket (and inflammatory) statements like that, perhaps you may want to read some of the other threads which indicate that people HAVE successfully bridged SMF1.1b3 and coppermine...
@gerrymore - Remember that you are using a beta of Coppermine and a beta of SMF. You shouldn't use either for a production site. The Coppermine beta is unsupported, and no new bridge file will be made for SMF until it goes final.
Does anyone know any reason why I am getting this error on top of my Coppermine?
QuoteWarning: filemtime(): Stat failed for C:\Program Files\Apache Group\Apache2\htdocs\gallery\bridge\smf.inc.php(127) : eval()'d code (errno=2 - No such file or directory) in C:\Program Files\Apache Group\Apache2\htdocs\gallery\bridge\smf.inc.php(127) : eval()'d code on line 16
http://virtualchill.ath.cx/gallery/index.php
http://virtualchill.ath.cx/smf/index.php
http://virtualchill.ath.cx/phpinfo.php
I am using the latest stable release of Coppermine with it successfully bridged with SMF.
Quote from: Kindred on July 23, 2005, 10:44:37 AM
gerrymore,
before making blanket (and inflammatory) statements like that, perhaps you may want to read some of the other threads which indicate that people HAVE successfully bridged SMF1.1b3 and coppermine...
Perhaps some may have got it to work. I see more people having problems than not.
Quote from: kegobeer on July 23, 2005, 11:21:52 AM
@gerrymore - Remember that you are using a beta of Coppermine and a beta of SMF. You shouldn't use either for a production site. The Coppermine beta is unsupported, and no new bridge file will be made for SMF until it goes final.
This is true, hence the reason that I dumped 1.4.1 and installed 1.3.3. I only used it on info I found here saying how easy it was, later to find others had problems with it. I'll find someone who can get 1.3.3 working for me, somehow, somewhere.
Didn't mean to offend anyone BTW. Sorry if I did.
Since Nibbler wrote the SMF bridge file, I'd go to the Coppermine support forum for assistance.
Ah, I'm having problems there as well. Each visit, I'm finding I can cllick a link, go off, make coffee, come back and drink it before the thread opens. The forum seems to be running very slow for me. Don't know if its my ISP, or what, but it takes a long time, and I keep getting "Timeouts" on links.
I followed OIDanTheManIO's how to's and it works like a charm. Fully integrated with 1.1 Beta 3 Public! Thanks Dan!
YM
Quote from: YahMan on July 23, 2005, 02:34:32 PM
I followed OIDanTheManIO's how to's and it works like a charm. Fully integrated with 1.1 Beta 3 Public! Thanks Dan!
YM
No problem; glad to hear it :).
-Dan The Man
Quote from: gerrymore on July 23, 2005, 02:30:16 PM
Ah, I'm having problems there as well. Each visit, I'm finding I can cllick a link, go off, make coffee, come back and drink it before the thread opens. The forum seems to be running very slow for me. Don't know if its my ISP, or what, but it takes a long time, and I keep getting "Timeouts" on links.
It's most likely something with your host or with the server you're on.
-Dan The Man
Quote from: gerrymore on July 23, 2005, 02:30:16 PM
Ah, I'm having problems there as well. Each visit, I'm finding I can cllick a link, go off, make coffee, come back and drink it before the thread opens. The forum seems to be running very slow for me. Don't know if its my ISP, or what, but it takes a long time, and I keep getting "Timeouts" on links.
If you are talking about coppermine forum, I have the same problem too, very slow...
Sorry, yes I do mean the coppermine forum. I'm finding it the slowest SMF forum I've seen yet. There must be quite a lot of load on it.
The site is hosted at SourceForge - there isn't anything we can do about the incredible wait times. We are looking at moving the site to another host, but nothing has been decided upon as of yet.
Quote from: akabugeyes on July 23, 2005, 12:17:02 PM
Does anyone know any reason why I am getting this error on top of my Coppermine?
QuoteWarning: filemtime(): Stat failed for C:\Program Files\Apache Group\Apache2\htdocs\gallery\bridge\smf.inc.php(127) : eval()'d code (errno=2 - No such file or directory) in C:\Program Files\Apache Group\Apache2\htdocs\gallery\bridge\smf.inc.php(127) : eval()'d code on line 16
http://virtualchill.ath.cx/gallery/index.php
http://virtualchill.ath.cx/smf/index.php
http://virtualchill.ath.cx/phpinfo.php
Do you have cache_enable on? I'd guess that as the cause. I'm afraid the latest cvs versions cause a potential problem. I'll change it.
Quote from: kegobeer on July 23, 2005, 03:18:19 PM
The site is hosted at SourceForge - there isn't anything we can do about the incredible wait times. We are looking at moving the site to another host, but nothing has been decided upon as of yet.
I have some pull with a few hosts - if you want, I can help with that. And, would you be willing to let me poke around to see what is causing it to be slow, there, either way?
-[Unknown]
@[Unknown] - You'd have to talk to Joachim (GauGau) as he's the lead developer. He may have a host in mind, but I'm sure he'd let you poke around if you could speed things up a bit.
working nicely! Now its time to figure out how to theme this bad boy to match my forums! :-\
When I try logging out from CPG it takes me to SMF and I get this error:
Session verification failed. Please try logging out and back in again, and then try again.
When I try logging out from SMF it works fine.
Any ideas why this is happening?
http://www.floodplane.net/photos/
http://www.floodplane.net/floodboard/
Quote from: cheesenub on July 26, 2005, 05:15:18 PM
When I try logging out from CPG it takes me to SMF and I get this error:
Session verification failed. Please try logging out and back in again, and then try again.
When I try logging out from SMF it works fine.
Any ideas why this is happening?
http://www.floodplane.net/photos/
http://www.floodplane.net/floodboard/
http://www.simplemachines.org/community/index.php?topic=41542.msg302724#msg302724
-Dan The Man
I just noticed that post and must have glossed over the first time.
I'll see if I can mod the cpg template then.
Thanks!
Quote from: cheesenub on July 26, 2005, 05:32:09 PM
I just noticed that post and must have glossed over the first time.
I'll see if I can mod the cpg template then.
Thanks!
No problem :). Good luck.
-Dan The Man
Simple question, how do I add a 'gallery' button in the default theme?
Quote from: YahMan on July 26, 2005, 07:29:15 PM
Simple question, how do I add a 'gallery' button in the default theme?
// The [gallery] button
echo '
<a href="http://www.replace_with_your_damin.com/cpg_folder">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/gallery.gif" alt="' . 'Gallery' . '" style="margin: 2px 0;" border="0" />' : 'Gallery'), '</a>', $context['menu_separator'];
It just says: "Fatal error: "
what version(s) are you installing? SMF? CPG?
the newest beta of both.
that's why... look at some of the other messages in this and the other thread. In order to get it working with SMF1.1b3, you need to download the newest CVS, not the distributable beta...
Quote from: Kindred on July 28, 2005, 05:56:11 PMIn order to get it working with SMF1.1b3, you need to download the newest CVS, not the distributable beta...
or you can use 1.3.3 CPG and it will work that way also
and do this
Quote from: OIDanTheManIO on July 09, 2005, 04:59:26 PM
In /include/init.inc.php, find:
// define('UDB_INTEGRATION', 'smf');
Replace with:
define('UDB_INTEGRATION', 'smf');
In /bridge/smf.inc.php, find:
$path = '../smf';
Replace /smf with the directory you have your SMF forum installed in. If SMF is installed in your root directory, remove smf leaving you with $path = '../';.
Once all necessary changes have been made, upload Coppermine to its own directory (examples: /coppermine, /gallery, /album). Once uploaded, run install.php. Make sure you install Coppermine on the same database as that of your SMF forum. Once installed, your new Coppermine gallery will be up and ready for use :).
-Dan The Man
I am kinda confused about this. I have coppermine already installed and being used same with smf. Can it still be done?
Also I really do not understand this:
QuoteReplace /smf with the directory you have your SMF forum installed in. If SMF is installed in your root directory, remove smf leaving you with $path = '../';.
I am running smf 1.05 and coppermine 1.3.2 and they are on seperate databases
Michelle
Help, I thought I understood and went ahead and tried what I thought and now I have a parse error:
Parse error: parse error, unexpected T_STRING in /home/scrap4/public_html/gallery/include/init.inc.php on line 7
what can I do?
Quote from: mirigoyen on July 29, 2005, 03:57:16 PM
QuoteReplace /smf with the directory you have your SMF forum installed in. If SMF is installed in your root directory, remove smf leaving you with $path = '../';.
Michelle
Yes, it can still be done, but you need them in the same database.
For this
$path = '../smf'; all I did to mine was put my forum name in where smf is ex: $path = '../Hunt'; Hunt is my forum name Http:www.Icducks.com/Hunt
how do I do that, they are on seperate databases?
Do you have any post on your forum yet?
Open up your Setting.php in you SMF and change the
$db_server = 'localhost';
$db_name = 'smf';
$db_user = 'root';
$db_passwd = '';
$db_prefix = 'smf_';
to the same as your CPG Settings But make sure you keep the $db_prefix = 'smf_'; as is you do not want it the same as your CPG
and then reupload it
yeah I already have posts in my forum and pics in my gallery.
ok, so I went back and changed it all back to the original and now I can't open my gallery it is a fatal error :'(
Fatal error: Call to undefined function: breadcrumb() in /home/scrap4/public_html/gallery/index.php on line 159
Help what do I do? :'(
Nevermind problem solved
Good to hear that. Did you get them into one Database. Make sure you back-up your forum first
Quote from: [Unknown] on July 23, 2005, 05:57:29 PM
Do you have cache_enable on? I'd guess that as the cause. I'm afraid the latest cvs versions cause a potential problem. I'll change it.
I just updated my test forums to the latest CVS and the error message went away on coppermine. I guess the potential problem has been fixed. ;)
I finally managed to get mine working (SMF 1.1B3 and CPG 1.3.3). I used [Unknown]'s smf_api.php, and changed the cookie settings in Admin. It now works pretty much as it should. The only problem I am left with is when I log in through the Gallery. I am taken to the Forum log in as I should, however, once logged in I am taken to the forum, not redirected back to the Gallery.
Any ideas on how to fix this? It is not a major problem, just very irritating.
In the first post on page 2 of this thread it is recommended that you remove your login & logout buttons from coppermine & only login & logout through your forum ;)
Bugger... well I installed coppermine a few days ago before I read that you could actually intergrate it lol :) Before I go to the effort of trying to intergrate it etc... Could someone please show me a link or screenshot of what it looks like to be "intergrated" I wanna see if its really worth it haha because i was thinking of just adding a button to the user menu of smf to go to the gallery.. but if this all fully intergrates everything that would be cool.
So please links people :D
Quote from: erockza on August 01, 2005, 08:22:55 PM
Bugger... well I installed coppermine a few days ago before I read that you could actually intergrate it lol :) Before I go to the effort of trying to intergrate it etc... Could someone please show me a link or screenshot of what it looks like to be "intergrated" I wanna see if its really worth it haha because i was thinking of just adding a button to the user menu of smf to go to the gallery.. but if this all fully intergrates everything that would be cool.
So please links people :D
It will look the same as your gallery looks now, except bridged. If you're the only registered gallery user, it's not too late to bridge the two.
-Dan The Man
@erockza
my forums are http://www.Icducks.com/Hunt and then just click on the galllery button.
Quote from: [Unknown] on July 23, 2005, 05:57:29 PM
Quote from: kegobeer on July 23, 2005, 03:18:19 PM
The site is hosted at SourceForge - there isn't anything we can do about the incredible wait times. We are looking at moving the site to another host, but nothing has been decided upon as of yet.
I have some pull with a few hosts - if you want, I can help with that. And, would you be willing to let me poke around to see what is causing it to be slow, there, either way?
-[Unknown]
Unknown, did you had a chance to look at Coppermine forum not only it is slow, in a day at least 3 to 4 time I get the following message.
QuoteConnection Problems
Sorry, SMF was unable to connect to the database. This may be caused by the server being busy. Please try again later.
SourceForge is still using MySQL 3.23.x, which is going to be slow especially because SMF was optimized for MySQL 4.0 and above. Furthermore, the statistics show that the MySQL server is enduring quite heavy usage (466 queries per second, among other things), although the webservers themselves seem relatively well-distributed.
They would probably benefit immensely from using MySQL 4.1 and replication with multiple servers (even if only two.) But, I suppose that's obviously just my opinion and not theirs.
That message is caused by the server, quite simply, being too overloaded I'm sure.
-[Unknown]
Yesterday (08/02/05) and Today I haven't been able to connect to coppermine forum, anyone else experiencing the same problem?
me too...
Same for me, and I'm a Coppermine dev! >:( I can't get any work done... The SourceForge MySQL server is horrendously overworked.
Hey. How do I get the SSI includes to work in Coppermine? I like to include a universal wrapper, so I was wondering if there was a way I could do this using the SSI and not have errors?
I will be using SMF 1.0.5 and Coppermine 1.3.3.
There are conflicting functions in SMF and Coppermine, so you'll get errors. Those functions have been renamed in the Coppermine beta so SSI will work. Feel free to try out the Coppermine beta. The forums aren't working, but you can still get to the downloads page (http://sourceforge.net/project/showfiles.php?group_id=89658) or the CVS. (http://sourceforge.net/cvs/?group_id=89658)
Coppermine has moved to a new server: http://coppermine-gallery.net/forum. Update your links!
Alright... I haven't seen this addressed yet. Sorry if it has been. Instead of my gallery opening in a seperate page, I was hoping to get it to open inside the forum. Just using 'include' isn't working. Any suggestions on where to go with this?
that is much more complicated and involves modifying templates (on both sides), source files and/or using SSI functions...
Ahhh..... OK. Thanks.
Hi!!!
I have follow the Dan instructions on the first page, but I am getting the following error(in coppermine):
Parse error: parse error, unexpected T_STRING, expecting T_VARIABLE or '$' in /home/ac99/public_html/coppermine/bridge/smf.inc.php on line 124
Could you help me :D?
looks like you may have deleted a quote that needs to be there... What did you change in smf.inc.php?
I have deleted this:$path = '../smf';
And writte this: $path = '../home/ac99/public_html/SMF';
Is this wrong :-[ ?
P.S - If my English looks bad, sorry but I am portuguese...
Quote from: ac99 on August 15, 2005, 12:14:05 AM
I have deleted this:$path = '../smf';
And writte this: $path = '../home/ac99/public_html/SMF';
Is this wrong :-[ ?
P.S - If my English looks bad, sorry but I am portuguese...
Try using just
$path = '../SMF';.
-Dan The Man
actually... try this, instead:
$path = '/home/ac99/public_html/SMF';
it's almost always better to use absolute paths when defining the root directory for a bridge.
I've tried all, but not works. See it at http://www.mundodosanimais.com/coppermine/
I don't know if it is the problem but I've installed Coppermine at cPanel Fantastico; export the tables of the BD and import them to the SMF database, and finally edit a coppermine file (don't remember the name) to appoint to the new database username and password. I've done this also to integrate Mambo and SMF, importing tables to only one database and it works! Coppermine couldn't be installed by Fantastico?
Which version of SMF and CPG are you using.
I would suggest make a backup copy of you current 'smf.inc.php' than replac it with a new one
Hi!
Coppermine is the version 1.3.2 and SMF is 1.0.5
I will try to replace the smf.inc.php ;)
FYI latest stable release of CPG is 1.3.3 you might want to upgrade you installation.
I've re-started the process:
in Fantastico, I have removed coppermine
I have downloaded the stable 1.3.3 coppermine version, edited the two files mentioned by Dan in the first page, uploaded it by FTP to public_html/coppermine.
In browser, I have appointed to mundodosanimais.com/coppermine/install.php
I have put the mambo/smf database correctly
Installation was a success
The same error appears again :( :( :( :(
Parse error: parse error, unexpected T_STRING, expecting T_VARIABLE or '$' in /home/ac99/public_html/coppermine/bridge/smf.inc.php on line 126
I really want to integrate forum and album... but it seems that I can't >:(
Did you change the file(s) before installing coppermine?
I am free today if you want PM me your info I'll see if I can have it up and running.
what program are you using to edit the php file?
To edit php files I use Namo Web Editor. I am using this program for all php files that need to be edited, no problems have been occurred before coppermine
Aravot I will send a Pm to you ;)
Quote from: ac99 on August 15, 2005, 08:15:42 PM
Aravot I will send a Pm to you ;)
Coppermine is up and running if you want me to do the bridge thingy too PM me.
ac99,
Your mistake was / is smf folder is in caps 'SMF' that is why you are having error, and in coppermine you wrote the path as 'mysite.com' instead of www.mysite.com
Quote from: Aravot on July 26, 2005, 08:02:37 PM
Quote from: YahMan on July 26, 2005, 07:29:15 PM
Simple question, how do I add a 'gallery' button in the default theme?
// The [gallery] button
echo '
<a href="http://www.replace_with_your_damin.com/cpg_folder">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/gallery.gif" alt="' . 'Gallery' . '" style="margin: 2px 0;" border="0" />' : 'Gallery'), '</a>', $context['menu_separator'];
When I try this on the index.template.php file, I get a parse error.... Am I editing the wrong page?
Any ideas?
Thanks
Quote from: DaveOaks on August 17, 2005, 07:46:53 PM
Quote from: Aravot on July 26, 2005, 08:02:37 PM
Quote from: YahMan on July 26, 2005, 07:29:15 PM
Simple question, how do I add a 'gallery' button in the default theme?
// The [gallery] button
echo '
<a href="http://www.replace_with_your_damin.com/cpg_folder">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/gallery.gif" alt="' . 'Gallery' . '" style="margin: 2px 0;" border="0" />' : 'Gallery'), '</a>', $context['menu_separator'];
When I try this on the index.template.php file, I get a parse error.... Am I editing the wrong page?
Any ideas?
Thanks
The code is OK, search for
// The [calendar]!
if ($context['allow_calendar'])
echo '
<a href="', $scripturl, '?action=calendar">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/calendar.gif" alt="' . $txt['calendar24'] . '" style="margin: 2px 0;" border="0" />' : $txt['calendar24']), '</a>', $context['menu_separator'];
add the gallery code after above calendar code make sure not to replace or overwrite another code
Worked Perfect!
Thanks!
I had placed it last after everything else :P
QuoteDan, the bridge/smf.inc.php file has the following warning near the top:
WARNING : Do not activate this bridge if you already have pictures or usergroups in your gallery.
Does this mean that existing pictures will be erased?
Yes, unfortunately they are erased, however you can save them and do the bridging with some preliminary work.
I have moved my CPG a few times now, and bridged it successfully twice now. You can retain your photos from your original gallery prior to bridging, but it takes a bit of work. I find it is easier if you use a fresh install of CPG into a new directory then move your contents. Also, it is easier if you are not using the "User gallery" feature. However it can be done if users are using it.
Here is how I did it:
1. Use FTP or your File Manager, or even just go to your original gallery and click each photo and "Save Picture As" and save the pictures to your computer. Via FTP or File Manager, the photos are located in the 'ablums' directory. Try to retain your directory structure within your album folder. The directory called "userpics" is where the user photos are located. Inside that each user is numbered. Keep track of who's photo's are who's...I just write it down and I rename the numbered folders to the users name. It also helps if you don't have very many users as I don't. This directory's structure, you cannot retain in the new install, but you can save out the photos and 'batch add' them later into the new gallery into a new directory in your ablums directory. It's tricky but can be done. DO NOT load them into the new 'userpics' directory in the new install. Create a new directory such as "userpicsbatch" rather. This will cause problems otherwise.
2. Install a fresh CPG and do the bridging the SMF. Make sure it all works well.
3. Recreate your non-user albums in the new install. eg: Wallpaper etc.
4. Use the 'batch-add' feature in Coppermine. You need to use FTP or your File Manager to use it. Upload your folders into the albums directory then use batch-add to install them into the newly recreated ablums.
5. For the userpics, this is a bit more difficult. There are 2 methods you can use.
- Method 1: As admin, you will need to recreate the user account and the user's albums they had and send them the new login information later when you are done....as I mentioned, it helps if you do not have too many users. Your users can change their passwords after. Upload manually from your computer, or use the batch-add feature and load the user's album from your "userpicsbatch" directory on your server.
- Method 2: Create communal albums under the user's names and set the albums properties for "Anonymous" to upload. The only problem with that is any other user can add to that album.
I hope it helps, and hope I haven't missed any steps. Sorry for the length....I tend to get a little long winded lol.
Ruskin
how do i completly uninstall so that i can re-install? i've looked but cannot find specific instructions
I am having a hell of a time getting my users the rights to upload pictures. I login to the site as admin then go to coppermine and then go to groups and set registered users and other groups to "yes" for uploads but they are still not able to upload any files.
They keep getting this when clicking on the upload button
QuoteSorry there is no album where you are allowed to upload files
Quote from: shipwreck on August 20, 2005, 11:31:10 PM
I am having a hell of a time getting my users the rights to upload pictures. I login to the site as admin then go to coppermine and then go to groups and set registered users and other groups to "yes" for uploads but they are still not able to upload any files.
They keep getting this when clicking on the upload button
QuoteSorry there is no album where you are allowed to upload files
have you chmod'd the album and include folders to 755? just a thought i don't even have this running but that sounds like it could be it
Quote from: shipwreck on August 20, 2005, 11:31:10 PM
I am having a hell of a time getting my users the rights to upload pictures. I login to the site as admin then go to coppermine and then go to groups and set registered users and other groups to "yes" for uploads but they are still not able to upload any files.
They keep getting this when clicking on the upload button
QuoteSorry there is no album where you are allowed to upload files
If you haven't set upload permissions for public albums, then of course the user will get that error if he/she hasn't created a personal album yet. Make album(s) first, then upload images. There's a button in each user's admin menu bar that says Create Album.
Thanks for your help! can't believe I missed that. :)
this is garbage i hate coppermine all i want to do is set it up i've done everything right but all i get is you don't have permission to acces this even when i'm admin F*%K
I don't know if this is the correct topic to this, but could someone give me the code to insert on index.template.php of SMF to insert a link in forum to coppermine (in the top, like home, Help, Album, etc)
Quote from: ac99 on August 27, 2005, 02:22:01 PM
I don't know if this is the correct topic to this, but could someone give me the code to insert on index.template.php of SMF to insert a link in forum to coppermine (in the top, like home, Help, Album, etc)
Gallery with Button
// The [gallery] button
echo '
<a href="http://www.mysite.org/cpg">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/gallery.gif" alt="' . 'Gallery' . '" style="margin: 2px 0;" border="0" />' : 'Gallery'), '</a>', $context['menu_separator'];
Gallery wording (without button) for Portal series.
// The [gallery] button
echo '
<a href="http://www.mysite.org/cpg"> Gallery <img src="' . $settings['images_url'] . '/seperator.gif" border="0" />';
Thanks, it works :D
i've seen coppermine actually intergrated into a smf forum somewhere but i don't remember the address, does anyone know how i would go about doing this?
thanks.
EDIT: after further looking it seems it might have been done with mambo i have check the forum and the mambo stuff but i don't want to change anything with my forum i just want coppermine to open up inside the forum like the smfshop or smfarcade how can i do this?
Quote from: kegobeer on August 21, 2005, 12:14:49 AM
Quote from: shipwreck on August 20, 2005, 11:31:10 PM
I am having a hell of a time getting my users the rights to upload pictures. I login to the site as admin then go to coppermine and then go to groups and set registered users and other groups to "yes" for uploads but they are still not able to upload any files.
They keep getting this when clicking on the upload button
QuoteSorry there is no album where you are allowed to upload files
If you haven't set upload permissions for public albums, then of course the user will get that error if he/she hasn't created a personal album yet. Make album(s) first, then upload images. There's a button in each user's admin menu bar that says Create Album.
How do you even make an album public? That's where I'm having problems. I've searched everything and cant find anything in my gallery that allows album permissions to be set.
Credit for this goes to "marcnyc" as it was his code for flashchat which you can check here http://www.simplemachines.org/community/index.php?topic=27137.0 that allowed me to do this.
i had been wanting to intergrate coppermine fully into my smf forum instead of having it open in a new window and after searching for an eternity and requesting assistance without reply i decide f%$k it i'll macguyver it. so here are the steps to get coppermine to sit nicely inside your forum.
first follow all the instructions in the start of this thread and make sure smf and coppermine are running all clear. then follow these steps
(I assume that you installed SMF in the folder called /smf/ and that you are using the default theme - if you are not just change "/smf/" with the name of your smf folder on your server and change "default" with the name of your theme's folder inside the /Themes/ directory of your SMF installation):
1. open /smf/index.php
2. find this line:
'boardrecount' => array('Admin.php', 'AdminBoardRecount'),
and after that code add this code:
'coppermine' => array('Coppermine.php', 'Coppermine'),
3. create a file called Coppermine.php with your text-only editor such as NotePad (PC) or BBEdit (Mac) and add this code inside it:
<?php
if (!defined('SMF'))
die('Hacking attempt...');
function Coppermine() {
// This is gonna be needed...
loadTemplate('Coppermine');
}
?>
4. save this file inside /smf/Sources
5. create a file called Coppermine.template.php with your text-only editor such as NotePad (PC) or BBEdit (Mac) and add this code inside it:
<?php
function template_main()
{
global $context, $settings, $options, $txt, $scripturl;
echo '
<script language="JavaScript" type="text/javascript"><!--
function checkAll(onOff)
{
for (var i = 0; i < document.searchform.elements.length; i++)
{
if (document.searchform.elements[i].name.substr(0, 3) == "brd")
document.searchform.elements[i].checked = onOff;
}
}
// --></script>
<form action="', $scripturl, '?action=search2" method="post" name="searchform" id="searchform">
<table width="80%" border="0" cellspacing="0" cellpadding="3" align="center">
<tr>
<td>', theme_linktree(), '</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="4" align="center" class="tborder">
<tr class="titlebg">
<td>Coppermine</td>
</tr><tr>
<td class="windowbg">';
// load coppermine
echo '<iframe width="100%" height="800" src="http://yourserver.com/public_html/coppermine/index.php"></iframe>';
echo '
</td>
</tr>
</table>
</form>';
}
?>
^^note the address in the above code change this to reflect your index.php file in your coppermine folder and make sure to leave out the www so as to keep compatability with firefox and IE
6. save this file inside /smf/Themes/default/
7. in that same folder open /smf/Themes/default/index.template.php and at the end of the file find this bit of code:
// The [calendar]!
if ($context['allow_calendar'])
echo '
<a href="', $scripturl, '?action=calendar">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/calendar.gif" alt="' . $txt['calendar24'] . '" style="margin: 2px 0;" border="0" />' : $txt['calendar24']), '</a>', $context['menu_separator'];
and below it copy and paste the following code
//begin gallery code
echo '
<a href="', $scripturl, '?action=coppermine"><img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/gallery.gif" alt="' . "Gallery" . '" style="margin: 2px 0;" border="0" /></a>', $context['menu_separator'];
//end gallery code
and that's it pretty easy. hope it's cool that i posted it in here and all that jazz i just know how hard it was for me to locate or find someone to help so i figure this will help some people.
EDIT: you may want to disable the profile access if you decide to use this as it will open up the entire forum in the iframe.
This is awesome, scrawl. It's exactly what I was looking for. Thanks. My only question is how to make the iframe automatically resize to the page size. So that it doesn't appear to be inside a frame. Any suggestions?
Quote from: ruzster on August 29, 2005, 09:34:37 AM
This is awesome, scrawl. It's exactly what I was looking for. Thanks. My only question is how to make the iframe automatically resize to the page size. So that it doesn't appear to be inside a frame. Any suggestions?
not exactly following what you mean but try this, make sure both the width and height are set at 100%
// load coppermine
echo '<iframe width="100%" height="100%" src="http://yourserver.com/public_html/coppermine/index.php"></iframe>';
Im having probs :(
I can login from the forum to coppermine with no problems but my members cant even though i have the settings right? it just wont log them in and when they click on login from the album it brings them back to the forum.
Quote from: scottjess on August 29, 2005, 07:55:20 PM
Im having probs :(
I can login from the forum to coppermine with no problems but my members cant even though i have the settings right? it just wont log them in and when they click on login from the album it brings them back to the forum.
from my limited understanding from reading this thread and many others and the coppermine forum if you have smf and coppermine bridged correctly you should remove the login/logout links from coppermine. as for your problem it seems you might not have bridged them properly i'd just go back over the instructions at the start of this thread. but that's all i can offer one of the other fellas will probably have a solid answer it just takes a while to get a response.
How do I remove the links?
Quote from: scottjess on August 29, 2005, 07:55:20 PM
Im having probs :(
I can login from the forum to coppermine with no problems but my members cant even though i have the settings right? it just wont log them in and when they click on login from the album it brings them back to the forum.
what version of SMF and CPG are you using
SMF - 1.0.5 Coppermine 1.3.3
In Coppermine, open up your theme.php file and find this (or something similar)
<!-- BEGIN login -->
<a href="{LOGIN_TGT}">{LOGIN_LNK}</a>
<!-- END login -->
<!-- BEGIN logout -->
<a href="{LOGOUT_TGT}">{LOGOUT_LNK}</a>
<!-- END logout -->
Change to
<!-- BEGIN login -->
<!-- END login -->
<!-- BEGIN logout -->
<!-- END logout -->
Then add a link back to your forum. I put mine here:
<!-- BEGIN album_list -->
<a href="../smf/index.php" title="My Forum">Forum</a> ::
<a href="{ALB_LIST_TGT}" title="{ALB_LIST_TITLE}">{ALB_LIST_LNK}</a> ::
<!-- END album_list -->
it keeps telling me when I am logged in as a normal forum user that I dont have the permissions.
I dont think its logged in at all.:(
Quote from: scottjess on August 29, 2005, 09:15:32 PM
it keeps telling me when I am logged in as a normal forum user that I dont have the permissions.
I dont think its logged in at all.:(
make sure you've gone through the instructions in the first post of this thread. i had the same issue and it was because i hadn't set up the
$path = '../smf'; properly
this was taken from the coppermine forum. check and make sure you've set it all up properly.
Quote from: GauGau on July 07, 2004, 12:40:49 AM
Glad you were able to solve this on your own.
For all who have similar problems and might get confused (language issue mabye), here's the solution in detail, with proper wording:
For// Set this to the location of your Settings file:
$path = '../smf';
in the SMF bridge file, you mustn't enter your board's url (like http://yourdomain.tld/smf/), but a relative path seen from your coppermine install. The two dots with a slash say "one directory up towards root level", followed by the folder name your SMF board is located at.
Some examples:
Coppermine URL | SMF Board URL | $path in your coppermine bridge file |
http://foobar.com/coppermine/ | http://foobar.com/smf/ | $path = '../smf'; |
http://foobar.com/gallery/ | http://foobar.com/forum/ | $path = '../forum'; |
http://foobar.com/mystuff/coppermine/ | http://foobar.com/board/ | $path = '../../board'; |
http://foobar.com/coppermine/ | http://foobar.com/mysubfolder/my_board/ | $path = '../mysubfolder/my_board'; |
Hope this clarifies things for you - mind the technical terms URI/URL/relative path/absolute path. They all mean different things, although there's no such thing as a "htdocs-URL"... ;)
GauGau
I had it working last week for a day and now I cant get it working :( ive done everything right I think and it still wont go.
I am installing the coppermine 1.4.1 BETA because it works on my testing server. :) it has the nice Bridging wizard too.
This topic follows so many versions and setups I just wanted to throw mine out to see if anyone else has don it...
Is the main benefit of integrating allowing members of the forum post comments or are there others?
I am using SMF 1.0.5
and Coppermine 1.3.3 I think?
I have about 100 members in my forum
just 2 in my photo archive
both coppermine members are admins and are also admins on SMF
I have almost 3000 photos (all public) in my coppermine setup.
Should this work for me?
here is my site...
http://www.razorbacklegacy.com/board (http://www.razorbacklegacy.com/board)
http://www.razorbacklegacy.com/hog_archive (http://www.razorbacklegacy.com/hog_archive)
if so do I only use the instructions in the first post?
**I don't have the login / logout buttons on my photo pages anyway**
Thanks for your time.
Londonhogfan
also Im wanting to use a new CMS is it easy to integrate all three? Which is the most effective?
1- yes. SMF 1.0.5 and CPG 1.3.3 should work with no problems
however, when you do the integration, there is a good chance that you will loose the connections between the new CPG users (based on the SMF user table) and the old CPG user-albums. They'll become "unconnected"
A script could be written to re-associate them... but it would take some effort.
(because with them installed separately, the CPG users and the SMF users have completely different user numbers in the tables)
2- Yes, SMF : Mambo : CPG installations seem to work just dandy.
Quote from: Kindred on September 02, 2005, 02:14:15 PM
however, when you do the integration, there is a good chance that you will loose the connections between the new CPG users (based on the SMF user table) and the old CPG user-albums. They'll become "unconnected"
if the admins in cpg and SMF are the same would I have any problems?
if so would I
just add them as an admin in SMF and they would have admin in Coppermine... Right?
but all photos, comments, etc in public coppermind would still be there - as well as all posts in SMF - Correct?
if I wanted to make public folders after the integration how would I do that?
Sorry - Just want to make sure before I start changing everything.
public albums will not be changed at all
private albums will be "unassigned" and pictures will no longer be associated with the person who uploaded them
The pictures themselves and the posts in SMF will not be altered.
Once the systems are integrated, then anyone with admin or global mod access in SMF will have admin access to CPG.
After the integration, public or private albums are done exactly like they were before the integration.
Quote from: Kindred on September 02, 2005, 02:33:42 PM
public albums will not be changed at all
private albums will be "unassigned" and pictures will no longer be associated with the person who uploaded them
The pictures themselves and the posts in SMF will not be altered.
Once the systems are integrated, then anyone with admin or global mod access in SMF will have admin access to CPG.
After the integration, public or private albums are done exactly like they were before the integration.
Thanks, you have been very helpful
QuoteMake sure you install Coppermine on the same database as that of your SMF forum.
Can I get clarification on this statement please?
does this mean to list the db that CPG is to use as the SAME db that SMF uses? and not a separate db within the domain? In other words, permit CPG to build its tables wihin the SMF DB?
Brains not fucntioning today
Quote from: Elegant John on September 03, 2005, 01:34:18 PM
QuoteMake sure you install Coppermine on the same database as that of your SMF forum.
Can I get clarification on this statement please?
does this mean to list the db that CPG is to use as the SAME db that SMF uses? and not a separate db within the domain? In other words, permit CPG to build its tables wihin the SMF DB?
Brains not fucntioning today
Yes, same database as SMF
Aravot did you have to work anything special for the bridge in your setup? I have 1.1 Beta 4 and am installing CPG 1.4.1
I tried this a few days ago and it came back with a Fatal error and a blank page, no error was listed :'(
Quote from: lace1215 on September 13, 2005, 09:50:01 AM
Aravot did you have to work anything special for the bridge in your setup? I have 1.1 Beta 4 and am installing CPG 1.4.1
I tried this a few days ago and it came back with a Fatal error and a blank page, no error was listed :'(
No, but make sure CPG 1.4.1 is the latest download from CVS
CVS?
Quote from: lace1215 on September 13, 2005, 11:03:07 AM
CVS?
http://cpg-contrib.org/index.php?file=minicms/cms&id=21
Absolutly wonderful!
Aravot thank you so much for the link. It worked flawlessly and the gallery is back up and running.
Just to say THANK YOU! for providing in this thread EVERYTHING needed to successfully integrate the Coppermine with SMF. Could not have asked for better instructions... ;D
Anna
Quote from: taz on August 01, 2005, 10:58:28 PM
@erockza
my forums are http://www.Icducks.com/Hunt and then just click on the galllery button.
OK. First of all I'm an idiot. :) Well not really but I'm still trying to get a handle on why you intergrate the two programs. Don't get me wrong I love and use both a lot. My forum (http://forum.hqpictures.net) is primarily a picture posting forum and I use Coppermine to host a TON of images so the idea of intergrating the two sounds great. From the link above it seems that all it really does is send you from SMF to the Coppermine gallery. Am I missing something? Like can a user upload a pic to Coppermine via SMF and then have the thumb posted on SMF and linked to the full sized pic on CPG making Coppermine and SMF a kind of internal ImageShack? Then using hotlink protection keep people from grabbing the code and posting it elsewhere? I've only been using SMF for about 3 weeks and absolutely love it and installing a new CPG setup wouldn't be a problem because it would be like adding a new feature to my board. I can deal with editing the code (I installed tons of mods on phpBB so I got used to it) I just am trying to figure out the advantages of doing the intergration.
So can someone with more brain power than me give me a kinda rundown of the advantages of intergrating the two programs?
Thank you most kindly.
Ok the purpose if to have both programs use the same users table so you dont have to register for the forum and the gallery sepparately. They will both be integrated. Also SMF user groups will replace copperminess usergroups.
Quote from: cheesenub on July 26, 2005, 05:15:18 PM
When I try logging out from CPG it takes me to SMF and I get this error:
Session verification failed. Please try logging out and back in again, and then try again.
When I try logging out from SMF it works fine.
Any ideas why this is happening?
http://www.floodplane.net/photos/
http://www.floodplane.net/floodboard/
OK. Well I installed new versions of both programs to check it out. SMF 1.1b and CPG 1.3.4. I'm using the "TechHead" theme and made a button. Downloaded the font used Photoshop and it looks perfect. At first I tried removing the login, register, and logout buttons from Coppermine but removed too much and got an error. :) So I used a copy of the template file I had on my HD and restored the menu. Everything worked fine. I then got the error you're talking about. I came back here because I remembered reading about it and came up with a different sort of fix...
At one point I was using Coppermine and had around 9000 images on it and 700 or so users so I decided to start a forum so they would have a place to go to ask questions, hear about downtimes, ect. I made a link to the forum in the menu bar. I used that same trick here and now when I hit the "logout" button on Coppermine it sends me right back to the SMF board. Here's what I did.
All I did was have to change the {LOGOUT_TGT} to the URL of my SMF board.
Original script<!-- BEGIN logout -->
<td><img name="spacer" src="images/spacer.gif" width="5" height="25" border="0" id="spacer" alt="" /></td>
<td><img name="button1_r1_c1" src="themes/rainy_day/images/button1_r1_c1.gif" width="5" height="25" border="0" id="button1_r1_c1" alt="" /></td>
<td background="themes/rainy_day/images/button1_r1_c2.gif">
<a href="{LOGOUT_TGT}">{LOGOUT_LNK}</a>
</td>
<td><img name="button1_r1_c3" src="themes/rainy_day/images/button1_r1_c3.gif" width="5" height="25" border="0" id="button1_r1_c3" alt="" /></td>
<!-- END logout -->
Changed Script<!-- BEGIN logout -->
<td><img name="spacer" src="images/spacer.gif" width="5" height="25" border="0" id="spacer" alt="" /></td>
<td><img name="button1_r1_c1" src="themes/rainy_day/images/button1_r1_c1.gif" width="5" height="25" border="0" id="button1_r1_c1" alt="" /></td>
<td background="themes/rainy_day/images/button1_r1_c2.gif">
<a href="hxxp://www.*******.net/smfcpg/">{LOGOUT_LNK}</a>
</td>
<td><img name="button1_r1_c3" src="themes/rainy_day/images/button1_r1_c3.gif" width="5" height="25" border="0" id="button1_r1_c3" alt="" /></td>
<!-- END logout -->
It should work on any theme. I removed the register and login buttons but left the logout one. I should also mention you can do the same with the [LOGIN_TGT} or any of the others you want to direct to somewhere else.
I'm a complete nOOb on SMF and board/gallery intergration so I may have missed something importent but it seems to work for me. :) If someone sees a big flaw here, or tried this and it did work, or thinks this is not the way to go about it PLEASE let me know. I can only learn if someone corrects my errors. ;)
Good Morning
Could someone share an example link of a bridged CMG and SMF. This sounds interesting and would like to make sure it's something I want/need to do before I delve in. If you don't wish to post the url publically I think my e-mail address is in profile.
Thanks a bunch
I have a test site of Mambo + SMF + CPG if you are interested click on the globe below my avatar
got this error
Notice: Undefined index: USER_AGENT in /home/httpd/vhosts/onweer-online.nl/httpdocs/medemblik/gallery/bridge/smf.inc.php(127) : eval()'d code on line 28
dunno what it means
I think it means that you just upgraded to SMF 1.1 CR1 which does not support or is not supported by the SMF bridge. I'm in exactly the same situation as you and probably numerous others.
Coppermine Forum says that the bridge supports only SMF 1.0.x and not SMF1.1.x http://coppermine-gallery.net/forum/index.php?topic=22015.0
I think it's too early to know the answers as to what to do next, revert to SMF 1.1 beta3 or 'unbridge'... or... ?
Anna
Orstio seems to have SMF 1.1b4, Coppermine and Mambo all integrated. How different is CR1 from beta4?
Anna
Problem can be fixed following the thread:
http://www.simplemachines.org/community/index.php?topic=40625.0
It works well
Anna
My question is:
After integration, which of the themes is beign loaded? -- I mean, I would like to have coppermine to use the smf theme not the coppermine theme, is that possbile? -- Or they have to load their own themes and I need to customize both to make them similar?
Thanks
I have this wierd problem with my bridge.. It works with IE but not with firefox. I just can get logged in with firefox. and the IE login is a little subborn, but it works.
To log in with IE i have to use the login link from the gallery, that uses the smf login and redirect me to the gallery logged in, and on the forum. But with firefox its inposseble to login at the gallery at all.
My forum and gallery:
http://forum.bandofbrothers-guild.com (forum)
http://forum.bandofbrothers-guild.com/gallery (gallery)
login:
uname: testuser
pword: testuser
thanks for all help :)
It is working fine (FF 1.0.7), make sure you clean the cache and cookies
Well, with FF I logged in through the Forum and had no problem with the Gallery, I was able in fact to create a user album. I logged out through the Forum.
When I tried to login through the Gallery it transferred me to the Forum's login where I successfully logged in, but then I was not logged into the Gallery and no matter how many cookies I cleared and what I tried from then on I was not able to log in into the Gallery at all from anywhere.
Sorry, but I'm too new to know why that is.
I have my Forum and Gallery bridged, but I removed the login button from the Gallery altogether so the only way to login into the gallery is through the Forum and I have no problems whatsoever.
Anna
Quote from: panter011 on September 27, 2005, 08:39:28 PM
My question is:
After integration, which of the themes is beign loaded? -- I mean, I would like to have coppermine to use the smf theme not the coppermine theme, is that possbile? -- Or they have to load their own themes and I need to customize both to make them similar?
Thanks
No this is not possible.
Quote from: panter011 on September 27, 2005, 08:39:28 PM
My question is:
After integration, which of the themes is beign loaded? -- I mean, I would like to have coppermine to use the smf theme not the coppermine theme, is that possbile? -- Or they have to load their own themes and I need to customize both to make them similar?
Thanks
Though integrated, they are two completely separate applications. Coppermine themes will not work with SMF, and SMF themes will not work with Coppermine, I'm afraid.
I downloaded the 1.3.5 version, uploaded all the files, then did the changes to init.inc.php and smf.inc.php.
I then went to install it, and all I get is:
Fatal error: Call to undefined function: cache_get_data() in /home/hwwepa08/public_html/gallery/bridge/smf.inc.php(127) : eval()'d code on line 10
Line 10 is just the license argreement and what not
Any help?
Quote from: The Outsider on October 09, 2005, 03:28:03 PM
I downloaded the 1.3.5 version, uploaded all the files, then did the changes to init.inc.php and smf.inc.php.
I then went to install it, and all I get is:
Fatal error: Call to undefined function: cache_get_data() in /home/hwwepa08/public_html/gallery/bridge/smf.inc.php(127) : eval()'d code on line 10
Line 10 is just the license argreement and what not
Any help?
you have to install coppermine and smf as standalone installs first...in the same database...make sure both installs work...then merge
-snork13
ok, I will try, thanks.
OK I did that all, now I get this
Fatal error: Call to undefined function: cache_get_data() in /home/hwwepa08/public_html/gallery/bridge/smf.inc.php(127) : eval()'d code on line 10
When I go to /gallery, it shows that.
when I go to /gallery/install.php, it shows fine.
I enter the same smf database, username and password, and then I get this:
The following errors were encountered and need to be corrected first:
mySQL Error: Table 'cpg135_albums' already existson query ' CREATE TABLE cpg135_albums ( aid int(11) NOT NULL auto_increment, title varchar(255) NOT NULL default '', description text NOT NULL, visibility int(11) NOT NULL default '0', uploads enum('YES','NO') NOT NULL default 'NO', comments enum('YES','NO') NOT NULL default 'YES', votes enum('YES','NO') NOT NULL default 'YES', pos int(11) NOT NULL default '0', category int(11) NOT NULL default '0', pic_count int(11) NOT NULL default '0', thumb int(11) NOT NULL default '0', last_addition datetime NOT NULL default '0000-00-00 00:00:00', stat_uptodate enum('YES','NO') NOT NULL default 'NO', keyword VARCHAR( 50 ), PRIMARY KEY (aid), KEY alb_category (category) ) TYPE=MyISAM'
Are you using SMF 1.1 if so, solution is in this topic
http://www.simplemachines.org/community/index.php?topic=40625
I am using
1.1 RC1
I have checked that topic out, but it doesn't really make sense to me because I'm only an amateur with PHP..
In coppermine find /bridge/smf.inc.php
search for
cm_include_smf_funcs("$sourcedir/Load.php", array("reloadSettings", "md5_hmac", "loadUserSettings"));
replace with
cm_include_smf_funcs("$sourcedir/Load.php", array("cache_get_data", "reloadSettings", "md5_hmac", "loadUserSettings"));
OK I tried that, but I now get this
Fatal error: Call to undefined function: forum_time() in /home/hwwepa08/public_html/gallery/bridge/smf.inc.php(127) : eval()'d code on line 176
When trying to use the install, I still get:
mySQL Error: Table 'cpg135_albums' already existson query ' CREATE TABLE cpg135_albums ( aid int(11) NOT NULL auto_increment, title varchar(255) NOT NULL default '', description text NOT NULL, visibility int(11) NOT NULL default '0', uploads enum('YES','NO') NOT NULL default 'NO', comments enum('YES','NO') NOT NULL default 'YES', votes enum('YES','NO') NOT NULL default 'YES', pos int(11) NOT NULL default '0', category int(11) NOT NULL default '0', pic_count int(11) NOT NULL default '0', thumb int(11) NOT NULL default '0', last_addition datetime NOT NULL default '0000-00-00 00:00:00', stat_uptodate enum('YES','NO') NOT NULL default 'NO', keyword VARCHAR( 50 ), PRIMARY KEY (aid), KEY alb_category (category) ) TYPE=MyISAM'
You have not installed CPG yet? First make sure SMF and CPG are working as standalone than try to bridge.
Yes I install it,
then I edited the files and tried to run it, to which I got that error.
Isn't it because It's ALREADY installed that I get the already created error?
I don't know why the second error, if you are starting fresh without any albums and photos try CPG 1.4.1 but make sure it's the latest from CVS.
Do you have a URL
one more thing try running update.php 'gallery/update.php'
I did the update, but continue to get the already created error.
http://www.wwepassion.com/
http://www.wwepassion.com/board
http://www.wwepassion.com/gallery
One last thing, what is CVS?
Seems to be working you get SSI error which I have no clue
QuoteNotice: SSI.php was unable to load a session! This may cause problems with logout and other functions - please make sure SSI.php is included before *anything* else in all your scripts! in /home/hwwepa08/public_html/board/SSI.php on line 158
for CVS check here
http://cpg-contrib.org/index.php?file=minicms/cms&id=21
hmm the only reason it shows me the error is because Im logged in, logged out it doesnt
Man, that link sure is confusing :(
isnt there someway someone could have a look for me?
Do you have a test account if not may I create one.
If you are interested in CPG 1.4.1 I can send you a zip file.
Username: Avarot
Password: Avarot
Just to double check, you mean a forum account don't you?
doesn't work
ok this one is tried and tested:
WARNED
smfsmfsmf
Weird only happens when logged in, do you want to try cpg 1.4.1 (remember it is still in beta but I use it on 3 sites)
OK, I will report back once tested
before that in smf.inc.php have you changed the path
form
$path = '../smf';
to
$path = '../board';
for the version I have now? Yes
In reply to this Post (http://www.simplemachines.org/community/index.php?topic=41542.msg337957#msg337957) and this One (http://www.simplemachines.org/community/index.php?topic=41542.msg301405#msg301405)
i've just decided to add my 2 cents and combine the whole procedure to integrate Coppermine into SMF, displaying the photo gallery into the main body of the forum.
I take no credits for it, i just tought i'd add some clarification on how i did it, and some minor changes i made.
So first step: install SMF :o (my Webhost supports it via Fantastico, so it's easy)
Second Step: Installing and Integrating Coppermine into SMF
do as said in Dan the man's Post:
Quote from: dtm.exe on July 09, 2005, 04:59:26 PM
Coppermine is an easily setup, fast, feature-rich photo gallery script with MySQL database, user management, private galleries, automatic thumbnail creation, ecard feature and a template system for easy customization to match the rest of a site.
To start, you'll need to download Coppermine (http://sourceforge.net/project/showfiles.php?group_id=89658). Once downloaded, follow these instructions to properly integrate Coppermine with your SMF forum.
In /include/init.inc.php, find:
// define('UDB_INTEGRATION', 'smf');
Replace with:
define('UDB_INTEGRATION', 'smf');
In /bridge/smf.inc.php, find:
$path = '../smf';
Replace /smf with the directory you have your SMF forum installed in. If SMF is installed in your root directory, remove smf leaving you with $path = '../';.
Once all necessary changes have been made, upload Coppermine to its own directory (examples: /coppermine, /gallery, /album). Once uploaded, run install.php. Make sure you install Coppermine on the same database as that of your SMF forum. Once installed, your new Coppermine gallery will be up and ready for use :).
-Dan The Man
As said: make sure SMF and Coppermine are sharing the same DataBase, so only registered users of the forum will access the Gallery.
p.s. if you installed SMF via fantastico, you'll need to "steal" the SMF MySql database informations from the settings.php file in the forum root folder when running Coppermine setup.. look for the following:
########## Database Info ##########
$db_server = 'localhost';
$db_name = 'Something_smf1';
$db_user = 'Something_smf1';
$db_passwd = 'some password';
Do not install Coppermine from Fantastico, or it will create it's own DB!
This should have Coppermine correctly linked to SMF
If you decide to have the gallery open in a new browser window, do the following, otherwise, skip this sub-step
1-create yourself a Gallery button, name it gallery.gif, place it into the proper theme folder you are using,
ex: /SMF/Themes/default/images/english/ if you are using the defautl theme or
/SMF/Themes/ThemeName/images/english for a custom theme.
2-Edit the index.template.php file on the theme you are using with BBedit(MAC) or Notepad(PC)
look for the following lines:(at the end)
// Otherwise, they might want to [logout]...
else {
echo '<a href="', $scripturl, '?action=logout;sesc=', $context['session_id'],
'">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url']
. '/' . $context['user']['language'] . '/logout.gif" alt="' . $txt[108]
. '" style="margin: 2px 0;" border="0" />' : $txt[108]),'</a>';
insert the following code between the "else{" and "echo '<a href="', $scripturl, '?action=logout;"(...)
(change the "../gallery" on the first line to match the name of the coppermine folder)
echo '<a href="../gallery" >',
($settings['use_image_buttons'] ? '<img src="' . $settings['images_url']
. '/' . $context['user']['language'] . '/gallery.gif" alt="Photo Gallery" style="margin: 2px 0;"
border="0" />' : "Photo Gallery"),'</a>', $context['menu_separator'];
placing the code there will make the Gallery button display only when users are logged in into the forum, at the end of the button row, just before the logout button.
If you did add the above code, skip to step 4
Third Step: Make coppermine display into the forum page itself
Based on Scrawl Post as noted below, with some minor changes of my own,
original post is here:
Quote from: scrawl on August 28, 2005, 06:04:29 AM
0.5-create yourself a Gallery button, name it gallery.gif, place it into the proper theme folder you are using,
ex: /SMF/Themes/default/images/english/ if you are using the defautl theme or
/SMF/Themes/ThemeName/images/english for a custom theme.
This takes for granted that /SMF is the forum root folder
1. open /smf/index.php
2. find this line:
'boardrecount' => array('Admin.php', 'AdminBoardRecount'),
and after that code add this code:
'coppermine' => array('Coppermine.php', 'Coppermine'),
3. create a file called Coppermine.php with your text-only editor such as NotePad (PC) or BBEdit (Mac) and add this code inside it:
<?php
if (!defined('SMF'))
die('Hacking attempt...');
function Coppermine() {
// This is gonna be needed...
loadTemplate('Coppermine');
}
?>
4. save this file inside /smf/Sources
5. create a file called Coppermine.template.php with your text-only editor such as NotePad (PC) or BBEdit (Mac) and add this code inside it:
<?php
function template_main()
{
global $context, $settings, $options, $txt, $scripturl;
echo '
<script language="JavaScript" type="text/javascript"><!--
function checkAll(onOff)
{
for (var i = 0; i < document.searchform.elements.length; i++)
{
if (document.searchform.elements[i].name.substr(0, 3) == "brd")
document.searchform.elements[i].checked = onOff;
}
}
// --></script>
<form action="', $scripturl, '?action=search2" method="post" name="searchform" id="searchform">
<table width="80%" border="0" cellspacing="0" cellpadding="3" align="center">
<tr>
<td>', theme_linktree(), '</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="4" align="center" class="tborder">
<tr class="titlebg">
<td>Coppermine Photo Gallery</td>
</tr><tr>
<td class="windowbg">';
// load coppermine
echo '<iframe width="100%" height="450"
src="http://YourSite.com/gallery"></iframe>';
echo '
</td>
</tr>
</table>
</form>';
}
?>
^^note the address in the above code change this to reflect your index.php file in your coppermine folder and make sure to leave out the www so as to keep compatability with firefox and IE,
Change i Made:
The original post adds /index.php at the end of the adress, don't put it there, since it will disable the automatic user login from the forum and makes the gallery display as unregistered user
6. save this file inside /smf/Themes/default/
7. in that same folder open /smf/Themes/default/index.template.php and at the end of the file find this bit of code:
The original post have you look for the calendar section to add the code, i'm changing it in order to have the Gallery button display only when the user is Logged-in
// Otherwise, they might want to [logout]...
else {
echo '<a href="', $scripturl, '?action=logout;sesc=', $context['session_id'],
'">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url']
. '/' . $context['user']['language'] . '/logout.gif" alt="' . $txt[108]
. '" style="margin: 2px 0;" border="0" />' : $txt[108]),'</a>';
insert the following code between the "else{" and "echo '<a href="', $scripturl, '?action=logout;"(...)
//begin gallery code
echo '
<a href="', $scripturl, '?action=coppermine"><img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/gallery.gif" alt="' . "Gallery" . '" style="margin: 2px 0;" border="0" /></a>', $context['menu_separator'];
//end gallery code
This is it for this section, Phew!
Fourth Step: Preventing navigation Errors
In order to prevent coppermine Logout errors and the forum displaying in a loop insde the iframe if integrated into the forum display, we have to edit the coppermine theme file you are using.
So:
if If you have the Photo gallery open in a blank page, do the following;
Open the coppermine theme.php file you are using (ex:/gallery/theme/classic/theme.php
and replace everything that is between the
<!-- BEGIN logout -->
<!-- END logout -->
to have it look like this:
<!-- BEGIN logout -->
<a href="../forum/index.php">Back to forum</a> |
<!-- END logout -->
So this will close the Coppermine page and send the user back to the forum index, using the cookie to remember the login and password of the user.
If you did include the Gallery Into the iframe of the forum:
It's better to disable the profile and logout buttons of coppermine so as the register button(since registration is handled by the forum...
to do so, Open the coppermine theme.php file you are using (ex:/gallery/theme/classic/theme.php
and clear the lines between the register, login and logout tags, so that it looks like this:
define('THEME_HAS_RATING_GRAPHICS', 1);
// HTML template for main menu
$template_main_menu1 = <<<EOT
|
<!-- BEGIN my_gallery -->
<a href="{MY_GAL_TGT}" title="{MY_GAL_TITLE}">{MY_GAL_LNK}</a> |
<!-- END my_gallery -->
<!-- BEGIN allow_memberlist -->
<a href="{MEMBERLIST_TGT}" title="{MEMBERLIST_TITLE}">{MEMBERLIST_LNK}</a> |
<!-- END allow_memberlist -->
<!-- BEGIN my_profile -->
<!-- END my_profile -->
<!-- BEGIN faq -->
<a href="{FAQ_TGT}" title="{FAQ_TITLE}">{FAQ_LNK}</a> |
<!-- END faq -->
<!-- BEGIN enter_admin_mode -->
<a href="{ADM_MODE_TGT}" title="{ADM_MODE_TITLE}">{ADM_MODE_LNK}</a> |
<!-- END enter_admin_mode -->
<!-- BEGIN leave_admin_mode -->
<a href="{USR_MODE_TGT}" title="{USR_MODE_TITLE}">{USR_MODE_LNK}</a> |
<!-- END leave_admin_mode -->
<!-- BEGIN upload_pic -->
<a href="{UPL_PIC_TGT}" title="{UPL_PIC_TITLE}">{UPL_PIC_LNK}</a> |
<!-- END upload_pic -->
<!-- BEGIN register -->
<!-- END register -->
<!-- BEGIN login -->
<!-- END login -->
<!-- BEGIN logout -->
<!-- END logout -->
EOT;
i hope it helps and gathers all the infos needed in the same place..
There are some stuff i'm still wondering about:Quote from: scrawl on August 29, 2005, 07:36:03 PM
Quote from: ruzster on August 29, 2005, 09:34:37 AM
This is awesome, scrawl. It's exactly what I was looking for. Thanks. My only question is how to make the iframe automatically resize to the page size. So that it doesn't appear to be inside a frame. Any suggestions?
not exactly following what you mean but try this, make sure both the width and height are set at 100%
// load coppermine
echo '<iframe width="100%" height="100%" src="http://yourserver.com/public_html/coppermine/index.php"></iframe>';
For me Putting 100% won't display the Iframe at all, seems i need to have a fixed pixel height,
any Ideas in this one?
then the other thing,
since it a custom added section to the Board, when looking at what users are doing in the forum, it says "Unknown action", Someone has a clue on this one?
Regards,
Dom
ADDONIf you want to prevent unregistered users to see the Gallery by typing direct url like h**p://yoursite.com/gallery, simply add the following code to the file /gallery/index.php
Look for
require('include/init.inc.php');
and add this on a new line after the semicolon
//Prevent Unregistered users
if (USER_ID){
} else {
{
$redirect = $redirect . "../forum/index.php";
header("Location: $redirect");
exit();
}}
//end Prevent Unregistered users
This will forward all non-logged/unregistered users to the login/subscribe page of SMF
You could also give the possibility to your users to open the gallery in a new window even if integrated into the forum, easy way is to edit the coppermine.template.php file and adding a href in the title bar of the forum section, still protected by forum logins...
Changing
<table width="100%" border="0" cellspacing="0" cellpadding="4" align="center" class="tborder">
<tr class="titlebg">
<td>Coppermine Photo Gallery</td>
</tr><tr>
<td class="windowbg">';
to
<table width="100%" border="0" cellspacing="0" cellpadding="4" align="center" class="tborder">
<tr class="titlebg">
<td>Coppermine Photo Gallery Open the photo gallery on a new page by clicking <a href="http://yoursite.com/gallery"target="_blank">here</a></td>
</tr><tr>
<td class="windowbg">';
i'm having fun!
Dom
damn that would've taken ages to put together, good work. gotta say i didn't realise about that index.php i had added messing with the logins cheers for pointing that out.
There is 2 things i'm still wondering about:
1-about iframe dynamic resizing
Quote from: scrawl on August 29, 2005, 07:36:03 PM
Quote from: ruzster on August 29, 2005, 09:34:37 AM
This is awesome, scrawl. It's exactly what I was looking for. Thanks. My only question is how to make the iframe automatically resize to the page size. So that it doesn't appear to be inside a frame. Any suggestions?
not exactly following what you mean but try this, make sure both the width and height are set at 100%
// load coppermine
echo '<iframe width="100%" height="100%" src="http://yourserver.com/public_html/coppermine/index.php"></iframe>';
For me Putting 100% won't display the Iframe at all, seems i need to have a fixed pixel height,
any Ideas in this one?
2- then the other thing,
since it a custom added section to the Board, when looking at what users are doing in the forum, it says "Unknown action", Someone has a clue on this one?
Regards,
Dom
Ok..I have read all I could on this subject. I have followed the instructions to the letter as far as I can tell. Changed the 2 files in 1.3.3, ran the installer, and when it goes to continue to the site, I get this error:
Fatal error: Call to undefined function: cache_get_data() in /home/spectro/public_html/fsduniverse/gallery/bridge/smf.inc.php(127) : eval()'d code on line 10
I can't figure out what I am doing wrong. If anyone could help, I would be greatly appreciate it. I can give someone access to the backends if needed...
Thanks!
- Greg
I've done it all to and consistently get error after error. I am trashing the CPG install and putting content within the forum itself with restricted permissions.
Perhaps in the future, SMF will have a gallery intergrated into the core which would be an awesome thing.
At this point, my biggest problem is causing the attachents to be displayed horizontal across the page instead of vertically
Quote from: SpectroPro on October 30, 2005, 11:30:30 PM
Ok..I have read all I could on this subject. I have followed the instructions to the letter as far as I can tell. Changed the 2 files in 1.3.3, ran the installer, and when it goes to continue to the site, I get this error:
Fatal error: Call to undefined function: cache_get_data() in /home/spectro/public_html/fsduniverse/gallery/bridge/smf.inc.php(127) : eval()'d code on line 10
I can't figure out what I am doing wrong. If anyone could help, I would be greatly appreciate it. I can give someone access to the backends if needed...
Thanks!
- Greg
I'm getting the same error message..
Fatal error: Call to undefined function: cache_get_data() in /path/to/gallery/bridge/smf.inc.php(128) : eval()'d code on line 10
I copied the funciton from the "Load.php" file in the SMF source folder and pasted it into the SMF bridge file. The gallery now loads.
That is Because you are using SMF version 1.1, I forgot to mention that the how-to was for Smf 1.0.5
To correct this error you do as Nibbler says on This Post (http://coppermine-gallery.net/forum/index.php?topic=22015.0):
in the bridge file:
find
cm_include_smf_funcs("$sourcedir/Load.php", array("reloadSettings", "md5_hmac", "loadUserSettings"));
and change it to
cm_include_smf_funcs("$sourcedir/Load.php", array("cache_get_data", "reloadSettings", "md5_hmac", "loadUserSettings"));
Hey guys, quick question - I've got SMF 1.1 RC. Is that what you guys are talking about when you mention "SMF 1.1"? Do I follow dan's oringial instructions and just make the change Nibbler/krustyop just mentioned? I'm an idiot and looking for a more or less step-by-step here.
Oh, and if anyone has got coppermine working w/ 1.1 RC then please let me know what version of coppermine you are using (the stable one or the beta as of this writing).
Thanks!
Quote from: dimensionmedia on November 06, 2005, 05:25:42 PM
Hey guys, quick question - I've got SMF 1.1 RC. Is that what you guys are talking about when you mention "SMF 1.1"? Do I follow dan's oringial instructions and just make the change Nibbler/krustyop just mentioned? I'm an idiot and looking for a more or less step-by-step here.
Oh, and if anyone has got coppermine working w/ 1.1 RC then please let me know what version of coppermine you are using (the stable one or the beta as of this writing).
Thanks!
I've integrated Coppermine with SMF 1.1 RC using the stable release of CM. I made the changes as outlined in this post (http://www.simplemachines.org/community/index.php?topic=41542.msg373383#msg373383) and then added the missing function as Nibbler said to do here (http://coppermine-gallery.net/forum/index.php?topic=22015.msg100774#msg100774) as suggested by krustyop. It seems to be working fine.
Thanks, i'll give that a shot! :-)
1. I hope i did all but:
- i don't see link to gallery.gif between main buttons
- when i try http://*****.com/f/index.php?action=coppermine i get error: Unable to load the 'Coppermine' template.
Here i used the same username and database but the prefix
Any idea?
I'm using SMF 1.0.5 and CPG 1.3.5
2. Then i tried with new installation of smf 1.0.5 and when i try to install CPG with the same user, database and prefix it shows that:
mySQL Error: Table 'smf_categories' already existson query ' CREATE TABLE smf_categories ( cid int(11) NOT NULL auto_increment, owner_id int(11) NOT NULL default '0', name varchar(255) NOT NULL default '', description text NOT NULL, pos int(11) NOT NULL default '0', parent int(11) NOT NULL default '0', thumb int(11) NOT NULL default '0', subcat_count int(11) NOT NULL default '0', alb_count int(11) NOT NULL default '0', pic_count int(11) NOT NULL default '0', stat_uptodate enum('YES','NO') NOT NULL default 'NO', PRIMARY KEY (cid), KEY cat_parent (parent), KEY cat_pos (pos), KEY cat_owner_id (owner_id) ) TYPE=MyISAM'
So, shall use same table prefix or not and if YES how to avoid the erros?
Thank you!
I have done the intergration but when i login in the forum as Admin and then i click on gallery i don't see the admin part of CPG?
I'm attempting the integration with smf 1.1rc1 and cpg 1.4.2. in the /include/init.inc.php it's written like this:
define('UDB_INTEGRATION', $BRIDGE['short_name']);
do I need to replace [short name] with anything?
Now, I've done the seperate installs and included cpg in the smf db. I also ran the integration wizard, but bein smf1.1 I don't know if it worked correctly. I'm carrying on assuming I can use these instructions. It's on a test site so I'm not worried about anything...
thanks
Use Coppermine's bridge manager wizard to bridge SMF and Coppermine.
Quote from: kegobeer on November 28, 2005, 10:22:28 AM
Use Coppermine's bridge manager wizard to bridge SMF and Coppermine.
That's what I did. seems like it's working, but I ain't quite done. I'll report back later with the results. Thanks!
How can i integrate Coppermine 1.4.2 with SMF 1.0.5 ? Thx
Quote from: www.Hits.FM on December 10, 2005, 02:27:44 PM
How can i integrate Coppermine 1.4.2 with SMF 1.0.5 ? Thx
In Coppermine got to 'Admin Tools' scroll down to 'Bridge Manager' and follow the instruction
Quote from: Aravot on December 10, 2005, 02:31:40 PM
Quote from: www.Hits.FM on December 10, 2005, 02:27:44 PM
How can i integrate Coppermine 1.4.2 with SMF 1.0.5 ? Thx
In Coppermine got to 'Admin Tools' scroll down to 'Bridge Manager' and follow the instruction
Hi
I have done this in my newest project and after bridge manager finish the process, I am unable to login on the gallery. I logon into the forum but when go to the gallery, appear like I'm off. And if I click the login on the gallery, it redirect to the login form of the forum, that, as I said, logon me on forum and portal but not in coppermine.
Thanks in advance for any help yoou could give
Thanks, Works like a charm ;)
Im using coppermine 1.4.2 when i go to user configuration it give me this message :
Critical error
There was an error while processing a database query
is there anyway that i can do? Thanks
Enable debug mode in Coppermine. You'll get the actual SQL error message and can start troubleshooting.
For Coppermine specific issues, I recommend using the Coppermine forums.
Allrighty..... I really would like to integrate all the things I have going on on my site. It's gotten a littel crazy and I'm thinking Mambo.... but here's my question: I have smf in use on one database and coppermine in use on another. How do I combine them and not lose any data? And if I am going to use Mambo should I bridge smf and coppermine or should i install Mambo first?
Sorry if these are insane questions.... I really have little experience with all this and I'm feeling my way pretty blindly!
Sally
As far as I know you should be able to use Coppermine and SMF bridged even if they're on seperate databases, but this would be a question for the Coppermine developers, so don't take my word for it...
I don't think it really matters what order you bridge things in, as the Mambo bridge only makes a few minor changes to SMF and the Coppermine bridge doesn't really touch SMF.
Okay, So I'll go check out Coppermine's forum and see what I find there.
I had just read in some previous posts that they needed to be in the same database. I could combine them, but I would need a very detailed block of instruction!!! I don't want to lose any data!!!
Thanks for your help
In the instructions it says, "Make sure you install Coppermine on the same database as that of your SMF forum." I was wondering how I would do this...I have godaddy as my host, and installed smf and coppermine through the control panel. I did not see any options for database.
Quote from: Avinash4 on January 07, 2006, 12:46:21 PM
In the instructions it says, "Make sure you install Coppermine on the same database as that of your SMF forum." I was wondering how I would do this...I have godaddy as my host, and installed smf and coppermine through the control panel. I did not see any options for database.
Don't install Coppermine via your host's control panel. Rather, install CPG manually with the cpg_ preffix on SMF's database.
Quote from: dtm.exe on January 07, 2006, 01:11:18 PM
Quote from: Avinash4 on January 07, 2006, 12:46:21 PM
In the instructions it says, "Make sure you install Coppermine on the same database as that of your SMF forum." I was wondering how I would do this...I have godaddy as my host, and installed smf and coppermine through the control panel. I did not see any options for database.
Don't install Coppermine via your host's control panel. Rather, install CPG manually with the cpg_ preffix on SMF's database.
ahh, how would I do this? there is no way to do it through control panel, then mod some files? I have no clue how to mod/view/do anything with databases. how can I do this?
Download Coppermine 1.4.3 from the Coppermine website (http://www.coppermine-gallery.net), read the instructions, then upload the files to your site (in a subdirectory, like /gallery or /cpg). Follow the installation instructions and CHMOD the appropriate files and directories. Run the installer. Use the same database that SMF uses.
If you want to look at your database(s), contact your host. They should provide a tool like phpMyAdmin. If not, you can install that yourself. Go to http://www.phpmyadmin.net for more information.
I was wondering, if coppermine and smf are already installed, how can I change which database coppermine is using, to be the same as the smf one?
Use a tool like phpMyAdmin to copy your Coppermine tables to your SMF database. Then, edit Coppermine's config.inc.php file and update the database information.
I have nobody added to the Coppermine database, its totally empty. Does this mean i'd just have to edit config.inc.php to use the smf database? How can I find out what the database info is for my SMF? like DBSERVER, DBUSER, DBPASS, DBNAME etc... of those, what would I have to change?
Quote from: Avinash4 on January 09, 2006, 11:44:25 PM
I have nobody added to the Coppermine database, its totally empty. Does this mean i'd just have to edit config.inc.php to use the smf database? How can I find out what the database info is for my SMF? like DBSERVER, DBUSER, DBPASS, DBNAME etc... of those, what would I have to change?
You lost me completely. The first post explains everything you need to know.
Yeah man, it all makes sense for me until, "Make sure you install Coppermine on the same database as that of your SMF forum." I'm kinda a newbie to all this database stuff. I don't know how to install Coppermine on the same database as my SMF. I dont even know what my SMF database is called, or where it is located. lol.
For Coppermine questions, best ask them at the Coppermine site.
well, Avinash4, How did you install SMF??
Look in your server config section in SMF and it should tell you the database name and user (although the db password will be blanked out)
***deleted got it working *****
Quote from: Kindred on January 10, 2006, 07:48:06 AM
well, Avinash4, How did you install SMF??
Look in your server config section in SMF and it should tell you the database name and user (although the db password will be blanked out)
In my SMF server settings, everything about my database is identical as with the coppermine database, except for the table_prefix. Should they be the same to successfully bridge? Will making them the same cause any problems with my SMF? I dont want to damage accounts.
If the database names, users and passwords are the same, you are ready to run the bridge wizard. Table prefixes must be different.
Quote from: kegobeer on January 10, 2006, 11:00:15 AM
If the database names, users and passwords are the same, you are ready to run the bridge wizard. Table prefixes must be different.
Thanks, the database names, users and passwords are the same and table prefixes are different. I've also made the necessary changes to /include/init.inc.php and /bridge/smf.inc.php. When I click login on coppermine, it takes me to my SMF login page. Once I enter user and password, it just redirects me to the board index, not back to coppermine. Also, I do get logged into coppermine, but only if I go to site.com/coppermine/index.php manually after logging in.
I just downloaded 1.4.3 and read through their documentation. They recommend installing it stand alone and then using the bridge wizard. Has anyone done this? Also, I looked to modify init.inc.php and couldn't find the correct line. There was some new stuff in there that looks like it determines what board you have installed (through their wizzard I presume).
Haven't started the install yet, just wondering the best way to proceed.
Avinash... that is correct. When you log in, you are sent to the SMF index page... you will need to ADD a menu itme in your SMF buttons list to point to Coppermine.
Ok. If you are using Coppermine 1.4.3, just follow the instructions included with Coppermine. Do not follow instructions from anywhere else. Use the bridge wizard. You do not need to modify anything.
If you want the best help with the bridge wizard, visit the Coppermine web site.
Thanks!
I installed it this morning. It seems as though the bridge may not be working properly. When I login in coppermine, it sends me to SMF, but then, when I go back to the gallery, I am not logged in.
Quote from: kegobeer on January 10, 2006, 01:33:22 PM
If you want the best help with the bridge wizard, visit the Coppermine web site.
I did, but thought I'd post here too, since you guys always respond faster. Usually someone else has seen the problem and has a solution. ;)
Quote from: mrandall131 on January 11, 2006, 09:22:05 AM
I did, but thought I'd post here too, since you guys always respond faster. Usually someone else has seen the problem and has a solution. ;)
Is this for the Admin account? Try using a different account, if you don't have create a test account, if it works than you'll know what to do.
can somebody please help me?
I get this error after installing coppermine, and intergrating it with SMF:
Fatal error: Call to undefined function: cache_get_data() in /www/b/bwworldcouk/htdocs/home/gallery/bridge/smf.inc.php(127) : eval()'d code on line 10
im running SMF RC2 and Coppermine 1.3.5.
Can soomebody help me with this?
Please search for coppermine cache_get_data. (http://www.simplemachines.org/community/index.php?action=search2;search=coppermine%20cache_get_data)
Quote from: Aravot on January 11, 2006, 12:16:52 PM
Quote from: mrandall131 on January 11, 2006, 09:22:05 AM
I did, but thought I'd post here too, since you guys always respond faster. Usually someone else has seen the problem and has a solution. ;)
Is this for the Admin account? Try using a different account, if you don't have create a test account, if it works than you'll know what to do.
Didn't work, tried a test account.
The worst thing is I can't log in at all.
Quote from: mrandall131 on January 11, 2006, 07:59:23 PM
Didn't work, tried a test account.
The worst thing is I can't log in at all.
The reason I suggested that is, I had a similar problem, after bridging Coppermine with SMF I couldn't login into Coppermine using Admin account but could login using regular test account so I made the test account into Admin and changed the Admin account to regular user (in SMF) after the change I was able to login into Coppermine (using my account), than I changed back the Admin account to Admin and the test account to regular user, it's working ever since.
Here's what I got from coppermine:
Quote from: Coppermine Siteyour cookie domains differ: one has a leading www, the other hasn't. Cookie domains have to be the same, preferably .northeastatvers.com (notice the leading dot)
They recommend setting both the board and gallery "cookie domains" to .northeastatvers.com Where is this in SMF?
Quote from: mrandall131 on January 12, 2006, 06:28:51 AM
Here's what I got from coppermine:
Quote from: Coppermine Siteyour cookie domains differ: one has a leading www, the other hasn't. Cookie domains have to be the same, preferably .northeastatvers.com (notice the leading dot)
They recommend setting both the board and gallery "cookie domains" to .northeastatvers.com Where is this in SMF?
SMF 1.1 RC2
Configuration --> Server Settings
If I change that, it crashes the forum. The main page loads of, but after that, nothing. Is the "." necessary? Is there something else to change?
Everything works now!!
One question about redirects. When you login or logout from coppermine, is it possible to have it redirect you to the gallery?
Why doesnt SMF have the option of downloading an SMF install that has CM already intergrated.
Surely having a galley in a forum isnt such a rare thing? I would have thought that most people would want this.
Or Why doesnt SMF just have thier own gallery.
After flicking through this thread I am freaked about attempting to do anything. I am scared I will muck up my forum and lose the 300 hard earned members.
Everything has been working flawlessly. One question about the bridge though. Is it possible to get their used upload space?
Quote from: dtm.exe on July 09, 2005, 04:59:26 PM
In /include/init.inc.php, find:
// define('UDB_INTEGRATION', 'smf');
Replace with:
define('UDB_INTEGRATION', 'smf');
In /bridge/smf.inc.php, find:
$path = '../smf';
Replace /smf with the directory you have your SMF forum installed in. If SMF is installed in your root directory, remove smf leaving you with $path = '../';.
I find neither of these codes...
I'm using CPG 1.4.3
:-\
Quote from: pinkbee on January 26, 2006, 09:57:53 PM
I find neither of these codes...
I'm using CPG 1.4.3
:-\
CPG 1.4.3 has in build Bridge Manager, got to Admin Tools scroll down you'll see than follow the step by step instructions.
Quote from: Aravot on January 27, 2006, 12:06:57 AM
Quote from: pinkbee on January 26, 2006, 09:57:53 PM
I find neither of these codes...
I'm using CPG 1.4.3
:-\
CPG 1.4.3 has in build Bridge Manager, got to Admin Tools scroll down you'll see than follow the step by step instructions.
Where's the Admin Tools?
Quote from: pinkbee on January 27, 2006, 06:33:03 AM
Where's the Admin Tools?
Login into CPG as Admin you'll see, it's part of administration menu
I have a SMF forum 1.0.6 and a CPG 1.4.3
after a successful install I got this error when I'm trying to load my forum:
Connection Problems
Sorry, SMF was unable to connect to the database. This may be caused by the server being busy. Please try again later.
But the error, I'm assure it's not of the server, because I have 2 forums running on the same server, first I got the error en 1 and the other works fine, and after doing the same installation in the other one i kill my 2 forums with the same error :(
Fatal error: Call to undefined function: db_query() in /home/content/c/h/i/chilehub/html/galeria/include/init.inc.php on line 272
I dunno what to do, I hope you can help me to figure out what to do
Saludos
init.inc.php is a Coppermine file, and Coppermine 1.4.3 does not have a function called db_query. That function is only in the older 1.2.x and 1.3.x versions. I don't think you are running 1.4.3.
Please be more specific: what exactly are you having trouble with? Does SMF function correctly? Does Coppermine function correctly? Do they function correctly after bridging the two together? Bridging Coppermine and SMF will in no way make SMF stop working.
Prolin... el foro smf y coppermine los tienes instalado en la misma base de datos o en distintas?
tienes el foro smf funcionando... pero el coppermine lo lograste hacer funcionar independiente?
Quote from: prolin on February 02, 2006, 04:28:38 PM
I have a SMF forum 1.0.6 and a CPG 1.4.3
after a successful install I got this error when I'm trying to load my forum:
Connection Problems
Sorry, SMF was unable to connect to the database. This may be caused by the server being busy. Please try again later.
But the error, I'm assure it's not of the server, because I have 2 forums running on the same server, first I got the error en 1 and the other works fine, and after doing the same installation in the other one i kill my 2 forums with the same error :(
Fatal error: Call to undefined function: db_query() in /home/content/c/h/i/chilehub/html/galeria/include/init.inc.php on line 272
I dunno what to do, I hope you can help me to figure out what to do
Saludos
Hey guys just to let you know... i have it working in RC2... i havent finished it yet as i still have the buttons to remove from the gallery and sort out the correct placement of the gallery button in my template (help on this would be good)
I would say to the others that are having probs go back... re-read and try again... it took me 5 attempts looking at the same info
www.minidirectory.co.uk/forum then click on the miss placed gallery button lol
EDIT: 20 mins later with a dif thread... fixed my button prob... you guys are ace... just the gallery left to remove buttons...
EDIT AGAIN After searching through the boards there is a plug-in for the remove buttons!
So its all working now... just time to add the photos...
Does anybody ever say thanks round here? well thank you guys couldnt have done it without you
PS i am a novice and i dont know any HTML or PHP..
Quote from: dodgydazzler on February 11, 2006, 10:00:18 PM
EDIT AGAIN After searching through the boards there is a plug-in for the remove buttons!
Could you please post a link.
http://coppermine-gallery.net/forum/index.php?topic=25197.msg117022#msg117022
just download the zip... extract it then up load to your coppermine "plug in folder" and away you go!
oh dont forget you may need to go in to your "config" on coppermine to activate this.
wow... never thought i would give out advice
cor blimey that was hard work - got there in the end though.
SMF 1.1 RC2 & Coppermine 1.4.4 & Tinyportal 0.8.6
http://www.timodonnell.co.uk/index.php?action=coppermine
Took me most of the weekend :o
Timmyo, the gallery looks okay. Just not much for the scrolling iframe thing.
Quote from: trenchteam on February 27, 2006, 05:28:46 AM
Timmyo, the gallery looks okay. Just not much for the scrolling iframe thing.
same here - if I could find a way of having it full/fixed height I'd do it . . .
putting 100% as height means nothing shows up at all - anyone got any ideas ?
Instructions for getting SMF 1.1 RC2 + Coppermine 1.4.4 + Tinyportal working together using the default SMF theme, the SMF Coppermine theme and Tinyportal 0.8.6 with the gallery appearing in a frame.
http://www.tinyportal.net/smf/index.php?topic=3075.msg25958#msg25958
Regards,
Tim
Quote from: timmyo on February 27, 2006, 07:44:11 AM
Quote from: trenchteam on February 27, 2006, 05:28:46 AM
Timmyo, the gallery looks okay. Just not much for the scrolling iframe thing.
same here - if I could find a way of having it full/fixed height I'd do it . . .
putting 100% as height means nothing shows up at all - anyone got any ideas ?
ok I just experimented with pixel height sizes for the iframe - 2280 did the trick ;D
Quote from: timmyo on February 27, 2006, 07:44:11 AM
Quote from: trenchteam on February 27, 2006, 05:28:46 AM
Timmyo, the gallery looks okay. Just not much for the scrolling iframe thing.
same here - if I could find a way of having it full/fixed height I'd do it . . .
putting 100% as height means nothing shows up at all - anyone got any ideas ?
yes, javascript can control the iframe. and if you enter subs.php you can add gallery to the nav.
check out my site, all working together seamlessly. more info at coppermine:
http://coppermine-gallery.net/forum/index.php?topic=25877.msg119264#msg119264 (http://coppermine-gallery.net/forum/index.php?topic=25877.msg119264#msg119264)
ta for that - looks neat.
Tim
Hello :(
I have smf 1.1 rc2 and coppermine 1.4.2
today I have just run the coppermine bridge wizard and linked CPG to Smf forum. I selected the option to use post counts.
In CPG 'groups' I can see all my smf groups and change their options.
However, in smf forum I see nothing at all to do with the gallery!
no gallery button - how to do I create a new button for 1.1 rc2?
no galley options
no way to access or view gallery at all
does anyone know what is going on and how to fix it?
I looked in forum permissions but there is nothing in there, or features and options or current theme. In forum permissions screen, there are some options that have radio buttons but dont show any text??? I dont know if they are related to the gallery but I switched them all on anyway and it made no difference.
Also I read above that the forum and the gallery should share the same database??? Can someone tell me how to do that too?
a step by step would be good.
Its very frustrating that the 'bridge' wizard ran smoothly but I cant see any evidence of the gallery in the forum, so no one could access it anyway.
Help!
Quote from: perplexed on March 11, 2006, 01:36:11 PM
Hello :(
I have smf 1.1 rc2 and coppermine 1.4.2
today I have just run the coppermine bridge wizard and linked CPG to Smf forum. I selected the option to use post counts.
In CPG 'groups' I can see all my smf groups and change their options.
However, in smf forum I see nothing at all to do with the gallery!
no gallery button - how to do I create a new button for 1.1 rc2?
no galley options
no way to access or view gallery at all
does anyone know what is going on and how to fix it?
I looked in forum permissions but there is nothing in there, or features and options or current theme. In forum permissions screen, there are some options that have radio buttons but dont show any text??? I dont know if they are related to the gallery but I switched them all on anyway and it made no difference.
Also I read above that the forum and the gallery should share the same database??? Can someone tell me how to do that too?
a step by step would be good.
Its very frustrating that the 'bridge' wizard ran smoothly but I cant see any evidence of the gallery in the forum, so no one could access it anyway.
Help!
a link to your site?
Quotein smf forum I see nothing at all to do with the gallery!
correct, it still handled via admin panel with coppermine
Quoteno way to access or view gallery at all
to add a link in forum using default 1.1rc2.
http://www.simplemachines.org/community/index.php?topic=63203 (http://www.simplemachines.org/community/index.php?topic=63203)
Quote from: snork13 on March 11, 2006, 03:10:02 PM
Quote from: perplexed on March 11, 2006, 01:36:11 PM
Hello :(
I have smf 1.1 rc2 and coppermine 1.4.2
today I have just run the coppermine bridge wizard and linked CPG to Smf forum. I selected the option to use post counts.
In CPG 'groups' I can see all my smf groups and change their options.
However, in smf forum I see nothing at all to do with the gallery!
no gallery button - how to do I create a new button for 1.1 rc2?
no galley options
no way to access or view gallery at all
does anyone know what is going on and how to fix it?
I looked in forum permissions but there is nothing in there, or features and options or current theme. In forum permissions screen, there are some options that have radio buttons but dont show any text??? I dont know if they are related to the gallery but I switched them all on anyway and it made no difference.
Also I read above that the forum and the gallery should share the same database??? Can someone tell me how to do that too?
a step by step would be good.
Its very frustrating that the 'bridge' wizard ran smoothly but I cant see any evidence of the gallery in the forum, so no one could access it anyway.
Help!
a link to your site?
Quotein smf forum I see nothing at all to do with the gallery!
correct, it still handled via admin panel with coppermine
Quoteno way to access or view gallery at all
to add a link in forum using default 1.1rc2.
http://www.simplemachines.org/community/index.php?topic=63203 (http://www.simplemachines.org/community/index.php?topic=63203)
hi
ok, maybe I'm misunderstanding what it actually does :( ???
the bridge manager links the gallery to the forum 'behind the scenes' like being able to use the same member groups, but it doesnt actually display anything in the forum unless you go and add some links or some code yourself?
So I would have to add a new tab to the forum navigation and then people could access that way subject to their group permissions?
Is that right?
I have something weird in my forum permissions which may or may not have to do with bridging CPG but I noticed it straight afterwards.
Here is what is in permissions
(http://i6.photobucket.com/albums/y219/lavenderbanners/Empire%20official/permissionscreen.jpg)
Ever seen anything like this before?
Does anyone know what the empty lines are supposed to be or how to fix it?
edited to add: I still don't 'get it' with the whole coppermine/smf/ joomla integration thing. This could be because I dont understand all the tech lingo or maybe I'm just thick, but I have bridged coppermine to smf but I cant 'get' to coppermine from the forum or from joomla. It keeps taking me to the forum if I try directly. I have been looking at various suggestions for 'components' and reading the various threads but its still unclear. There was one that was suggested but you had to pay for it, others involved downloading joomla versions of coppermine and so on.
I will add the goosemoose code to add link to user profile but apart from that finding/accessing the gallery seems like an IQ test. I think I'm still missing something somewhere :(
For complete integration use the Javascript method, as listed from the post above:
<?php
// Version: 1.1 RC2; Gallery
function template_main()
{
global $context, $settings, $options, $txt, $scripturl;
echo '
<script language="JavaScript" type="text/javascript"><!--
function checkAll(onOff)
{
for (var i = 0; i < document.searchform.elements.length; i++)
{
if (document.searchform.elements[i].name.substr(0, 3) == "brd")
document.searchform.elements[i].checked = onOff;
}
}
// --></script>
<form action="', $scripturl, '?action=search2" method="post" name="searchform" id="searchform">
<script type="text/javascript"><!--
/***********************************************
* IFrame SSI script II- © Dynamic Drive DHTML code library (http://www.dynamicdrive.com)
* Visit DynamicDrive.com for hundreds of original DHTML scripts
* This notice must stay intact for legal use
***********************************************/
//Input the IDs of the IFRAMES you wish to dynamically resize to match its content height:
//Separate each ID with a comma. Examples: ["myframe1", "myframe2"] or ["myframe"] or [] for none:
var iframeids=["myframe"]
//Should script hide iframe from browsers that don\'t support this script (non IE5+/NS6+ browsers. Recommended):
var iframehide="yes"
var getFFVersion=navigator.userAgent.substring(navigator.userAgent.indexOf("Firefox")).split("/")[1]
var FFextraHeight=parseFloat(getFFVersion)>=0.1? 16 : 0 //extra height in px to add to iframe in FireFox 1.0+ browsers
function resizeCaller() {
var dyniframe=new Array()
for (i=0; i<iframeids.length; i++){
if (document.getElementById)
resizeIframe(iframeids[i])
//reveal iframe for lower end browsers? (see var above):
if ((document.all || document.getElementById) && iframehide=="no"){
var tempobj=document.all? document.all[iframeids[i]] : document.getElementById(iframeids[i])
tempobj.style.display="block"
}
}
}
function resizeIframe(frameid){
var currentfr=document.getElementById(frameid)
if (currentfr && !window.opera){
currentfr.style.display="block"
if (currentfr.contentDocument && currentfr.contentDocument.body.offsetHeight) //ns6 syntax
currentfr.height = currentfr.contentDocument.body.offsetHeight+FFextraHeight;
else if (currentfr.Document && currentfr.Document.body.scrollHeight) //ie5+ syntax
currentfr.height = currentfr.Document.body.scrollHeight;
if (currentfr.addEventListener)
currentfr.addEventListener("load", readjustIframe, false)
else if (currentfr.attachEvent){
currentfr.detachEvent("onload", readjustIframe) // Bug fix line
currentfr.attachEvent("onload", readjustIframe)
}
}
}
function readjustIframe(loadevt) {
var crossevt=(window.event)? event : loadevt
var iframeroot=(crossevt.currentTarget)? crossevt.currentTarget : crossevt.srcElement
if (iframeroot)
resizeIframe(iframeroot.id);
}
function loadintoIframe(iframeid, url){
if (document.getElementById)
document.getElementById(iframeid).src=url
}
if (window.addEventListener)
window.addEventListener("load", resizeCaller, false)
else if (window.attachEvent)
window.attachEvent("onload", resizeCaller)
else
window.onload=resizeCaller
// --></script>
<table width="100%" border="0" cellspacing="0" cellpadding="4" align="center" class="tborder">
<tr class="titlebg">
<td>Gallery</td>
</tr><tr>
<td class="windowbg">';
// load the gallery
echo '<iframe name="myframe" id="myframe" src="http://www.???.com/gallery" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" vspace="0" hspace="0" style="overflow:novisible; width:100%; display:none"></iframe>';
echo '
</td>
</tr>
</table>
</form>';
}
?>
Be sure to change the http://www.???.com to your domain name. Also, if you the iframe doesnt' expand, double check for error messages. Most likely, you'll see "Access Denied..." To correct this, double check your Apache configuration. Look for ServerName If it's not set or set to your public IP address, change it to your www.???.com (full domain name). You can see this in action here:
http://www.ayeka.net/smf/index.php?action=coppermine (http://www.ayeka.net/smf/index.php?action=coppermine)
Also, I think I read a question on how to set the custom action. The way to do this is to edit the Who.template.php file. Add the following line:
$txt['whoall_coppermine'] = 'Viewing the Gallery';
(assuming that your action is coppermine)
Now, the only problem that I have to resolve is since I migrated to Linux, none of my albums are working. I get an error message:
The selected album/file does not exist !
I've verified the permissions (everything is 777) and the filenames and directories, they are in the correct capitalzation and spelling).
Has anybody run into this problem before?
edit: I found the answer! In your php.ini, make sure register_long_arrays=On is set (mine was off ).
Now the only thing to do is find a theme to better match SMF.
Thanks!
Quote from: Senkusha on March 15, 2006, 04:41:16 PM
For complete integration use the Javascript method, as listed from the post above:
<?php
// Version: 1.1 RC2; Gallery
function template_main()
{
global $context, $settings, $options, $txt, $scripturl;
echo '
<script language="JavaScript" type="text/javascript"><!--
function checkAll(onOff)
{
for (var i = 0; i < document.searchform.elements.length; i++)
{
if (document.searchform.elements[i].name.substr(0, 3) == "brd")
document.searchform.elements[i].checked = onOff;
}
}
// --></script>
<form action="', $scripturl, '?action=search2" method="post" name="searchform" id="searchform">
<script type="text/javascript"><!--
/***********************************************
* IFrame SSI script II- © Dynamic Drive DHTML code library (http://www.dynamicdrive.com)
* Visit DynamicDrive.com for hundreds of original DHTML scripts
* This notice must stay intact for legal use
***********************************************/
//Input the IDs of the IFRAMES you wish to dynamically resize to match its content height:
//Separate each ID with a comma. Examples: ["myframe1", "myframe2"] or ["myframe"] or [] for none:
var iframeids=["myframe"]
//Should script hide iframe from browsers that don\'t support this script (non IE5+/NS6+ browsers. Recommended):
var iframehide="yes"
var getFFVersion=navigator.userAgent.substring(navigator.userAgent.indexOf("Firefox")).split("/")[1]
var FFextraHeight=parseFloat(getFFVersion)>=0.1? 16 : 0 //extra height in px to add to iframe in FireFox 1.0+ browsers
function resizeCaller() {
var dyniframe=new Array()
for (i=0; i<iframeids.length; i++){
if (document.getElementById)
resizeIframe(iframeids[i])
//reveal iframe for lower end browsers? (see var above):
if ((document.all || document.getElementById) && iframehide=="no"){
var tempobj=document.all? document.all[iframeids[i]] : document.getElementById(iframeids[i])
tempobj.style.display="block"
}
}
}
function resizeIframe(frameid){
var currentfr=document.getElementById(frameid)
if (currentfr && !window.opera){
currentfr.style.display="block"
if (currentfr.contentDocument && currentfr.contentDocument.body.offsetHeight) //ns6 syntax
currentfr.height = currentfr.contentDocument.body.offsetHeight+FFextraHeight;
else if (currentfr.Document && currentfr.Document.body.scrollHeight) //ie5+ syntax
currentfr.height = currentfr.Document.body.scrollHeight;
if (currentfr.addEventListener)
currentfr.addEventListener("load", readjustIframe, false)
else if (currentfr.attachEvent){
currentfr.detachEvent("onload", readjustIframe) // Bug fix line
currentfr.attachEvent("onload", readjustIframe)
}
}
}
function readjustIframe(loadevt) {
var crossevt=(window.event)? event : loadevt
var iframeroot=(crossevt.currentTarget)? crossevt.currentTarget : crossevt.srcElement
if (iframeroot)
resizeIframe(iframeroot.id);
}
function loadintoIframe(iframeid, url){
if (document.getElementById)
document.getElementById(iframeid).src=url
}
if (window.addEventListener)
window.addEventListener("load", resizeCaller, false)
else if (window.attachEvent)
window.attachEvent("onload", resizeCaller)
else
window.onload=resizeCaller
// --></script>
<table width="100%" border="0" cellspacing="0" cellpadding="4" align="center" class="tborder">
<tr class="titlebg">
<td>Gallery</td>
</tr><tr>
<td class="windowbg">';
// load the gallery
echo '<iframe name="myframe" id="myframe" src="http://www.???.com/gallery" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" vspace="0" hspace="0" style="overflow:novisible; width:100%; display:none"></iframe>';
echo '
</td>
</tr>
</table>
</form>';
}
?>
Be sure to change the http://www.???.com to your domain name. Also, if you the iframe doesnt' expand, double check for error messages. Most likely, you'll see "Access Denied..." To correct this, double check your Apache configuration. Look for ServerName If it's not set or set to your public IP address, change it to your www.???.com (full domain name). You can see this in action here:
http://www.ayeka.net/smf/index.php?action=coppermine (http://www.ayeka.net/smf/index.php?action=coppermine)
Also, I think I read a question on how to set the custom action. The way to do this is to edit the Who.template.php file. Add the following line:
$txt['whoall_coppermine'] = 'Viewing the Gallery';
(assuming that your action is coppermine)
Now, the only problem that I have to resolve is since I migrated to Linux, none of my albums are working. I get an error message:
The selected album/file does not exist !
I've verified the permissions (everything is 777) and the filenames and directories, they are in the correct capitalzation and spelling).
Has anybody run into this problem before?
edit: I found the answer! In your php.ini, make sure register_long_arrays=On is set (mine was off ).
Now the only thing to do is find a theme to better match SMF.
Thanks!
ya, i posted MY mod over at coppermine quite some time ago... ::)
http://coppermine-gallery.net/forum/index.php?topic=25877.0 (http://coppermine-gallery.net/forum/index.php?topic=25877.0)
I am currently trying to incorporate my copper mine into smf...
I can get it half bridged where when I click the log in button on Copper Mine it brings me to the SMF log in page but after that I can not get back to Copper Mine from SMF. And when I go back to Copper mine I am not Logged in.
I used the Bridge wizard in copper mine and that was all I got.
I am using SMF 1.1rc2 and Copper mine 1.4.2 .
I am using the default theme in the forum modified with a button tab to the gallery allready.
http://www.milwaukeeareavwclub.com/forum
I have searched through this file up and down through this file "/bridge/smf.inc.php" for this path "$path = '../smf';" and can not find it.
Do I have to add the path into that file?
Anyone willing to help would be greatly appreciated.
Since I integrated cpg and smf I have 'empty' albums displayed in the member gallery. Has anyone had that problem or know how to get rid of them? There are 4 of them; they are greyed out since there are no pics in them, and they have no 'member' name, it just says 1 album, 0 files, on each of them
It's kinda annoying, as they take up space where the actual member albums are displayed,and I cant find anywhere to delete them since they dont have a name. If I click on the greyed out square I just get
Anonymous's Gallery, 1 album, 0 files
anyone heard of this happening and how to fix?
I found out that in coppermine 'guests' are the anonymous users/albums but because I am bridged with smf I dont have an 'anonymous' user category. I have smf 'guests' who dont have access to the gallery at all, so does anyone know how to get rid of these empty albums? They are dotted inbetween the actual members albums and taking up space that real members should have ???
Quote from: dtm.exe on July 09, 2005, 04:59:26 PM
Coppermine is an easily setup, fast, feature-rich photo gallery script with MySQL database, user management, private galleries, automatic thumbnail creation, ecard feature and a template system for easy customization to match the rest of a site.
To start, you'll need to download Coppermine (http://sourceforge.net/project/showfiles.php?group_id=89658). Once downloaded, follow these instructions to properly integrate Coppermine with your SMF forum.
In /include/init.inc.php, find:
// define('UDB_INTEGRATION', 'smf');
Replace with:
define('UDB_INTEGRATION', 'smf');
In /bridge/smf.inc.php, find:
$path = '../smf';
Replace /smf with the directory you have your SMF forum installed in. If SMF is installed in your root directory, remove smf leaving you with $path = '../';.
Once all necessary changes have been made, upload Coppermine to its own directory (examples: /coppermine, /gallery, /album). Once uploaded, run install.php. Make sure you install Coppermine on the same database as that of your SMF forum. Once installed, your new Coppermine gallery will be up and ready for use :).
Now
I installed cpg 1.4.3 and smf 1.0.7 and tried for the integration .
But I can't do it and it's got error.
I think there is some different coding .
I find that one
define('UDB_INTEGRATION', 'smf');
But I Saw
// Set UDB_INTEGRATION if enabled in admin
if ($CONFIG['bridge_enable'] == 1 && !defined('BRIDGEMGR_PHP')) {
$BRIDGE = cpg_get_bridge_db_values();
} else {
$BRIDGE['short_name'] = 'coppermine';
$BRIDGE['use_standard_groups'] = 1;
$BRIDGE['recovery_logon_failures'] = 0;
$BRIDGE['use_post_based_groups'] = false;
}
define('UDB_INTEGRATION', $BRIDGE['short_name']);
require_once 'bridge/' . UDB_INTEGRATION . '.inc.php';
/*
So I changed to
// Set UDB_INTEGRATION if enabled in admin
if ($CONFIG['bridge_enable'] == 1 && !defined('BRIDGEMGR_PHP')) {
$BRIDGE = cpg_get_bridge_db_values();
} else {
$BRIDGE['short_name'] = 'smf';
$BRIDGE['use_standard_groups'] = 1;
$BRIDGE['recovery_logon_failures'] = 0;
$BRIDGE['use_post_based_groups'] = false;
}
define('UDB_INTEGRATION', $BRIDGE['short_name']);
require_once 'bridge/' . UDB_INTEGRATION . '.inc.php';
/*
And then at smf10.inc.php
if (!USE_BRIDGEMGR) {
require_once('../smf/SSI.php');
$boardurl = 'http://www.mysite.com/board';
} else {
require_once($BRIDGE['relative_path_to_config_file'] . 'SSI.php');
}
I saw that one . So I need to change at
$boardurl = 'http://www.mysite.com/board'; to my site url and also that path
require_once('../smf/SSI.php'); to my path rite ? Coz my path is not /smf it's /frm/SSI.php .
But I don't know why . I got error . Here is the error
Fatal error: main(): Failed opening required 'bridge/smf.inc.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/poemsco/public_html/gallery/include/init.inc.php on line 234I know I did wrong something . But i don't know how to solve . Please help me from that. Thanks
with regards,
neonplayer
You atleast got errors.
I have 1.1RC2 and CPG 1.4.5
First of all i never foung the word smf in init.inc.php
in smf10.php i chaged to the reqd path.
But during installation it never even asked me to integrate.
Where did i go wrong
Pls Help me.
Thnaks and have a good day.
Hello ,
I want to know is that when i edit bridge file . Am i need to change that one .
// Database connection settings
$this->db = array(
'name' => $dbname,
'host' => $dbhost ? $dbhost : 'localhost',
'user' => $dbuser,
'password' => $dbpasswd,
'prefix' =>$table_prefix
like adding dbname to my dbname
user to my dbuser
and then password is my password .
Please help me with that. Thx
Quote from: rongup on April 28, 2006, 04:59:22 AM
You atleast got errors.
I have 1.1RC2 and CPG 1.4.5
First of all i never foung the word smf in init.inc.php
in smf10.php i chaged to the reqd path.
But during installation it never even asked me to integrate.
Where did i go wrong
Pls Help me.
Thnaks and have a good day.
My problem is the same
There isn't this code in CPG 1.4.5
// define('UDB_INTEGRATION', 'smf');
Also I think smf10.php for integrade smf 1.X and we need a new file for integrate to smf 1.1 .
This thread is for Coppermine 1.3 only, the process has changed for 1.4 (Perhaps someone could edit the first post in the thread to reflect this). For 1.4 use the bridge manager as dexribed in the documentation. smf10.inc.php works for SMF 1.1 as well so far.
thanks
Unable to fine Code to Modify in
/include/init.inc.phpQuote from: dtm.exe on July 09, 2005, 04:59:26 PM
Coppermine is an easily setup, fast, feature-rich photo gallery script with MySQL database, user management, private galleries, automatic thumbnail creation, ecard feature and a template system for easy customization to match the rest of a site.
To start, you'll need to download Coppermine (http://sourceforge.net/project/showfiles.php?group_id=89658). Once downloaded, follow these instructions to properly integrate Coppermine with your SMF forum.
In /include/init.inc.php, find:
// define('UDB_INTEGRATION', 'smf');
Replace with:
define('UDB_INTEGRATION', 'smf');
In /bridge/smf.inc.php, find:
$path = '../smf';
Replace /smf with the directory you have your SMF forum installed in. If SMF is installed in your root directory, remove smf leaving you with $path = '../';.
Once all necessary changes have been made, upload Coppermine to its own directory (examples: /coppermine, /gallery, /album). Once uploaded, run install.php. Make sure you install Coppermine on the same database as that of your SMF forum. Once installed, your new Coppermine gallery will be up and ready for use :).
Quote from: crash5456 on May 15, 2006, 10:05:57 AM
Unable to fine Code to Modify in /include/init.inc.php
Why not read two post above yours
Apparently I need new glasses, Thanks
Well i got it working and already loving it ;)
However I have one small problem as one might see when visiting my website: http://www.weescreatief.nl/SCMForum/index.php
For some reason my header is wrong and it show the word "gallery" on the left top side. I have to find out how to get this away and since my PHP skills are rather limited I would to hear some ideas :)
-edit-
Got that going already. The most important thing for everything in life: Logic. If there is a logic behind it one can figure it out without having knowledge about it :)
I added the line in index.template.php or something (the one where you say that when user is logged on then echo this) and that I could leave out for some reason. So now it's working and I only have to alter the colours etc to have a nice website :)
I tried to integrate smf with coppermine using the instructions in the coppermine documentation.
I'm using smf 1.1 RC2 and coppermine 1.4.2
I followed the instructions, which seemed to imply that you could use two separate databases, because it said to have both programs running independently before trying to attach the bridge.
I set up the bridge as instructed.
The result is that when I log in to coppermine, I end up in smf, but from smf there seems to be no way to use coppermine.
When I run coppermine directly, I can't log in, just can see the display as a guest.
Does anybody know how to solve this problem, or, at least, allow me to get back my coppermine functionality?
Thanks...
:(
you have to add a button from SMF into coppermine.
Quote from: rvforumite on July 11, 2005, 12:32:22 PM
Thanks Kindred.
Quote from: Kindred on July 11, 2005, 12:01:43 PMyou should remove the login/logout buttons from Coppermine and only use the SMF login/logout...
Which Coppermine file has the login/logout buttons code?
ok what i did here was goto (public_html/gallery/include/themes.inc.php)
looked 4 these files :-
addbutton($sys_menu_buttons,'{LOGIN_LNK}','{LOGIN_TITLE}','{LOGIN_TGT}','login','');
addbutton($sys_menu_buttons,'{LOGOUT_LNK}','{LOGOUT_TITLE}','{LOGOUT_TGT}','logout','');
then completely removed them, saved it then went back and added them again then saved it again.
it worked 4 me.
Hi,
I just installed Coppermine in it's own subdomain (http://fotoboek.astmaforum.nl) and would like to integrate this with my forum (http://www.astmaforum.nl) though whatever I fill in to relative path to the BBS program, nothing seems to work.
Should Coppermine necessarily be installed at www.astmaforum.nl/whatever or can I use this subdomain to? In that case, what to fill in? I tried loads so help would be very much appreciated
Cheers,
Stu
Quote from: Stuart on August 10, 2006, 01:00:24 PM
I just installed Coppermine in it's own subdomain
From Coppermine documentation (http://coppermine-gallery.net/demo/cpg14x/docs/index.htm#integrating_prerequisites_start)
Quote from: Aravot on August 10, 2006, 01:04:32 PM
Quote from: Stuart on August 10, 2006, 01:00:24 PM
I just installed Coppermine in it's own subdomain
From Coppermine documentation (http://coppermine-gallery.net/demo/cpg14x/docs/index.htm#integrating_prerequisites_start)
So there isn't an option to make it work? Just reinstall it on the same domain as my forum right?
Quote from: Stuart on August 10, 2006, 01:21:39 PM
Quote from: Aravot on August 10, 2006, 01:04:32 PM
Quote from: Stuart on August 10, 2006, 01:00:24 PM
I just installed Coppermine in it's own subdomain
From Coppermine documentation (http://coppermine-gallery.net/demo/cpg14x/docs/index.htm#integrating_prerequisites_start)
So there isn't an option to make it work? Just reinstall it on the same domain as my forum right?
I just reinstalled it and it's now working fantastic :D
Success.
Coppermine 1.4.8 + SMF 1.1 RC2.
Followed the instructions from Coppermine's official Docs. Works like a charm.
I just switched from phpBB to SMF 1.1 RC3 and have been using Coppermine (1.4.9) for a while (well, this very version went on a couple of days ago, but I have been using Coppermine for a while).
It all went really smoothly and without any probs or hitches.
Just one question, I would like to add a 'Gallery' button to my SMF menu at the top (default template at the moment). How do I go about that?
Please take a look at this: http://docs.simplemachines.org/index.php?topic=564.0
button works fine, but the php script behind it doesn't ... damn
OK...I got it to bridge just fine....I think. I am using SMF 1.09 and Coppermine 1.4.8. I used the Admin Tool Bridge Manager in Coppermine, and it automatically logs me in just fine. However, I can't post any pictures! Do I have to do some other step? Is it an incompatibilty issue? Any help would be great.
Oops...I'm running SMF 1.08.
Maybe a link to both would help.
SMF: http://www.deepprogressions.com/smf/
Coppermine: http://www.deepprogressions.com/coppermine/
I don't have a link button on the forum yet, but it looks pretty easy to accomplish that much...besides since I can't seem to find a way to upload pix since I've done the bridge why give the option right now. Coppermine worked fine before, so I'm sure something was done when the bridge was done.
I hope I'm not seeming pushy here, I just figure the more info I can provide, the easier it might be to come up with a fix.
Currently, I'm leaning toward updating the SMF, since I'm running an older version, but want some feedback since I always manage to screw up upgrading somehow.
Thanks again.
Make sure you have upload permission in coppermine
I'm the admin of the entire site, wouldn't I by default have upload permission? Besides, I can't find that option anywhere in SMF or Coppermine. As I said, Coppermine worked just fine before I bridged the 2 together.
Quote from: DaveSmooth on November 08, 2006, 02:27:52 PM
I'm the admin of the entire site, wouldn't I by default have upload permission? Besides, I can't find that option anywhere in SMF or Coppermine. As I said, Coppermine worked just fine before I bridged the 2 together.
OK..I'm an idiot. I didn't realize you actually had to add Administrator to the user permissions. It seems to work now...doh!
Alright! I'm making progress, the bridge works great, and pix can be uploaded by all users. Now, is it possible to match the SMF theme when going to Coppermine? I've tried searching for answers, but don't really know what to search for. I've seen some comments about ssi and want to know if that is the answer. Of course, I have no idea what ssi is, but I can learn I'm sure.
OOPS's I just upgraded SMF to 1.1 final and my "bridge" to Coppermine seems to be partially broken.
It links to Coppermine like always, BUT does not login to Coppermine. Click login in Coppermine and it goes back to login in SMF so it's still partially "bridged" however something in an SMF file must have been overwritten by the upgrade.
Any ideas on what file to edit where to restore the bridge?
Surely (I hope) I'm not the only one. I have no custom themes etc. installed just running SMF default.
Probably just a line or two that needs editing but I can't find it.
Any help appreciated greatly... :'(
Well Coppermine says it's not them...anybody know what might have changed in 1.1 final that would "break the bridge" between the two?
I don't know. I upgraded to 1.1 and my Coppermine bridge works. Exactly what steps did you take during the upgrade process?
Just upgraded SMF (had to do the download & upload thing, the new web install wouldn't work for me, I tried it...don't know if that did anything but SMF seems OK) re-synced the tables in SMF & a user was trying to post pictures & couldn't register so I checked and it was broke. Every time I tried a login on Coppermine it took me back to SMF where I was already logged in.
So I found some new bridge files on the Coppermine site and uploaded them & tried the bridge manager again. Now if the bridge manager is on I get a "you do not have permission to access this page" error. With it off both work OK but independently.
When I do a versions check in Coppermine I get some "does not exist in Coppermine" errors when clicking SMF bridge, bridge/coppermine.inc.php, etc. although they do exist. I have new versions of some of these files (10) and my install is 9 because I am leery of how to do a full upgrade without erasing all the user photos.
When it wouldn't work after the SMF upgrade I thought it might need new bridge files so I tried those. All files are there, just some of them say "not in Coppermine" when I check in version manager.
I did get a couple of error messages when upgrading SMF but they only appeared briefly (too fast to read) then the install proceeded and everything about SMF seems to work fine (except when I return I am not logged in where before I always was after selecting "forever" on login. Other than that no problems except old mods I had to delete that no longer worked etc.
The code is not matching on the latest version, can you update the post?
Thanks
Jay
Quote from: warhonowicz on September 06, 2006, 12:42:03 PM
button works fine, but the php script behind it doesn't ... damn
Hmmm, OK, I just did the upgrade, got the bridge working again, but now I'm in th same boat.. My button is still there but the script behind it does nothing.. This worked just before the upgrade...
warhonowicz , I see you got it working on your site, what was the issue? Anybody?
I did a new upgrade of both SMF & Coppermine on another forum I have and it worked great, latest versions. No problems at all, but I still can't get the broken one to work (latest versions) so I must be missing a file somewhere ::)
Anyone know how to integrate it so it looks like this?
http://praetorianlegion.com/images/smfcm.jpg (http://praetorianlegion.com/images/smfcm.jpg)
(http://praetorianlegion.com/images/smfcm.jpg)
Quote from: Existant on January 18, 2007, 03:54:50 PM
Anyone know how to integrate it so it looks like this?
http://www.simplemachines.org/community/index.php?topic=113488.0
http://www.tinyportal.net/index.php?PHPSESSID=79d008e08c19d5d2008e198af0ffab53&topic=3075.msg25958#msg25958
How do you get users set up in Coppermine via the bridge? I can see my memberlist but there is no settings area. Consequently, none of my users can upload anything even though the Coppermine permissions are set up to allow registered users to do so. When I look in the Coppermine users database, there is only one user (me).
I have bafflement.
I am using Coppermine 1.4.10 Is there a code set to work with this one?
I originally posted this message on the Joomla forums. I thought this might help some of those on the SMF forums as well.
-----------------------------
I've been doing some work on integrating Coppermine into Joomla when configured with the Orstio bridge. I've got a working solution. It uses iframe, but it handles all direct URL redirects (using javascript), and integrates Coppermine Search into Joomla via a searchbot (or search mambot). I am providing this as is, but will try to elp out, if I can. I am also encouraging feedback and improvements. This solution works great for me, though it may not work for anyone else, I have tried to make it as universal as possible.
EDIT: Oh, and the mambot searches the title, caption, and keywords fields in the gallery. It checks permissions as well, both the primary group, and additional groups. It also allows full access for admins. If the logged-in user doesn't have access to the image, it doesn't show up in the search results.
Contents of Read Me file:
The Coppermine Searchbot tool requires some modifications to the Joomla! Wrapper component, and your Coppermine theme. These changes are to allow links to the direct (unwrapped) coppermine site to redirect correctly to a wrapped page. This is based on other code I have seen, but goes one step further in allowing alternate pages to also correctly redirect.
PREREQUISITES
Installed SMF 1.1.2
Installed Joomla 1.0.12
Installed Coppermine 1.4.10
Configured all Pieces Above
Created and functioning SMF-Joomla Bridge from Orstio on www.simplemachines.org
Created and functioning SMF-Coppermine Bridge (included in Coppermine package)
INSTRUCTIONS
Update the Joomla Wrapper component: /components/com_wrapper/wrapper.php
The file included clearly shows where the code I added is from
This update will allow additional parameters to pass through to the iframe
Ensure the Menu Item for the Wrapper is configured correctly
Wrapper Link should be to the directory of the Coppermine installation (eg. http://www....com/coppermine/)
Published should be set to Yes
Scroll Bars set to Auto (or the configuration screens won't work right)
Auto Height set to Yes
I also have Width and Height set to 100%, though these are not critical
Update your Coppermine Theme: /themes/(your theme)/template.html
The file included clearly shows where the code I added is from
This update uses Javascript to determine if the coppermine gallery is loading in the Joomla wrapper (using an iframe) or not.
Update the coppermine location and the itemid in the template file, per the comments in the file.
Install the cpg_searchbot.zip file into Joomla. This is done through the admin tool as adding a mambot.
Configure the Site Mambots. Select the Search Coppermine mambot.
Publish the mambot, and enter your module name (which shows up in the search results), and the prefix for your coppermine tables (must be in same database).
Save it.
You are done!!
Please ask questions in the forum. I am providing this out of the goodness of my heart. I am releasing this under the GPL, and cannot guarantee support. It's free! I am providing this to all those with Joomla! SMF, and Coppermine looking to have an improved integration expereince.
Yeah, it's not perfect, but it works. And yeah, it's GPL... you want to modify it? Go ahead. It'd be really nice if you could share your improvements with the community. After all, that's really what this is about.
Thanks,
Brian Devendorf
Hmmm... I can't seem to post attachments. Oh well, get it here:
http://www.brianjd.com/files/Coppermine_Searchbot.zip (http://www.brianjd.com/files/Coppermine_Searchbot.zip)
Want to see a demo... try here:
http://www.crookedcreekwi.org/ (http://www.crookedcreekwi.org/)
I am having a few what seems to be MINOR ISSUES!
Coppermine is showing on my SMF Forums perfectly, but it isn't logging in the users... I won't eb sure about the permissions till i can get users logged in and when i try and login to the gallery it self it send sme to my SMF Login and still don't work.
I will put up evrything i have done...
SMF Location = root/Hordies
CPG Location = root/Hgallery
I added a button into my forums which works perfectly that aint an issue.
Here is the complete code of both files that it said to edit.
I coudlnt find a smf.inc.php file in the bridge folder of CPG but i did find smf10.inc.php so here it is..
I italisized what i editted and Bolded anythign i think might be an issue. im nto runnin db server localhost.
also i coudl not find $path in there anwhere...
smf10.php
<?php
/*************************
Coppermine Photo Gallery
************************
Copyright (c) 2003-2006 Coppermine Dev Team
v1.1 originally written by Gregory DEMAR
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
********************************************
Coppermine version: 1.4.10
$Source$
$Revision: 3275 $
$Author: gaugau $
$Date: 2006-09-03 12:10:47 +0200 (So, 03 Sep 2006) $
**********************************************/
if (!defined('IN_COPPERMINE')) die('Not in Coppermine...');
// Switch that allows overriding the bridge manager with hard-coded values
define('USE_BRIDGEMGR', 1);
require_once 'bridge/udb_base.inc.php';
if (!USE_BRIDGEMGR) {
require_once('../Hordies/SSI.php');
$boardurl = 'http://www.pwnzjoo.com/Hordies';
} else {
require_once($BRIDGE['relative_path_to_config_file'] . 'SSI.php');
}
class cpg_udb extends core_udb {
function cpg_udb()
{
global $BRIDGE, $CONFIG, $boardurl, $db_prefix, $db_connection, $db_server, $db_name, $db_user, $user_settings;
$this->use_post_based_groups = $BRIDGE['use_post_based_groups'];
$this->boardurl = $boardurl;
$this->multigroups = 1;
$this->group_overrride = 1;
// Board table names
$this->table = array(
'users' => 'members',
'groups' => 'membergroups',
);
// Database connection settings
$this->db = array(
'name' => $db_name,
'host' => $db_server ? $db_server : 'localhost',
'user' => $db_user,
'prefix' =>$db_prefix
);
// Derived full table names
if (strpos($db_prefix, '.') === false) {
$this->usertable = '`' . $this->db['name'] . '`.' . $this->db['prefix'] . $this->table['users'];
$this->groupstable = '`' . $this->db['name'] . '`.' . $this->db['prefix'] . $this->table['groups'];
} else {
$this->usertable = $this->db['prefix'] . $this->table['users'];
$this->groupstable = $this->db['prefix'] . $this->table['groups'];
}
// Table field names
$this->field = array(
'username' => 'memberName', // name of 'username' field in users table
'user_id' => 'ID_MEMBER', // name of 'id' field in users table
'password' => 'passwd', // name of the password field in the users table
'email' => 'emailAddress', // name of 'email' field in users table
'regdate' => 'dateRegistered', // name of 'registered' field in users table
'lastvisit' => 'UNIX_TIMESTAMP(lastLogin)', // last time user logged in
'active' => 'is_activated', // is user account active?
'location' => 'location', // name of 'location' field in users table
'website' => 'websiteUrl', // name of 'website' field in users table
'usertbl_group_id' => 'ID_POST_GROUP', // name of 'group id' field in users table
'grouptbl_group_id' => 'ID_GROUP', // name of 'group id' field in groups table
'grouptbl_group_name' => 'groupName' // name of 'group name' field in groups table
);
// Pages to redirect to
$this->page = array(
'register' => '/index.php?action=register',
'editusers' => '/index.php?action=mlist',
'edituserprofile' => '/index.php?action=profile;u='
);
// Group ids - admin and guest only.
$this->admingroups = array($this->use_post_based_groups ? 101 : 1);
$this->guestgroup = $this->use_post_based_groups ? 1 : 3;
// Connect to db - or supply a connection id to be used instead of making own connection.
$this->connect($db_connection);
}
// overriding authenticate() as we can let SMF do this all for us.
function authenticate()
{
global $USER_DATA, $user_settings;
if (!$user_settings){
$this->load_guest_data();
} else {
$row = array(
'id' => $user_settings['ID_MEMBER'],
'username' => $user_settings['memberName'],
'group_id' => $user_settings['ID_GROUP']
);
$this->load_user_data($row);
}
$user_group_set = '(' . implode(',', $USER_DATA['groups']) . ')';
$USER_DATA = array_merge($USER_DATA, $this->get_user_data($USER_DATA['groups'][0], $USER_DATA['groups'], $this->guestgroup));
$USER_DATA['can_see_all_albums'] = $USER_DATA['has_admin_access'] = array_intersect($USER_DATA['groups'],$this->admingroups) ? 1 : 0;
// avoids a template error
if (!$USER_DATA['user_id']) $USER_DATA['can_create_albums'] = 0;
// For error checking
$CONFIG['TABLE_USERS'] = '**ERROR**';
define('USER_ID', $USER_DATA['user_id']);
define('USER_NAME', addslashes($USER_DATA['user_name']));
define('USER_GROUP', $USER_DATA['group_name']);
define('USER_GROUP_SET', $user_group_set);
define('USER_IS_ADMIN', $USER_DATA['has_admin_access']);
define('USER_CAN_SEND_ECARDS', (int)$USER_DATA['can_send_ecards']);
define('USER_CAN_RATE_PICTURES', (int)$USER_DATA['can_rate_pictures']);
define('USER_CAN_POST_COMMENTS', (int)$USER_DATA['can_post_comments']);
define('USER_CAN_UPLOAD_PICTURES', (int)$USER_DATA['can_upload_pictures']);
define('USER_CAN_CREATE_ALBUMS', (int)$USER_DATA['can_create_albums']);
define('USER_UPLOAD_FORM', (int)$USER_DATA['upload_form_config']);
define('CUSTOMIZE_UPLOAD_FORM', (int)$USER_DATA['custom_user_upload']);
define('NUM_FILE_BOXES', (int)$USER_DATA['num_file_upload']);
define('NUM_URI_BOXES', (int)$USER_DATA['num_URI_upload']);
$this->session_update();
}
function get_groups($row)
{
global $user_settings;
$i = $this->use_post_based_groups ? 100 : 0;
$data = array();
if ($user_settings['ID_GROUP'] == 0){
$data[0] = 2;
} else {
$data[0] = $user_settings['ID_GROUP'] + $i;
}
if ($user_settings['additionalGroups']){
$groups = explode(',', $user_settings['additionalGroups']);
foreach ($groups as $id => $group){
//$data[$id] = $group+$i; This was overwriting the primary group
$data[] = $group+$i; //appends additionalGroups to the primary group.
}
}
if ($this->use_post_based_groups) $data[] = $user_settings['ID_POST_GROUP'] + $i;
return $data;
}
function collect_groups()
{
// Use this version to exclude true post based groups
//$sql ="SELECT * FROM {$this->groupstable} WHERE minposts=-1";
// Use this version to include all SMF groups
$sql ="SELECT * FROM {$this->groupstable}";
$result = cpg_db_query($sql, $this->link_id);
$udb_groups = array(1=>'Guests', 2=>'Registered');
while ($row = mysql_fetch_assoc($result))
{
$udb_groups[$row[$this->field['grouptbl_group_id']]+100] = utf_ucfirst(utf_strtolower($row[$this->field['grouptbl_group_name']]));
}
return $udb_groups;
}
function login_page()
{
global $CONFIG;
// silly workaround for SMF's redirect check...
$_SESSION['old_url'] = $CONFIG['site_url'] . '?board=redirect';
$this->redirect('/index.php?action=login');
}
function logout_page()
{
global $CONFIG;
// this is a wee bit messy like....
ob_start();
ssi_logout($CONFIG['site_url']);
preg_match('/<a href="(.*)">/', ob_get_clean(), $matches);
$this->boardurl = '';
$this->redirect($matches[1]);
}
function view_users()
{
$this->redirect($this->page['editusers']);
}
function view_profile() {}
}
// and go !
$cpg_udb = new cpg_udb;
?>
OK so upon looking it over again i foudn a spot in there that i think coudl be a problem but im asking before i edit. in the coge do u see where i have it Bolded my db serve ris NOT local host coudl that be an issue? Also please make sure i have everything else correct. I coudl NOT find $path in here anywhere so i figured it was at the italic areas.
Here is the code for the init.inc.php
I will Italisize what i editted and bold anythign i see as a potential problem.
init.inc.php
<?php
/*************************
Coppermine Photo Gallery
************************
Copyright (c) 2003-2006 Coppermine Dev Team
v1.1 originally written by Gregory DEMAR
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
********************************************
Coppermine version: 1.4.10
$Source$
$Revision: 3275 $
$Author: gaugau $
$Date: 2006-09-03 12:10:47 +0200 (So, 03 Sep 2006) $
**********************************************/
define('COPPERMINE_VERSION', '1.4.10');
define('COPPERMINE_VERSION_STATUS', 'stable');
if (!defined('IN_COPPERMINE')) { die('Not in Coppermine...');}
// Store all reported errors in the $cpgdebugger
require_once('include/debugger.inc.php');
set_magic_quotes_runtime(0);
// used for timing purpose
$query_stats = array();
$queries = array();
function cpgGetMicroTime()
{
list($usec, $sec) = explode(" ", microtime());
return ((float)$usec + (float)$sec);
}
$cpg_time_start = cpgGetMicroTime();
// Do some cleanup in GET, POST and cookie data and un-register global vars
$HTML_SUBST = array('&' => '&', '"' => '"', '<' => '<', '>' => '>', '%26' => '&', '%22' => '"', '%3C' => '<', '%3E' => '>','%27' => ''', "'" => ''');
$keysToSkip = array('_POST', '_GET', '_COOKIE', '_REQUEST', '_SERVER');
if (get_magic_quotes_gpc()) {
if (is_array($_POST)) {
foreach ($_POST as $key => $value) {
if (!is_array($value))
$_POST[$key] = strtr(stripslashes($value), $HTML_SUBST);
if (!in_array($key, $keysToSkip) && isset($$key)) unset($$key);
}
}
if (is_array($_GET)) {
foreach ($_GET as $key => $value) {
unset($_GET[$key]);
$_GET[strtr(stripslashes($key), $HTML_SUBST)] = strtr(stripslashes($value), $HTML_SUBST);
if (!in_array($key, $keysToSkip) && isset($$key)) unset($$key);
}
}
if (is_array($_COOKIE)) {
foreach ($_COOKIE as $key => $value) {
if (!is_array($value))
$_COOKIE[$key] = stripslashes($value);
if (!in_array($key, $keysToSkip) && isset($$key)) unset($$key);
}
}
if (is_array($_REQUEST)) {
foreach ($_REQUEST as $key => $value) {
if (!is_array($value))
$_REQUEST[$key] = strtr(stripslashes($value), $HTML_SUBST);
if (!in_array($key, $keysToSkip) && isset($$key)) unset($$key);
}
}
} else {
if (is_array($_POST)) {
foreach ($_POST as $key => $value) {
if (!is_array($value))
$_POST[$key] = strtr($value, $HTML_SUBST);
if (!in_array($key, $keysToSkip) && isset($$key)) unset($$key);
}
}
if (is_array($_GET)) {
foreach ($_GET as $key => $value) {
unset($_GET[$key]);
$_GET[strtr(stripslashes($key), $HTML_SUBST)] = strtr(stripslashes($value), $HTML_SUBST);
if (!in_array($key, $keysToSkip) && isset($$key)) unset($$key);
}
}
if (is_array($_COOKIE)) {
foreach ($_COOKIE as $key => $value) {
if (!in_array($key, $keysToSkip) && isset($$key)) unset($$key);
}
}
if (is_array($_REQUEST)) {
foreach ($_REQUEST as $key => $value) {
if (!is_array($value))
$_REQUEST[$key] = strtr($value, $HTML_SUBST);
if (!in_array($key, $keysToSkip) && isset($$key)) unset($$key);
}
}
}
// Initialise the $CONFIG array and some other variables
$CONFIG = array();
//$PHP_SELF = isset($_SERVER['REDIRECT_URL']) ? $_SERVER['REDIRECT_URL'] : $_SERVER['SCRIPT_NAME'];
$PHP_SELF = '';
$ORIGINAL_PHP_SELF = $_SERVER['PHP_SELF'];
$possibilities = array('REDIRECT_URL', 'PHP_SELF', 'SCRIPT_URL', 'SCRIPT_NAME','SCRIPT_FILENAME');
foreach ($possibilities as $test){
if (isset($_SERVER[$test]) && preg_match('/([^\/]+\.php)$/', $_SERVER[$test], $matches)){
$PHP_SELF = $_SERVER['PHP_SELF'] = $_SERVER['SCRIPT_NAME'] = $matches[1];
break;
}
}
$REFERER = urlencode($_SERVER['PHP_SELF'] . (isset($_SERVER['QUERY_STRING']) && $_SERVER['QUERY_STRING'] ? '?' . $_SERVER['QUERY_STRING'] : ''));
$ALBUM_SET = '';
$META_ALBUM_SET = '';
$FORBIDDEN_SET = '';
$FORBIDDEN_SET_DATA = array();
$CURRENT_CAT_NAME = '';
$CAT_LIST = '';
// Record User's IP address
$raw_ip = stripslashes($_SERVER['REMOTE_ADDR']);
if (isset($_SERVER['HTTP_CLIENT_IP'])) {
$hdr_ip = stripslashes($_SERVER['HTTP_CLIENT_IP']);
} else {
if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
$hdr_ip = stripslashes($_SERVER['HTTP_X_FORWARDED_FOR']);
} else {
$hdr_ip = $raw_ip;
}
}
if (!preg_match('/^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$/', $raw_ip)) $raw_ip = '0.0.0.0';
if (!preg_match('/^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$/', $hdr_ip)) $hdr_ip = '0.0.0.0';
// Define some constants
define('USER_GAL_CAT', 1);
define('FIRST_USER_CAT', 10000);
define('RANDPOS_MAX_PIC', 200);
define('TEMPLATE_FILE', 'template.html');
// Constants used by the cpg_die function
define('INFORMATION', 1);
define('ERROR', 2);
define('CRITICAL_ERROR', 3);
// Include config and functions files
if(file_exists('include/config.inc.php')){
ob_start();
require_once 'include/config.inc.php';
ob_clean();
} else {
// error handling: if the config file doesn't exist go to install
die('<html>
<head>
<title>Coppermine not installed yet</title>
<meta http-equiv="refresh" content="10;url=install.php">
<style type="text/css">
<!--
body { font-size: 12px; background: #FFFFFF; margin: 20%; color: black; font-family: verdana, arial, helvetica, sans-serif;}
-->
</style>
</head>
<body>
<img src="images/coppermine_logo.png" alt="Coppermine Photo Gallery - Your Online Photo Gallery" /><br />
Coppermine Photo Gallery seems not to be installed correctly, or you are running coppermine for the first time. You\'ll be redirected to the installer. If your browser doesn\'t support redirect, click <a href="install.php">here</a>.
</body>
</html>');
}
$mb_utf8_regex = '[\xE1-\xEF][\x80-\xBF][\x80-\xBF]|\xE0[\xA0-\xBF][\x80-\xBF]|[\xC2-\xDF][\x80-\xBF]';
require 'include/functions.inc.php';
# see http://php.net/mbstring for details
if (function_exists('mb_internal_encoding')) { mb_internal_encoding('UTF-8'); }
$CONFIG['TABLE_PICTURES'] = $CONFIG['TABLE_PREFIX'].'pictures';
$CONFIG['TABLE_ALBUMS'] = $CONFIG['TABLE_PREFIX'].'albums';
$CONFIG['TABLE_COMMENTS'] = $CONFIG['TABLE_PREFIX'].'comments';
$CONFIG['TABLE_CATEGORIES'] = $CONFIG['TABLE_PREFIX'].'categories';
$CONFIG['TABLE_CONFIG'] = $CONFIG['TABLE_PREFIX'].'config';
$CONFIG['TABLE_USERGROUPS'] = $CONFIG['TABLE_PREFIX'].'usergroups';
$CONFIG['TABLE_VOTES'] = $CONFIG['TABLE_PREFIX'].'votes';
$CONFIG['TABLE_USERS'] = $CONFIG['TABLE_PREFIX'].'users';
$CONFIG['TABLE_BANNED'] = $CONFIG['TABLE_PREFIX'].'banned';
$CONFIG['TABLE_EXIF'] = $CONFIG['TABLE_PREFIX'].'exif';
$CONFIG['TABLE_FILETYPES'] = $CONFIG['TABLE_PREFIX'].'filetypes';
$CONFIG['TABLE_ECARDS'] = $CONFIG['TABLE_PREFIX'].'ecards';
$CONFIG['TABLE_TEMPDATA'] = $CONFIG['TABLE_PREFIX'].'temp_data';
$CONFIG['TABLE_FAVPICS'] = $CONFIG['TABLE_PREFIX'].'favpics';
$CONFIG['TABLE_BRIDGE'] = $CONFIG['TABLE_PREFIX'].'bridge';
$CONFIG['TABLE_VOTE_STATS'] = $CONFIG['TABLE_PREFIX'].'vote_stats';
$CONFIG['TABLE_HIT_STATS'] = $CONFIG['TABLE_PREFIX'].'hit_stats';
// Connect to database
($CONFIG['LINK_ID'] = cpg_db_connect()) || die('<b>Coppermine critical error</b>:<br />Unable to connect to database !<br /><br />MySQL said: <b>' . mysql_error() . '</b>');
// Retrieve DB stored configuration
$results = cpg_db_query("SELECT * FROM {$CONFIG['TABLE_CONFIG']}");
while ($row = mysql_fetch_array($results)) {
$CONFIG[$row['name']] = $row['value'];
} // while
mysql_free_result($results);
// Reference 'site_url' to 'ecards_more_pic_target'
$CONFIG['site_url'] =& $CONFIG['ecards_more_pic_target'];
// Include logger functions
include_once('include/logger.inc.php');
// Include media functions
require 'include/media.functions.inc.php';
// Check for GD GIF Create support
if ($CONFIG['thumb_method'] == 'im' || function_exists('imagecreatefromgif'))
$CONFIG['GIF_support'] = 1;
else
$CONFIG['GIF_support'] = 0;
// Include plugin API
require('include/plugin_api.inc.php');
if ($CONFIG['enable_plugins'] == 1) {
CPGPluginAPI::load();
}
// Set UDB_INTEGRATION if enabled in admin
if ($CONFIG['bridge_enable'] == 1 && !defined('BRIDGEMGR_PHP')) {
$BRIDGE = cpg_get_bridge_db_values();
} else {
$BRIDGE['short_name'] = 'coppermine';
$BRIDGE['use_standard_groups'] = 1;
$BRIDGE['recovery_logon_failures'] = 0;
$BRIDGE['use_post_based_groups'] = false;
}
//define('UDB_INTEGRATION', $BRIDGE['short_name']);
define('UDB_INTEGRATION', 'smf10');
require_once 'bridge/' . UDB_INTEGRATION . '.inc.php';
/*
Removed temporarily due to non-compliance with bridging system - Nibbler
// Retrieve Array of Admin Groups (used for hiding admin usernames on thumbnails)
$results = cpg_db_query("SELECT group_id FROM {$CONFIG['TABLE_USERGROUPS']} WHERE has_admin_access ");
$CONFIG['ADMIN_GROUPS']=array();
while ($row = mysql_fetch_array($results)) {
$CONFIG['ADMIN_GROUPS'][]= $row['group_id'];
} // while
mysql_free_result($results);
// Retrieve Array of Admin Users (used for hiding admin usernames on thumbnails)
$results = cpg_db_query("SELECT {$cpg_udb->field['user_id']} as user_id FROM $cpg_udb->usertable WHERE {$cpg_udb->field['usertbl_group_id']} in (" . implode(',',$CONFIG['ADMIN_GROUPS']).')');
$CONFIG['ADMIN_USERS']=array();
while ($row = mysql_fetch_array($results)) {
$CONFIG['ADMIN_USERS'][] = $row['user_id'];
} // while
mysql_free_result($results);
*/
// Start output buffering
ob_start('cpg_filter_page_html');
// Parse cookie stored user profile
user_get_profile();
// Authenticate
$cpg_udb->authenticate();
// Test if admin mode
$USER['am'] = isset($USER['am']) ? (int)$USER['am'] : 0;
define('GALLERY_ADMIN_MODE', USER_IS_ADMIN && $USER['am']);
define('USER_ADMIN_MODE', USER_ID && USER_CAN_CREATE_ALBUMS && $USER['am'] && !GALLERY_ADMIN_MODE);
// Set error logging level
// Maze's new error report system
if (!USER_IS_ADMIN) {
if (!$CONFIG['debug_mode']) $cpgdebugger->stop(); // useless to run debugger cos there's no output
error_reporting(E_PARSE); // hide all errors for visitors
}
// Process theme selection if present in URI or in user profile
if (!empty($_GET['theme'])) {
$USER['theme'] = $_GET['theme'];
}
// Load theme file
if (isset($USER['theme']) && !strstr($USER['theme'], '/') && is_dir('themes/' . $USER['theme'])) {
$CONFIG['theme'] = strtr($USER['theme'], '$/\\:*?"\'<>|`', '____________');
} else {
unset($USER['theme']);
}
if (!file_exists("themes/{$CONFIG['theme']}/theme.php")) $CONFIG['theme'] = 'classic';
require "themes/{$CONFIG['theme']}/theme.php";
require "include/themes.inc.php"; //All Fallback Theme Templates and Functions
$THEME_DIR = "themes/{$CONFIG['theme']}/";
// Process language selection if present in URI or in user profile or try
// autodetection if default charset is utf-8
if (!empty($_GET['lang']))
{
$USER['lang'] = ereg("^[a-z0-9_-]*$", $_GET['lang']) ? $_GET['lang'] : $CONFIG['lang'];
}
if (isset($USER['lang']) && !strstr($USER['lang'], '/') && file_exists('lang/' . $USER['lang'] . '.php'))
{
$CONFIG['default_lang'] = $CONFIG['lang']; // Save default language
$CONFIG['lang'] = strtr($USER['lang'], '$/\\:*?"\'<>|`', '____________');
}
elseif ($CONFIG['charset'] == 'utf-8')
{
include('include/select_lang.inc.php');
if (file_exists('lang/' . $USER['lang'] . '.php'))
{
$CONFIG['default_lang'] = $CONFIG['lang']; // Save default language
$CONFIG['lang'] = $USER['lang'];
}
}
else
{
unset($USER['lang']);
}
if (isset($CONFIG['default_lang']) && ($CONFIG['default_lang']==$CONFIG['lang']))
{
unset($CONFIG['default_lang']);
}
if (!file_exists("lang/{$CONFIG['lang']}.php"))
$CONFIG['lang'] = 'english';
// We load the chosen language file
require "lang/{$CONFIG['lang']}.php";
// Include and process fallback here if lang <> english
if($CONFIG['lang'] != 'english' && $CONFIG['language_fallback']==1 ){
require "include/langfallback.inc.php";
}
// See if the fav cookie is set else set it
if (isset($_COOKIE[$CONFIG['cookie_name'] . '_fav'])) {
$FAVPICS = @unserialize(@base64_decode($_COOKIE[$CONFIG['cookie_name'] . '_fav']));
foreach ($FAVPICS as $key => $id ){
$FAVPICS[$key] = (int)$id; //protect against sql injection attacks
}
} else {
$FAVPICS = array();
}
// If the person is logged in get favs from DB those in the DB have precedence
if (USER_ID > 0){
$sql = "SELECT user_favpics FROM {$CONFIG['TABLE_FAVPICS']} WHERE user_id = ".USER_ID;
$results = cpg_db_query($sql);
$row = mysql_fetch_array($results);
if (!empty($row['user_favpics'])){
$FAVPICS = @unserialize(@base64_decode($row['user_favpics']));
}else{
$FAVPICS = array();
}
}
/**
* CPGPluginAPI::action('page_start',null)
*
* Executes page_start action on all plugins
*
* @param null
* @return N/A
**/
CPGPluginAPI::action('page_start',null);
// load the main template
load_template();
// Remove expired bans
$now = date('Y-m-d H:i:s', localised_timestamp());
$CONFIG['template_loaded'] = true;
cpg_db_query("DELETE FROM {$CONFIG['TABLE_BANNED']} WHERE expiry < '$now'");
// Check if the user is banned
$user_id = USER_ID;
$result = cpg_db_query("SELECT * FROM {$CONFIG['TABLE_BANNED']} WHERE (ip_addr='$raw_ip' OR ip_addr='$hdr_ip' OR user_id=$user_id) AND brute_force=0");
if (mysql_num_rows($result)) {
pageheader($lang_error);
msg_box($lang_info, $lang_errors['banned']);
pagefooter();
exit;
}
mysql_free_result($result);
// Retrieve the "private" album set
if (!GALLERY_ADMIN_MODE && $CONFIG['allow_private_albums']) get_private_album_set();
if (!USER_IS_ADMIN && $CONFIG['offline'] && !strstr($_SERVER["SCRIPT_NAME"],'login')) {
pageheader($lang_errors['offline_title']);
msg_box($lang_errors['offline_title'], $lang_errors['offline_text']);
pagefooter();
exit;
}
// kick user into user_admin_mode (needed to fix "removed user mode for users" when upgrading)
if (USER_ID && !USER_IS_ADMIN && !$USER['am']) { // user is logged in, but is not gallery admin and not in admin mode
$USER['am'] = 1;
pageheader($lang_info, "<META http-equiv=\"refresh\" content=\"1;url=$referer\">");
msg_box($lang_info, 'Sending you to admin mode', $lang_continue, $referer);
pagefooter();
ob_end_flush();
die();
}
?>
OK here the 1st line all i did was put a // in fornt of the original code and added the code below it and because it wasn't smf.php it was smf10.php i made it smf10 instead of smf.
please help me so i can move onto othe rissues im havin with SMF mods liek the Downloads mod saying im hacking when i try to download and other small cosmetic stuff.
Thank You!
Mike
I dont know what gallery anymore lol........i think ill go with coppermine, can somebody tell me like is there any integration file or what do i need to do in order to have this all functioning ......with
1.1.2
TP 0.98
just install coppermine normally and go under the config and look for bridge manager, and tell it to use SMF, should work fine
Sweet that worked ! , now how can i embend the coppermine into smf like so people don't use 2 addresess?
I have coppermine installed (via bridge manager) and it's working fine with smf :D
The only thing I am having problems with is the link in the top menu. Yes I have looked at the manual etc but I am lost! Help would be great :D
Bob
Powerbob, just answered your same question here:
http://www.simplemachines.org/community/index.php?topic=167130.msg1072565#msg1072565
Quote from: NeMoD on April 18, 2007, 09:03:08 PM
just install coppermine normally and go under the config and look for bridge manager, and tell it to use SMF, should work fine
I see no "bridge manager" in config
It's the last item in the 'Admin Tools' menu.
oh DUH! LOL I was looking under config thanx!
Quote from: Existant on January 18, 2007, 03:54:50 PM
(http://praetorianlegion.com/images/smfcm.jpg)
how can i make iframe to look like this for coppermine and smf..
I am having similar problems to what I have read in this thread. I have a working SMF forum, 1.1.2 and a working coppermine gallery 1.4.10.
What I did was add a 'PHOTO' link in the forum menu and when clicked I would want the username to carry over to the photo page.
In these instructions there is no // define('UDB_INTEGRATION', 'smf'); in my init.inc.php file.
Here is what my file had:
// Set UDB_INTEGRATION if enabled in admin
if ($CONFIG['bridge_enable'] == 1 && !defined('BRIDGEMGR_PHP')) {
$BRIDGE = cpg_get_bridge_db_values();
} else {
$BRIDGE['short_name'] = 'coppermine';
$BRIDGE['use_standard_groups'] = 1;
$BRIDGE['recovery_logon_failures'] = 0;
$BRIDGE['use_post_based_groups'] = false;
}
define('UDB_INTEGRATION', $BRIDGE['short_name']);
require_once 'bridge/' . UDB_INTEGRATION . 'coppermine.inc.php';
This was actually giving me errors by looking for copperminecoppermine.inc.php I took out the short_name and it seems to working OK.
There has to be some kind of file alteration, but I'm kinda new with this.
Also, I don't have an smf.inc.php but I do have a smf10.inc.php and I see no $path line.
Any help would be greatly appreciated.
Thanks
Also, I ran the bridging wizard in the coppermine admin tools, but it didn't seem to make a difference.
Ok, I don't think I saw this already answered anywhere else so I'm going to ask it here. I am going to bridge my Coppermine gallery into my SMF forum but I want the gallery to match the forum. Is there a way to modify Coppermine to use the forum's theme, or perhaps to modify the SMF theme so that I can load it in Coppermine?
Quote from: chickenout on May 09, 2007, 12:53:35 PM
Also, I ran the bridging wizard in the coppermine admin tools, but it didn't seem to make a difference.
The wizard worked for me. Be sure to activate the bridge (it's an option on the last page). It doesn't seem to sync the groups, but the users and login/logout are enough for me.
alinne : you can't directly. You will have to open a page on your forum, save it as HTML, and try to include parts of this HTML in a Coppermine theme.
hi i have intergrated coppermin on my site but when i click on th gallery button i get
Fatal error: Call to undefined function tp_loadtheme() in /www/110mb.com/j/o/y/r/i/d/e/r/joyrider/htdocs/Sources/Load.php on line 1181
this any help its to do with smf
see for yourself here
joyrider.110mb.com/gallery/ (http://joyrider.110mb.com/gallery/)
I have SMF and Coppermine bridged and it appears everything is working fine with one exception. When a user clicks on the link tab in the forum to go to Coppermine, a password box appears and asks them to log in, even though they are, already. If they try and log in through this box, they simply get returned to the forum home page. The only way (that I have found) for anyone to get to Coppermine (including myself the admin) is to "logout" while in the forum and then "login" again. Once that's done, all users can then enter Coppermine via the link tab.
I'm guessing this is Cookie related somehow but have no clue on how to correct it.
Ideas?
This would be related to how you have smf bridged to coppermine.
It sounds like Coppermine is eithe rno using the SMF cookie, or the coppermine cookie expires while the SMF cookie is still active.
The cookie used by the SMF and Coppemine are not the same. I am sure that the instructions said "not" to have them the same. Is this not correct?
If it is the other as you suggested (cookie expiring), how would I correct it?
Thanks!
Quote from: Teal on May 28, 2007, 08:47:51 AM
I have SMF and Coppermine bridged and it appears everything is working fine with one exception. When a user clicks on the link tab in the forum to go to Coppermine, a password box appears and asks them to log in, even though they are, already. If they try and log in through this box, they simply get returned to the forum home page. The only way (that I have found) for anyone to get to Coppermine (including myself the admin) is to "logout" while in the forum and then "login" again. Once that's done, all users can then enter Coppermine via the link tab.
I'm guessing this is Cookie related somehow but have no clue on how to correct it.
Ideas?
I have fixed this problem by changing the cookie setting in SMF to the 2nd alternate and disabling the first.
I can now access the gallery with out the login issue. I am now faced with the next issue:
Users other than "admin" cannot see all of the albums nor can they "upload" to the one they can. I have set the albums users to "community member" which is the group from the forum that needs access to all of the albums.
When I check under "groups" in Coppermine, there is no reference to the user group "community member"
I am quite puzzled by this and have read several threads in this forum but haven't found any info that has helped me cure this problem.
Ideas?
I have SMF 1.1.2 Installed (manually) and Coppermine 1.4.10 Installed (fantastico)
I went through the Bridge Manager and everything went smoothly. However now whenever I click on the Login link while in the gallery (simpgfx.com/gallery) I'm taken to the SMF Login. I don't even need the gallery to be "inline" with the forum/theme etc... I just want to be able to use it =( Does anyone know what could be wrong?
You need to add a link button in the forum.
You also need to change the cookie setting in the forum from the default setting to the second option.
You will also need to "clear your cookies" one time afterwards to avoid any login issues.
Quote from: Teal on June 01, 2007, 12:43:13 PM
You need to add a link button in the forum.
You also need to change the cookie setting in the forum from the default setting to the second option.
You will also need to "clear your cookies" one time afterwards to avoid any login issues.
i don't "need" to add the button I can do that later...
but how do I know what option for the cookie setting... since both the checkboxes are unchecked
(http://i16.tinypic.com/4pww7cl.gif)
The top one is normally checked by default.
In this case, you need to check the bottom one.
thank you SO SO much... it now shows that I'm logged in when I go to the gallery (/gallery) now to figure out how to get it wrapped into my SMF site so that it all matches =P any ideas??
Why not just adjust the color scheme in the style.css file after you select a theme (in Coppermine).
By comparing that file in both Coppermine and SMF (theme being used), you can easily note the hexidecimal colors used in both and adjust to suit.
I use both Photoshop and Jasc paint shop pro for this purpose. If you simply enter the six digit color code into the color palette, you'll see what it looks like and that, will assist you to identify what colors are where.
well I got it integrated in a sense (www.simpgfx.com/forum/index.php?action=gallery) but theres a few things I need to fix =P
Quote from: Teal on June 01, 2007, 06:40:26 PM...you simply enter the six digit color code into the color palette, you'll see what it looks like and that, will assist you to identify what colors are where.
thanks for the info (http://www.shomazta.com/smf/Smileys/afro/kiss.gif) I do graphics design for a living.
Quote from: Teal on June 01, 2007, 12:43:13 PM
You need to add a link button in the forum.
You also need to change the cookie setting in the forum from the default setting to the second option.
You will also need to "clear your cookies" one time afterwards to avoid any login issues.
Finally after a couple days of ripping my hair out, searching, screaming I find this post and my question is answered. A stupid cookie issue. Duh! Make a link button! Obviously people do this, so why isn't there documentation on it!
Thanks a mil for the simple solution and preventing me from going totally bald!
Might make another post, but I have installed the latest SMF and the latest Coppermine. Bridged fine. Need a button on the SMF to go to CM, and then a button on CM to link back to SMF......sooooooo, how do I do this???
Thanks, Bill
Quote from: Yaxley on July 02, 2007, 10:14:29 PM
Might make another post, but I have installed the latest SMF and the latest Coppermine. Bridged fine. Need a button on the SMF to go to CM, and then a button on CM to link back to SMF......sooooooo, how do I do this???
Thanks, Bill
I know very little about php but i have managed to link SMF with coppermine. But I need to make buttons as Bill is requesting (post above)
Thanks ed
QuoteReplace /smf with the directory you have your SMF forum installed in. If SMF is installed in your root directory, remove smf leaving you with $path = '../';.
Once all necessary changes have been made, upload Coppermine to its own directory (examples: /coppermine, /gallery, /album). Once uploaded, run install.php. Make sure you install Coppermine on the same database as that of your SMF forum. Once installed, your new Coppermine gallery will be up and ready for use .
do i have to still use the same database?? Thanks
Hiyas, I think i have the same question.....
This is how things are atm..
My SMF is already setup and recently upgraded to latest version.
I want to setup the latest CPG to be integrated with my current SMF.
I've had a CPG setup for ages now but it's all outdated and I want to delete that one and install the latest CPG and have it bridged using the latest CPG's bridge manager...
My question is.... when I install CPG, do i have to Install it on the same Database as my current SMF to use the CPG bridge ? or do I install CPG on it's own database and then use the bridge?
Thanks in advance :)
Hello Irc_Sandman;
I have SMF and CPG on the same database. The newest version of CPG has a build-in bridge, so all you need to do is follow easy directions.
Good luck
Anna
Hi Anna, thank you for your reply :)
I think my SMF is on a different version of MySQL that is needed for the CPG, but i'm not sure.
Yeah i've read a lil bit of the built in bridge instructions, but just couldn't find anywhere about it having to be installed on the 'same' database as the SMF i wanna bridge to. So I definitely 'need' to install it on the same DB as the current SMF for the bridge to work then ?
I just don't want to risk hurting my SMF database in any way is all.
thank you again in advance :)
As per README file from CPG 1.4.12 you need: MySQL 3.23.23 or newer (MySQL 4.1 is recommended, MySQL 5 is supported)
QuoteIf you already have a database you're using for a BBS or something else, that'll work just as well. You can use that database for Coppermine, too. If you have a BBS and plan to connect it to Coppermine install, you'll need to share the database anyway.
So, it looks like you
need to have the same db if you want to bridge it.
Anna
Thank you again Anna :) .... my bad, I typoed before, I do have my SMF on that version of MySQL, i was thinking of PHP version lol.
I'll install it on my SMF DB , seems as though it can't do any harm as long as cookies are named different I think :)
Thanks again for your help :)
You're welcome Irc_Sandman.
Just read and follow the enclosed with CPG instructions carefully and you will be just fine... :)
Anna
I have my smf and coppermine successfully integrated, I was wondering If I could somehow make SMF's search also search coppermine photos?
Ok call me lazy or whatever but im putting a post in the help wanted section to do this for me. I like taz's layout http://www.icducks.com/Main/coppermine.html and how its not only intergrated but w/in his site.
Please check out the help wanted section or email me if you can do this for me and your fee.
I have officially gone blind reading through all this and trying to do it myself.
-N
Apologies if this has been covered, but I did a search and couldn't find it. It appears this integration is going to have some issues if your board has member names with blanks. For example, on my board, my username is jerri blank, same as here, but Coppermine doesn't accept usernames with blanks.
Forcing everyone on my board to change their names isn't really practical, because their usernames are also their Xbox Live gamertags.
Am I wrong about this?
Thanks,
jb
Thanks for the tutorial, but I can't get this to work with Coppermine 1.4.13. Is there a way to download a previous version?
OK, I did what was posted but I'm getting a fatal error:
Fatal error: Call to undefined function: cache_get_data() in /homepages/3/d217209892/htdocs/images/bridge/smf.inc.php(127) : eval()'d code on line 16
http://www.simplemachines.org/community/index.php?topic=200954.0
Ataru, there is now a Bridge Wizard included with the Coppermine to guide you through integration with SMF. And instructions are here: http://coppermine-gallery.net/demo/cpg14x/docs/index.htm#integrating
Anna