Advanced search  

News:

cpg1.5.46 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter recently discovered vulnerabilities. It is important that all users who run version cpg1.5.44 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: New plugin : short_comment for CPG 1.5.x  (Read 4182 times)

0 Members and 1 Guest are viewing this topic.

pbasmo

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 133
    • Galerie de photos
New plugin : short_comment for CPG 1.5.x
« on: September 04, 2011, 10:23:15 pm »

Hi,

In 2007, I wrote a post on the display comments below the thumbnails (see http://forum.coppermine-gallery.net/index.php/topic, 44532.msg211689.html # msg211689).
The goal was to show only the first x words from a comment to keep the presentation more air in the thumbnail view.
I changed the script "functions.inc.php" in the "build_caption" where I added about 10 lines of code to achieve the desired result.

As it is not recommended to modify the original scripts of CPG, I had the idea of ​​making a full plugin that I called "short_comments".

It installs like any other plugin and administered from the plugin manager.
Only one information is needed : the number of words to display before the presence of "Suite ..." (French) or "More ..." (in English). By default it is set to 15 words.

The image attached can get an idea of the result.
What is amusing, it is the tiny 10 lines of code turned into plugin totaling about 420 lines! :)

We hope it is helpful to many.

PS:This post is also on french forum at http://forum.coppermine-gallery.net/index.php/topic,73485.0.html
Logged

Alejandrito

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 31
Re: New plugin : short_comment for CPG 1.5.x
« Reply #1 on: September 25, 2011, 12:54:20 am »

I just tested it, but it won't show anything  :-\ (using 1.5.16)
Logged

Obcodis

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
Re: New plugin : short_comment for CPG 1.5.x
« Reply #2 on: October 05, 2011, 03:59:03 pm »

It works for random files but not last additions.:)
Logged

pbasmo

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 133
    • Galerie de photos
Re: New plugin : short_comment for CPG 1.5.x
« Reply #3 on: October 23, 2011, 11:22:13 pm »

Hi,

There is the last version 1.1 of short_comments : it works for last additions and others modes  ;)
Logged
Pages: [1]   Go Up
 

Page created in 0.052 seconds with 20 queries.