NAVIGATION
This shows you the differences between two versions of the page.
|
english:phpwcms_replacer_rts:frontend_render:lightbox-prev-next-threading:lightbox-images-threading [2010/01/02 18:41] Knut Heermann (flip-flop) created |
english:phpwcms_replacer_rts:frontend_render:lightbox-prev-next-threading:lightbox-images-threading [2018/06/03 18:09] (current) |
||
|---|---|---|---|
| Line 7: | Line 7: | ||
| 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. | 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. \\ | + | 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|}} | {{:deutsch:ersetzer_rts:frontend_render:lighbox-prev-next-verbinden:rt_lightbox_prev_next_all01_1.gif|}} | ||
| Line 29: | Line 29: | ||
| **CMS Version:** >= 1.3 \\ | **CMS Version:** >= 1.3 \\ | ||
| **Version:** V1.1 \\ | **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)%% \\ | ||
| Line 73: | Line 75: | ||
| **Other parameters are:** \\ | **Other parameters are:** \\ | ||
| - | **------ Template range**: Begin - End of the scan area \\ | + | **------ Template range**: Beginning and end of areas to be scaned |
| - | This area is marked in the template with ##<!%%--%% bbbbbbbb %%//--%%>{CONTENT}<!%%--%% eeeeeee %%//--%%>## \\ | + | |
| + | This areas are marked in the template with ##<!%%--%% bbbbbbbb %%//--%%>{CONTENT}<!%%--%% eeeeeee %%//--%%>##. | ||
| + | |||
| + | |||
| + | All other content placeholder as {LEFT}, {RIGHT}, {FOOTER}, {HEADER} or your own {CUSTOM_BLOCKS} can be integrated. \\ | ||
| + | E.g. ##<!%%--%% bbbbbbbb %%//--%%>{RIGHT}<!%%--%% eeeeeee %%//--%%>## | ||
| + | |||
| + | "bbbbbbbb" or "eeeeeee" are standing for the specified marker texts e.g. \\ | ||
| + | "bbbbbbbb" = "content-begin" and "eeeeeee" = "content-end" as e.g. \\ | ||
| + | ##<!%%--%% content-begin %%//--%%>{LEFT}<!%%--%% content-end %%//--%%>##. | ||
| <code php> | <code php> | ||
| Line 100: | Line 111: | ||
| New rel for all LB pictures is called: rel="lightbox[catid-XX]" | New rel for all LB pictures is called: rel="lightbox[catid-XX]" | ||
| Where XX is the current category ID. | Where XX is the current category ID. | ||
| + | Update 05.08.2011 KH: 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) | ||
| Filename: rt_lighbox_prev_next_all01.php | Filename: rt_lighbox_prev_next_all01.php | ||
| Line 141: | Line 155: | ||
| $cat_id = $content['cat_id']; // current category ID | $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 ($inc_categories ) { // include active? | ||
| - | if ( in_array($cat_id, $_categories) ) | + | if ( in_array($cat_id, $_categories) ) { |
| // $text = preg_match("/\<!-- content-begin \/\/--\>(.*?)\<!-- content-end \/\/--\>/ism", $content['all'], $g) ? $g[1] : ''; | // $text = preg_match("/\<!-- content-begin \/\/--\>(.*?)\<!-- content-end \/\/--\>/ism", $content['all'], $g) ? $g[1] : ''; | ||
| $text = preg_match("/\<!-- $tag_before \/\/--\>(.*?)\<!-- $tag_after \/\/--\>/ism", $content['all'], $g) ? $g[1] : ''; | $text = preg_match("/\<!-- $tag_before \/\/--\>(.*?)\<!-- $tag_after \/\/--\>/ism", $content['all'], $g) ? $g[1] : ''; | ||
| + | } | ||
| } | } | ||
| else { // exclude active! | else { // exclude active! | ||
| - | if ( !in_array($cat_id, $_categories) ) | + | if ( !in_array($cat_id, $_categories) ) { |
| $text = preg_match("/\<!-- $tag_before \/\/--\>(.*?)\<!-- $tag_after \/\/--\>/ism", $content['all'], $g) ? $g[1] : ''; | $text = preg_match("/\<!-- $tag_before \/\/--\>(.*?)\<!-- $tag_after \/\/--\>/ism", $content['all'], $g) ? $g[1] : ''; | ||
| + | } | ||
| } | } | ||
| Line 171: | Line 188: | ||
| else // all image CPs and no gallery images | else // all image CPs and no gallery images | ||
| - | $text = preg_replace('/rel="lightbox\[[^gallery](.*?)\]"/i', | + | $text = preg_replace('/rel="lightbox\[(?!gallery).*?\]"/i', |
| 'rel="lightbox[catid-'.$cat_id.']"', $text); // fill content | 'rel="lightbox[catid-'.$cat_id.']"', $text); // fill content | ||