September 02, 2010, 03:20:33 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: The wait is over - Coppermine 1.5.8 [stable] is here
It is with great pride that the Coppermine community announces to the world the immediate availability of Coppermine 1.5.8 stable. As a community of contributors, we have been through celebrations and tribulations. We have had fun, and we have worked hard. We have learned from and helped one another. What started two and a half years ago has grown into what we believe to be the finest PHP photo gallery yet.
[more]
   Home   Help Search Board rules Login Register  
Pages: [1] 2 3 4   Go Down
  Print  
Author Topic: SEF_URLs plugin for cpg1.4.x  (Read 46728 times)
0 Members and 1 Guest are viewing this topic.
Joachim Müller Topic starter
Dev Team member
****
Gender: Male
Germany Germany

Posts: 47735


aka "GauGau"


WWW
« on: September 08, 2007, 12:04:34 pm »

In all versions of cpg1.4.x before cpg1.4.13, the SEF_URL plugin used to be part of the coppermine package, although there are known issues with it. That's why the dev team decided to not bundle the SEF_URL plugin with cpg1.4.13 (and future versions) any longer.
Instead, it is available here for download. Please keep in mind that this plugin is still experimental and not recommended for production use.

What it does: this plugin makes search engine friendly URLs for index, thumbnails, and displayimage.php. It can only work on apache-driven webservers.
If you have issues using this plugin, uninstall it (using the plugin manager) and remove the .htaccess file from coppermine's root folder that the plugin has created.


[Edit GauGau 2010-03-05]
This plugin has been added to the subversion repository: http://coppermine.svn.sourceforge.net/viewvc/coppermine/branches/cpg1.4.x/plugins/

It has been updated as well to reflect the version checking routines in the plugin manager that are meant to make sure that galleries don't break because of plugins installed that aren't meant for that particular version of the gallery.

Download: https://sourceforge.net/projects/coppermine/files/Plugins/1.4.x/cpg1.4.x_plugin_sef-urls_v1.45.zip/download
[/Edit]
« Last Edit: March 05, 2010, 06:51:47 am by Joachim Müller » Logged
jaiak
Coppermine novice
*
Gender: Male
Posts: 34

Spanish


WWW
« Reply #1 on: October 02, 2007, 07:30:33 pm »

Where Can I download this plugin?
Logged
just_some_guy
Supporter
****
United Kingdom United Kingdom

Posts: 539


I am currently on holiday, back in a few weeks. :D


« Reply #2 on: October 02, 2007, 09:19:54 pm »

in spanish: ^^^ Allí ^^^ en la primero mensaje.

in english: ^^^ There  ^^^ in the first post.
Logged

Tambien, Hablo Español      PHP - Achieve Anything
"The Internet is becoming the town square for the global village of tomorrow. " - Bill Gates
Windows 7 Forums
jaiak
Coppermine novice
*
Gender: Male
Posts: 34

Spanish


WWW
« Reply #3 on: October 02, 2007, 10:17:15 pm »

Thanks just_some_guy!

I try this plugin with a new instalaccion of cpg1.4.13 and work ok.

This is my experience... my cpg is hosted in bluehost.com

Regards from spain!
Logged
just_some_guy
Supporter
****
United Kingdom United Kingdom

Posts: 539


I am currently on holiday, back in a few weeks. :D


« Reply #4 on: October 02, 2007, 10:18:26 pm »

de nada,
Logged

Tambien, Hablo Español      PHP - Achieve Anything
"The Internet is becoming the town square for the global village of tomorrow. " - Bill Gates
Windows 7 Forums
byrev
Coppermine newbie

Posts: 6


« Reply #5 on: October 16, 2007, 02:33:37 am »

Is not the best solution!!!

This link:
http://moka.t2i.info/displayimage-185-6.html

must become like this:

http://moka.t2i.info/Butterflys/Multi-Colored-Butterfly-on-Flowers-002/Multi-colored-Butterfly_display-16-0.html
Logged
Joachim Müller Topic starter
Dev Team member
****
Gender: Male
Germany Germany

Posts: 47735


aka "GauGau"


WWW
« Reply #6 on: October 16, 2007, 07:06:06 am »

You're welcome to re-write the plugin accordingly. Roll Eyes
Logged
byrev
Coppermine newbie

Posts: 6


« Reply #7 on: October 16, 2007, 06:21:19 pm »

yes but how can i retrive current album name for photo ?
Logged
Makc666
Translator
**
Gender: Male
Russian Federation Russian Federation

Posts: 1391


Русский (ISO-8859-1) - Russian - Ðóññêèé (Windows)


WWW
« Reply #8 on: December 01, 2007, 10:10:14 am »

