Strict Standards: Declaration of action_plugin_dlcount::register() should be compatible with DokuWiki_Action_Plugin::register($controller) in /home/www/wiki/lib/plugins/dlcount/action.php on line 14

Strict Standards: Declaration of action_plugin_indexmenu::register() should be compatible with DokuWiki_Action_Plugin::register($controller) in /home/www/wiki/lib/plugins/indexmenu/action.php on line 169

Strict Standards: Declaration of action_plugin_ipban::register() should be compatible with DokuWiki_Action_Plugin::register($controller) in /home/www/wiki/lib/plugins/ipban/action.php on line 67

Strict Standards: Declaration of action_plugin_loglog::register() should be compatible with DokuWiki_Action_Plugin::register($controller) in /home/www/wiki/lib/plugins/loglog/action.php on line 82

Strict Standards: Declaration of action_plugin_navi::register() should be compatible with DokuWiki_Action_Plugin::register($controller) in /home/www/wiki/lib/plugins/navi/action.php on line 46

Strict Standards: Declaration of action_plugin_uparrow::register() should be compatible with DokuWiki_Action_Plugin::register($controller) in /home/www/wiki/lib/plugins/uparrow/action.php on line 69

Strict Standards: Declaration of action_plugin_userspagecreate::register() should be compatible with DokuWiki_Action_Plugin::register($controller) in /home/www/wiki/lib/plugins/userspagecreate/action.php on line 97

Strict Standards: Declaration of cache_instructions::retrieveCache() should be compatible with cache::retrieveCache($clean = true) in /home/www/wiki/inc/cache.php on line 289

Warning: Cannot modify header information - headers already sent by (output started at /home/www/wiki/lib/plugins/dlcount/action.php:14) in /home/www/wiki/inc/auth.php on line 312

Strict Standards: Only variables should be passed by reference in /home/www/wiki/doku.php on line 71

Warning: Cannot modify header information - headers already sent by (output started at /home/www/wiki/lib/plugins/dlcount/action.php:14) in /home/www/wiki/inc/actions.php on line 154
{XBROWSE:UP:LinkText} [phpwcms-HowTo:wiki]

Strict Standards: Declaration of syntax_plugin_code::render() should be compatible with DokuWiki_Syntax_Plugin::render($format, &$renderer, $data) in /home/www/wiki/lib/plugins/code/syntax.php on line 41

Strict Standards: Declaration of syntax_plugin_tip::render() should be compatible with DokuWiki_Syntax_Plugin::render($format, &$renderer, $data) in /home/www/wiki/lib/plugins/tip/syntax.php on line 38

{XBROWSE:UP:LinkText}

Different Browse UP for category/article-view in simple or listing article mode. → Display modes

- Browse up to the category (article listing) if the user is in article detail view (article listing mode set).
- Browse up to the parent category if the user is in article detail view (simple article mode) or category view.

This tag can alternatively be used for the built-in {BROWSE:UP:LinkText}.

Please do not use this tag parallel with {XBROWSE:NEXT/PREV/UP:LinkText:X} (There it is integrated).



rt_xbrowse_up V1.0/V1.1 14.03.2010

Docu: –
Forum: http://forum.phpwcms.org/viewtopic.php?f=16&t=19936

Author: K.Heermann (flip-flop) http://planmatrix.de
CMS Version: >= 1.3
Version: V1.0
Version: V1.1 recommended :!:

Tag: {XBROWSE:UP:LinkText}

Filename: rt_xbrowse_up.php

Folder: template/inc_script/frontend_render/

Condition:/config/phpwcms/conf.inc.php

  • $phpwcms['allow_ext_render'] = 1;



Code V1.1:

V1.1 recommended :!::
Faster processing without function call and $GLOBALS, “LinkText” must be available ''{XBROWSE:UP:LinkText}''.

rt_xbrowse_up

<?php
/**
 *******************************************************************
 * Different Browse UP for category/article-view in
 * simple or listing article mode
 * - Browse up to the category (article listing) if the user is in
 *   article detail view (article listing mode set)
 * - Browse up to the parent category if the user is in
 *   article detail view (simple article mode) or category view
 *
 * V1.1: 14.03.2010 K.Heerrmann http://planmatrix.de
 * TAG: {XBROWSE:UP:LinkText}
 *
 * Filename: rt_xbrowse_up.php
 * Folder:  /template/inc_script/frontend_render/
 * Switch:  $phpwcms['allow_ext_render'] = 1; (/config/phpwcms/conf.inc.php)
 *
 * Forum:   http://forum.phpwcms.org/viewtopic.php?f=16&t=19936
 *******************************************************************/
