New plugin : short_comment for CPG 1.5.x New plugin : short_comment for CPG 1.5.x
 

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

Main Menu

New plugin : short_comment for CPG 1.5.x

Started by pbasmo, September 04, 2011, 10:23:15 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

pbasmo

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

Alejandrito

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

Obcodis

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

pbasmo

Hi,

There is the last version 1.1 of short_comments : it works for last additions and others modes  ;)