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 5 6 ... 11   Go Down

Author Topic: SEF_URLs plugin for cpg1.5.x  (Read 214845 times)

0 Members and 1 Guest are viewing this topic.

Fabricio Ferrero

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 1996
  • From San Juan, Argentina, to the World!
    • http://fabricioferrero.com/
Re: SEF_URLs plugin for cpg1.5.x
« Reply #20 on: February 05, 2010, 05:07:25 pm »

Please read the known issues txt file!
My bad! I did it very fast. (I shouldn't post till I get real results.)


'.html' is correct, as you can see in your address bar: http://forum.coppermine-gallery.net/index.php/topic,42568.0.html
Is not. If you go to the plugin manager you'll see this url: http://forum.coppermine-gallery.net//index.html/topic,42568.0.html the "index.html" in the middle is not correct. SMF works with "index.php" in its URLs.


For you as a native speaker you just open ht-spanish.txt with a plain text editor and review each line like
Code: [Select]
RewriteRule busca.html(.*) search.php$1 [NC]if "busca" is actually the correct translation for "search" or if it should read buscar or busco. Pretty straightforward ;)
Thanks ;) I'll do.

I'll post when I got more results, and will correct some wording mistakes.
Logged
Read Docs and Search the Forum before posting. - Soporte en español
--*--
Fabricio Ferrero's Website

Catching up! :)

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: SEF_URLs plugin for cpg1.5.x
« Reply #21 on: February 05, 2010, 05:27:40 pm »

If you go to the plugin manager you'll see this url: http://forum.coppermine-gallery.net//index.html/topic,42568.0.html the "index.html" in the middle is not correct. SMF works with "index.php" in its URLs.
Sorry, I didn't notice the 'index.html' in the middle ;)
Logged

papukaija

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 333
Re: SEF_URLs plugin for cpg1.5.x
« Reply #22 on: February 05, 2010, 10:20:03 pm »

I found a bug in codebase.php at lines 84-87:
Code: [Select]
   $html = preg_replace('/index\.php\?cat=([0-9]+)(\&|\&)page=([0-9]+)/i','index-$1-'.$str_page.'-$3.html',$html);
    $html = preg_replace('/index\.php\?cat=0/i','/index.html',$html);
    $html = preg_replace('/index\.php\?cat=([0-9]+)/i','index-$1.html',$html);
    $html = preg_replace('/index\.php/i','/index.html',$html);
which should be:
Code: [Select]
   $html = preg_replace('/index\.php\?cat=([0-9]+)(\&|\&)page=([0-9]+)/i','index-$1-'.$str_page.'-$3.html',$html);
    $html = preg_replace('/index\.php\?cat=0/i','index.html',$html);
    $html = preg_replace('/index\.php\?cat=([0-9]+)/i','index-$1.html',$html);
    $html = preg_replace('/index\.php/i','index.html',$html);

The difference is that the slash (in the second and fourth line) points the albumlist link to the webserver's root folder which might not be Coppermine's root folder. As a consequence, the user may get a 404 page or an other page which isn't powered by Coppermine.
Logged

Timos-Welt

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 808
    • Timos-Welt
Re: SEF_URLs plugin for cpg1.5.x
« Reply #23 on: February 06, 2010, 11:07:19 am »

Thanks for your report, fixed in SVN.
Logged

Timos-Welt

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 808
    • Timos-Welt
Re: SEF_URLs plugin for cpg1.5.x
« Reply #24 on: February 08, 2010, 09:59:02 am »

Update to v1.8 attached to first post
Logged

flapane

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 251
    • Flavio's page
Re: SEF_URLs plugin for cpg1.5.x
« Reply #25 on: June 04, 2010, 11:58:22 am »

Let's consider an image link created using this plugin:
http://www.test.com/gallery/displayimage-7-505.html#top_display_media

Shouldn't be more SEO-ish substituting the number (7) after "displayimage-" with the album name, and the number just after (505) with the title of the photo, if any?
Google really likes it.
« Last Edit: October 02, 2014, 09:33:37 pm by flapane »
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.5.x
« Reply #26 on: June 04, 2010, 12:28:06 pm »

That's actually a feature request for a totally different approach. Has been requested before, and the answer remains the same: you're welcome to code that if you need it badly. See http://forum.coppermine-gallery.net/index.php/topic,61471.0.html and similar threads...
The main disadvantage is stability: if you base a URL on the textual content of a page and the textual content changes (i.e. the user who uploaded the image and has got editing powers is not aware of this mechanism), the URL will change and all static links to the old URL will become invalid, which is a very bad thing in terms of search engine friendliness. It would therefore not be a bright idea imo to completely rely on the title of the pic, i.e. it would be bad to get rid of the album and picture ID from the URL generated. Relevance in terms of search engine friendliness doesn't decrease with numbers in the URL.
Logged

flapane

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 251
    • Flavio's page
Re: SEF_URLs plugin for cpg1.5.x
« Reply #27 on: June 04, 2010, 12:30:39 pm »

No, I don't need it badly, it was a suggestion only, I was glad to propose an idea in the same way I'm glad to contribute to the translations. In SEO optic, it would be a more interesting approach to experiment.
Thanks, anyway...

profili

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 113
Re: SEF_URLs plugin for cpg1.5.x
« Reply #28 on: June 04, 2010, 04:47:02 pm »

Will this plugin add permanent link to each photo?
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: SEF_URLs plugin for cpg1.5.x
« Reply #29 on: June 04, 2010, 04:55:45 pm »

Will this plugin add permanent link to each photo?
Coppermine has a permanent link out of the box. Just look at the file information.
Logged

