Changeset 1121876
- Timestamp:
- 03/27/2015 01:35:16 AM (11 years ago)
- Location:
- chatup/trunk
- Files:
-
- 5 edited
-
chatup.php (modified) (6 diffs)
-
languages/chatup-it_IT.mo (modified) (previous)
-
languages/chatup-it_IT.po (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
-
settings.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
chatup/trunk/chatup.php
r1121158 r1121876 115 115 public function wpFooterScript($arg) { 116 116 $cid=$this->__fillOption('campaign'); 117 $hide_na=$this->__fillOption('hide_na'); 118 $online_img=$this->__fillOption('online_img'); 119 $offline_img=$this->__fillOption('offline_img'); 117 120 $s="<script>\n". 118 121 "var _chatup=_chatup||[];\n". … … 121 124 " if(x) {\n". 122 125 " _chatup.push('setCampaign','$cid');\n". 126 ($hide_na?" _chatup.push('setHideUnavailable',true);":""). 127 ($online_img?" _chatup.push('setOnlineImage','$online_img');":""). 128 ((!$hide_na && $offline_img)?" _chatup.push('setOfflineImage','$offline_img');":""). 123 129 " _chatup.push('showButton','chatup_but');\n". 124 130 " (function(c,h,a,t) { t=h.createElement(c); t.async=1; t.src='//chatup.it/chatup.js'; a=h.getElementsByTagName(c)[0]; a.parentNode.insertBefore(t,a) })('script',document);\n". … … 154 160 $this->__options = array( 155 161 'campaign' => 0, // Campaign ID 162 'hide_na' => 0, // Hide if no operators available 163 'online_img' => "", // Image URL 164 'offline_img' => "", // Image URL 156 165 ); 157 166 } … … 165 174 // register_setting('chatup','chatup_campaign',array($this,'validateCampaign')); 166 175 register_setting('chatup','chatup_campaign'); 176 register_setting('chatup','chatup_hide_na'); 177 register_setting('chatup','chatup_online_img'); 178 register_setting('chatup','chatup_offline_img'); 167 179 } 168 180 … … 174 186 private function __deleteOptions() { 175 187 delete_option('chatup_campaign'); 188 delete_option('chatup_hide_na'); 189 delete_option('chatup_online_img'); 190 delete_option('chatup_offline_img'); 176 191 } 177 192 … … 183 198 private function __fillOptions() { 184 199 $this->__fillOption('campaign'); 200 $this->__fillOption('hide_na'); 201 $this->__fillOption('online_img'); 202 $this->__fillOption('offline_img'); 185 203 } 186 204 -
chatup/trunk/languages/chatup-it_IT.po
r1121158 r1121876 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: ChatUP 1. 0\n"5 "Project-Id-Version: ChatUP 1.1\n" 6 6 "Report-Msgid-Bugs-To: http://wordpress.org/tag/chatup\n" 7 7 "POT-Creation-Date: 2014-09-27 13:43:06+00:00\n" … … 39 39 msgstr "Campagna (ottieni il tuo codice da" 40 40 41 msgid "Hide chat icon when no operators are available" 42 msgstr "Nascondi icona se non ci sono operatori disponibili" 43 44 msgid "Image URL for operator online [optional]" 45 msgstr "URL dell'immagine per operatore online [opzionale]" 46 47 msgid "Image URL for operator offline (no operators available) [optional]" 48 msgstr "URL dell'immagine per operatore offline [opzionale]" 49 50 msgid "If not absolute, relative to this site" 51 msgstr "Se non assoluto, relativo a questo sito" 52 41 53 #: includes/settings-page.php:96 42 54 msgid "Save" -
chatup/trunk/readme.txt
r1121852 r1121876 4 4 Requires at least: 3.8.5 5 5 Tested up to: 4.1.1 6 Stable tag: 1. 06 Stable tag: 1.1 7 7 License: GPLv2 8 8 … … 61 61 = 1.0 = 62 62 * Initial version 63 64 = 1.1 = 65 * Added options (hide unavailable, custom image urls) -
chatup/trunk/settings.php
r1121158 r1121876 18 18 <?php settings_fields('chatup'); ?> 19 19 <div class="inside"> 20 20 21 <p><strong><?php _e('Campaign (obtain yours from','chatup'); ?> <a href='//chatup.it' target='_blank'>http://chatup.it/</a>):</strong></p> 21 22 <p><input type="number" min="1" max="9999" name="chatup_campaign" value="<?php echo $this->__options['campaign']; ?>" /></p> 23 24 <p><strong><?php _e('Hide chat icon when no operators are available', 'chatup'); ?> (offline):</strong></p> 25 <p><input type="checkbox" name="chatup_hide_na" value="true" <?php echo ($this->__options['hide_na'])?'checked':''; ?> /></p> 26 27 <p><strong><?php _e('Image URL for operator online [optional]', 'chatup'); ?>:</strong></p> 28 <p><input type="text" name="chatup_online_img" value="<?php echo $this->__options['online_img']; ?>" size=40 /><br> 29 <i><?PHP _e('If not absolute, relative to this site'); ?></i></p> 30 31 <p><strong><?php _e('Image URL for operator offline (no operators available) [optional]', 'chatup'); ?>:</strong></p> 32 <p><input type="text" name="chatup_offline_img" value="<?php echo $this->__options['offline_img']; ?>" size=40 /><br> 33 <i><?PHP _e('If not absolute, relative to this site'); ?></i></p> 34 22 35 <?php submit_button(__('Save','chatup'),'primary','submit',false); ?> 23 36 <br>
Note: See TracChangeset
for help on using the changeset viewer.