You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

52 lines
1.8 KiB

<?php
// (c) Copyright by authors of the Tiki Wiki CMS Groupware Project
//
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
// $Id $
function wikiplugin_pdfbookmark_info()
{
return [
'name' => tra('PluginPDF Bookmark'),
'documentation' => 'PluginPDFBookmark',
'description' => tra('Manual bookmark entry for a PDF file'),
'tags' => [ 'advanced' ],
'iconname' => 'pdf',
'prefs' => [ 'wikiplugin_pdf' ],
'introduced' => 18,
'params' => [
'content' => [
'name' => tra('Bookmark Label'),
'description' => tra(''),
'tags' => ['advanced'],
'type' => 'text',
'default' => ''
],
'level' => [
'name' => tra('Bookmark level'),
'description' => tra(''),
'tags' => ['advanced'],
'type' => 'text',
'default' => '0',
'options' => [
['text' => '0','value' => '0'],
['text' => '1','value' => '1'],
['text' => '2','value' => '2'],
],
],
]
];
}
function wikiplugin_pdfbookmark($data, $params)
{
if (strstr($_GET['display'], 'pdf') == '') {
return;
}
$paramList = '';
foreach ($params as $paramName => $param) {
$paramList .= $paramName . "='" . $param . "' ";
}
return "<bookmark " . $paramList . " />";
}