![]() |
Coppermine in Mambo without the wrapper
This is a method to viusally integrate Coppermine into Mambo, without using the Wrapper component, based almost totally on the work of silid from this thread. I have made a few changes to work around a server restriction, package it together, make it a bit more flexible, and get it to work 'out of the box' (hopefully!), but the main thing I want to do is just let others know that there is a way to do it, as a lot of people have been asking without too many clear answers. As the other thread has about 10 pages of mainly confusing questions and has been going on for a long time, I think it's best to separate this into a new thread.
Now it's not 100% perfect, and is not a full integration, particularly in terms of being a component, integrating users or breadcrumb navigation etc. It is more of a 'trick.' However, it is very simple, requiring only one modification to a Coppermine file, and I think most people who currently use the Wrapper component would prefer this method. A demonstration of this working can be seen at my very slow server (edit: sorry no longer up). Silid's site, using his original version of the files is at http://www.oleonline.com I was planning to make a full Coppermine component using the method used by the phpbb component. This way is so easy though I am not sure how beneficial a full component would be. There's a few issues to consider. Installation Procedure The following steps are needed, as always, it is recommended that you try this on a test version of your site first, and/or backup: 0. Check if this will work with the PHP configuration on your web host. It requires either: - allow_url_fopen to be On (often turned Off for safety reasons) - or Curl support to be enabled To check this, copy the file phpinfo.php (attached if needed, see Step 1) to a directory of your web server, and then go to the phpinfo.php in your web browser. Look for 'allow_f_open' and 'curl' to see whether they are enabled. If either is, you are fine. If not, this will not work, but I may eventually be able to fix it. 1. Download the following file - http://www.4eva.com/Coppermine for M...this first.zip, and unzip it in a folder. This contains all the files you will need. 2.You already should have Mambo and Coppermine installed - you do not need to install Coppermine through Mambo at all. Coppermine should be in its own directory under the Mambo directory. The easiest way to make sure this works is to have Mambo in the root directory, and Coppermine underneath it in a folder called gallery, as in the demonstration sites. However, you can configure this (see end). 3. Replace the following line in the Coppermine file include/functions.inc.php: Code:
$template = fread(fopen($template_file, 'r'), filesize($template_file));Code:
//$template = fread(fopen($template_file, 'r'), filesize($template_file));4. Install the attached file com_coppermine.zip as a Mambo component, as you would any other component (via the Mambo administration > Components > Install/Uninstall page). This component does little except provide a placeholder for the Mambo template to fill. You do not ever need to go directly to this component, so don't add it to the menu etc. 5. Copy the two attached Coppermine theme directories, coppermambo and coppermambo2 to the Coppermine themes directory, as you would any other theme. If Curl support is enabled on your server (from Step 1), select the coppermambo theme as your theme in Coppermine. Otherwise if allow_url_fopen works select the coppermambo2 theme as your theme in Coppermine. 6. Go to gallery/index.php and it should be working! Issues Currently this does not work well with the Mambo Template Changer module, when you try to change the template module from a Gallery page. It is best if you leave the Template Changer module off this page (i.e. select the pages you want it on, rather than all pages). There may be other modules that this doesn't work perfectly with, or some extras in Coppermine itself. But it seems to work well with the most common ones, and at worst, it certainly won't interfere with anything except when you are on the gallery page. The other issue is that the Coppermine and Mambo css styles may conflict on the gallery pages if they have the same name, as we include both style sheets. You may have to change one or more styles in one of the style sheets. If you want to integrate users, that has not been tested with this method. Go to the thread up the top of this post to see the beta bridge file from silid and try it. Finally there may be a way to get around it if both curl and allow_url_fopen are disabled. Just reply here if you are in that boat, and I'll try. Customisation To customise the Coppermine theme attached, you simply edit the html part of the template.html. Unfortunately this is no longer a pure html file, but I think you will see that it is still easy to edit the HTML. If you want to change to another Coppermine theme, you can basically just copy this template.html file to the existing theme, replacing it with the existing HTML in the existing theme. No changes to theme.php are ever needed. If your Coppermine folder is not called gallery, or your Mambo is not installed in the root folder, you can edit it in the template.html file too. Comparison to the Wrapper component The main benefit is the direct URLS to the Coppermine pages which is useful in many ways. Also it feels more integrated. This is no disrespect to the Wrapper though which is still excellent for many uses, and some may still feel more comfortable with it. A full sample of how the integration can work can be seen at (edit: sorry, no longer up either). For more discussion on development go to the thread at the top, any questions and problems go here! Edit: Sorry I had a very busy time, and so if there are unanswered questions here I apologise. I probably no longer can answer the questions very well anyway, as I actually no longer use Mambo (a great CMS, but I did not have enough content to really need it, just images), and so it's been a long time since I worked with this little component). Sorry all! |
Very nice
|
Thats a nice site :D
(Though I'm a Bronco fan myself :p) And the integration between the two (mambo, copper) looks seamless - good work !! Might have need of this myself soon. |
Thanks romanus and stingrey (I will forgive you, even after the golden point last week! :) )
That Sharks site has a bit more hacking to add in the breadcrumb to the gallery pages etc, but yeah, I think this approach by silid is very good. It is particularly useful if you want to link to an individual picture. |
Register twice?
Neat work, the visual integration is seamless :D
However, users are still required to register twice, and login twice. Is that correct, or does that only go for users already registerd into coppermine/mambo before the integration? Edit: Ah yes, now I see. I must really read better :oops: To integrate users, I'll have to use the bridge file. Well, I'll try it :) Edit2: On top of that, I can't use the first coppermambo theme: Quote:
Any idea's on what could be the cause of that? Edit3: Not to nag, since I think you did a great job, but I have another problem: When I click the gallery link when I'm logged in, the user menu changes back to that of an user that is not logged in. |
There's a problem with the bridge file. It doesn't check the session cookie, so if you don't check "remember" it'll won't know you're logged in....most of the time.
|
Quote:
Quote:
I will have to look at it more - I'm not sure how easy it is to address those issues, as it may be unavoidable when including the Mambo page. The simplest (obviously not the best) solution at this stage is to leave some of these more complex modules off the gallery page (i.e. only show them on specific pages). I guess these are factors in favour of retaining the Wrapper component, and working towards a full Coppermine component. |
Within the next couple weeks, it'll be easier to make a full Coppermine component. The biggest thing preventing it in the past was hard-coded urls. When the plugin API is released, you'll be able to use regex's like silid did to make the urls Mambo-friendly, without having to modify core code. I did something similar on my site to make short urls. Right now, I have Coppermine opening in a new window, but I plan to integrate it later. (http://www.brownfloyd.com/gallery/)
|
New interested developer
Hello all -
I am looking to a coppermine integration with Mambo v4.5.1 and above. As such I would like to get a bit of feedback on what is needed in a prioritized order. Thanks and looking forward to helping out here. |
I notice the integration only works on the site default template.
|
Thanks for the work put into this. I have a problem though, because I use the JSCookmenu in my Mambo template. All the links come out wrong... Is there any change anybody has tried this already?
EDIT: I just hardcoded some URL's into it to make it work. Not a nice solution... But it works for the moment. http://www.it.fnt.hvu.nl/~pde/coppermine/index.php |
url prob
To fix the problem with te wrong url's change in the copperminetemplate the root to mambo:
// The folder your Mambo is located in relative to the root $mambo_root="/mambo45rc2/"; (change mambo45rc2 to whatever your root is!) It works for me, coppermine working local without any probs! ;) |
Bad luck, JsCookmenu is loading but the url's are still wrong grrrr, sorry! I can't figure out what's wrong, anyone got a clue? The rest of the menu's are working correctly!
|
Works great without SEF running on mambo however when its running, none of the links or images work... www.tctunerz.com is the site.. Any help would be appreciated.
|
anyone?
|
I know this thread is about Coppermine without the wrapper, but... The wrapper that comes with 4.5.1a seems to do a good job with Coppermine. I choose the MacOSx theme that came with Coppermine, and did a little editing to the theme, since I am using a fixed width template under Mambo. I think it came out pretty good, the integration looks pretty seamless. You can see it at my site www.stolarz.org click on the Photos link on the left.
I did try the component and theme that was attached to this thread and it did work good except for a javascript error when I tried to click the picture for the full size photo. Josh |
site doesnt work.
|
Problem with folders
If mambo installation is at http://mydomain.com/mambo
and Coppermine is at http://mydomain.com/mambo/gallery then what is the correct values for the following variables for template.html? // The folder your Mambo is located in relative to the root $mambo_root="/mambo/"; (is it correct?) // The name of the folder Coppermine is located in (e.g. the 'gallery' in http://localhost/gallery/index.php $coppermine_folder='gallery'; (I have tried '/mambo/gallery/' but it gets worse) All links on Coppermine top page simply points to Mambo installation folder, something like: http://mydomain.com/mambo/thumbnails...m=lastup&cat=0 also all images does not show up at all. Please help me... any other folder name to change? I really love Mambo and Coppermine, I really want both of them to get married. :wink: |
Quote:
<?php if (isset($mosConfig_sef) && $mosConfig_sef) { // echo "<base href=\"$mosConfig_live_site/\" />\r\n"; } in metadata.php if your mambo root is / as mine, you shouldn't need such line anyway I think. What is the exat use of this line, I didn't figure out, but if you comment it coppermine will work with SEF |
Quote:
But still, there is one serious problem. Mambo pages with Coppermine looks fine but other Mambo pages will lost some of the graphics hardcoded with relative URL (because we commented the base href). Is there any alternatives in solving this problem? not from Mambo side, but from the Coppermine side? |
| All times are GMT -7. The time now is 08:55. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.