Textpattern CMS support forum

You are not logged in. Register | Login | Help

#341 2009-01-28 23:26:25

masa
Member
From: Asturias, Spain
Registered: 2005-11-25
Posts: 1,091

Re: smd_gallery: super-flexible gallery generator

Thanks Julián, much appreciated!

Offline

#342 2009-02-13 13:31:31

progre55
Member
Registered: 2006-05-02
Posts: 668

Re: smd_gallery: super-flexible gallery generator

Bloke (or anyone else)

I Have come across a problem that I am hoping I can get some assiatnce on. I am using smd_gallery which is awsome in conjunction with Aaron’s Slideshow2. See Sample Here The integration and everything else is working great. Please over look the minor details (ie thumbnails are not displaying fully) since this is only a sample.

My problem is this: If you put “www” in front of the domain name, it works perfect in IE and Firefox. If I take out “www” it works fine in IE, but does not work in Firefox. Now to add one more niggle to the equation, I can get it to work fine in Firefox without the “www” if I change the root field in TXP and remove the “www”, but then it breaks IE.

So the short of it is, I am not sure if this is a browser issue, a TXP, Aaron’s code; Bloke’s code (highly doubt it) or a combination. Any and all assitance would be appreciated.

I have listed below the code I am using just in case it helps:

HEADER CODE:

<script type="text/javascript" src="mootools.js"></script>
<script type="text/javascript" src="slideshow.js"></script>

PAGE CODE:

<txp:smd_gallery category="slideshowBloke" form="slideshowBloke" 
combo="imagecap::'{imagedef}': { 'caption': '{title}' }" collate="1" paramdelim="::" />

FORM CODE:

<div id="show" class="slideshow">
<img src="{imagepath#1}{imagedef#1}" alt="{alt#1}" />
</div>
<script type="text/javascript">
  var data = {{imagecap}};
  var myShow = new Slideshow('show', data, {captions: true, controller: true, height: 533, hu: '{imagepath#1}', thumbnails: true, width: 800 });
</script>

TXP ADMIN SITE URL SETTING:

www.progressivetechnology.net

Thanks in advance for your assistance.

Also, Bloke did you get my email? Let me know, because I have a question offline kinda about that same subject.

Last edited by progre55 (2009-02-13 13:34:44)

Offline

#343 2009-02-13 13:40:11

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,810
Website

Re: smd_gallery: super-flexible gallery generator

progre55 wrote:

If you put “www” in front of the domain name, it works perfect in IE and Firefox. If I take out “www” it works fine in IE, but does not work in Firefox.

This domain / subdomain issue has been mentioned somewhere in this thread (I think) but of course I can’t find it now. Typical!

From what I recall, it boils down to trust. If the way you specify the site domain, and/or the images, and /or the flash component don’t all match, the slideshow throws a fit becaues it thinks you are trying to scam it from a different domain.

Quite why it behaves differently in different browsers I have no idea. I think I’ve fixed it in the past by making sure that my site URL does not have a ‘www’ in it, and then forcing all URLs to remove ‘www’ via a fairly standard two-line .htaccess rule. Once everything was using the same system the problem went away (if you prefer, you can of course force the ‘www’ to be present). Try that and see if it helps. Check the source code of the page is rendering the images with/without the ‘www’ and everything is coherent.

And yes I did get your message yesterday thanks. Didn’t get a chance to look at it last night but I’ll try again later.

Last edited by Bloke (2009-02-13 13:42:25)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#344 2009-02-13 13:43:28

progre55
Member
Registered: 2006-05-02
Posts: 668

Re: smd_gallery: super-flexible gallery generator

Bloke:

Thanks for the quick response, I thought I had seen it to, but cannot find it myself in the thread.

I have tried several .htaccess versions (figuring that may be the answer) but each one I do breaks the site. If you would be so kind to post the .htaccess the code you would use it would be much apprecaited.

Once you have had a chnace to take a look at the other stuff, give me a shout.

progre55

Last edited by progre55 (2009-02-13 13:43:58)

Offline

#345 2009-02-13 13:49:09

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,810
Website

Re: smd_gallery: super-flexible gallery generator

progre55 wrote:

If you would be so kind to post the .htaccess the code you would use it would be much apprecaited.

My usual one is something along the lines of:

RewriteCond %{HTTP_HOST} ^www\.site\.com$ [NC,OR]
RewriteRule ^(.*)$ http://site.com/$1 [R=permanent,L]

Whether that’s the most efficient or best route is something I haven’t a clue about. .htaccess is a dark art. It just worked, so I never questioned it :-)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#346 2009-02-13 14:52:50

progre55
Member
Registered: 2006-05-02
Posts: 668

Re: smd_gallery: super-flexible gallery generator

Bloke:

I tried your code:

———————-

#DirectoryIndex index.php index.html

#Options +FollowSymLinks
#Options -Indexes

<IfModule mod_rewrite.c>
RewriteCond %{HTTP_HOST} ^www\.site\.com$ [NC,OR]
RewriteRule ^(.*)$ http://progressivetechnology.net/$1 [R=permanent,L]

RewriteEngine On #RewriteBase /relative/web/path/ RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^(.+) – [PT,L] RewriteCond %{REQUEST_URI} !=/favicon.ico RewriteRule ^(.*) index.php RewriteCond %{HTTP:Authorization} !^$ RewriteRule .* – [E=REMOTE_USER:%{HTTP:Authorization}]

</IfModule>

#php_value register_globals 0

——————

I get this error:

Redirect Loop

Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

The browser has stopped trying to retrieve the requested item. The site is redirecting the request in a way that will never complete.

If I put another domain in place of mine, it redirects to that domain with no problem.

I am sure it is something simple :) but can’t figure out why?

progre55

Last edited by progre55 (2009-02-13 14:53:34)

Offline

#347 2009-02-13 15:05:30

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,810
Website

Re: smd_gallery: super-flexible gallery generator

RewriteCond %{HTTP_HOST} ^www\.progressivetechnology\.net$ [NC,OR]
RewriteRule ^(.*)$ http://progressivetechnology.net/$1 [R=permanent,L]

… ?

Last edited by Bloke (2009-02-13 15:05:36)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#348 2009-02-13 15:13:58

progre55
Member
Registered: 2006-05-02
Posts: 668

Re: smd_gallery: super-flexible gallery generator

Bloke:

Tried that with same result.

I also tried this that I found on another post with no luck.

The search continues ….

Offline

#349 2009-02-13 15:30:12

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,810
Website

Re: smd_gallery: super-flexible gallery generator

Oh, duh, sorry. You also need to put the two lines (probably immediately) beneath the “RewriteEngine On” line ;-)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#350 2009-02-13 15:32:33

progre55
Member
Registered: 2006-05-02
Posts: 668

Re: smd_gallery: super-flexible gallery generator

Bloke:

Same error:

I am using the following file:

——————————-

#DirectoryIndex index.php index.html

#Options +FollowSymLinks
#Options -Indexes

<IfModule mod_rewrite.c>

RewriteEngine On RewriteCond %{HTTP_HOST} ^www\.progressivetechnology\.net$ [NC,OR] RewriteRule ^(.*)$ http://progressivetechnology.net/$1 [R=permanent,L] #RewriteBase /relative/web/path/

RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^(.+) – [PT,L]

RewriteCond %{REQUEST_URI} !=/favicon.ico RewriteRule ^(.*) index.php

RewriteCond %{HTTP:Authorization} !^$ RewriteRule .* – [E=REMOTE_USER:%{HTTP:Authorization}]

</IfModule>

—————————

#php_value register_globals 0

Offline

Board footer

Powered by FluxBB