// ----------------------------------------------------------------
// obligate check for phpwcms constants
if (!defined('PHPWCMS_ROOT')) {
   die("You Cannot Access This Script Directly, Have a Nice Day."); }
// ----------------------------------------------------------------
 
 
// Different Browse UP
// ================================================================
 
// Tag available // Tag im Content gesetzt?  Z.B. {XBROWSE:UP:^^^^}
 
if(strpos($content["all"],'{XBROWSE:') !== false) {
 
    // In detail view if article listing mode is set
    // In der Detailansicht wenn Artikellisten-Modus aktiv
    if ( empty($aktion['3']) ) {
 
        // Jump to the category   // gehe zur Kategorie
        $link = $content["struct"][$content["cat_id"]]["acat_alias"];
        $link = '<a href="index.php?'.$link.'">$1</a>';
 
        // Only if not home cat // Nur wenn nicht Home Kategorie
//        if ($content['cat_id'] == 0 ) $link = '';
 
        $content["all"] = preg_replace('/\{XBROWSE:UP:(.+?)\}/', $link, $content["all"]);
 
 
    // In category view if simple article- or listing mode set
    // In der Kategorie bei einfachem & Artikellisten-Modus
    } else {
 
        // Only if not home cat // Nur wenn nicht Home Kategorie
//        if ($content['cat_id'] == 0 ) $content["all"] = preg_replace('/\{XBROWSE:UP:(.+?)\}/','',$content["all"]);
 
        $content["all"] = preg_replace('/\{XBROWSE:UP:(.+?)\}/e','get_index_link_up("$1");',$content["all"]);
 
    }
}
 
?>

Optionally exclude the Home category, see 2x if ($content['cat_id'] == 0 ) ....;


Code V1.0:

rt_xbrowse_up

<?php
/**
 *******************************************************************
 * Different Browse UP for category/article-view in
 * simple or listing article mode
 * - Browse up to the category (article listing) if the user is in
 *   article detail view (article listing mode set)
 * - Browse up to the parent category if the user is in
 *   article detail view (simple article mode) or category view
 *
 * V1.0: 14.03.2010 K.Heerrmann http://planmatrix.de
 * TAG: {XBROWSE:UP:LinkText}
 *
 * Filename: rt_xbrowse_up.php
 * Folder:  /template/inc_script/frontend_render/
 * Switch:  $phpwcms['allow_ext_render'] = 1; (/config/phpwcms/conf.inc.php)
 *
 * Forum:   http://forum.phpwcms.org/viewtopic.php?f=16&t=19936
 *******************************************************************/
// ----------------------------------------------------------------
// obligate check for phpwcms constants
if (!defined('PHPWCMS_ROOT')) {
   die("You Cannot Access This Script Directly, Have a Nice Day."); }
// ----------------------------------------------------------------
 
 
// Different Browse UP
// ================================================================
 
// Tag available // Tag im Content gesetzt?  Z.B. {XBROWSE:UP:^^^^}
 
if(strpos($content["all"],'{XBROWSE:') !== false) {
 
    function x_get_index_link_up($linktext) {
 
        if (empty($linktext['1'])) $linktext['1'] = '^UP^';
 
        // In detail view if article listing mode is set
        // In der Detailansicht wenn Artikellisten-Modus aktiv
        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 simple article- or listing mode set
        // In der Kategorie bei einfachem & Artikellisten-Modus
        } else {
 
            // Jump to parent category   // gehe zur Eltern-Kategorie
            $link = get_index_link_up($linktext['1']);
 
        }
 
    return $link;
 
    // Only if not home cat // Nur wenn nicht Home Kategorie
//    return (($GLOBALS['content']['cat_id']) > 0 ) ? $link :'';
 
    }
 
    $content["all"] = preg_replace_callback('/\{XBROWSE:UP:(.*?)\}/','x_get_index_link_up',$content["all"]);
}
 
?>

Optionally exclude the Home category, see return ….;

english/phpwcms_replacer_rts/frontend_render/xbrowse-up.txt · Last modified: 2010/07/13 07:47 by Knut Heermann (flip-flop)
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

Strict Standards: Only variables should be passed by reference in /home/www/wiki/doku.php on line 79