Page 1 of 1

ImageGallery Tag and built-in pretty URL system doesn't work togther v.0.13?

Posted: Fri May 26, 2006 2:19 pm
by stijncatv
Does ImageGallery Tag and built-in pretty URL system work togther in CMSMS version 0.13? I did a default install and tried using the ImageGallery tag, only the thumbs show, but when you try clicking on a thumb to view large images it doesn't work I get a 404 error.

It look to be a URL error, I got ImageGallery to work by going into the config.php file and turning the internal pretty url system to "false" and now it works. But that's stupid that a tag that's included with the core cmsms doesn't function properly, is there some way this can be fixed to work with the internal pretty url sytem? Or am I doing someting wrong? Is there a way to turn off the pretty url system for one page? I guess that would be gay though, it should just work.

Re: ImageGallery Tag and built-in pretty URL system doesn't work togther v.0.13?

Posted: Fri May 26, 2006 4:00 pm
by Russ
I think you may need to have the {metadata} tag in the header in your template?

Russ

Re: ImageGallery Tag and built-in pretty URL system doesn't work togther v.0.13?

Posted: Fri May 26, 2006 4:26 pm
by tsw
the popup window is written with javascript and doesnt have base defined

as a quick fix youll need to change the javascript a bit

find this line:

Code: Select all

newWindow.document.write('<__html><head><title>'+title+'</title>');
and change it to this

Code: Select all

newWindow.document.write('<__html><head><title>'+title+'</title><base href="http://YOURDOMAINNAME.TLD/PATH/" />');
Ill try to figure out how to get that automagically be right ;)

I cant see why the plugin couldnt generate the javascript that generates that new window, but Ill dig into it later on

Re: ImageGallery Tag and built-in pretty URL system doesn't work togther v.0.13?

Posted: Fri May 26, 2006 4:39 pm
by stijncatv
I'm not using popup type just the default "click" type. It gives me a 404 error. I'm digging into the code for the ImageGallery to see if I can fix it so it works.

Re: ImageGallery Tag and built-in pretty URL system doesn't work togther v.0.13?

Posted: Fri May 26, 2006 4:54 pm
by tsw
oh, well I just fixed the popup :) (its now in svn)

Ill dig into click also

Re: ImageGallery Tag and built-in pretty URL system doesn't work togther v.0.13?

Posted: Fri May 26, 2006 6:01 pm
by stijncatv
Thanks, I got the click method working by changing the $self variable in the function.ImageGallery.php plugin file to

Code: Select all

$self = 'http://' . $GLOBALS['HTTP_HOST']. '/' . 'index.php?page=' . $GLOBALS['page'];

so it bascially just reverts the link back to the old method.

I'm sure some where in the code there is an easier way to get the old URL method, I'm just not familar with where everything is in cmsms.

What would be even cooler is to have the click and pop links for ImageGallery also use the "internal pretty url method" I'm sure this wouldn't be hard.