Bridge for Joomla 1.08+ (free) by Mehdi Bridge for Joomla 1.08+ (free) by Mehdi
 

News:

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

Main Menu

Bridge for Joomla 1.08+ (free) by Mehdi

Started by extrabigmehdi, April 12, 2006, 09:29:41 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

extrabigmehdi

Hi ,
I was not satisfied by already existings bridging solution  between Coppermine and Joomla ...
So I've develloped my own bridge ...
It works well with current versions ie: joomla 1.08 and coppermine  1.44

I hope you don't mind , but I choosed to release files and "official" explanations on my website only.
Get all required stuff at this link:

http://www.mehdiplugins.com/misc/

EDIT:
FAQ added here:
http://www.mehdiplugins.com/misc/cpgjoomfaq.html

EDIT2:
5 october 2006,
added an online script to quickly fix the CSS of the Coppemine template when
integrated inside joomla template. here:
http://www.mehdiplugins.com/misc/cssintegrator.htm
Hopefully , it would help  people  to fix the CSS of their Coppermine theme  faster, in the context of a visual
integration inside Joomla.  Also it could help newbies that know nothing about CSS.

Added "fixed"   style2.css for classic theme in the zip package.

Improved navigation in the menu of my website. ( so that  people are less lost between all the links)

8 january 2008
EDIT 3:
I've opened a new thread, because   I offer a bridge that  support Joomla 1.5 rc4 too.
here: http://forum.coppermine-gallery.net/index.php?topic=49586.0

Cheers, Mehdi   ;)

PS: the download link works only if javascript is enabled

n0fear2

GREAT!!! Thanks alot i am sure you will make alot of people happy! BUT i have a great Problem, the bridge works for me and a couple of users but most get only a blank page even when going direktly to /index.php of the gallery (without any wrapping in joomla) very strange.. one user even told it works in IE and not in Firefox at his place.. others dont get it to work in any Browser. Well anyone got a idee what that could be? It does NOT matter on the users or anything, i tryed with an user account too .(

extrabigmehdi

Hi ,
I also got a mail , on which a guy was complaining of a similar problem..

So it works for some user and not for others ?
That's quite wierd.
Do they belong to the same "user group" ?

Do you have sef url enabled ? Try to disable this...

You said that for a user it works in explorer and not  in firefox ?
Try to play with option "Session Authentication Method" in server tab , from global configuration in Joomla.

Also try to clean your cookies,  in your browser.... (ask for user experiencing such problems to do so)

Aso maybe this bridge does not work well in conjunction with community builder (I don't use it)
or anything that may affect how the "standard joomla" login.

That's all I have in mind.
Maybe you can post the link or PM so I can take a further look.

The best would be to find how to reproduce the bug.


n0fear2

Thanks for your fast answer. I am the same guy that wrote you. Its like that: it has nothing to do with the login because even if they logout and kill all cookies (or ar guests) they get only a blank site where the gallery should be. I did all with Session Authentication and so on like "Backward compatiblity" and so on... did not work. strange thing is it worx on some users. Must be a stupid little bug. You can test if YOU can see it (i do, but most users dont ;) here:  http://www.hochrhein.biz/index.php?option=com_wrapper&Itemid=80

btw. i also tryed with template integration did not work too.

btw. listen, what i found out is - i tried to get to bridgemanager "start bridge assistant" on such a computer (where it did not work) and clicking on that button (start bridge assistant) did not open anything. Maybe it has something to to with it!?

n0fear2

Update: i tested with debug mode and with original templates, makes no difference. As soon as the bridge is activated it does not print anything out for most users and guests. All joomla users are shown as reistered in coppermine at least ;) Well i am not a coder but i guess this is a strange bug and hope you can help finding it.. would be really really nice! ... could you answer me per eMail or did you got a icq account maybe?

extrabigmehdi

Well I've took a look a at the page you showed me and I just don't see any problem either ....
Ask these user having troubles to test if they still have a problem when browsing your website through a proxy.
This proxy: http://www.unipeak.com/
Other suggestion: you should delete the index.html file you have put in your gallery folder.
When I take a look  directely to the gallery folder, i.e: http://www.hochrhein.biz/galerie
I see a blank page,  because of this file.

You can send me a mail by filling the contact form on my website.


Joachim Müller

@extrabigmehdi: Is it OK to download your mod and attach it to this thread, inc case your site goes down?

extrabigmehdi

My website won't go down .... I use  a good hosting service (not a cheap one).
I'd like to benefit a minimum from  the exclusivity.... (some traffic ...)
You may integrate this bridge on your next release of coppermine...  :-\
but I'm not in a hurry for this.

n0fear2

Quote from: extrabigmehdi on April 14, 2006, 08:11:15 PM
Well I've took a look a at the page you showed me and I just don't see any problem either ....
Ask these user having troubles to test if they still have a problem when browsing your website through a proxy.
This proxy: http://www.unipeak.com/
Other suggestion: you should delete the index.html file you have put in your gallery folder.
When I take a look  directely to the gallery folder, i.e: http://www.hochrhein.biz/galerie
I see a blank page,  because of this file.

You can send me a mail by filling the contact form on my website.

Well it works over www.unipeak.com but only direktly to http://www.hochrhein.biz/galerie   (i deleted the html - but had linked to index.php before) coz we use a javascript menu that does not load over unipeak. So now we are here:

http://www.hochrhein.biz/galerie direktly does not work for guests/registered
http://www.hochrhein.biz/galerie over a proxy works for all...

any idee now? It isnt our server coz without bridging it works. Hope you can help mate



n0fear2

Friend of mine testet it with wget and it works, so i guess it could be a http1.1 protocoll problem or a useragent switch/check  .. the 2nd one would be the soulution why it worx with anonymous proxie or!?

extrabigmehdi

Hi n0fear2,
I have another suggestion:
add the line :

error_reporting(E_ERROR);

or if you want a more detailed output of the error (i.e  with warnings )
the line :

error_reporting(E_ALL);

at the begining of your joomla.inc.php script and see error you get.
More details  concerning error_reporting function here.

You are probably getting a blank page because of a fatal error,
but your current php configuration doesn't allow to display it by default.
Getting an output of the error would help.
At least try to locate the "exit point" of the script, i.e where this script stop it's execution.
I usually add on the script many lines like:  echo "whatever string";
If one string is not displayed, then the script has ended before that string.
Well, work a bit, do some debugging....  ;)
If I was able to reproduce the problem I would do this myself, but that's not the case.  ;D

