Differences

This shows you the differences between two versions of the page.

deutsch:ersetzer_rts:frontend_render:lighbox-prev-next-verbinden:lightbox-bilder-verbinden [2010/01/02 11:51]
Knut Heermann (flip-flop)
deutsch:ersetzer_rts:frontend_render:lighbox-prev-next-verbinden:lightbox-bilder-verbinden [2018/06/03 18:09] (current)
Line 7: Line 7:
Sind mehrere Bilder in einem Artikel aus dem Artikelkopf und CPs vorhanden, lassen sich diese nicht miteinander durch prev/next über die LightBox verbinden.   Sind mehrere Bilder in einem Artikel aus dem Artikelkopf und CPs vorhanden, lassen sich diese nicht miteinander durch prev/next über die LightBox verbinden.  
-Um alle Bilder der Kategorie Artikelkopf/CP/Gallery-übergreifend in den Rollvorgang einzuschließen kann dieser RT eingesetzt werden. \\+Um alle Bilder der Kategorie Artikelkopf/CP/Gallery-übergreifend in den Rollvorgang einzuschließen kann dieser RT eingesetzt werden.  
 + 
 +//(Funktioniert auch mit der Erweiterung MediaBox-Advanced).// \\
\\ \\
Line 28: Line 30:
**CMS Version:** >= 1.3 \\ **CMS Version:** >= 1.3 \\
**Version:** V1.1 \\ **Version:** V1.1 \\
 +**Update 05.08.2011 KH:** Fehler behoben "Wenn keine Kategorie im Array angegeben wurde" //("If no category is specified in the array").// \\
 +**Update 19.01.2012 KH:** Fehler behoben in "all image CPs and no gallery images:"  RegEx %%[^gallery]%% ersetzt durch %%(?!gallery)%% \\
   
Line 71: Line 75:
**Weitere Parameter sind:** \\ **Weitere Parameter sind:** \\
-**------ Template range**: Anfang - Ende des abzusuchenden Bereiches \\ +**------ Template range**: Anfang - Ende der abzusuchenden Bereiche  
-Dieser Bereich wird im Template mit  ##<!%%--%% bbbbbbbb %%//--%%>{CONTENT}<!%%--%% eeeeeee %%//--%%>## gekennzeichnet \\+ 
 +Diese Bereiche werden im Template mit  ##<!%%--%% bbbbbbbb %%//--%%>{CONTENT}<!%%--%% eeeeeee %%//--%%>## gekennzeichnet.  
 + 
 +Es können auch alle anderen Contentplatzhalter wie {LEFT}, {RIGHT}, {FOOTER}, {HEADER} oder eigene {CUSTOM_Bloecke} eingebunden werden. \\ 
 +Z.B. ##<!%%--%% bbbbbbbb %%//--%%>{RIGHT}<!%%--%% eeeeeee %%//--%%>##  
 + 
 +"bbbbbbbb" bzw. "eeeeeee" stehen für die angegebenen Markierungstexte z.B. \\ 
 +"bbbbbbbb" = "content-begin" und  "eeeeeee" = "content-end" also z.B. \\ 
 +##<!%%--%% content-begin %%//--%%>{LEFT}<!%%--%% content-end %%//--%%>##.
<code php> <code php>
Line 80: Line 92:
\\ \\
-**------ Some specific parameters**+**------ Some specific parameters**: Einzel-, Arktikelkopf- und/oder Galeriescript-Bilder einbinden
<code php> <code php>
$one_image_on      = true;    // true = binde auch Einzelbilder ein z.B. aus "Text mit Bild",   false = auschlieszen ... $one_image_on      = true;    // true = binde auch Einzelbilder ein z.B. aus "Text mit Bild",   false = auschlieszen ...
Line 99: 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 correction 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 140: 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 170: 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
deutsch/ersetzer_rts/frontend_render/lighbox-prev-next-verbinden/lightbox-bilder-verbinden.1262429509.txt.gz · Last modified: 2018/06/03 18:07 (external edit)
www.planmatrix.de www.chimeric.de Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0