Support > cpg1.5 bridge contributions
Bridge for Joomla 1.5 ready
extrabigmehdi:
hi Joachim,
--- Quote ---That's why I suggested to bundle only the plugin and the bridge file with the release. Users would still have to visit your site to get the stuff that needs to go into the joomla folder.
--- End quote ---
The joomla component is very basic. All it does is displaying the {COPPERMINE_TEMPLATE_HTML} tag inside Joomla.
This way the bridge can capture Joomla output and replace this tag, by the output of the gallery.
There's even a way to use no joomla component at all, it just might be more complicated to explain.
--- Quote ---Another possible way would be to force end users to visit your site by giving out API keys (similar to what wordpress and akismet are doing) and performing a check against the API key in the bridge manager. This way, you could force the end user to visit your site as well. Imo your request is legitimate to force people to visit your site.
--- End quote ---
well that's a bit a weird solution. At least when people visit website they take few minutes to read some instruction.
All of this looks like a dumb problem :-[... Probably I should write true interesting articles, instead of giving away stuff, and then expecting people to come back.
--- Quote ---This way, much more users would learn about your bridge file imo.
--- End quote ---
Lot of people already know it I think.
But I guess people will adopt it more easily if it's officially supported by Coppermine.
--- Quote ---Why do you do that? That's not a bright move imo - you're deliberately ruining the additional security that is created by using Inspekt.
--- End quote ---
I'm not ruining the security introduced by Inspeckt at all.
But you have to be aware of the logic the bridge, that's why I bring this to your attention.
I proceed this way:
1- restore some superglobals
2- call the full joomla install (yep, joomla included like a 'vulgar' script).
3- destroy again superglobals.
Because I cannot predict how Joomla will handle all superglobals (that's a big CMS), I'm just giving it all the superglobals it can expect. In a similar way, Joomla destroy all globals at begin, and I have to bypass this otherwise all Coppermine globals will be destroyed and it won't work.
I think I've done my best regarding security , just be aware that the bridge is a different "beast". Joomla and Coppermine,
are both handling in different way security, and I'm just ensuring that security solutions adopted by both script is not breaking logic adopted by my bridge.
"Final problem", I currently know: Coppermine & Joomla are using same class PHPMailer. Usually Joomla doesn't load by default the
class PHPMailer, and hence no conflict occurs. But I got once a user complaining that a conflict occured .
I've told more or less all the potential problems.
Once you understand that the full Joomla install is included inside Coppermine by the bridge, you should realize all that it implies.
Joachim Müller:
Thanks for your patience to explain all those things to me. I must confess that I'm a complete novice when it comes to Joomla, so please bare with me.
--- Quote from: extrabigmehdi on March 20, 2009, 02:29:29 pm ---"Final problem", I currently know: Coppermine & Joomla are using same class PHPMailer. Usually Joomla doesn't load by default the
class PHPMailer, and hence no conflict occurs. But I got once a user complaining that a conflict occured .
--- End quote ---
This should be pretty easy to solve: we can savely rename "our" class or wrap it inside a if (!function_exists('function_name') {-construct.
I'll do that this weekend.
Joachim
phill104:
extrabigmehdi
I'd like to thank you for excellent bridge. It is the only one that works well and as such I have been using it for a long time now. It is so good to see that you are continuing development to coppermine 1.5 as I would be lost without your efforts. This bridge should enable a lot more users to integrate Coppermine and Joomla where before many struggled to apply the code changes. Keep up the good work.
As for people visiting your site, I'm sure people will still visit simply to get their themes sorted with your css integrator ( http://www.mehdiplugins.com/misc/cssintegrator.htm ), and get instructions on getting their themes to work properly. I'm sure if you included these links in the plugins details then you could increase traffic to your site.
Nibbler:
--- Quote from: Joachim Müller on March 20, 2009, 06:13:18 pm ---This should be pretty easy to solve: we can savely rename "our" class or wrap it inside a if (!function_exists('function_name') {-construct.
--- End quote ---
Renaming is safer. We don't want to end up using Joomla's copy of the class instead of our own.
Joachim Müller:
It should be safe to just rename the class, right?
Editing include/mailer.inc.php, finding
--- Code: ---$mail = new PHPmailer();
--- End code ---
and replacing that string with
--- Code: ---$mail = new cpg_PHPmailer();
--- End code ---
Then find
--- Code: ---class PHPMailer {
--- End code ---
and replace with
--- Code: ---class cpg_PHPMailer {
--- End code ---
Taking a closer look: we have another class named SMTP that might be there two times, so we'd have to rename that as well.
--- Quote from: Nibbler on March 20, 2009, 07:32:33 pm ---We don't want to end up using Joomla's copy of the class instead of our own.
--- End quote ---
Why not? They use PHPmailer as well. Couldn't we just wrap the two classes into corresponding if (!class_exists('class_name') {-code and get away with that? After all, the users of the joomla bridge warp "our" gallery into an entire CMS - the CMS should know what it is doing anyway.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version