Differences

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

deutsch:ersetzer_rts:frontend_render:xbrowse-up [2010/03/15 08:22]
Knut Heermann (flip-flop)
deutsch:ersetzer_rts:frontend_render:xbrowse-up [2018/06/03 18:09] (current)
Line 7: Line 7:
- Gehe zurück zur Kategorie //(Artikel Listenmodus)// wenn der Benutzer sich im Artikeldetail befindet //(Artikel-Listenmodues aktiv)//. \\ - Gehe zurück zur Kategorie //(Artikel Listenmodus)// wenn der Benutzer sich im Artikeldetail befindet //(Artikel-Listenmodues aktiv)//. \\
- Gehe zurück zur Elternkategorie wenn der Benutzer sich im Artikeldetail //(einfacher Artikelmodus)// oder in der Kategorieansicht befindet. - Gehe zurück zur Elternkategorie wenn der Benutzer sich im Artikeldetail //(einfacher Artikelmodus)// oder in der Kategorieansicht befindet.
 +
 +<note important>Bitte nicht parallel mit dem TAG [[deutsch/ersetzer_rts/frontend_render/xbrowse-up-next-prev]] verwenden. //(Dort ist der TAG integriert).// </note>
Dieser Tag kann alternativ zum eingebauten [[http://www.phpwcms-docu.de/navigations_tags_.phtml|{BROWSE:UP:LinkText}]] eingesetzt werden. Dieser Tag kann alternativ zum eingebauten [[http://www.phpwcms-docu.de/navigations_tags_.phtml|{BROWSE:UP:LinkText}]] eingesetzt werden.
---- ----
\\ \\
-**rt_xbrowse_up** V1.0  14.03.2010  +**rt_xbrowse_up** V1.0/V1.1 14.03.2010  
Docu: -- \\ Docu: -- \\
Line 19: Line 21:
**Autor:**  K.Heermann (flip-flop) http://planmatrix.de \\ **Autor:**  K.Heermann (flip-flop) http://planmatrix.de \\
**CMS Version:** >= 1.3 \\ **CMS Version:** >= 1.3 \\
-**Version:** V1.0/V1.1 \\+**Version:** V1.0 \\ 
 +**Version:** V1.1 empfohlen :!: \\
   
Line 36: Line 39:
---- ----
---- ----
 +
 +
\\ \\
-==== Code V1.0: ====+==== Code V1.1: ====
 +**V1.1 empfohlen :!:: \\
 +** Schnellere Verarbeitung ohne eingebettete Funktion und $GLOBALS, der "LinkText" muss angegeben werden %%''{XBROWSE:UP:LinkText}''%%.  
<code php |h rt_xbrowse_up |h > <code php |h rt_xbrowse_up |h >
Line 48: Line 55:
 * Different Browse UP for category/article-view in  * Different Browse UP for category/article-view in
 * simple or listing article mode  * simple or listing article mode
- * - Browse up to the category (article listing) if the user is in a + * - Browse up to the category (article listing) if the user is in
 *   article detail view (article listing mode set)  *   article detail view (article listing mode set)
- * - Browse up to the parent category if the user is in a + * - Browse up to the parent category if the user is in
 *   article detail view (simple article mode) or category view  *   article detail view (simple article mode) or category view
 *    *  
- * V1.0: 14.03.2010 K.Heerrmann http://planmatrix.de + * V1.1: 14.03.2010 K.Heerrmann http://planmatrix.de
 * TAG: {XBROWSE:UP:LinkText}  * TAG: {XBROWSE:UP:LinkText}
 *  *
Line 76: Line 83:
if(strpos($content["all"],'{XBROWSE:') !== false) { if(strpos($content["all"],'{XBROWSE:') !== false) {
- function x_get_index_link_up($linktext) {+ // In detail view if article listing mode is set 
 + // In der Detailansicht wenn Artikellisten-Modus aktiv 
 + if ( empty($aktion['3']) ) {
- if (empty($linktext['1'])) $linktext['1'] = '^UP^';+ // Jump to the category   // gehe zur Kategorie 
 + $link = $content["struct"][$content["cat_id"]]["acat_alias"];  
 + $link = '<a href="index.php?'.$link.'">$1</a>';
- // In detail view if article listing mode is set + // Only if not home cat // Nur wenn nicht Home Kategorie 
- // In der Detailansicht wenn Artikellisten-Modus aktiv +// if ($content['cat_id'] == 0 ) $link = '';
- if ( empty($GLOBALS['aktion']['3']) ) {  +
-  +
- // Jump to the category   // gehe zur Kategorie +
- $link = $GLOBALS['content']["struct"][$GLOBALS['content']["cat_id"]]["acat_alias"];  +
- $link = '<a href="index.php?'.$link.'">'.$linktext['1'].'<;/a>'; +
-  +
- // In category view if normal article- or listing mode set +
- // In der Kategorie bei infachem & Artikellisten-Modus +
- } else { +
- // Jump to parent category   // gehe zur Eltern-Kategorie + $content["all"] = preg_replace('/\{XBROWSE:UP:(.+?)\}/', $link, $content["all"]);
- $link = get_index_link_up($linktext['1']);+
- }+  
 + // In category view if simple article- or listing mode set 
 + // In der Kategorie bei infachem & Artikellisten-Modus 
 + } else {
- return $link; + // Only if not home cat // Nur wenn nicht Home Kategorie 
-  +// if ($content['cat_id'] == 0 ) $content[&quot;all"] = preg_replace('/\{XBROWSE:UP:(.+?)\}/','',$content["all"]); 
- // Only if not home cat // Nur wenn nicht Home Kategorie + 
-// return (($GLOBALS['content']['cat_id']) &gt; 0 ) ? $link :'';+ $content["all"] = preg_replace('/\{XBROWSE:UP:(.+?)\}/e','get_index_link_up("$1");',$content["all"]);
} }
-  
- $content["all"] = preg_replace_callback('/\{XBROWSE:UP:(.*?)\}/','x_get_index_link_up',$content["all"]); 
} }
Line 110: Line 112:
</code> </code>
-Optional die Home Kategorie ausklammern, siehe **return ....;**+Optional die Home Kategorie ausklammern, siehe 2x  **''%%if ($content['cat_id'] == 0 ) ....;%%''**
\\ \\
 +
\\ \\
-==== Code V1.1: ====+==== Code V1.0: ====
-V1.1: Schnellere Verarbeitung ohne eingebettete Funktion, der "LinkText" muss angegeben werden %%''{XBROWSE:UP:LinkText}''%%.   
<code php |h rt_xbrowse_up |h > <code php |h rt_xbrowse_up |h >
Line 124: Line 126:
 * Different Browse UP for category/article-view in  * Different Browse UP for category/article-view in
 * simple or listing article mode  * simple or listing article mode
- * - Browse up to the category (article listing) if the user is in a + * - Browse up to the category (article listing) if the user is in
 *   article detail view (article listing mode set)  *   article detail view (article listing mode set)
- * - Browse up to the parent category if the user is in a + * - Browse up to the parent category if the user is in
 *   article detail view (simple article mode) or category view  *   article detail view (simple article mode) or category view
 *    *  
- * V1.1: 14.03.2010 K.Heerrmann http://planmatrix.de + * V1.0: 14.03.2010 K.Heerrmann http://planmatrix.de
 * TAG: {XBROWSE:UP:LinkText}  * TAG: {XBROWSE:UP:LinkText}
 *  *
Line 152: Line 154:
if(strpos($content["all"],'{XBROWSE:') !== false) { if(strpos($content["all"],'{XBROWSE:') !== false) {
- // In detail view if article listing mode is set + function x_get_index_link_up($linktext) {
- // In der Detailansicht wenn Artikellisten-Modus aktiv +
- if ( empty($GLOBALS['aktion']['3']) ) {+
- // Jump to the category   // gehe zur Kategorie + if (empty($linktext['1'])) $linktext['1'] = '^UP^';
- $link = $GLOBALS['content']["struct"][$GLOBALS['content']["cat_id"]]["acat_alias"];  +
- $link = '<a href="index.php?'.$link.'">$1</a>';+
- // Only if not home cat // Nur wenn nicht Home Kategorie + // In detail view if article listing mode is set 
- if ($content['cat_id'] == 0 ) $link = ''; + // In der Detailansicht wenn Artikellisten-Modus aktiv 
- dumpVar($link);+ if ( empty($GLOBALS['aktion']['3']) ) {  
 +  
 + // Jump to the category   // gehe zur Kategorie 
 + $link = $GLOBALS['content']["struct"][$GLOBALS['content']["cat_id"]]["acat_alias"];  
 + $link = '<;a href="index.php?'.$link.'">'.$linktext['1'].'</a>'; 
 +  
 + // In category view if normal article- or listing mode set 
 + // In der Kategorie bei infachem & Artikellisten-Modus 
 + } else {
- $content["all"] = preg_replace('/\{XBROWSE:UP:(.+?)\}/', $link, $content["all"]);+ // Jump to parent category   // gehe zur Eltern-Kategorie 
 + $link = get_index_link_up($linktext['1']);
-  + }
- // In category view if normal article- or listing mode set +
- // In der Kategorie bei infachem & Artikellisten-Modus +
- } else {+
- // Only if not home cat // Nur wenn nicht Home Kategorie + return $link; 
-// if ($content['cat_id'] == 0 ) $content[&quot;all"] = preg_replace('/\{XBROWSE:UP:(.+?)\}/','',$content["all"]); +  
- + // Only if not home cat // Nur wenn nicht Home Kategorie 
- $content["all"] = preg_replace('/\{XBROWSE:UP:(.+?)\}/e','get_index_link_up("$1");',$content["all"]);+// return (($GLOBALS['content']['cat_id']) &gt; 0 ) ? $link :'';
} }
 +
 + $content["all"] = preg_replace_callback('/\{XBROWSE:UP:(.*?)\}/','x_get_index_link_up',$content["all"]);
} }
Line 182: Line 188:
</code> </code>
-Optional die Home Kategorie ausklammern, siehe **''if ($content['cat_id'] == 0 ) ....;''**+Optional die Home Kategorie ausklammern, siehe **return ....;**
\\ \\
- 
deutsch/ersetzer_rts/frontend_render/xbrowse-up.1268637747.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