NAVIGATION
This is an old revision of the document!
RT which all images of the content parts of a category in which the LightBox (SlimBox) is used combines.
better translate
If larger picture quantities are present in a category, it is not simply to handle in backend, if all pictures lie in one CP. Therefore, this pictures stock is distributed among several CPs. However the LightBox scrolls the pictures not automatically from a CP to the next (Prev/Next), but stops at the beginning/end of the respective CPs.
To include all the images of the category CP-spreading into the rolling process you can use this RT.
(Alternatively, of course, the scripts gallery or galleryX can be used. (other logic, installation more complex)).
<note> The RT in the current form also includes the picture from the CP text w/image, if the LightBox were activated here. </note>
rt_lighbox_prev_next_all.php V1.0 17.12.09
Docu: –
Forum: –
Autor: K.Heermann (flip-flop) http://planmatrix.de
CMS Version: >= 1.3
Version: V1.0
Tag: –
Filename: rt_lighbox_prev_next_all.php
Folder: template/inc_script/frontend_render/
Condition: → /config/phpwcms/conf.inc.php
In the range === CUSTOM INPUT === of the RT can be indicated, for which categories this behavior is desired.
For this we registered the IDs of the categories into the Array $_categories = array( );.
Two characteristics: Include ot exclude this behavior.
Whether include or exclude is set up with the switch $inc_categories = true/false;.
true = include aktiv, false = exclude aktiv
Example:
$inc_categories = true; $_categories = array(5,7,23,67);
In the categories with IDs 5,7,23,67 it is checked whether a Lightbox is active and the series of images can be combined (Prev/Next).
If $inc_categories = false; the pictures would be excluded of this operation in the categories with the ID 5,7,23,67.
<note> If the array $_categories = array( ); is empty, each category will be reviewed on the use of LightBox, regardless of the setting has been made in the $inc_categories.
</note>
<?php /********************************************************************************************* V1.0 17.12.09 K.Heermann (flip-flop) "LightBox Prev/Next all": All Prev/Next from LightBox bind up New rel for all LB pictures is called: rel="lightbox[catid-XX]" Where XX is the current category ID. Filename: rt_lighbox_prev_next_all.php Folder: /template/inc_script/frontend_render/ Switch: $phpwcms['allow_ext_render'] = 1; (/config/phpwcms/conf.inc.php) **********************************************************************************************/ // ------------------------------------------------------------------------------------------- // obligate check for phpwcms constants if (!defined('PHPWCMS_ROOT')) { die("You Cannot Access This Script Directly, Have a Nice Day."); } // ------------------------------------------------------------------------------------------- // ===== CUSTOM INPUT ======================================================================== // ------ true = include active, false = exclude active $inc_categories = true; // ------ Fill in your inc/excluded categories e.g. array(7,23,16,25,33) $_categories = array( ); // =========================================================================================== $cat_id = $content['cat_id']; // current category ID if ($inc_categories ) { // include active? if ( in_array($cat_id, $_categories) ) { $content['all'] = preg_replace('/rel="lightbox\[(.*?)\]"/i', 'rel="lightbox[catid-'.$cat_id.']"', $content['all']); // fill content } } else { // exclude active! if ( !in_array($cat_id, $_categories) ) { $content['all'] = preg_replace('/rel="lightbox\[(.*?)\]"/i', 'rel="lightbox[catid-'.$cat_id.']"', $content['all']); // fill content } } // -----------[ CLOSE ]---------------- ?>