Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from mjbohn/addconfig
Add config options, thx to mjbohn!!
- Loading branch information
Showing
7 changed files
with
169 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
/** | ||
* DokuWiki Plugin scrollticker | ||
* | ||
* @license GPL 2 http://www.gnu.org/licenses/gpl-2.0.html | ||
* | ||
* @author Michael Bohn <mjbohn@gmail.com> | ||
*/ | ||
|
||
if(!defined('DOKU_INC')) die(); // no Dokuwiki, no go | ||
|
||
class action_plugin_scrollticker extends DokuWiki_Action_Plugin | ||
{ | ||
/** | ||
* Register the handle function in the controller | ||
* | ||
* @param Doku_event_handler $controller The event controller | ||
*/ | ||
function register(Doku_Event_Handler $controller) | ||
{ | ||
$controller->register_hook('DOKUWIKI_STARTED', 'AFTER', $this, 'addconfig2js'); | ||
} | ||
|
||
|
||
/** | ||
* @param $event | ||
* @param $params | ||
*/ | ||
function addconfig2js ($event, $params) { | ||
global $JSINFO; | ||
global $conf; | ||
$this->loadConfig(); | ||
$JSINFO['plugin_scrollticker'] = $conf['plugin']['scrollticker']; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
/** | ||
* Default settings for the scrollticker plugin | ||
* | ||
* @license GPL 2 http://www.gnu.org/licenses/gpl-2.0.html | ||
* | ||
* @author Michael Bohn <mjbohn@gmail.com> | ||
* | ||
* | ||
*/ | ||
|
||
$conf['counterstyle'] = 'none'; | ||
$conf['separator'] = ' +++ '; | ||
$conf['speed'] = 6; | ||
$conf['stopOnHover'] = 1; | ||
$conf['showBorder'] = 0; | ||
$conf['border'] = '0.5px dashed #000'; | ||
$conf['border-radius'] = '20px'; | ||
$conf['width'] = '90%'; | ||
$conf['height'] = '2.5em'; | ||
$conf['textcolor'] = 'red'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
/** | ||
* Options for the scrollticker plugin | ||
* | ||
* @license GPL 2 http://www.gnu.org/licenses/gpl-2.0.html | ||
* | ||
* @author Michael Bohn <mjbohn@gmail.com> | ||
* | ||
*/ | ||
|
||
$meta['counterstyle'] = array('multichoice', _choices => array('decimal', 'decimal-leading-zero', 'lower-roman', 'upper-roman','lower-latin', 'upper-latin', 'none')); | ||
$meta['separator'] = array('string'); | ||
$meta['speed'] = array('numeric'); | ||
$meta['stopOnHover'] = array('onoff'); | ||
$meta['showBorder'] = array('onoff'); | ||
$meta['border'] = array('string'); | ||
$meta['border-radius'] = array('string'); | ||
$meta['width'] = array('string'); | ||
$meta['height'] = array('string'); | ||
$meta['textcolor'] = array('string'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
/** | ||
* english language file for scrollticker plugin | ||
* | ||
* @author Michael Bohn <mjbohn@gmail.com> | ||
* | ||
*/ | ||
|
||
$lang['counterstyle'] = 'Add counter in front of ticker items (default none)'; | ||
$lang['separator'] = 'Separator between items'; | ||
$lang['speed'] = 'Tickerspeed'; | ||
$lang['stopOnHover'] = 'Stop Ticker on mouse hover'; | ||
$lang['showBorder'] = 'Show border on ticker'; | ||
$lang['border'] = 'Border style (default "0.5px dashed #000" )'; | ||
$lang['border-radius'] = 'Add rounded corners ( 0 for none )'; | ||
$lang['width'] = 'Ticker width (%)'; | ||
$lang['height'] = 'Ticker height (default 2em)'; | ||
$lang['textcolor'] = 'Color of ticker text'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters