<?php

/**
* Addon_Template
*
* @author http://rexdev.de
* @link   http://www.redaxo.de/180-0-addon-details.html?addon_id=720
*
* @package redaxo4.3
* @version 0.1
* $Id$:
*/
// GET PARAMS
////////////////////////////////////////////////////////////////////////////////
$mypage = rex_request('page', 'string');
$subpage = rex_request('subpage', 'string');
$func = rex_request('func', 'string');
// MAIN
////////////////////////////////////////////////////////////////////////////////
$addonroot = $REX['INCLUDE_PATH'] . '/addons/' . $mypage . '/';
switch ($func) {
    case '':
        $html = a720_incparse($addonroot . 'pages/', '_connector_explanation.textile', 'textile', true);
        $html = str_replace('addon_template', $mypage, $html);
        echo $html;
        break;
    case 'css':
        a720_incparse($addonroot . 'files/', 'backend.css', 'raw');
        break;
}
Beispiel #2
0
// SUBNAVIGATION ITEMS
////////////////////////////////////////////////////////////////////////////////
$chapterpages = array('' => array('Readme', '_readme.textile', 'textile'), 'changelog' => array('Changelog', '_changelog.textile', 'textile'), 'text_demo' => array('<em>TXT include</em>', 'pages/_txt_include_example.txt', 'txt'), 'php_demo' => array('<em>PHP include</em>', 'pages/_php_include_example.php', 'php'), 'iframelink_demo' => array('<em>Link (iframe)</em>', 'http://rexdev.de/addons/addon-template.html', 'iframe'), 'newwinlink_demo' => array('<em>Link (neues Fenster)</em>', 'http://rexdev.de/addons/addon-template.html', 'jsopenwin'));
// BUILD CHAPTER NAVIGATION
////////////////////////////////////////////////////////////////////////////////
$chapternav = '';
foreach ($chapterpages as $chapterparam => $chapterprops) {
    if ($chapter != $chapterparam) {
        $chapternav .= ' | <a href="?page=' . $mypage . '&subpage=help&chapter=' . $chapterparam . '" class="chapter ' . $chapterparam . ' ' . $chapterprops[2] . '">' . $chapterprops[0] . '</a>';
    } else {
        $chapternav .= ' | <span class="chapter ' . $chapterparam . ' ' . $chapterprops[2] . '">' . $chapterprops[0] . '</span>';
    }
}
$chapternav = ltrim($chapternav, " | ");
// BUILD CHAPTER OUTPUT
////////////////////////////////////////////////////////////////////////////////
$addonroot = $REX['INCLUDE_PATH'] . '/addons/' . $mypage . '/';
$source = $chapterpages[$chapter][1];
$parse = $chapterpages[$chapter][2];
$html = a720_incparse($addonroot, $source, $parse, true);
// OUTPUT
////////////////////////////////////////////////////////////////////////////////
echo '
<div class="rex-addon-output">
  <h2 class="rex-hl2" style="font-size:1em">' . $chapternav . '</h2>
  <div class="rex-addon-content">
    <div class= "addon-template">
    ' . $html . '
    </div>
  </div>
</div>';
Beispiel #3
0
* @package redaxo4.3
* @version 0.1
* $Id$:
*/
// ADDON IDENTIFIER AUS ORDNERNAMEN ABLEITEN
////////////////////////////////////////////////////////////////////////////////
$mypage = explode('/redaxo/include/addons/', str_replace(DIRECTORY_SEPARATOR, '/', __FILE__));
$mypage = explode('/', $mypage[1]);
$mypage = $mypage[0];
$myroot = $REX['INCLUDE_PATH'] . '/addons/' . $mypage . '/';
// LOCAL INCLUDES
////////////////////////////////////////////////////////////////////////////////
require_once $myroot . 'functions/function.a720_incparse.inc.php';
// HELP CONTENT
////////////////////////////////////////////////////////////////////////////////
$help_includes = array('Hilfe' => array('_readme.textile', 'textile'), 'Changelog' => array('_changelog.textile', 'textile'));
// MAIN
////////////////////////////////////////////////////////////////////////////////
foreach ($help_includes as $k => $v) {
    if (file_exists($myroot . $v[0])) {
        echo '
    <div class="rex-addon-output" style="overflow:auto">
      <h2 class="rex-hl2" style="font-size:1em">' . $k . ' <span style="color: gray; font-style: normal; font-weight: normal;">( ' . $v[0] . ' )</span></h2>
      <div class="rex-addon-content">
        <div class="' . $mypage . '">
          ' . a720_incparse($myroot, $v[0], $v[1], true) . '
        </div>
      </div>
    </div>';
    }
}