plugin:processing
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
plugin:processing [2010-08-25 15:01] – 130.89.233.139 | plugin:processing [2023-10-30 22:55] (current) – Klap-in | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== processing | + | ====== processing |
---- plugin ---- | ---- plugin ---- | ||
- | description: | + | description: |
author | author | ||
email : mail@edwindertien.nl | email : mail@edwindertien.nl | ||
type : syntax | type : syntax | ||
lastupdate : 2010-08-25 | lastupdate : 2010-08-25 | ||
- | compatible : | + | compatible : 2005-09-22+ |
depends | depends | ||
conflicts | conflicts | ||
similar | similar | ||
- | tags : javascript, processing, syntax highlight | + | tags : |
- | downloadurl: | + | downloadurl: |
- | bugtracker : http:// | + | bugtracker : https:// |
- | sourcerepo : http:// | + | sourcerepo : https:// |
donationurl: | donationurl: | ||
---- | ---- | ||
+ | Processing module used by this plugin is discontinued and deprecated. | ||
+ | |||
+ | ===== About this plugin ===== | ||
+ | |||
+ | [[http:// | ||
+ | |||
+ | This plugin parses processing(java) code to the [[http:// | ||
+ | |||
+ | The plugin is pretty much a 0.0001 release. Some example sketches work, but by far not all of them. Also a number of extra features would increase usability tremendously. Any help or contribution is highly appreciated | ||
+ | |||
+ | ==== Safety ==== | ||
+ | |||
+ | This plugin allows users to execute their own javascript within the wiki. Although the processing.js function set is pretty harmless (screen output, mouse capture, etc) executing user scripts can be vulnerable. | ||
===== Download and Installation ===== | ===== Download and Installation ===== | ||
- | Download | + | Search |
===== Syntax and Usage ===== | ===== Syntax and Usage ===== | ||
- | Using < | + | Using '' |
+ | |||
+ | See [[http:// | ||
+ | |||
+ | The plugin syntax file: | ||
+ | <file php syntax.php> | ||
+ | <?php | ||
+ | /** | ||
+ | * DokuWiki Plugin processing (Syntax Component) | ||
+ | * | ||
+ | * @license GPL 2 http:// | ||
+ | * @author | ||
+ | */ | ||
+ | |||
+ | // must be run within Dokuwiki | ||
+ | if (!defined(' | ||
+ | |||
+ | if (!defined(' | ||
+ | if (!defined(' | ||
+ | if (!defined(' | ||
+ | |||
+ | require_once DOKU_PLUGIN.' | ||
+ | |||
+ | require_once DOKU_INC.' | ||
+ | require_once DOKU_INC.' | ||
+ | |||
+ | |||
+ | class syntax_plugin_processing extends DokuWiki_Syntax_Plugin { | ||
+ | function getInfo() { | ||
+ | return array(' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | } | ||
+ | function getType() { | ||
+ | return ' | ||
+ | } | ||
+ | |||
+ | function getPType() { | ||
+ | return ' | ||
+ | } | ||
+ | |||
+ | function getSort() { | ||
+ | return 100; | ||
+ | } | ||
+ | |||
+ | |||
+ | function connectTo($mode) { | ||
+ | $this-> | ||
+ | } | ||
+ | |||
+ | | ||
+ | $this-> | ||
+ | } | ||
+ | |||
+ | | ||
+ | | ||
+ | | ||
+ | switch ($state) { | ||
+ | case DOKU_LEXER_ENTER : | ||
+ | break; | ||
+ | case DOKU_LEXER_MATCHED : | ||
+ | break; | ||
+ | case DOKU_LEXER_UNMATCHED : | ||
+ | // ugly piece of string decomposition to get width and hight from the sketch | ||
+ | $numbers = substr($match, | ||
+ | $width = trim(substr($numbers, | ||
+ | $height = trim(substr($numbers, | ||
+ | return array($state, | ||
+ | break; | ||
+ | case DOKU_LEXER_EXIT : | ||
+ | break; | ||
+ | case DOKU_LEXER_SPECIAL : | ||
+ | break; | ||
+ | } | ||
+ | |||
+ | } | ||
+ | |||
+ | |||
+ | function render($mode, | ||
+ | if($mode == ' | ||
+ | list($state, | ||
+ | switch ($state) { | ||
+ | case DOKU_LEXER_ENTER : | ||
+ | break; | ||
+ | case DOKU_LEXER_UNMATCHED : | ||
+ | | ||
+ | "< | ||
+ | | ||
+ | "</ | ||
+ | $width. | ||
+ | " | ||
+ | $height. | ||
+ | " | ||
+ | |||
+ | $renderer-> | ||
+ | |||
+ | $renderer-> | ||
+ | break; | ||
+ | case DOKU_LEXER_EXIT : | ||
+ | break; | ||
+ | default: | ||
+ | break; | ||
+ | } | ||
+ | return true; | ||
+ | } | ||
+ | return false; | ||
+ | } | ||
+ | } | ||
+ | ?> | ||
+ | </ | ||
+ | |||
+ | ===== Bugs, feature requests ===== | ||
+ | * The java-applet is not parsed into a slideshow (s5). Anyone hints in a direction how to start solving this? | ||
+ | * giving the download-link at the top of the highlighted code using '' | ||
+ | * make source collapsible | ||
+ | * not every processing sketch can be executed. Is there a way to include the *.js sources on top of the page? | ||
+ | * check vulnerability? | ||
plugin/processing.1282741317.txt.gz · Last modified: 2010-08-25 15:01 by 130.89.233.139