SEF_URLs plugin for cpg1.5.x - Page 3 SEF_URLs plugin for cpg1.5.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.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.

Timos-Welt

I've added my changes to the SVN, including italian language and some performance optimizations. Please use the link to the SVN in the first post of this thread to download.

flapane

Flapane
www.flapane.com

Gallery
www.gallery.flapane.com

Timos-Welt

How about contributing your theme in exchange? ;)

Here's my gallery (german, with speaking URLs).

flapane

At the moment it's a real mess because I renewed my layout a month ago and the gallery actually it's a mix of both general website layout sheets and specific custom cpg css classess (which doesn't do nothing without the general website sheets), so it isn't exportable as a stand alone cpg theme.
After my summer exams and US trip I'll take a look and see how to export a stand alone theme. ;)
Flapane
www.flapane.com

Gallery
www.gallery.flapane.com

taucher_0815

Hi @ all!

I have a little problem with this Plugin:

The search via the Tag-Cloud is not working and when I uninstall the Plugin the Website still refers to index.html and not to index.php.

URL: http://www.sk-foto.info

Currently the Plugin is enabled and a manual Serarch for "adac" creates the following URL and displays all thumbs :http://www.sk-foto.info/thumbnails.php?search=adac&submit=suchen&album=search&title=on&newer_than=&caption=on&older_than=&keywords=on&type=AND

Clicking the tag in the cloud gives me this URL: http://www.sk-foto.info/thumbnails-search.html&keywords=on&search=adac and diplays this errormessage: The requested URL /search.php&keywords=on&search=adac was not found on this server.

attached is the current .htaccess-file.

taucher_0815

OK, got the stuff with the index.html resolved.
Config-error by me in the general settings.

Now the SEF-Plugin is disabled.

Timos-Welt

Thanks for your report, I've added the info to the known_issues file in the SVN.

Timos-Welt

Keyword search problem should be fixed in SVN (r7653).

taucher_0815

Confirmed working!

Many thanks for quick support!!!

flapane

Flapane
www.flapane.com

Gallery
www.gallery.flapane.com

Timos-Welt

I've added some more 'speaking' URL functionality to the SVN (for thumbnail pages and user profiles).

taucher_0815


Joe Carver

#52
Hello Timos,

I have a (small?) feature request.

Is it possible to rewrite the link "Album List"   ( index.php?cat=0   )
be different than the home page link?           (  index.php   )

At the moment it looks to be that both are rewritten to   ( index.html   )
when I have tried it myself and see on your gallery. (nice pictures!)

My reasons for asking are somewhat selfish - I have made 4 plugins that
need to have different values for:                 ( server->getRaw('REQUEST_URI')  )
This is for the plugin to know which page it is on because I have found that both pages are ( $cat = 0  )
for cpg and the plugin.

Any values that you choose a would be fine. The cpg 1.4 version used   (  index-0.html    )  but at
the same time did not rewrite the home page from index.php.

Thanks

Αndré

Afaik index.php?cat=0 and index.php have the same content. Why do you want to do different things with your plugin?

Joe Carver

It is actually to replace/remove/change duplicate content so when a visitor or search engine follows the link named "Album List" from the home page they see something different than the home page. Of course this could be done with custom theming or with code mods., but plugins are for the novice -> average user of cpg as you know.

These are the plugins' actions.

  • iScroll - moving display (partly inspired by slider) - show on home page only or all index.php?cat=xxx pages
  • anycontent.php - show on home page only
  • "Contents of the main page" - sequences/items changed/added/removed
  • <meta name="description" content="abc123"> in <head> - different on the two pages

All of the plugins are now on the User Contributed Plugins page. I have them running (more or less)
Here   and    Here (with a slightly modded SEF URL's plugin)

If the request is too late or difficult, I understand.

Thanks for asking

flapane

Is underscore allowed? In case I'd suggest an improved translation which fits better in the context:

FROM->TO:

inalto--> top
miniature--> album
contacto--> this was an error, it is spanish, I already suggested "contatto"
novitadi--> novita_di
migliore--> piu_votate
osservazionedi--> contributo_di
osservazione--> contributo
Flapane
www.flapane.com

Gallery
www.gallery.flapane.com

Timos-Welt

Quote from: Joe Carver on June 11, 2010, 11:21:19 PM
It is actually to replace/remove/change duplicate content so when a visitor or search engine follows the link named "Album List" from the home page they see something different than the home page.

Delete this line from codebase.php and you're fine:
    $html = preg_replace('/index\.php\?cat=0/i','index.html',$html);

Joe Carver


nickelas

Is there a config-setting for changing characters like åäö? I noticed ö is changed to oe in Timos link above, but my ö get removed.

http://uppsalafoto.se/galleri/
Human

Timos-Welt

It's this section in codebase.php that currently only works for german. Feel free to contribute rules for another language:
            if ($sef_language == 'german')
            {
              $urlname = str_replace('%C3%B6','oe',$urlname);
              $urlname = str_replace('%C3%BC','ue',$urlname);
              $urlname = str_replace('%C3%9F','ss',$urlname);
              $urlname = str_replace('%C3%A4','ae',$urlname);
              $urlname = str_replace('%C3%9C','Ue',$urlname);
              $urlname = str_replace('%C3%84','Ae',$urlname);
              $urlname = str_replace('%C3%96','Oe',$urlname);
            }