dokuwiki-source-plugin

Subversion Repositories:
Compare Path: Rev
With Path: Rev
?path1? @ 1  →  ?path2? @ 2
/action.php
@@ -5,7 +5,8 @@
* Action plugin component, for cache validity determination
*
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
* @author Christopher Smith <chris@jalakai.co.uk>
* @author Wizardry and Steamworks office@grimore.org
* original: Christopher Smith <chris@jalakai.co.uk>
*/
if(!defined('DOKU_INC')) die(); // no Dokuwiki, no go
 
@@ -23,12 +24,12 @@
*/
function getInfo(){
return array(
'author' => 'Christopher Smith',
'email' => 'chris@jalakai.co.uk',
'date' => '2008-08-13',
'author' => 'Wizardry and Steamworks',
'email' => 'office@grimore.org',
'date' => '2016-11-19',
'name' => 'Source Plugin',
'desc' => 'Include a remote source file',
'url' => 'http://www.dokuwiki.org/plugin:source',
'url' => 'http://grimore.org/dokuwiki/plugins/source',
);
}
 
/style.css
@@ -1,44 +1,64 @@
/*
* source plugin extension - style additions
*
* @author Christopher Smith chris@jalakai.co.uk
* @link http://wiki.jalakai.co.uk/dokuwiki/doku.php/tutorials/codeplugin
* @author Wizardry and Steamworks office@grimore.org
* original: Christopher Smith chris@jalakai.co.uk
* @link http://grimore.org/dokuwiki/plugins/source
* original: http://wiki.jalakai.co.uk/dokuwiki/doku.php/tutorials/codeplugin
*/
/* source plugin extensions */
 
/* layout */
div.source {
/*
width: 92%;
margin: 1em auto;
border: 1px solid;
padding: 4px;
*/
}
 
div.source p {
/*
font-size: 90%;
margin: 0;
padding: 2px;
padding: 2px;
*/
}
 
div.source p span {
/*
font-weight: normal;
*/
}
 
div.source pre.code {
/*
margin: 4px 0 0 0;
*/
}
 
/* colours */
div.source {
/*
border-color: #bdb;
background: #e4f8f2;
*/
}
 
div.source p {
/*
background: #c4e4d4;
*/
}
 
div.source pre.code {
/*
border: 1px dashed #9c9;
background: #ecfaf6;
*/
}
 
div.source p.title {
display: none;
}
/syntax.php
@@ -22,7 +22,8 @@
* - this plugin's location, allow & deny settings.
*
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
* @author Christopher Smith <chris@jalakai.co.uk>
* @author Wizardry and Steamworks office@grimore.org
* original: Christopher Smith <chris@jalakai.co.uk>
*/
if(!defined('DOKU_INC')) die(); // no Dokuwiki, no go
 
@@ -131,7 +132,7 @@
$title = ($title) ? "<span>".hsc($title)."</span>"
: $this->_makeTitle($file, $start, $end);
 
$renderer->doc .= "<div class='source'><p>$title</p>";
$renderer->doc .= "<div class='source'><p class='title'>$title</p>";
$renderer->code($source, $lang);
$renderer->doc .= "</div>";
} else {