SEF_URLs plugin for cpg1.4.x SEF_URLs plugin for cpg1.4.x
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

SEF_URLs plugin for cpg1.4.x

Started by Joachim Müller, September 08, 2007, 01:04:34 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Joachim Müller

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]

jaiak


just_some_guy

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

in english: ^^^ There  ^^^ in the first post.
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

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!

just_some_guy

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


Joachim Müller

You're welcome to re-write the plugin accordingly. ::)

byrev

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

Makc666

#8
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:
Quote from: GauGau on October 20, 2006, 10:10:59 PM
Added suggested changes to devel branch. Can a dev team member confirm, so this can be applied to the stable branch as well?
and
Quote from: Nibbler on October 21, 2006, 01:10:45 AM
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.

cryptq1

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 :
QuoteOptions 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:
QuoteOptions +ExecCGI
just after:
QuoteOptions FollowSymLinks SymLinksIfOwnerMatch

phill104

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.
It is a mistake to think you can solve any major problems just with potatoes.

kidler

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

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.

Nibbler

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

kidler

I greet. I did just so and nothing helped ....

TigerClaw

#14
I have installed the plugin it works correctly :)
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)

Quote from: byrev on October 16, 2007, 07:21:19 PM
yes but how can i retrive current album name for photo ?

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


Makc666

Quote from: TigerClaw on January 27, 2008, 05:22:59 PM
I have installed the plugin it works correctly :)
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

Quote from: TigerClaw on January 27, 2008, 05:22:59 PM2) Can we have an hint on how we can do it?  ???
This one needs a total rewrite of plugin.
There is no easy implementation for the current version.

Eirene

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?

Makc666

Quote from: Eirene on March 14, 2008, 07: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?
Way be you use some custom skin?
Can you post the link to your gallery.

Eirene

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

$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.

Makc666

Quote from: Eirene on March 17, 2008, 02: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":

$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! :)