Advanced search  

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]

Pages: 1 [2] 3 4   Go Down

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

0 Members and 1 Guest are viewing this topic.

Makc666

  • Translator
  • Coppermine addict
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 1614
  • Русский (ISO-8859-1) - Russian - Ðóññêèé (Windows)
    • Makc's home page
Search Engine Friendly URLs v1.3
« Reply #20 on: June 03, 2008, 02:04:23 pm »

Search Engine Friendly URLs v1.3

History
v1.3 (2008.06.03) (Makc666)


---------------------------------
Lines added to: codebase.php
---------------------------------
- $html = preg_replace('/thumbnails\.php\?album=lastupby(\&|\&)uid=([0-9]+)/i','thumbnails-lastupby-$2.html',$html);
- $html = preg_replace('/thumbnails\.php\?album=lastcomby(\&|\&)uid=([0-9]+)/i','thumbnails-lastcomby-$2.html',$html);
- $html = preg_replace('/displayimage\.php\?album=lastupby(\&|\&)cat=([\-0-9]+)(\&|\&)pos=([\-0-9]+)(\&|\&)uid=([0-9]+)/i','displayimage-lastupby-$2-$4-$6.html',$html);
- $html = preg_replace('/displayimage\.php\?album=lastcomby(\&|\&)cat=([\-0-9]+)(\&|\&)pos=([\-0-9]+)(\&|\&)uid=([0-9]+)/i','displayimage-lastcomby-$2-$4-$6.html',$html);
- $html = preg_replace('/displayimage\.php\?pid=([\-0-9]+)(\&|\&)fullsize=1/i','displayimage-$1-fullsize.html',$html);
- $html = preg_replace('/profile\.php\?uid=([0-9]+)/i','profile-$1.html',$html);
- $html = preg_replace('/ratepic\.php\?pic=([0-9]+)(\&|\&)rate=([0-5])/i','ratepic-$1-$3.html',$html);
---------------------------------

---------------------------------
Lines added to: ht.txt
---------------------------------
- RewriteRule thumbnails-lastupby-([a-z0-9]*)\.html thumbnails.php?album=lastupby&uid=$1 [NC]
- RewriteRule thumbnails-lastcomby-([a-z0-9]*)\.html thumbnails.php?album=lastcomby&uid=$1 [NC]
- RewriteRule displayimage-lastupby-([\-]?[0-9]+)-([\-]?[0-9]+)-([0-9]+)\.html displayimage.php?album=lastupby&cat=$1&pos=$2&uid=$3 [NC]
- RewriteRule displayimage-lastcomby-([\-]?[0-9]+)-([\-]?[0-9]+)-([0-9]+)\.html displayimage.php?album=lastcomby&cat=$1&pos=$2&uid=$3 [NC]
- RewriteRule displayimage-([\-]?[0-9]+)-fullsize\.html displayimage.php?pid=$1&fullsize=1 [NC]
- RewriteRule profile-([0-9]*)\.html profile.php?uid=$1 [NC]
- RewriteRule ratepic-([0-9]*)-([0-5])\.html ratepic.php?pic=$1&rate=$2 [NC]
---------------------------------

Fixes for:

1. User Name link is now ok on page:
http://coppermine-gallery.net/demo/cpg14x/displayimage.php?pos=-367
In line:
Code: [Select]
Album name: RedFalcon / Architecture
2. When you click on that User Name you get to page:
http://coppermine-gallery.net/demo/cpg14x/profile.php?uid=22286
On that page two links:
  • Last uploaded file. Click to see all uploads by RedFalcon
  • Last comment. Click to see all comments made by RedFalcon
now also have a correct links

3. When you click on any of this two links:
  • Last uploaded file. Click to see all uploads by RedFalcon
  • Last comment. Click to see all comments made by RedFalcon
you get to page:
http://coppermine-gallery.net/demo/cpg14x/thumbnails.php?album=lastupby&uid=22286
or
http://coppermine-gallery.net/demo/cpg14x/thumbnails.php?album=lastcomby&uid=22286

Urls on that pages are now also OK.

4. Fullsize images now also have Friendly URLs
http://coppermine-gallery.net/demo/cpg14x/displayimage.php?pid=325&fullsize=1

How to Update:
  • Backup your Galleries .htaccess file
  • Delete Old Version via Config
  • Re-apload plugin's files with new one
  • Update manually .htaccess if you have your own lines there, or you can update it automatically via plugin's install if you don't have such lines
  • Install New Vesion via Config with overwriting .htaccess if you don't have your own lines there

UPDATED: Search for the latest version in this thread.
« Last Edit: October 26, 2008, 11:47:16 pm by Makc666 »
Logged

