forum.coppermine-gallery.net

Support => cpg1.5 plugins => cpg1.5.x Support => cpg1.5 plugin contributions => Topic started by: pbasmo on September 04, 2011, 10:23:15 pm

Title: New plugin : short_comment for CPG 1.5.x
Post by: pbasmo 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 (http://forum.coppermine-gallery.net/index.php/topic,73485.0.html)
Title: Re: New plugin : short_comment for CPG 1.5.x
Post by: Alejandrito on September 25, 2011, 12:54:20 am
I just tested it, but it won't show anything  :-\ (using 1.5.16)
Title: Re: New plugin : short_comment for CPG 1.5.x
Post by: Obcodis on October 05, 2011, 03:59:03 pm
It works for random files but not last additions.:)
Title: Re: New plugin : short_comment for CPG 1.5.x
Post by: pbasmo 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  ;)