Compare commits

..

No commits in common. "4ca0e4a0ba1feb57db354500858ac587d6d0fcda" and "3d040fe5c2f41c06a0df56b33c8f230c55cfdf6c" have entirely different histories.

8 changed files with 0 additions and 218 deletions

View File

@ -1,5 +1,2 @@
# tile # tile
DokuWiki Extensions : https://www.dokuwiki.org/plugin:tile
Membership directory in the form of thumbnails.

View File

@ -1,7 +0,0 @@
<?php
/**
* Options for the Tile Plugin
*/
$conf['iconSize'] = 80; // the icon size
$conf['sampleDelai'] = 2*60*60;
?>

View File

@ -1,11 +0,0 @@
<?php
/**
* @license http://www.cecill.info/licences/Licence_CeCILL-B_V1-fr.html
* @author Francois Merciol <dokuplugin@merciol.fr>
*
* Metadata for configuration manager plugin
* Additions for the tile plugin
*/
$meta['iconSize'] = array('numeric');
$meta['sampleDelai'] = array('numeric');
?>

View File

@ -1,12 +0,0 @@
<?php
/**
* @license http://www.cecill.info/licences/Licence_CeCILL-B_V1-fr.html
* @author Francois Merciol <dokuplugin@merciol.fr>
*
* English language file
*/
// for the configuration tile plugin
$lang['iconSize'] = 'tile icon size';
$lang['sampleDelai'] = 'cache time delay for sample (sec)';
?>

View File

@ -1,12 +0,0 @@
<?php
/**
* @license http://www.cecill.info/licences/Licence_CeCILL-B_V1-fr.html
* @author Francois Merciol <dokuplugin@merciol.fr>
*
* French language file
*/
// for the configuration tile plugin
$lang['iconSize'] = 'taille de l\'icon de tuile';
$lang['sampleDelai'] = 'temps de cache pour l\'exemple (en secondes)';
?>

View File

@ -1,7 +0,0 @@
base tile
author Francois Merciol
email dokuplugin@merciol.fr
date 2020-07-20
name Tile plugin
desc Display URL in tile
url http://www.dokuwiki.org/plugin:tile

View File

@ -1,54 +0,0 @@
div.tiles {
background: #E8E8E8;
display: block;
padding: 0.5em;
text-align: center;
}
div.tile {
background: #FFF;
display: inline-block;
padding: 0.5em;
margin: 0.5em;
width: 10em;
min-height: 15em;
text-align: center;
vertical-align: middle;
}
div.tile a {
min-height: 2em;
}
div.tile p {
margin: 0 ! important;
display: block;
min-height: 0;
}
div.tile div.img {
display: table-cell;
vertical-align: middle;
width: 9em;
height: 9em;
}
div.tile div.img * {
vertical-align: middle;
}
/*\*//*/
div.tile div.img {
display: block;
}
div.tile div.img span {
display: inline-block;
height: 100%;
width: 1px;
}
/**/
div.tile div.img img {
max-height: 9em;
max-width: 9em;
}

View File

@ -1,112 +0,0 @@
<?php
/**
* @license http://www.cecill.info/licences/Licence_CeCILL-B_V1-fr.html
* @author Francois <dokuplugin@merciol.fr>
*
* Plugin touchtile: display URL in tiles
*/
if (!defined ('DOKU_INC'))
define ('DOKU_INC', realpath (dirname (__FILE__).'/../../').'/');
if (!defined ('DOKU_PLUGIN'))
define ('DOKU_PLUGIN', DOKU_INC.'lib/plugins/');
require_once(DOKU_PLUGIN.'syntax.php');
// ============================================================
class syntax_plugin_tile extends DokuWiki_Syntax_Plugin {
// ============================================================
function getType () { return 'substition'; }
function getPType () { return 'block';}
function getSort () { return 299; }
function connectTo ($mode) {
$this->Lexer->addEntryPattern ('<tile[^>]*>', $mode, 'plugin_tile');
}
function postConnect() {
$this->Lexer->addExitPattern ('</tile>', 'plugin_tile');
}
// ============================================================
function handle ($match, $state, $pos, Doku_Handler $handler){
switch ($state) {
case DOKU_LEXER_ENTER:
return array ($state, trim (substr ($match, 5, -1))); // "<title" => 5 ">" => 1
case DOKU_LEXER_UNMATCHED:
return array ($state, $match);
case DOKU_LEXER_EXIT:
return array ($state);
}
return false;
}
var $iconSize;
var $imgAttr;
// ============================================================
function render ($mode, Doku_Renderer $renderer, $indata) {
if ($mode != 'xhtml')
return false;
if (empty ($indata))
return false;
list ($instr, $data) = $indata;
switch ($instr) {
case DOKU_LEXER_ENTER :
if (preg_match_all ("#(\"[^\"]*\")*help(\"[^\"]*\")*#", $data, $dumy) > 0)
$this->help ($renderer);
$this->iconSize = $this->getConf ('iconSize');
if (preg_match_all ("#(\"[^\"]*\")*width=\"(?<width>[^\"]*)\"(\"[^\"]*\")*#", $data, $dumy) > 0)
$this->iconSize = $dumy ['width'][0];
$this->imgAttr = ' width="'.$this->iconSize.'"';
$renderer->doc .= ' <div class="tiles">';
break;
case DOKU_LEXER_EXIT :
$renderer->doc .= ' </div>';
break;
case DOKU_LEXER_UNMATCHED :
$data = trim ($data);
if (empty ($data))
return false;
global $_REQUEST;
foreach (explode ("\n", $data) as $line) {
$line = trim ($line);
if (!$line)
continue;
$line = preg_replace ("#\s+\|#", "|", $line);
$line = preg_replace ("#\|\s+#", "|", $line);
$line = trim ($line,'|');
list ($id, $title, $img, $email, $name) = explode ("|", $line);
if (!$id)
continue;
$email = obfuscate ($email);
$mailto = $email ? '<a class="mail JSnocheck" href="mailto:'.$email.'" >'.($name ? $name : $email).'</a>' : "";
$renderer->doc .= '
<div class="tile">
<a href="'.wl ($id).'">
<p>'.$title.'</p>
<div class="img"><span></span><img src="'.ml ($img, array ('cache'=>$_REQUEST['cache'], 'w'=>$this->iconSize)).'"'.$this->imgAttr.' alt="'.$title.'"/></div>
</a>
<p>'.$mailto.'</p>
</div>';
}
break;
}
return true;
}
// ============================================================
function help (Doku_Renderer $renderer) {
$url = "http://admin.parlenet.org/plugins/tile/";
$renderer->doc .=
' <h1>Tile Help</h1>'.NL.
' <ul>'.NL.
' <li>Syntax : <b>&lt;tile [help] [width=pp]&gt;</b><br/>'.
' | :dokuwiki:namespace:page | Short Description | :dokuwiki:namespace:icon.png | member.mel@some.where.org | nickname |<br/>'.
' ...<br/>'.
' <b>&lt;/tile&gt;</b></li>'.NL.
' <li>Info : <a class="urlextern" rel="nofollow" title="'.$url.'" href="'.$url.'">'.$url.'</a></li>'.NL.
' </ul>'.NL;
}
// ============================================================
} // syntax_plugin_tile
?>