I didn't know why this one fix -> http://forum.coppermine-gallery.net/index.php?topic=37271
was not included in archive in first post (version 1.1)
as GauGau said before:
Added suggested changes to devel branch. Can a dev team member confirm, so this can be applied to the stable branch as well?
and
Confirmed.

All sort codes are 2 digits, so the preg_match could be more specific, ie [a-z]{2} instead of [a-z]+

So I attached version 1.2 with these changes.

UPDATED: Search for the latest version in this thread.
« Last Edit: October 26, 2008, 10:46:29 pm by Makc666 » Logged

*Image Removed*  "А стукачков мы не любим!"

Официальный Русский Перевод - 1.4.x

[MOD] Restriction of email domains
cryptq1
Coppermine newbie

Posts: 6


« Reply #9 on: December 29, 2007, 01:53:43 pm »

Hi

Installed and works after an initial problem. Just in case anyone else has the problem, here's what happened and the solution.

I have CPG installed as a sub-directory within a Joomla install and use a bridge to link the two. After installation I had a 404 error. My error log showed the following :
Quote
Options ExecCGI is off in this directory: /home/xxx/public_html/copper/index.php

The problem was solved by adding the following to the .htaccess in the CPG directory:
Quote
Options +ExecCGI
just after:
Quote
Options FollowSymLinks SymLinksIfOwnerMatch
Logged
Phill Luckhurst
Administrator
*****
Gender: Male
United Kingdom United Kingdom

Posts: 2615



WWW
« Reply #10 on: December 29, 2007, 06:46:23 pm »

I tried this on Lycos and it caused a 500 server error locking me out of my test gallery. After deleting the .htaccess via ftp I was able to get back into pluginmgr and remove this plugin.
Logged

It is a mistake to think you can solve any major problems just with potatoes.
kidler
Coppermine newbie

Posts: 3


« Reply #11 on: January 04, 2008, 03:01:48 pm »

I greet.  After installation this plugin  near the test of the entry on the side: I ask for the help...

Code:
Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, test@test.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.
Logged
Nibbler
Dev Team member
****
Gender: Male
United Kingdom United Kingdom

Posts: 19724



« Reply #12 on: January 04, 2008, 03:10:16 pm »

Did you even read this thread? Delete the .htaccess file and uninstall the plugin.
Logged

I don't care about what they say, I won't live or die that way.
kidler
Coppermine newbie

Posts: 3


« Reply #13 on: January 04, 2008, 04:58:32 pm »

I greet. I did just so and nothing helped ....
Logged
TigerClaw
Coppermine novice
*
Posts: 28


« Reply #14 on: January 27, 2008, 04:22:59 pm »

I have installed the plugin it works correctly Smiley
I have two questions strictly related to the plugin:

1) The rewrite rule works correctly but when someone asks for the old URLs apache do not redirect the page to the new URLs. I tried to add R=301 to the option and modify the htaccess but without luck. Someone knows how to do it?

2)

yes but how can i retrive current album name for photo ?

Can we have an hint on how we can do it?  Huh

« Last Edit: January 27, 2008, 10:42:02 pm by TigerClaw » Logged
Makc666
Translator
**
Gender: Male
Russian Federation Russian Federation

Posts: 1391


Русский (ISO-8859-1) - Russian - Ðóññêèé (Windows)


WWW
« Reply #15 on: January 28, 2008, 02:52:11 pm »

I have installed the plugin it works correctly Smiley
I have two questions strictly related to the plugin:

1) The rewrite rule works correctly but when someone asks for the old URLs apache do not redirect the page to the new URLs. I tried to add R=301 to the option and modify the htaccess but without luck. Someone knows how to do it?
Maybe you forgot to install the plugin's part for .htaccess file?

For me old urls work without any problem.
  • SEF_URLs
    .../gallery/index-2.html
  • Normal URLs
    .../gallery/index.php?cat=2

2) Can we have an hint on how we can do it?  Huh
This one needs a total rewrite of plugin.
There is no easy implementation for the current version.
Logged

*Image Removed*  "А стукачков мы не любим!"

Официальный Русский Перевод - 1.4.x

[MOD] Restriction of email domains
Eirene
Coppermine newbie

Gender: Female
Posts: 2


WWW
« Reply #16 on: March 14, 2008, 06:02:19 am »

Thank you for this mod. I have instaled it on my gallery. It's working fine, but there is one problem.
The link for slide show must to look like "slideshow-[album]-[pid]-[interval].html", but the link is looking like "displayimage-[album]-[category]-[position].html?album=[album]&pid=[pid]&slideshow=[interval]".
And in file informathion fild the file link must be "displayimage-[pid].html", but in real it's "displayimage-[album]-[category]-[position].html?pos=-[pid]". Why this problem happen?
Logged
Makc666
Translator
**
Gender: Male
Russian Federation Russian Federation