profili

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 113
Re: SEF_URLs plugin for cpg1.5.x
« Reply #30 on: June 05, 2010, 02:03:39 am »

Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: SEF_URLs plugin for cpg1.5.x
« Reply #31 on: June 05, 2010, 08:10:43 am »

You need that additional information in the link, to determine what you're currently doing (viewing an album, viewing an meta album like 'recent uploads', search, etc.). So you need different url's to that one image. The pid parameter is always the same for each single file.

So maybe the answer is 'no'. 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.
Logged

Timos-Welt

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 808
    • Timos-Welt
Re: SEF_URLs plugin for cpg1.5.x
« Reply #32 on: June 05, 2010, 11:21:33 am »

This a beta version!

New in version 2.0beta:
- Speaking URL functionality. This means that if you like, the picture title (or its filename if no title is given) will be included into the URL.

Open codebase.php with a text editor and configure the plugin as you wish (lines 42-45) before installing it.

Please note:
The previous versions of this plugin are not 100% stable, and this beta may be even more unstable. So please test carefully before installing this in a productive gallery.

Edit: Removed file, use latest SVN snapshout from first post instead
« Last Edit: June 05, 2010, 01:08:46 pm by Timos-Welt »
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.5.x
« Reply #33 on: June 05, 2010, 11:29:33 am »

These are everything, but not permalinks :)
Really? Then what are they in your opinion? They are permanent URLs - they won't go down or change dynamically - that's what a permalink is by definition. You are right though if you claim that those different URLs all lead to the same content and that there will be a penalty for double content. But: that's a different animal.

SEOed links are not just links with .html in the end!
That's an entirely different animal. First of all, you appear to be repeating things that you seem to have read somewhere without critically looking at this. Search engine friendliness is being achieved using several techniques, which vary in as much as search engine ranking mechanisms are constant subject to change. Some years ago, search engines slightly prefered links with a trailing .htm or .html, as this used to be a guarantee for a static page. SEO techniques adopted to that and delivered dynamic sites using the extension .htm. Do your really think that the folks in Mountainview, CA are that supid? They are of course aware of this and therefore there is no longer a bonus for pages with that extension. The recommendation that you could read on SEO pages that was valid some years ago is still out there and you can read it in many places: the recommendation to create pages with the extension .htm(l). As suggested, that's no longer the case. For search engine relevance, you need textual content and keyword density (among some other things). That's one of the reasons why this plugin has been dropped from the core.
You are welcome to discuss things here, but I suggest you do not lecture us on SEO basics unless you have fully understood them.

- Speaking URL functionality. This means that if you like, the picture title (or its filename if no title is given) will be included into the URL.
Good work Timo!

Open codebase.php with a text editor and configure the plugin as you wish (lines 42-45) before installing it.
Do you plan to implement a config page for this plugin in a later version?
Logged

flapane

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 251
    • Flavio's page
Re: SEF_URLs plugin for cpg1.5.x
« Reply #34 on: June 05, 2010, 11:30:45 am »

Thanks for having followed my tip.
Works here: http://www.test.com/gallery/displayimage-7-493-_Memoriale_WW2_.html#top_display_media

Will track it down in the next weeks any weird behaviours.
The sitemaps generator still seems to work good.
« Last Edit: October 02, 2014, 09:33:47 pm by flapane »
Logged

flapane

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 251
    • Flavio's page
Re: SEF_URLs plugin for cpg1.5.x
« Reply #35 on: June 05, 2010, 11:43:52 am »

Anyway, you can add a new translation:

       $str_thumbnails = 'miniature';
        $str_displayimage = 'mostra';
        $str_toprated = 'migliore';
        $str_topn = 'popolari';
        $str_lastcomby = 'commento_di';
        $str_lastcom = 'commento';
        $str_page = 'pagina';
        $str_profile = 'profilo';
        $str_lastupby = 'novita_di';
        $str_lastup = 'novita';
        $str_search = 'cerca';
        $str_contact = 'contatti';
        $str_tdm = 'in_alto';
        $str_usermgr = 'lista_utenti';

Timos-Welt

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 808
    • Timos-Welt
Re: SEF_URLs plugin for cpg1.5.x
« Reply #36 on: June 05, 2010, 11:47:26 am »

$str_lastcom = 'commento';
Will not work because the english word comment is included. Any other italian word with the same meaning?
Logged

flapane

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 251
    • Flavio's page
Re: SEF_URLs plugin for cpg1.5.x
« Reply #37 on: June 05, 2010, 11:53:02 am »

Nota (note) or Osservazione are the closest in the synonim dictionary.

Timos-Welt

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 808
    • Timos-Welt
Re: SEF_URLs plugin for cpg1.5.x
« Reply #38 on: June 05, 2010, 11:57:20 am »

Good work Timo!
Do you plan to implement a config page for this plugin in a later version?

Thanks. Yes that would be nice, but I think ATM the user has to manually edit files anyways (setting RewriteBase in ht file for example), so it's acceptable this way, especially in a beta version and in the context of this plugin, that surely is not adequate for absolute beginners with Coppermine/Apache.
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.5.x
« Reply #39 on: June 05, 2010, 12:08:05 pm »

Sure, it's better than nothing, but I'm really opposed to have plugins that require the end user to edit files. The main objective of using plugins is the fact that the end user doesn't have to edit files or move files around. The creation and editing of the .htaccess files should be done using the plugin's user interface. The plugin should create the .htaccess file for the end user and complain if it can't.
Logged
Pages: 1 [2] 3 4 5 6 ... 11   Go Up
 

Page created in 0.031 seconds with 22 queries.