]> git.mjollnir.org Git - s9y.git/commitdiff
Add "None" option to weblogping plugin
authorgarvinhicking <garvinhicking>
Mon, 17 Apr 2006 18:03:36 +0000 (18:03 +0000)
committergarvinhicking <garvinhicking>
Mon, 17 Apr 2006 18:03:36 +0000 (18:03 +0000)
plugins/serendipity_event_weblogping/serendipity_event_weblogping.php

index 8451a855f70f2db7931528f4c3d4ba103768e012..5162250d0275b097c95d9d93540048e6dd8ed1e9 100644 (file)
@@ -22,7 +22,7 @@ class serendipity_event_weblogping extends serendipity_event
         $propbag->add('description',   PLUGIN_EVENT_WEBLOGPING_DESC);
         $propbag->add('stackable',     false);
         $propbag->add('author',        'Serendipity Team');
-        $propbag->add('version',       '1.05');
+        $propbag->add('version',       '1.06');
         $propbag->add('requirements',  array(
             'serendipity' => '0.8',
             'smarty'      => '2.6.7',
@@ -113,12 +113,14 @@ class serendipity_event_weblogping extends serendipity_event
                     <fieldset style="margin: 5px">
                         <legend><?php echo PLUGIN_EVENT_WEBLOGPING_PING; ?></legend>
 <?php
+                    $noneclick = '';
                     foreach($this->services AS $index => $service) {
                         // Detect if the current checkbox needs to be saved. We use the field chk_timestamp to see,
                         // if the form has already been submitted and individual changes shall be preserved
                         $selected = (($serendipity['POST']['chk_timestamp'] && $serendipity['POST']['announce_entries_' . $service['name']]) || (!isset($serendipity['POST']['chk_timestamp']) && $this->get_config($service['name']) == 'true') ? 'checked="checked"' : '');
 
-                        $onclick = '';
+                        $noneclick .= 'document.getElementById(\'serendipity[announce_entries_' . $service['name'] . ']\').checked = false; ';
+                        $onclick   = '';
                         if (!empty($service['supersedes'])) {
                             $onclick    = 'onclick="';
                             $supersedes = explode(', ', $service['supersedes']);
@@ -136,6 +138,8 @@ class serendipity_event_weblogping extends serendipity_event
 <?php
     }
 ?>
+                            <input onclick="<?php echo $noneclick; ?>" style="margin: 0px; padding: 0px; vertical-align: bottom;" type="checkbox" value="none" id="serendipity[announce_entries_none]" />
+                                <label title="<?php echo NONE; ?>" style="vertical-align: bottom; margin: 0px; padding: 0px;" for="serendipity[announce_entries_none]">&nbsp;<?php echo NONE; ?>&nbsp;&nbsp;</label><br />
                     </fieldset>
 <?php
                     return true;