The problem doesn't seems obvious  since its appearition depends of the location of the user who connects to your
gallery. My only suggestion for this would have been to play with option "Session Authentication Method" in server tab from Joomla.
But you said it fix nothing.


n0fear2

Oki cool, i will build that in this afternoon and look if i can get more infos and post here. Btw. just be curious, did you wrote me back on email? Just to know if its got lost coz of spam filter or if you did not write back yet.

extrabigmehdi

#12
Hi, n0fear2 and anyone having the "blank page" problem...
I hope that's not a "wicked bug" appearing randomly and  that concerns everyone,
but instead a bug appearing only for specific php versions.
There's too much similar bugs reported on http://bugs.php.net/ , so I couldn't find
which one  could exactly match this one.

I think I have a solution ... (In fact someone sent me by mail  the trick) . BUT be aware that this solution is not
perfect and that it has at least a small drawback (if you don't discover others).


At the begining of your joomla.inc.php script just add:

<?php
error_reporting
(E_ERROR); //avoid any warning concerning headers
echo " "//output a white space, will kill all following headers. Also cookies unfortunately
?>



What the fix does ? It  allows to discard any headers sent by joomla.
Unfortunately, joomla won't be  able also to write any cookie.
Despites this, you are still able to connect ...
Why ? Because the login form redirect you to the index.php file of Joomla which will be able to create
the cookie.  The joomla's index.php  page will itself redirect you to the gallery page.

Now here's a small "bug" you'll observe with this fix :
Copy the direct url to your gallery in your "url bar".
Clean all your cookies.
Close your browser.
Re-open you browser.
Now paste the direct url to your gallery in the url bar.
Try to login.
The first attempt will fail. (not the second)

Why ? because joomla needs to create a first "test cookie"
before allowing the user to login.
That's not possible if you go directely to your gallery page.
However   you won't notice any problem if you visit any
page of your website before.

I'm not aware of any Joomla's module requiring cookies
to work, but if that's the case you'll also have a problem.

cheers Mehdi

PS: I didn't recieved any mail from n0fear2. I always check my junk mail.
Is it the fault of my hotmail inbox ?

AvrilBoi

I did everything, deleted cookie, modified Session Authentication Method, I also modified joomla.inc.php... but I still get (i don't think this can help, but I say it: i haven't made any album yet):
-everything if i visit through unipeak.com
-blank page from firefox
-this from opera (in english it is "random images - no image to show ||| last upload - no image to show)
-blank page from IE
???

haligi

Mehdi and all,

I was having the same problem.  I was about to say that this might be worth more problem than it's worth, until I went to the joomla global configuration tab.  From there, I disabled "GZIP Page Compression".  This seems to have helped.

Hope this pointer helps.


extrabigmehdi

Thanks haligi,
I hope your suggestion will make a difference for AvrilBoi.
Personnally  it just changes nothing on my website...

AvrilBoi

#16
Thank you so much haligi, without GZip compression it works well!
I've some questions now:
1) In my theme folder (waterdrop) i don't have theme.css, but style.css... what should i exactly do?
2) I didn't convert any charset and i see everything correctly... so... can i continue without converting the coppermine charset? And if i want to, can i do it through phpmyadmin, and how? (I've searched for this on the net, but i didn't find nothing, and the few things i found weren't clear to understand)
p.s. sorry for my eventual bad english, but i'm italian

n0fear2

#17
Quote from: extrabigmehdi on April 16, 2006, 04:36:49 PM
Hi, n0fear2 and anyone having the "blank page" problem...
I hope that's not a "wicked bug" appearing randomly and  that concerns everyone,
but instead a bug appearing only for specific php versions.
There's too much similar bugs reported on http://bugs.php.net/ , so I couldn't find
which one  could exactly match this one.

I think I have a solution ... (In fact someone sent me by mail  the trick) . BUT be aware that this solution is not
perfect and that it has at least a small drawback (if you don't discover others).


At the begining of your joomla.inc.php script just add:

<?php
error_reporting
(E_ERROR); //avoid any warning concerning headers
echo " "//output a white space, will kill all following headers. Also cookies unfortunately
?>



What the fix does ? It  allows to discard any headers sent by joomla.
Unfortunately, joomla won't be  able also to write any cookie.
Despites this, you are still able to connect ...
Why ? Because the login form redirect you to the index.php file of Joomla which will be able to create
the cookie.  The joomla's index.php  page will itself redirect you to the gallery page.

Now here's a small "bug" you'll observe with this fix :
Copy the direct url to your gallery in your "url bar".
Clean all your cookies.
Close your browser.
Re-open you browser.
Now paste the direct url to your gallery in the url bar.
Try to login.
The first attempt will fail. (not the second)

Why ? because joomla needs to create a first "test cookie"
before allowing the user to login.
That's not possible if you go directely to your gallery page.
However   you won't notice any problem if you visit any
page of your website before.

I'm not aware of any Joomla's module requiring cookies
to work, but if that's the case you'll also have a problem.

cheers Mehdi

PS: I didn't recieved any mail from n0fear2. I always check my junk mail.
Is it the fault of my hotmail inbox ?

I wrote you over the contact form on your page. Please contact me at info@hochrhein.biz  thx!... btw. this <

?php
error_reporting(E_ERROR); //avoid any warning concerning headers
echo " "; //output a white space, will kill all following headers. Also cookies unfortunately
?>

did not make ANY difference! BUT... disabling GZIP in Joomla fixed the bug.. but WHY? What has gzip in joomla to do with the gallery? Because if i have gzip Enabled in Joomla even the direkt link for a guest in /galerie  does not work.. if its disabled ALL works... is there any chance to disbale gzip ONLY in the bridge mate?

So bug seams to be the GZIP header or something in the Bridge not correctly working in some browser versions - not in FF but in some Versions of IE. Would be cool if you could try to fix that so we can enable gzip again (rest of the site it works since month without any problems)... thank you all alot for helping!

extrabigmehdi

Hi,
let me first answer to AvrilBoi.
1) there was a mistake on my page, it was style.css and style2.css. I've just made the correction.
2) charset conversion.... If you write only in  english in your gallery and in your joomla website, you probably don't have to bother.
I mean you don't use special characters like: é à ç ù ê î .... But  it's better to have the same charset setting for your coppermine gallery and joomla.

Now to n0fear2,
I prefer to answer directly in this forum (you can pm me, if there's something really special & private  )
I don't know why Gzip is inducing problems; but in general I prefer to avoid all these nice extra in Joomla,
that are not necessary to let Joomla work.
Personally I don't have any problem with Gzip but I still prefer to avoid it.

Now to the question:
Quote
Is there any chance to disbale gzip ONLY in the bridge mate?

Well here's a suggestion. Edit the index.php of your Joomla's site and
after the line :

require_once( 'configuration.php' );

just add the line:

if (defined('IN_COPPERMINE')) $mosConfig_gzip = '0';


If you don't use visual integration, then edit the index2.php file instead.

n0fear2

Cool. Does that hack disable DZIP only on the coppermine pages? Will try this. Well since i disabled the GZIP none of the visitors got any problem anymore. Would be interesting to test on your site if you want and if you got gzip activated.