Advanced search  

News:

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

Pages: [1] 2 3 4   Go Down

Author Topic: SEF_URLs plugin for cpg1.4.x  (Read 110925 times)

0 Members and 2 Guests are viewing this topic.

Joachim Mller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
SEF_URLs plugin for cpg1.4.x
« on: September 08, 2007, 01: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, 07:51:47 am by Joachim Mller »
Logged

jaiak

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 34
  • Spanish
    • Spanish Young People Electronic Music and Concerts
Re: SEF_URLs plugin for cpg1.4.x
« Reply #1 on: October 02, 2007, 08:30:33 pm »

Where Can I download this plugin?
Logged

just_some_guy

  • Supporter
  • Coppermine addict
  • ****
  • Offline Offline
  • Posts: 539
  • I am currently on holiday, back in a few weeks. :D
Re: SEF_URLs plugin for cpg1.4.x
« Reply #2 on: October 02, 2007, 10:19:54 pm »

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

in english: ^^^ There  ^^^ in the first post.
Logged
Tambien, Hablo Espaol      PHP - Achieve Anything
"The Internet is becoming the town square for the global village of tomorrow. " - Bill Gates
Windows 7 Forums

jaiak

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 34
  • Spanish
    • Spanish Young People Electronic Music and Concerts
Re: SEF_URLs plugin for cpg1.4.x
« Reply #3 on: October 02, 2007, 11: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
  • Coppermine addict
  • ****
  • Offline Offline
  • Posts: 539
  • I am currently on holiday, back in a few weeks. :D
Re: SEF_URLs plugin for cpg1.4.x
« Reply #4 on: October 02, 2007, 11:18:26 pm »

de nada,
Logged
Tambien, Hablo Espaol      PHP - Achieve Anything
"The Internet is becoming the town square for the global village of tomorrow. " - Bill Gates
Windows 7 Forums

byrev

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Logged

Joachim Mller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: SEF_URLs plugin for cpg1.4.x
« Reply #6 on: October 16, 2007, 08:06:06 am »

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

byrev

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: SEF_URLs plugin for cpg1.4.x
« Reply #7 on: October 16, 2007, 07:21:19 pm »

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

Makc666

  • Translator
  • Coppermine addict
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 1608
  • Русский (ISO-8859-1) - Russian - (Windows)
    • Makc's home page
Re: SEF_URLs plugin for cpg1.4.x
« Reply #8 on: December 01, 2007, 11: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, 11:46:29 pm by Makc666 »
Logged

cryptq1

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: SEF_URLs plugin for cpg1.4.x
« Reply #9 on: December 29, 2007, 02: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
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4482
    • Windsurf.me
Re: SEF_URLs plugin for cpg1.4.x
« Reply #10 on: December 29, 2007, 07: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
  • Offline Offline
  • Posts: 3
Re: SEF_URLs plugin for cpg1.4.x
« Reply #11 on: January 04, 2008, 04:01:48 pm »

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

Code: [Select]
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

  • Guest
Re: SEF_URLs plugin for cpg1.4.x
« Reply #12 on: January 04, 2008, 04:10:16 pm »

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

kidler

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: SEF_URLs plugin for cpg1.4.x
« Reply #13 on: January 04, 2008, 05:58:32 pm »

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

TigerClaw

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 28
Re: SEF_URLs plugin for cpg1.4.x
« Reply #14 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?

2)

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

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

« Last Edit: January 27, 2008, 11:42:02 pm by TigerClaw »
Logged

Makc666

  • Translator
  • Coppermine addict
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 1608
  • Русский (ISO-8859-1) - Russian - (Windows)
    • Makc's home page
Re: SEF_URLs plugin for cpg1.4.x
« Reply #15 on: January 28, 2008, 03:52:11 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

2) 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.
Logged

Eirene

  • Coppermine newbie
  • Offline Offline
  • Gender: Female
  • Posts: 2
    • Markiz.Net
Re: SEF_URLs plugin for cpg1.4.x
« Reply #16 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?
Logged

Makc666

  • Translator
  • Coppermine addict
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 1608
  • Русский (ISO-8859-1) - Russian - (Windows)
    • Makc's home page
Re: SEF_URLs plugin for cpg1.4.x
« Reply #17 on: March 15, 2008, 01: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

Eirene

  • Coppermine newbie
  • Offline Offline
  • Gender: Female
  • Posts: 2
    • Markiz.Net
Re: SEF_URLs plugin for cpg1.4.x
« Reply #18 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":

Code: [Select]
$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
  • Coppermine addict
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 1608
  • Русский (ISO-8859-1) - Russian - (Windows)
    • Makc's home page
Re: SEF_URLs plugin for cpg1.4.x
« Reply #19 on: March 18, 2008, 08: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: [Select]
$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! :)
Logged
Pages: [1] 2 3 4   Go Up
 

Page created in 0.024 seconds with 21 queries.