SEF_URLs plugin for cpg1.5.x - Page 4 SEF_URLs plugin for cpg1.5.x - Page 4
 

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

SEF_URLs plugin for cpg1.5.x

Started by Joachim Müller, March 26, 2007, 06:56:46 PM

Previous topic - Next topic

0 Members and 6 Guests are viewing this topic.

ThunderBolt

Hi, how can I make it work with the "File Replace" plugin?

The normal link to replace is: http://gallerylink.com/displayimage.php?replacer_pid=39546
And with SEF it's: http://gallerylink.com/displayimage-2376-39546.html?replacer_pid=39546

The SEF link doesn't work and I don't understand much about htaccess.

Thanks!

nickelas

Ok, heres an attempt for swedish


if ($sef_language == 'swedish')
            {
$urlname = str_replace('%C3%A4','ae',$urlname);
$urlname = str_replace('%C3%84','Ae',$urlname);
$urlname = str_replace('%C3%A5','aa',$urlname);
$urlname = str_replace('%C3%85','Aa',$urlname);
$urlname = str_replace('%C3%B6','oe',$urlname);
$urlname = str_replace('%C3%96','Oe',$urlname);
}


Do the replacements have to be language-specific?
Human

Timos-Welt

It's just a performance thing - it doesn't make any sense to replace characters like åäö in an english speaking gallery. Every str_replace needs time and server performance. That's why I only implemented these for german umlauts ÄÖÜäöüß, and only do the replacement if language really is german.

Αndré

Quote from: ThunderBolt on July 25, 2010, 10:46:19 AM
Hi, how can I make it work with the "File Replace" plugin?

The normal link to replace is: http://gallerylink.com/displayimage.php?replacer_pid=39546
And with SEF it's: http://gallerylink.com/displayimage-2376-39546.html?replacer_pid=39546

The SEF link doesn't work and I don't understand much about htaccess.
What happens if you click on the SEF link?

nickelas

Quote from: Timos-Welt on July 26, 2010, 01:35:07 PM
It's just a performance thing - it doesn't make any sense to replace characters like åäö in an english speaking gallery. Every str_replace needs time and server performance. That's why I only implemented these for german umlauts ÄÖÜäöüß, and only do the replacement if language really is german.

I see, but how about english speaking gallery with "international" users?
Human

Timos-Welt

Give me a swedish language file / codebase snip, a swedish replacement list for special characters, a swedish htaccess.txt, and I will add it to the plugin. Give me complaints, and I will ignore them. It's really that easy. I don't speak swedish (although I wish I did with respect to your royal princesses).  ;D

ThunderBolt

Quote from: Αndré on July 26, 2010, 07:37:25 PM
What happens if you click on the SEF link?

Like a "loop", it goes back to the same page. If I click on "http://pics.britney.com.br/displayimage-2387-39701.html?replacer_pid=39701", it just "reload" the page.

nickelas

Quote from: Timos-Welt on July 26, 2010, 11:40:38 PM
Give me a swedish language file / codebase snip, a swedish replacement list for special characters, a swedish htaccess.txt, and I will add it to the plugin. Give me complaints, and I will ignore them. It's really that easy. I don't speak swedish (although I wish I did with respect to your royal princesses).  ;D

Great, I will try and come up with the files.
Princess is now off the market, but she has a sister  :)
Human

ThunderBolt

Quote from: ThunderBolt on July 25, 2010, 10:46:19 AM
Hi, how can I make it work with the "File Replace" plugin?

The normal link to replace is: http://gallerylink.com/displayimage.php?replacer_pid=39546
And with SEF it's: http://gallerylink.com/displayimage-2376-39546.html?replacer_pid=39546

The SEF link doesn't work and I don't understand much about htaccess.

Thanks!

Quote from: ThunderBolt on July 27, 2010, 12:08:12 AM
Like a "loop", it goes back to the same page. If I click on "http://pics.britney.com.br/displayimage-2387-39701.html?replacer_pid=39701", it just "reload" the page.


Anyone knows how can I fix it? =/

Thanks!

phill104

I've never tried those 2 together. In fact I have never used either of these plugins. Have you tried altering the order of the plugins?
It is a mistake to think you can solve any major problems just with potatoes.

ThunderBolt

Quote from: Phill Luckhurst on July 30, 2010, 11:13:26 PM
I've never tried those 2 together. In fact I have never used either of these plugins. Have you tried altering the order of the plugins?

Yes I did. I think that some changes need to be made on .htaccess, but I don't know much about it.

#
# Rewrite displayimage urls
#
RewriteRule displayimage-([a-z0-9]+)-([\-]?[0-9]+)-([\-]?[0-9]+)\.html(.*) displayimage.php?album=$1&cat=$2&pid=$3$4 [NC]

RewriteRule displayimage-([a-z0-9]+)-([\-]?[0-9]+)\.html(.*) displayimage.php?album=$1&pid=$2$3 [NC]

RewriteRule displayimage-([0-9]+)\.html(.*) displayimage.php?pid=$1$2 [NC]

RewriteRule slideshow-([0-9]+)-([\-]?[0-9]+)-([0-9]+)\.html(.*) displayimage.php?album=$1&pid=$2&slideshow=$3$4 [NC]

RewriteRule slideshow-([a-z]+)-([\-]?[0-9]+)-([0-9]+)-([0-9]+)\.html(.*) displayimage.php?album=$1&cat=$2&pid=$3&slideshow=$4$5 [NC]


Timos-Welt

Everything is ok there. I made a little change to the flie_replacer plugin, please try the latest SVN version:
Download SVN Version of File Replacer Plugin

Does this fix your problem?

Timos-Welt

Same was valid for the custom_thumb plugin, I changed that, too. There was something wrong with the changelog file as it seems (it was gone); I added it again.

ThunderBolt

Quote from: Timos-Welt on July 31, 2010, 07:00:52 PM
Everything is ok there. I made a little change to the flie_replacer plugin, please try the latest SVN version:
Download SVN Version of File Replacer Plugin

Does this fix your problem?

Yes, fixed! Thanks! :)

Αndré

Quote from: Timos-Welt on July 31, 2010, 07:10:25 PM
There was something wrong with the changelog file as it seems (it was gone); I added it again.
I deleted them, as they weren't complete and I personally don't need changelogs for my plugins, as I document the changes in the svn log. I'll delete that files again and release the new versions soon.

Bobses

Sef-urls_v1.4 plugin don't work for me: I receive only 404 error. I mention that is the only plugin enabled.
This is my incipient gallery: www.feroviarul.ro/foto
Any idea?

Αndré

Seems that the required htaccess file doesn't exist or contains error. Please check.

Bobses

First of all, thanks for your quick answer.
Second, you are right: .htacces doesn't exist. Well, it's easy to create it, but what will it contain?
Thanks.

Αndré

Please read the docs and look at the example files that are in the package.

Bobses

Hm, I can't edit previous post...
Well, I've renamed ht.txt in .htaccess, then I  copied this file in my gallery. Likes everything to be okay now, but I dont't like the urls:
Quotehttp://www.feroviarul.ro/foto/index-2.html
instead
Quotehttp://www.feroviarul.ro/foto/accidente
Can anything be done about it? I would like the url contain the category or file name... :) Is it too much? :)