Posts: 1391


Русский (ISO-8859-1) - Russian - Ðóññêèé (Windows)


WWW
« Reply #17 on: March 15, 2008, 12:20:03 pm »

Thank you for this mod. I have instaled it on my gallery. It's working fine, but there is one problem.
The link for slide show must to look like "slideshow-[album]-[pid]-[interval].html", but the link is looking like "displayimage-[album]-[category]-[position].html?album=[album]&pid=[pid]&slideshow=[interval]".
And in file informathion fild the file link must be "displayimage-[pid].html", but in real it's "displayimage-[album]-[category]-[position].html?pos=-[pid]". Why this problem happen?
Way be you use some custom skin?
Can you post the link to your gallery.
Logged

*Image Removed*  "А стукачков мы не любим!"

Официальный Русский Перевод - 1.4.x

[MOD] Restriction of email domains
Eirene
Coppermine newbie

Gender: Female
Posts: 2


WWW
« Reply #18 on: March 17, 2008, 01:56:19 pm »

I use my own skin, but I just changed template.html
This problem i resolved. I added some additional rules to "codebase.php":

Code:
$php = preg_replace('/displayimage-([a-z0-9]+)-([\-0-9]+)\.php\?album=([a-z0-9]+)(\&|\&)pos=([\-0-9]+)/i','displayimage-$3-$5.php',$php);

$php = preg_replace('/displayimage-([a-z0-9]+)-([\-0-9]+)-([\-0-9]+)\.php\?pos=-([0-9]+)/i','displayimage-$4.php',$php);
$php = preg_replace('/displayimage-([a-z0-9]+)-([\-0-9]+)\.php\?pos=-([0-9]+)/i','displayimage-$3.php',$php);

$php = preg_replace('/displayimage-([a-z0-9]+)-([\-0-9]+)-([\-0-9]+)\.php\?album=([a-z0-9]+)(\&|\&)cat=([\-0-9]+)(\&|\&)pid=([0-9]+)(\&|\&)slideshow=([0-9]+)/i','slideshow-$4-$6-$8-$10.php',$php);
$php = preg_replace('/displayimage-([a-z0-9]+)-([\-0-9]+)\.php\?album=([a-z0-9]+)(\&|\&)pid=([0-9]+)(\&|\&)slideshow=([0-9]+)/i','slideshow-$3-$5-$7.php',$php);

There is i also changed .html to .php, i'm feeling it's better for my site.
Logged
Makc666
Translator
**
Gender: Male
Russian Federation Russian Federation

Posts: 1391


Русский (ISO-8859-1) - Russian - Ðóññêèé (Windows)


WWW
« Reply #19 on: March 18, 2008, 07:01:15 pm »

I use my own skin, but I just changed template.html
This problem i resolved. I added some additional rules to "codebase.php":

Code:
$php = preg_replace('/displayimage-([a-z0-9]+)-([\-0-9]+)\.php\?album=([a-z0-9]+)(\&|\&)pos=([\-0-9]+)/i','displayimage-$3-$5.php',$php);

$php = preg_replace('/displayimage-([a-z0-9]+)-([\-0-9]+)-([\-0-9]+)\.php\?pos=-([0-9]+)/i','displayimage-$4.php',$php);
$php = preg_replace('/displayimage-([a-z0-9]+)-([\-0-9]+)\.php\?pos=-([0-9]+)/i','displayimage-$3.php',$php);

$php = preg_replace('/displayimage-([a-z0-9]+)-([\-0-9]+)-([\-0-9]+)\.php\?album=([a-z0-9]+)(\&|\&)cat=([\-0-9]+)(\&|\&)pid=([0-9]+)(\&|\&)slideshow=([0-9]+)/i','slideshow-$4-$6-$8-$10.php',$php);
$php = preg_replace('/displayimage-([a-z0-9]+)-([\-0-9]+)\.php\?album=([a-z0-9]+)(\&|\&)pid=([0-9]+)(\&|\&)slideshow=([0-9]+)/i','slideshow-$3-$5-$7.php',$php);

There is i also changed .html to .php, i'm feeling it's better for my site.

Eirene, thanks for your reply and code! Smiley
Logged

*Image Removed*  "А стукачков мы не любим!"

Официальный Русский Перевод - 1.4.x

[MOD] Restriction of email domains
Pages: [1] 2 3 4   Go Up
  Print  
 
Jump to:  

Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC
Page created in 0.153 seconds with 17 queries.