Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: New plugin : short_comment for CPG 1.5.x  (Read 7930 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.016 seconds with 19 queries.