Comparing revisions for FileexportAction

Additions:
- Save the first code block below as ##action/fileexport.php##
# @version 0.96
# @input Parameters = [type=('html'|'xml')] [sort=('tag'|'type'|'time')] [scope=('PageTag'|'m'|'o'|'p')] [opts=['e']['r']] [cats='Category1','Category2'..]
if (!defined('FE_ERROR_USAGE')) define ('FE_ERROR_USAGE', "fileexport [type=\"html|xml\"] [scope=\"PageTag|m|o|p\"] [opts=\"[e][r]\"] [sort=\"tag|time|title\"] [cats=\"<i>category list</i>\"]");
|| (isset($vars['type']) && (!preg_match("/^(html|xml)$/i", $vars['type'])))
$query = '&scope='. (isset($vars['scope']) ? $vars['scope'] : 'm');
# @version 1.03
if (!defined('FE_ERROR_MISSING_LIBRARY')) define ('FE_ERROR_MISSING_LIBRARY', 'Could not find the \'pclzip\' library, check installation instructions');
function FEhtml(&$this, &$pages, &$key_order, $embed_css, $css_path, $remove_links, $save_tag, $save_page)
// preserve intra-wiki links
$pagedata['body'] = '<a name="'. $pages[$tag]['i'] .'"></a>'. preg_replace($pat, $rep, $pagedata['body']);
$output = $header .'<div class="page"><h2>'. FE_TABLE_OF_CONTENTS. '</h2><ul>'. $toc .'</ul><hr />'. $output;
echo '</div></body></html>';
|| (isset($_GET['type']) && (!preg_match("/^(html|xml)$/i", $_GET['type'])))
if (!isset($_GET['type']) || $_GET['type'] == 'html')
FEhtml($this, $pages, $key_order, $embed_css, $css_path, $remove_links, $save_tag, $save_page);
Deletions:
- Save the first code block below as ##actions/fileexport.php##
# @version 0.97
# @input Parameters = [type=('html'|'rawhtml'|'xml')] [sort=('tag'|'type'|'time')] [scope=('PageTag'|'m'|'o'|'p')] [opts=['e']['r']] [cats='Category1','Category2'..]
if (!defined('FE_ERROR_USAGE')) define ('FE_ERROR_USAGE', "fileexport [type=\"html|rawhtml|xml\"] [scope=\"PageTag|m|o|p\"] [opts=\"[e][r]\"] [sort=\"tag|time|title\"] [cats=\"<i>category list</i>\"]");
if (!defined('FE_ERROR_MISSING_PAGE')) define ('FE_ERROR_MISSING_PAGE', 'Can not export: page \'%s\' does not exist');
|| (isset($vars['type']) && (!preg_match("/^(html|rawhtml|xml)$/i", $vars['type'])))
else if ( isset($vars['scope']) && preg_match("/^[A-ZÄÖÜ]+[a-zßäöü]+[A-Z0-9ÄÖÜ][A-Za-z0-9ÄÖÜßäöü]*$/", $vars['scope']) && !$this->ExistsPage($vars['scope']) )
$output .= FEerror(sprintf(FE_ERROR_MISSING_PAGE, $vars['scope']));
$query .= '&scope='. (isset($vars['scope']) ? $vars['scope'] : 'm');
# @version 1.04
function FEhtml(&$this, &$pages, &$key_order, $embed_css, $css_path, $remove_links, $save_tag, $save_page, $raw=false)
if (!$raw)
{ // preserve intra-wiki links
$pagedata['body'] = '<a name="'. $pages[$tag]['i'] .'"></a>'. preg_replace($pat, $rep, $pagedata['body']);
{ // remove all intra-wiki links for raw HTML
$pat = '/<\s*a[^>]+href=([\'\"])'. preg_quote('http://'.$root_url, '/') .'\?wakka=.+?[^>].*?\>(.*?)<\/a>/';
$pagedata['body'] = preg_replace($pat, "$2", $pagedata['body']);
else if ($raw)
{ // remove links tail
if (!$raw)
$output = $header .'<div class="page"><h2>'. FE_TABLE_OF_CONTENTS. '</h2><ul>'. $toc .'</ul><hr />'. $output . '</div></body></html>';
else
{ // remove last ruler from raw HTML
$output = preg_replace('/\<hr \/\>$/', '', $output);
}
|| (isset($_GET['type']) && (!preg_match("/^(html|rawhtml|xml)$/i", $_GET['type'])))
if (!isset($_GET['type']) || ($_GET['type'] == 'html') || ($_GET['type'] == 'rawhtml'))
$raw_html = ($_GET['type'] == 'rawhtml');
FEhtml($this, $pages, $key_order, $embed_css, $css_path, $remove_links, $save_tag, $save_page, $raw_html);
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki