SEF_URLs plugin for cpg1.5.x - Page 7 SEF_URLs plugin for cpg1.5.x - Page 7
 

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.5.x

Started by Joachim Müller, March 26, 2007, 06:56:46 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

profili

Thanks André.
I have another question. Is there any easy way to replace the words "thumbnails" with "foto" and "displayimage" with "img". The rest is fine for me, just those two want to change.

Αndré

You can of course replace them in codebase.php. But keep in mind to update the htaccess file, too. I don't know if it creates some odd behavior. I don't recommend to modify the plugin that way, nor can I assist you.

profili

I tried but it gives me errors.
Maybe the author of the plugin can say something more about this.

profili

Quote from: Αndré on June 05, 2010, 08:10:43 AM
Of course you can modify the plugin to only use that variant: http://coppermine-gallery.net/demo/cpg15x/displayimage.php?pid=6 - but that limits the functionality of Coppermine substantially.

Could you achieve this? I don't really care about the meta-albums. Maybe a little hack could be useful for those like me.

alanz01

I have noticed some interaction behavior with this plug-in and other plug-ins that when installed include a button to go to the support thread here at the board. This issue was briefly mentioned on pages 1 and 2 of this thread but it looks like it was dropped with no further comment.

If I examine the support thread URL in the php code of a given plug-in, the URL will look something like this:

http://forum.coppermine-gallery.net/index.php/topic,42568.0.html

but what gets displayed in the far lower left browser window and what gets sent to the server is:

http://forum.coppermine-gallery.net/index.html/topic,42568.0.html

which generates a 404 because the "index.php" portion of the URL is converted to "index.html."

Is there some way I can exclude the conversion of "index.php" to "index.html" in the case of URLs that point to this forum?
CPG 1.5.12 / Curve Theme / modified color scheme
Plugins (in order):
- External Tracker 2.6
- Social Sharing 1.5
- First Visit Hint 1.0
- Add Meta Description 1.5
- SEF URLs
- Image Preloader 1.4

Walkinman

Hey Folks,

Excellent plugin, thank you.

I've installed it, and it's working well, no issues at all, on cpg1.5.12 for me.

One query I have is can I, and if so how, remove the first and last underscore from the text it writes?

Example:

http://www.skolaiimages.com/stock/thumbnails-92-_Wrangell_St_Elias_National_Park_Coastal_R.html

if possible, without too much hassle, I'd like it to read

http://www.skolaiimages.com/stock/thumbnails-92-Wrangell_St_Elias_National_Park_Coastal_R.html

or

http://www.skolaiimages.com/stock/thumbnails-92_Wrangell_St_Elias_National_Park_Coastal_R.html

If the album name is shorter than the truncated point, then I get:

http://www.skolaiimages.com/stock/thumbnails-13-_Grizzly_Bears_Photos_.html

which I'd like to be:

http://www.skolaiimages.com/stock/thumbnails-13-Grizzly_Bears_Photos.html

Is something like this possible? I'd really rather the underscores all the regular dashes, like

http://www.skolaiimages.com/stock/thumbnails-13-Grizzly-Bears-Photos.html

but that's not a big concern, and I figure that would involve quite a big more hacking to configure, no?
I looked at the htaccess file, but wasn't sure where or how to make these changes. Everything I tried didn't work.

Thanks so much.

Cheers

Carl

lineart


How i can auto-add "file name" (such as nice_picture.jpg) in page adress?

Sample:

in codebase.php

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

and in .htaccess

RewriteRule nice_picture-([a-z0-9]+)-([\-]?[0-9]+)\.html displayimage.php?album=$1&pos=$2 [NC]

Help or explain me please.. ???


Walkinman

Hey Folks,

This is probably needless, but the query I asked above is solved. Extra underscores are gone. Please continue to ignore this post.

Cheers

Carl

alanz01

What did you do to solve it? I would like to have the same feature.
CPG 1.5.12 / Curve Theme / modified color scheme
Plugins (in order):
- External Tracker 2.6
- Social Sharing 1.5
- First Visit Hint 1.0
- Add Meta Description 1.5
- SEF URLs
- Image Preloader 1.4

Walkinman

Hey Alanz01,

What did I do? this. :)

I wish I could tell you. Foulu did the work, and I'm not sure entirely what he did, but solved it right up.

Cheers

Carl

Αndré

Quote from: Walkinman on April 05, 2011, 01:46:42 AM
Foulu did the work, and I'm not sure entirely what he did
You could try find out the changes with a diff viewer. I suggest to do that asap, otherwise your gallery will become one of many galleries that lacks many versions behind, because the administrators have paid somebody to install/customize their gallery and they don't know how to update their galleries.

Walkinman

Hey André

Thanks - yes, I'll see if I can find out. I'm putting out fires one at a time, and right now, that info is not too high on my list, but I'll try to see if I can find out as I get some other, more pressing, things attended to.

Cheers

Carl

Walkinman

hey Folks,

I haven't had time to sift through it yet and see what might have been changed, but I'll upload the codebase.php file from my site and you're free to see if it works for you. I believe that is the only file that has changed.

See attached file.

Cheers

Carl

alanz01

Looks like the changes are at lines 229 to 234 and lines 248 to 251 of the new codebase.php
CPG 1.5.12 / Curve Theme / modified color scheme
Plugins (in order):
- External Tracker 2.6
- Social Sharing 1.5
- First Visit Hint 1.0
- Add Meta Description 1.5
- SEF URLs
- Image Preloader 1.4

elwave

hm, I enabled this but nothing seems to have changed. However if I edit this bit:

#  Uncomment the following line if your webserver's
#  URL is not directly related to physical file paths.
#  Update "YOUR_COPPERMINE_ROOT" (just / for root)

# RewriteBase /


I definitely get a reaction (usually it breaking in some way lol)

My gallery is simply at /home/xxxxx/public_html/gallery, and it seemed to edit the .htaccess file just fine when I enabled it. Do I need to change the RewriteBase line? I would guess not...

Hm, I wonder why nothing is renamed!

I'll have to continue to investigate this o.O


pols1337

Hi,

Sorry if this is a stupid question  :( but do I need to do anything after I install plug-in?  The sef_url is installed, but I am still getting the old url's. 

I didn't see any instructions included in the plug-in package, and I read through most of the forum  :-[

pols1337


Timos-Welt

No, normally you don't need to do anything with this plugin. It consists out of two components:
- a page filter will replace all links in each coppermine page with SEF ones
- a .htaccess-file will make your Apache webserver re-translate them

The .htaccess file can be overwritten when installing this plugin (if it already exists), and you will be ask if it should be deleted when uninstalling it.

I recommend to place it as the last plugin in the chain, meaning to move it all the way down on plugin manager page in the list of installed plugins.

pols1337

I am using the plug-in from the first post of this topic, and it's still not working  :(

I feel kinda stupid, since I don't know what's wrong.  I checked with my webserver and my website is on a Linux server running Apache, so that's okay.  SEF_URL is also the last plug-in.

Stupid question, but it seems like there should be a .htaccess file created in the root of my Coppermine gallery, correct?  I don't see this file.