{{indexmenu_n>10}} ====== LightBox threading all images ====== **RT which will combine //(Prev/Next)// all images //(article / CPs / gallery / custom scripts)// of a category (article) where the LightBox (SlimBox) is used.** If there are multiple pictures in an article from the article header, CPs and custom scripts, they (normally) canĀ“t be connected by prev / next links with the LightBox. To include all the images of the category //(article header, CPs, gallery-script)// into the sliding process you can use this RT. //(Also works with the extension MediaBox-Advanced).// \\ {{:deutsch:ersetzer_rts:frontend_render:lighbox-prev-next-verbinden:rt_lightbox_prev_next_all01_1.gif|}} The RT actually will include the picture from the **article head**, the CP **text w/image**, the **gallery script** and **all other scripts /CPs** if the LightBox were activated here. ---- **rt_lighbox_prev_next_all01.php** V1.1 31.12.09 Docu: -- \\ Forum: -- **Autor:** K.Heermann (flip-flop) http://planmatrix.de \\ **CMS Version:** >= 1.3 \\ **Version:** V1.1 \\ **Update 05.08.2011 KH:** Bug solved "If no category is specified in the array". \\ **Update 19.01.2012 KH:** Bug solved at "all image CPs and no gallery images:" -> RegEx %%[^gallery]%% changed to %%(?!gallery)%% \\ Tag: -- \\ Filename: **rt_lighbox_prev_next_all01.php** Folder: ** template/inc_script/frontend_render/ ** **Condition:** -> [[http://www.phpwcms-docu.de/conf_inc_php_en.phtml|/config/phpwcms/conf.inc.php]] \\ * ##$phpwcms['allow_ext_render'] = 1;## ---- ---- \\ ===== Description ===== 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. 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##. **Other parameters are:** \\ **------ Template range**: Beginning and end of areas to be scaned This areas are marked in the template with ##{CONTENT}##. All other content placeholder as {LEFT}, {RIGHT}, {FOOTER}, {HEADER} or your own {CUSTOM_BLOCKS} can be integrated. \\ E.g. ##{RIGHT}## "bbbbbbbb" or "eeeeeee" are standing for the specified marker texts e.g. \\ "bbbbbbbb" = "content-begin" and "eeeeeee" = "content-end" as e.g. \\ ##{LEFT}##. $tag_before = 'content-begin'; // Marking text for the beginning of the content to be scanned e.g. $tag_after = 'content-end'; // Marking text for the end of the content to be scanned e.g. **------ Some specific parameters** $one_image_on = true; // true = include images without prev/next (one image), false = exclude ... $article_list_on = false; // true = include article images in article list mode, false = exclude ... $gallery_on = false; // true = include images generated by gallery script, false = exclude ... \\ ===== Code ===== {CONTENT} $tag_before = 'content-begin'; // Marking text for the beginning of the content to be scanned e.g. $tag_after = 'content-end'; // Marking text for the end of the content to be scanned e.g. // ------ Some specific parameters $one_image_on = true; // true = include images without prev/next (one image), false = exclude ... $article_list_on = false; // true = include article images in article list mode, false = exclude ... $gallery_on = false; // true = include images generated by gallery script, false = exclude ... // =========================================================================================== $text = ''; $cat_id = $content['cat_id']; // current category ID if (count($_categories) == 0 ) $_categories[0] = $cat_id; // Update 05.08.2011 KH: If no category is specified in the array if ($inc_categories ) { // include active? if ( in_array($cat_id, $_categories) ) { // $text = preg_match("/\