Merge branch 'master' of github.com:s9y/additional_plugins

This commit is contained in:
Garvin Hicking 2013-05-11 15:20:58 +02:00
commit 7fe199b727
2 changed files with 17 additions and 11 deletions

View file

@ -1,6 +1,9 @@
2.2:
----
added new <div class="serendipity_emoticon_bar"> and changed css to better support backend textareas
2.1: 2.1:
---- ----
Fix for static calling of the plugin Fix for static calling of the plugin
2.0: 2.0:

View file

@ -30,7 +30,7 @@ class serendipity_event_emoticonchooser extends serendipity_event
'smarty' => '2.6.7', 'smarty' => '2.6.7',
'php' => '4.1.0' 'php' => '4.1.0'
)); ));
$propbag->add('version', '2.1'); $propbag->add('version', '2.2');
$propbag->add('event_hooks', array( $propbag->add('event_hooks', array(
'backend_entry_toolbar_extended' => true, 'backend_entry_toolbar_extended' => true,
'backend_entry_toolbar_body' => true, 'backend_entry_toolbar_body' => true,
@ -118,7 +118,7 @@ class serendipity_event_emoticonchooser extends serendipity_event
} }
} }
// CKEDITOR needs a little switch // CKEDITOR needs this little switch
if (preg_match('@^nugget@i', $func)) { if (preg_match('@^nugget@i', $func)) {
$cke_txtarea = $func; $cke_txtarea = $func;
} else { } else {
@ -130,7 +130,7 @@ class serendipity_event_emoticonchooser extends serendipity_event
} }
if (!isset($style)) { if (!isset($style)) {
$style = 'float: right; margin-left: 5px; margin-top: 5px;'; $style = 'margin-top: 5px; vertical-align: bottom';
} }
$popupstyle = ''; $popupstyle = '';
@ -167,6 +167,7 @@ class serendipity_event_emoticonchooser extends serendipity_event
$unique[$value] = $key; $unique[$value] = $key;
} }
?> ?>
<div class="serendipity_emoticon_bar">
<script type="text/javascript"> <script type="text/javascript">
<!-- <!--
function toggle_emoticon_bar_<?php echo $func; ?>() { function toggle_emoticon_bar_<?php echo $func; ?>() {
@ -229,15 +230,16 @@ function use_emoticon_<?php echo $func; ?>(img) {
//--> //-->
</script> </script>
<?php <?php
echo $popuplink; echo $popuplink."\n";
echo '<div id="serendipity_emoticonchooser_' . $func . '" style="' . $style . $popupstyle . '">'; echo ' <div id="serendipity_emoticonchooser_' . $func . '" style="' . $style . $popupstyle . '">'."\n";
foreach($unique as $value => $key) { foreach($unique as $value => $key) {
echo '<a href="javascript:use_emoticon_' . $func . '(\'' . addslashes($key) . '\')" title="' . $key . '"><img src="'. $value .'" style="border: 0px" alt="' . $key . '" /></a>&nbsp;'; echo ' <a href="javascript:use_emoticon_' . $func . '(\'' . addslashes($key) . '\')" title="' . $key . '"><img src="'. $value .'" style="border: 0px" alt="' . $key . '" /></a>&nbsp;'."\n";
if ($i++ % 10 == 0) { if ($i++ % 10 == 0) {
echo '<br />'; echo " <br />\n";
} }
} }
echo '</div>'; echo ' </div>'."\n";
echo '</div>'."\n";
return true; return true;
break; break;
@ -246,9 +248,10 @@ function use_emoticon_<?php echo $func; ?>(img) {
?> ?>
.serendipity_toggle_emoticon_bar.serendipityPrettyButton { .serendipity_toggle_emoticon_bar.serendipityPrettyButton {
display: inline-block; display: inline-block;
margin: 3px auto 0; margin: 0 auto 1px;
} }
.serendipityEntryEdit tr:nth-of-type(3) td:last-child { .serendipity_emoticon_bar {
margin: 0 auto;
text-align: right; text-align: right;
} }
<?php <?php