DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:toplist

This is an old revision of the document!


Toplist Plugin

Compatible with DokuWiki

No compatibility info given!

plugin Insert Toplist.cz status image into your DokuWiki page

Last updated on
2006-04-09
Provides
Syntax

This extension has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues.

The following security issue was reported for this extension: XSS vulnerability allows arbitrary JavaScript insertion. Author informed on 2009-11-08.

It is not recommended to use this extension until this issue was fixed. Extension authors should read the plugin security guidelines

Tagged with status

<?xml version=“1.0” encoding=“utf-8”?> <!DOCTYPE html PUBLIC “-WAPFORUMDTD XHTML Mobile 1.0EN” “http://www.wapforum.org/DTD/xhtml-mobile10.dtd”> <html xmlns=“http://www.w3.org/1999/xhtml”> <meta http-equiv=“Content-type” content=“text/html; charset=utf-8” /> <meta name=viewport content=“width=device-width, initial-scale=1”> <head> <title>mobil chat,mobil sohbet,mobil muhabbet,mobil çet,telefon chat, telefon sohbet,cep chat,cep sohbet,cep muhabbet,cep çet,wap chat sohbet çet reinawap.com</title> <meta name=“keywords” content=“#mobil chat,mobil sohbet,mobil muhabbet,mobil çet,telefon chat, telefon sohbet,cep chat,cep sohbet,cep muhabbet,cep çet,wap chat sohbet çet reinawap.com#” /> <meta name=“description” content=“#mobil chat,mobil sohbet,mobil muhabbet,mobil çet,telefon chat, telefon sohbet,cep chat,cep sohbet,cep muhabbet,cep çet,wap chat sohbet çet reinawap.com#” /> <link href=“#CSS#” rel=“stylesheet” style=“text/css”> </head> <body> <!–standart-üst-bölüm-bitti–> <!–orta-bölüm-başlıyor—→ <div class=“container”> <div class=“alert alert-success” role=“alert”> <center><h1 style=“font-size:20px”><a href=“http://reinawap.com”>REİNAWAP.COM</a></h1></center> </div> <div class=“alert alert-success” role=“alert”><strong>Reinawap.com</strong> mobil chat,mobil sohbet,mobil muhabbet,mobil çet,telefon chat, telefon sohbet,cep chat,cep sohbet,cep muhabbet,cep çet,wap chat sohbet çet reinawap.com</div> <div class=“panel panel-success”> <div class=“panel-heading”><h3 class=“panel-title”><b>Kategoriler</b></h3></div> <li class=“list-group-item”><img src=“http://cepte.us/k.gif” alt=“*”></a> <a href=“http://reinawap.cep7.net/index.xhtml”>Mobil Oyun İndir</a></li> <li class=“list-group-item”><img src=“http://cepte.us/k.gif” alt=“*”></a> <a href=“http://muzikdinle.cep7.org/mobil/”>Mobil Mp3 İndir</a></li> <li class=“list-group-item”><img src=“http://cepte.us/k.gif” alt=“*”></a> <a href=“http://reinawap.cep7.net/index.xhtml”>Mobil Tema İndir</a></li> <li class=“list-group-item”><img src=“http://cepte.us/k.gif” alt=“*”></a> <a href=“http://reinawap.cep7.net/index.xhtml”>Mobil Resim İndir</a></li> <li class=“list-group-item”><img src=“http://cepte.us/k.gif” alt=“*”></a> <a href=“http://cep.gs”>Mobil Site Yap</a></li> <!–orta–bölüm–bitti—→ </div> <div class=“panel panel-success”> <div class=“panel-heading”><h3 class=“panel-title”><b>İstatistikler</b></h3></div> <li class=“list-group-item”>- Online: <b>#ONLINE#</b></li> <li class=“list-group-item”>- Bugün Tekil: <b>#BUGUN#</b></li> <li class=“list-group-item”>- Bugün Çogul: <b>#COGUL#</b></li> <li class=“list-group-item”>- Toplam Hit: <b>#TOPLAMCOGUL#</b></li> </div> <p align=“Reinawap.com”>© 2016 <br/> <a href=“http://reinawap.com”>Reinawap.com SohbeT ChaT SitemiZ TıkLa</a></p> </div> </body> </html> ===== Installation ===== ==== Plugin ==== Create a new folder lib/plugin/toplist/ and place the following file in it: syntax.php. lib/plugin/toplist/syntax.php: <code php> <?php / * Plugin Toplist: Show Toplist Status. * * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * @author Mario Lacko <mario [dot] lacko [at] gmail [dot] com> */ 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'); / * All DokuWiki plugins to extend the parser/rendering mechanism * need to inherit from this class */ class syntax_plugin_toplist extends DokuWiki_Syntax_Plugin { / * return some info */ function getInfo(){ return array( 'author' ⇒ 'Mario Lacko', 'email' ⇒ 'mario [dot] lacko [at] gmail [dot] com', 'date' ⇒ '2006-04-09', 'name' ⇒ 'Toplist Plugin', 'desc' ⇒ 'Show your statistic from toplist.cz . Syntax: ~~toplist:000000~~', 'url' ⇒ 'http://www.dokuwiki.org/plugin:toplist', ); } / * What kind of syntax are we? */ function getType(){ return 'substition'; } function getSort(){ return 129; } function connectTo($mode) { $this→Lexer→addSpecialPattern(“~~toplist:\w+~~”,$mode,'plugin_toplist'); } / * Handle the match */ function handle($match, $state, $pos, &$handler){ $match = substr($match,10,-2); Strip markup Check alignment $ralign = (bool)preg_match('/^ /',$match); $lalign = (bool)preg_match('/ $/',$match); if ($lalign & $ralign) $align = 'center'; else if ($ralign) $align = 'right'; else if ($lalign) $align = 'left'; else $align = NULL; return array(trim($match),$align); } / * Create output */ function render($mode, &$renderer, $data) { if($mode == 'xhtml'){ $renderer→doc .= '<img SRC=“http://toplist.cz/count.asp?id='.$data[0].'&amp;logo=mc” border=“0” alt=“TOPlist” WIDTH=“88” HEIGHT=“60”/>'; return true; } return false; } } Setup VIM: ex: et ts=4 enc=utf-8 : </code>

Discussion

It's insert counter image from www.toplist.cz , like this ⇒ http://www.toplist.cz/images/counter.asp?a=mc&ID=1

Hello, There's so many plug-ins, so please, think to include a Demo Link, just to have an idea…
plugin/toplist.1453921797.txt.gz · Last modified: 2016-01-27 20:09 by 178.241.95.158