Makc666

  • Translator
  • Coppermine addict
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 1614
  • Русский (ISO-8859-1) - Russian - Ðóññêèé (Windows)
    • Makc's home page
Re: SEF_URLs plugin for cpg1.4.x
« Reply #21 on: June 03, 2008, 03:38:16 pm »

I just have update the archive again:

4. Fullsize images now also have Friendly URLs
http://coppermine-gallery.net/demo/cpg14x/displayimage.php?pid=325&fullsize=1

---------------------------------
Lines added to: codebase.php
---------------------------------
- $html = preg_replace('/displayimage\.php\?pid=([\-0-9]+)(\&|\&)fullsize=1/i','displayimage-$1-fullsize.html',$html);
---------------------------------

---------------------------------
Lines added to: ht.txt
---------------------------------
- RewriteRule displayimage-([\-]?[0-9]+)-fullsize\.html displayimage.php?pid=$1&fullsize=1 [NC]
---------------------------------
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: SEF_URLs plugin for cpg1.4.x
« Reply #22 on: June 03, 2008, 05:36:04 pm »

Please do always count up the version instead of just replacing the archive. There is a reason why we use version numbers.
Logged

Makc666

  • Translator
  • Coppermine addict
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 1614
  • Русский (ISO-8859-1) - Russian - Ðóññêèé (Windows)
    • Makc's home page
Re: SEF_URLs plugin for cpg1.4.x
« Reply #23 on: June 03, 2008, 09:02:03 pm »

Please do always count up the version instead of just replacing the archive. There is a reason why we use version numbers.
Joachim, it was a quick update as I thought.
« Reply #20 on: Today at 16:04:23 »
« Reply #21 on: Today at 17:38:16 »

At the beginning I think that I have to set it 1.31 but then I decided that 1 hour change didn't worth it :)

But I will of course try to follow your advice in the future :)
Logged

marecki

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: SEF_URLs plugin for cpg1.4.x
« Reply #24 on: September 17, 2008, 04:23:01 pm »

I think there is a problem with SEF plugin.

Take a look: http://www.kocjan.pl/index-4.html Album "Wystawa Makiet Rybnik 2008" (second row, first from the left) contains 46 files.
When you open this album or follow link http://www.kocjan.pl/thumbnails-64.html you can see... 97 files :(

Is there a problem with gallery, or with plugin?
Logged

Nibbler

  • Guest
Re: SEF_URLs plugin for cpg1.4.x
« Reply #25 on: September 17, 2008, 04:42:44 pm »

Neither. I expect you are using the linked files (album keywords) feature. Not related to this plugin.
Logged

marecki

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: SEF_URLs plugin for cpg1.4.x
« Reply #26 on: September 17, 2008, 05:30:18 pm »

You're right. I've changed keywords and now it seems to be ok.
Logged

cl9m

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 118
Re: SEF_URLs plugin for cpg1.4.x
« Reply #27 on: October 08, 2008, 03:58:58 pm »

I try to improve sef url plugin

but i don't understand all in the codebase.php

in codebase.php i add
// Rewrite thumbnails.php?album=lastupby&uid=[userid] URLs to thumbnails-lastupby-[userid]-page-[page].html
$html = preg_replace('/thumbnails\.php\?album=lastupby(\&|\&)uid=([0-9]+)page=([0-9]+)/i','thumbnails-lastupby-$2-page-$3.html',$html);

and .ht i add
RewriteRule thumbnails-lastupby-([a-z0-9]*)-page-([0-9]*)\.html thumbnails.php?album=lastupby&cat=$0&uid=$1&page=$2 [NC]

Please can you tell me what's wrong  :-[
Logged

Makc666

  • Translator
  • Coppermine addict
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 1614
  • Русский (ISO-8859-1) - Russian - Ðóññêèé (Windows)
    • Makc's home page
Re: SEF_URLs plugin for cpg1.4.x
« Reply #28 on: October 08, 2008, 05:10:47 pm »

I will check this one tomorrow or today at night and will help you.
As I can see there is some other places need to be fixed for v1.3
Logged

cl9m

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 118
Re: SEF_URLs plugin for cpg1.4.x
« Reply #29 on: October 13, 2008, 11:36:32 am »

Makc666

the problem is we can't go to page 2 of last update by user
http://www.mywebsite.com/thumbnails-lastupby-0.html&uid=3&page=2
Logged

Makc666

  • Translator
  • Coppermine addict
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 1614
  • Русский (ISO-8859-1) - Russian - Ðóññêèé (Windows)
    • Makc's home page
Re: SEF_URLs plugin for cpg1.4.x
« Reply #30 on: October 13, 2008, 12:43:41 pm »

Makc666

the problem is we can't go to page 2 of last update by user
http://www.mywebsite.com/thumbnails-lastupby-0.html&uid=3&page=2
Search Engine Friendly URLs

Quote
History

v1.4 (2008.10.13) (Makc666)

- Lines added to: codebase.php
---------------------------------
Code: [Select]
// Rewrite thumbnails.php?album=lastupby&cat=[category]&uid=[userid]&page=[page] URLs to thumbnails-lastupby-[category]-[userid]-page-[page].html
$html = preg_replace('/thumbnails\.php\?album=lastupby(\&|\&)cat=([0-9]+)(\&|\&)uid=([0-9]+)(\&|\&)page=([0-9]+)/i','thumbnails-lastupby-$2-$4-page-$6.html',$html);

// Rewrite thumbnails.php?album=lastcomby&cat=[category]&uid=[userid]&page=[page] URLs to thumbnails-lastcomby-[category]-[userid]-page-[page].html
$html = preg_replace('/thumbnails\.php\?album=lastcomby(\&|\&)cat=([0-9]+)(\&|\&)uid=([0-9]+)(\&|\&)page=([0-9]+)/i','thumbnails-lastcomby-$2-$4-page-$6.html',$html);
---------------------------------

- Lines added to: ht.txt
---------------------------------
Code: [Select]
RewriteRule thumbnails-lastupby-([0-9]+)-([0-9]+)-page-([0-9]+)\.html thumbnails.php?album=lastupby&cat=$1&uid=$2&page=$3 [NC]
RewriteRule thumbnails-lastcomby-([0-9]+)-([0-9]+)-page-([0-9]+)\.html thumbnails.php?album=lastcomby&cat=$1&uid=$2&page=$3 [NC]
---------------------------------

- Lines changed in: ht.txt
*** FROM ***
---------------------------------
Code: [Select]
RewriteRule thumbnails-lastupby-([a-z0-9]*)\.html thumbnails.php?album=lastupby&uid=$1 [NC]
RewriteRule thumbnails-lastcomby-([a-z0-9]*)\.html thumbnails.php?album=lastcomby&uid=$1 [NC]
---------------------------------
*** TO ***
---------------------------------
Code: [Select]
RewriteRule thumbnails-lastupby-([0-9]+)\.html thumbnails.php?album=lastupby&uid=$1 [NC]
RewriteRule thumbnails-lastcomby-([0-9]+)\.html thumbnails.php?album=lastcomby&uid=$1 [NC]
---------------------------------

How to Update:
  • Backup your Galleries .htaccess file
  • Delete Old Version via Config
  • Re-apload plugin's files with new one
  • Update manually .htaccess if you have your own lines there, or you can update in automatically via plugin's install if you don't have such lines
  • Install New Vesion via Config with overwriting .htaccess if you don't have your own lines there

UPDATED: Search for the latest version in this thread.
« Last Edit: October 26, 2008, 11:47:25 pm by Makc666 »
Logged

cl9m

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 118
Re: SEF_URLs plugin for cpg1.4.x
« Reply #31 on: October 15, 2008, 01:38:24 pm »

for user contrib i found this post : http://forum.coppermine-gallery.net/index.php/topic,50834.0.html

that's change http://www.mysitename.com/thumbnails-lastupby-3.html by  http://www.mysitename.com/-username-

that's interesting for the future version of SEF_URLs plugin
Logged

cl9m

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 118
Re: SEF_URLs plugin for cpg1.4.x
« Reply #32 on: October 15, 2008, 06:09:05 pm »

under picture there is tag with link for search when it's a date it does'nt work

http://www.mywebsite.com/thumbnails-search-2006.html :-[

can you tell me what wrong?

Logged

Makc666

  • Translator
  • Coppermine addict
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 1614
  • Русский (ISO-8859-1) - Russian - Ðóññêèé (Windows)
    • Makc's home page
Re: SEF_URLs plugin for cpg1.4.x
« Reply #33 on: October 15, 2008, 10:34:15 pm »

for user contrib i found this post : http://forum.coppermine-gallery.net/index.php/topic,50834.0.html

that's change http://www.mysitename.com/thumbnails-lastupby-3.html by  http://www.mysitename.com/-username-

that's interesting for the future version of SEF_URLs plugin
The original author of "Search Engine Friendly URLs" don't use queries to database.
The MOD you pointed to maked queries to database.
Also there can be, for example, Russian usernames with Cyrillic letters.
There will be also some sort of problem here.

So I don't see this on in future implementation list because of the current specific structure.
Logged

Makc666

  • Translator
  • Coppermine addict
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 1614
  • Русский (ISO-8859-1) - Russian - Ðóññêèé (Windows)
    • Makc's home page
Re: SEF_URLs plugin for cpg1.4.x
« Reply #34 on: October 15, 2008, 10:41:32 pm »

