forum.coppermine-gallery.net

Support => cpg1.5 plugins => cpg1.5.x Support => cpg1.5 plugin contributions => Topic started by: mykee on September 03, 2013, 11:18:36 pm

Title: CollagePlus plugin
Post by: mykee on September 03, 2013, 11:18:36 pm
Hi all,

I made a collage plugin from CollagePlus JQuery script. More information and license is here:
http://collageplus.edlea.com/

This plugin made a collage to index page from thumbnails or big photos with caption. I integrated TipTip balloon, and Lightbox effect too.

What can with this:
- make a collage
- set number of pictures
- select thumbnail, normal or full size pictures
- setup caption type: none, standard, TipTip
- set padding, container width, fade time or target width and height (if selected Normal or Full size image)
- turn on or off HTML5 compatible code, JQuery and Lightbox effect

I fixed IE width bug for collage resort if your template is ellastic or not fixed width.

Check Readme.txt after install for setup. If any problem with use, just turn on or off JQuery, maybe help.

Attention: this plugin use HTML5 and CSS3 codes! Under IE8 and older versions will not working all features!

------------------------------------
Update v1.2 (2014/09/27):
- restriction mode added to sql query
- add language support to lightbox caption
- jQuery updated to 1.11.1 version, added jquery-migrate 1.2.1 version

Update v1.1 (2014/07/11):
- small code optimization


Update from 1.x to 1.2:
- download CP_Update_1.0_to_1.1.zip file
- unpack to an empty folder
- upload unpacked file and replace it in your site\plugins\collageplus. That's all!

Title: Re: CollagePlus plugin
Post by: mykee on January 12, 2014, 05:08:43 pm
I have a little mod, if you need: collage only on first page, no show on catalog page. (Updated to 1.1 version!)

Open codebase.php, and find this:
Code: [Select]
// Add filter for page head
$thisplugin->add_action('page_start','collageplus_head');
// Add search display action
$thisplugin->add_filter('plugin_block','collageplus_mainpage');
//Add plus styles for metas
$thisplugin->add_filter('page_meta','collageplus_header_addons');
//Add script to footer
$thisplugin->add_filter('gallery_footer','collageplus_footer_addons');

Replace with:
Code: [Select]
function collageplus_noindex () {
  global $superCage;
   if ($superCage->get->keyExists('cat') or $superCage->get->keyExists('file')) {
      return "1";
    } else {
      return "0";   
    }
}
$collageplus_noindex = collageplus_noindex();

if ($collageplus_noindex == "0"){
// Add filter for page head
$thisplugin->add_action('page_start','collageplus_head');
// Add search display action
$thisplugin->add_filter('plugin_block','collageplus_mainpage');
//Add plus styles for metas
$thisplugin->add_filter('page_meta','collageplus_header_addons');
//Add script to footer
$thisplugin->add_filter('gallery_footer','collageplus_footer_addons');
}


And here a fix, if you use non-English characters in filename:

Open codebase.php, and find this:
Code: [Select]
list($width, $height) = getimagesize($collageplus_imgfile);
Replace with:
Code: [Select]
list($width, $height) = getimagesize(urldecode($collageplus_imgfile));
Title: Re: CollagePlus plugin
Post by: phill104 on January 12, 2014, 05:40:35 pm
Excellent work as usual.  :)
Title: Re: CollagePlus plugin
Post by: mykee on July 11, 2014, 03:35:44 pm
Plugin updated, please check first post!
Title: Re: CollagePlus plugin
Post by: mykee on September 27, 2014, 11:11:52 am
Plugin updated! Changelog and new version in first post!