Skip to content

Commit

Permalink
refs #1543 : added - wiki link block button on toolbar (Working in
Browse files Browse the repository at this point in the history
	 progress)

 -
  • Loading branch information
inureyes committed Mar 11, 2015
1 parent 8144597 commit 4f53d72
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
24 changes: 22 additions & 2 deletions plugins/WikiCube/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
----------------------------------
Version 0.14
Starts at : Apr. 5, 2006
Last modified at : Mar. 9, 2015
Last modified at : Mar. 11, 2015 (WIP)
jeongkyu Shin.
Jeongkyu Shin.
E-mail : [email protected]
Expand Down Expand Up @@ -58,6 +58,26 @@ function WikiCube_FormatErrorPage($target) {
return $target.$additional;
}

function WikiCube_AddButton($target) {
ob_start();
?>
<script type="text/javascript">
editor.addCommand('wikicubeAddLink', function () {
});
editor.addButton('wikicubeAddWikiLink', {
title: 'Add Wiki Link',
cmd: 'wikicubeAddLink',
icon: 'save'
});
editor.settings.toolbar1 = editor.settings.toolbar1 + ' wikicubeAddWikiLink';
editor.render();
</script>
<?php
$result = ob_get_contents();
ob_end_clean();
return $target.$result;
}

function WikiCube_DataHandler($data) {
$config = Setting::fetchConfigVal($data);
if (!array_key_exists('mode',$config)) return false;
Expand Down
1 change: 1 addition & 0 deletions plugins/WikiCube/index.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<binding>
<listener event="ViewPostContent" handler="WikiCube_FormatContent" />
<listener event="ViewErrorPage" handler="WikiCube_FormatErrorPage" />
<listener event="ShowAdminFooter" handler="WikiCube_AddButton" />
<config xml:lang="en" dataValHandler="WikiCube_DataHandler">
<window width="500" height="525" />
<fieldset legend="Default Mode">
Expand Down

0 comments on commit 4f53d72

Please sign in to comment.