under picture there is tag with link for search when it's a date it does'nt work
http://www.mywebsite.com/thumbnails-search-2006.html :-[
can you tell me what wrong?
Download v1.41

Quote
History

v1.41 (2008.10.16) (Makc666)

- Changed in file ht.txt quantifier '*' to '+' for all instances, because quantifier '+' means > 1
More you can read here http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html#RewriteRule
This change just a cosmetic one

- Move in file ht.txt the line of code
---------------------------------
Code: [Select]
RewriteRule thumbnails-search-(.*)\.html thumbnails.php?album=search&search=$1 [NC]---------------------------------
from line #58 to line #42
not to conflict with another rule

=================================
How to Update:
  • Backup your Galleries .htaccess file
  • Delete Old Version via Config
  • Re-apload plugin's files with new one
  • Update manually .htaccess if you have your own lines there, or you can update in automatically via plugin's install if you don't have such lines
  • Install New Vesion via Config with overwriting .htaccess if you don't have your own lines there

UPDATED: Search for the latest version in this thread.
« Last Edit: October 26, 2008, 11:47:36 pm by Makc666 »
Logged

cl9m

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 118
Re: SEF_URLs plugin for cpg1.4.x
« Reply #35 on: October 16, 2008, 09:09:43 am »

Quote
The original author of "Search Engine Friendly URLs" don't use queries to database.
The MOD you pointed to maked queries to database.
Also there can be, for example, Russian usernames with Cyrillic letters.
There will be also some sort of problem here.

So I don't see this on in future implementation list because of the current specific structure.

ok I understand

thanks so much for v1.41
Logged

cl9m

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 118
Re: SEF_URLs plugin for cpg1.4.x
« Reply #36 on: October 16, 2008, 09:43:32 am »

I know SEF URLs plugin is in beta version

and i've found another probleme  :-[

http://www.mywebsite.com/thumbnails-search-0-page-2.html

I try to repare it myself when i add in the codebase.php
Code: [Select]
$html = preg_replace('/thumbnails\.php\?album=search(\&|\&)cat=([0-9]+)(\&|\&)uid=([0-9]+)(\&|\&)page=([0-9]+)/i','thumbnails-search-$2-$4-page-$6.html',$html);

and in .ht
Code: [Select]
RewriteRule thumbnails-search-([0-9]+)-([0-9]+)-page-([0-9]+)\.html thumbnails.php?album=search&cat=$1&uid=$2&page=$3 [NC]
but that doesn't works can you tell me what's worng?  ???
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: SEF_URLs plugin for cpg1.4.x
« Reply #37 on: October 16, 2008, 05:09:57 pm »

Why don't you post a real URL instead of a dummy placeholder?
Logged

cl9m

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 118
Re: SEF_URLs plugin for cpg1.4.x
« Reply #38 on: October 16, 2008, 05:45:34 pm »

For the moment my project is configurate in locallost
Logged

Makc666

  • Translator
  • Coppermine addict
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 1614
  • Русский (ISO-8859-1) - Russian - Ðóññêèé (Windows)
    • Makc's home page
Re: SEF_URLs plugin for cpg1.4.x
« Reply #39 on: October 16, 2008, 06:07:14 pm »

I know SEF URLs plugin is in beta version

and i've found another probleme  :-[

http://www.mywebsite.com/thumbnails-search-0-page-2.html
Download v1.42

Quote
History

v1.42 (2008.10.17) (Makc666)

- Changed in file ht.txt line:
*** FROM ***
---------------------------------
Code: [Select]
RewriteRule thumbnails-search-(.*)\.html thumbnails.php?album=search&search=$1 [NC]---------------------------------
*** TO ***
---------------------------------
Code: [Select]
RewriteRule search-thumbnails-(.*)\.html thumbnails.php?album=search&search=$1 [NC]---------------------------------

- Changed in file codebase.php lines:
*** FROM ***
---------------------------------
Code: [Select]
// Rewrite thumbnails.php?album=search&search=[searchterm] URLs to thumbnails-search-[searchterm].html
$html = preg_replace('/thumbnails\.php\?album=search(\&|\&)search=([^"]+)/i','thumbnails-search-$2.html',$htm
---------------------------------
*** TO ***
---------------------------------
Code: [Select]
// Rewrite thumbnails.php?album=search&search=[searchterm] URLs to search-thumbnails-[searchterm].html
$html = preg_replace('/thumbnails\.php\?album=search(\&|\&)search=([^"]+)/i','search-thumbnails-$2.html',$htm
---------------------------------

UPDATED: Search for the latest version in this thread.
« Last Edit: October 26, 2008, 11:47:59 pm by Makc666 »
Logged
Pages: 1 [2] 3 4   Go Up
 

Page created in 0.037 seconds with 21 queries.