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
Bilder: Ausgabe von Title [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

Bilder: Ausgabe von Title

Mit diesem kleinen Script kann der {TITLE} TAG innerhalb <!--IMAGES_ENTRY_START//--> ......... <!--IMAGES_ENTRY_END//--> im CP-Template ersetzt werden.

TAGs:

  • CP Titel: [[%TITLE%]]
  • Bild title: [[%{IMGID}::TITLE%]]

Docu: –
Forum: CP-Template: Caption erschein an der Stelle des Inhalttitels

Autor: K.Heermann (flip-flop) http://planmatrix.de
CMS Version: >= 1.4x
Version: V1.0 (24.09.2011)

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

  • $phpwcms['allow_ext_init'] = 1;



PHP:

Datei: /template/inc_script/frontend_init/cp_trig_images_title.php

cp_trig_images_title.php

<?php
/*************************************************************************************
 * 24.10.2011 KH: Replace title into {TITLE} TAG between
 * <!--IMAGES_ENTRY_START//--> ......... <!--IMAGES_ENTRY_END//-->
 *
 * TAG: [[%Count::........%]]  Title from Caption title
 * TAG: [[%........%]] Title from CP title
 *
 * Identifier in template: <!--TITLE01//-->
*************************************************************************************/
// -----------------------------------------------------------------------------------
// OBLIGATE CHECK FOR PHPWCMS CONSTANTS
if (!defined('PHPWCMS_ROOT')) {die("You Cannot Access This Script Directly, Have a Nice Day.");}
// -----------------------------------------------------------------------------------
 
 
function CP_IMGDIV_TITLE01($text, & $data) {
    if($data['acontent_type'] == 29 AND strpos($text, '<!--TITLE01//-->') ) { // 29 is CP img div
 
//    dumpVar($data);
//    dumpVar($text);
 
        // --- Title from caption title ------------------------
 
        $image    = @unserialize($data["acontent_form"]);
 
        foreach($image['images'] as $key => $value) {
 
            $caption[$key]    = getImageCaption($image['images'][$key][6]);
 
            // [[%Count::TITLE%]]  title aus Bildunterzeile einsetzen
            $text = preg_replace('/\[\[%'.$key.'::TITLE%\]\]/is', $caption[$key][3], $text);
        }
        // -----------------------------------------------------
 
//    dumpVar($caption);
 
        // --- Title from CP title -----------------------------
        // [[%TITLE%]]  Title einsetzen
 
        $text = str_replace('[[%TITLE%]]', $data[acontent_title], $text);
 
        // --- Title from caption title ------------------------
 
    }
    return $text;
}
 
register_cp_trigger('CP_IMGDIV_TAG01');
 
?>


Beispiel:

<!--IMAGES_ENTRY_START//-->
    <div style="padding:0px;border:0px solid #CCCCCC;margin:0px 0px 0 0;">
        [TITLE]<h3>[[%TITLE%]]</h3>[/TITLE]
        [TITLE]<h3>[[%{IMGID}::TITLE%]]</h3>[/TITLE]
 
        [SUBTITLE]<h4>{SUBTITLE}</h4>[/SUBTITLE]
    </div>
        .....
        .....
<!--IMAGES_ENTRY_END//-->


deutsch/ersetzer_rts/frontend_init/cp_trigger/cp-bilder-title-ausgabe.txt · Last modified: 2011/09/27 08:58 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