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

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.

cl9m

Thanks Makc666 that's work fine if we add "l;" to the end of line ...$html;  ;)

// 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',$html;


that will be hard to rewrite minicms url? index.php?file=minicms/cms&id=8  ???

Makc666

#41
Quote from: cl9m on October 25, 2008, 09:44:53 AM
Thanks Makc666 that's work fine if we add "l;" to the end of line ...$html;  ;)
Yes. This is my fault.  :-\

Download v1.43

QuoteHistory

v1.43 (2008.10.27) (Makc666)

- Fixed two misprints in codebase.php lines:
*** FROM ***
---------------------------------
$html = preg_replace('/thumbnails\.php\?album=search(\&|\&)search=([^"]+)/i','thumbnails-search-$2.html',$htm
---------------------------------
*** TO ***
---------------------------------
$html = preg_replace('/thumbnails\.php\?album=search(\&|\&)search=([^"]+)/i','thumbnails-search-$2.html',$html);
---------------------------------
*** FROM ***
---------------------------------
$html = preg_replace('/thumbnails\.php\?album=search(\&|\&)search=([^"]+)/i','search-thumbnails-$2.html',$htm
---------------------------------
*** TO ***
---------------------------------
$html = preg_replace('/thumbnails\.php\?album=search(\&|\&)search=([^"]+)/i','search-thumbnails-$2.html',$html);
---------------------------------

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.

Makc666

#42
Quote from: cl9m on October 25, 2008, 09:44:53 AM
// 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',$html;


that will be hard to rewrite minicms url? index.php?file=minicms/cms&id=8  ???

For codebase.php it will be smth like:
$html = preg_replace('/index\.php\?minicms/cms=([0-9]+)/i','minicms-index-$1.html',$html);

For ht.txt it will be smth like:
RewriteRule minicms-index-([0-9]+)\.html index.php?file=minicms/cms&id=$1 [NC]

cl9m


Makc666

Quote from: cl9m on October 27, 2008, 06:38:24 PM
i try it but it don't work  ???
1st, I corrected the second line. There were two "==" there.
2nd, which one didn't work?
3rd, give me the url to that plugin you are talking about.

I think it didn't work because that plugin is not the part of Coppermine and that is why the code for it will be different.
Also I think that codebase.php can not be able to help with this plugin.

cl9m

I corrected the second line. There were two "==" there but that's don't work, i've a white page with nothing, no links!

when i put the new ligne in codebase.php to coment all links work but not index.php?file=minicms/cms&id=2
//$html = preg_replace('/index\.php\?minicms/cms=([0-9]+)/i','minicms-index-$1.html',$html);

i've actually my photo gallery in localhost
but you can find this plugin to the plugin pack on source fourge it's called minicms
and you can see this url whose use minicms

http://ceconn.com/photo_gallery/index.php?file=minicms/cms&id=2

thanks for your help
( :-[ sorry for my little english i'm french )

cl9m

i've found another problem

with SEF URLs plugin you can change the language (of coppermine) only on the first gallerie's page.

Makc666

Quote from: cl9m on October 30, 2008, 09:17:54 AM
i've found another problem

with SEF URLs plugin you can change the language (of coppermine) only on the first gallerie's page.

cl9m, I was trying to make this one.
With the current URLs like "http://coppermine-gallery.net/demo/cpg14x/test.hml" where we have ".html" at the end there is no way to change languages on pages not like index.html
Sorry, but there is really nothing we can do about this one.

If we change the URL to snth like "http://coppermine-gallery.net/demo/cpg14x/test/" with out any ".html" at the end then I think we will be able to change language on any page.

cl9m


Joachim Müller

Post real links instead of dummy placeholders.

Makc666

SEF_URLs plugin for cpg1.4.x
LATEST VERSION IS IN THIS POST


QuoteHistory

v1.44 (2008.11.19) (Makc666)

- Fixed a misprint in History description for v1.43

- Fixed a misprint in ht.txt lines:
*** FROM ***
---------------------------------
RewriteRule thumbnails-search-(.*)\.html thumbnails.php?album=search&search=$1 [NC]
---------------------------------
*** TO ***
---------------------------------
RewriteRule search-thumbnails-(.*)\.html thumbnails.php?album=search&search=$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

mreider

Heya,

Thanks for all your work on this!

I've managed to install it with partial success - It will rewrite the links accordingly, however when I click on any of them, it generates a 404 error. The URL's and links all look correct though.

I'm using cpg 1.4.5, and your latest download.

Any ideas what could be causing the 404's? I'm thinking it's something to do with the codebase.php, since it appears the mod_rewrite rules are all working correctly.

phill104

Quote from: mreider on December 16, 2008, 08:00:24 PM


I'm using cpg 1.4.5, and your latest download.


You mean you have upgraded to 1.4.19 I hope and are not using 1.4.5?
It is a mistake to think you can solve any major problems just with potatoes.

mreider

Lol - yes, I always get the version numbers mixed up. I've upgraded to that latest one - 1.4.19 :)

Makc666

Quote from: mreider on December 16, 2008, 08:00:24 PM
I've managed to install it with partial success - It will rewrite the links accordingly, however when I click on any of them, it generates a 404 error. The URL's and links all look correct though.
You didn't install .htaccess file or there is no mod_rewrite support on your server.

mreider

Thanks for replying - the mod_rewrite is enabled, and I use it on various other sections on my site.

I'm going to play around with the paths, maybe that's the issue.

mreider

Success! I had to change:

Options FollowSymLinks SymLinksIfOwnerMatch

to:
Options +FollowSymlinks -Indexes

mohamedimran

Dear Friends,

Help me to solve this problem...

Recently, I changed my coppermine gallery from One Hosting to Another Hosting.....
In the old hosting, i installed the SEF_URLs Plugin and it worked well. Now in New Hosting, if i tried to install the SEF_URLs Plugin means, i'm getting the "Internal Server Error", so i deleted the plugin.... But the problem is, upto the day i used to change the hosting, i submitted the site URLs (SEF_URLs) in many sites, now if i refer that old links i got error page.

Old URL : http://funnyimgs.co.cc/displayimage-134.html

New URL : http://funnyimgs.co.cc/displayimage.php?pos=-134

Please help me.... site losing it's traffic

Nibbler

Ask your host about mod_rewrite support.

mohamedimran

I contacted the host about mod_rewrite support and got replied that,

Quote
You may use mod_rewrite with no problems via an .htaccess file in your account with us. Unfortunately we do not offer third party scripts support and we will not be able to assist you properly in this situation.

Please let me know, how is this useful to give solution for my problem.....