Changeset 136867
- Timestamp:
- 07/20/2009 05:25:57 AM (17 years ago)
- Location:
- nitwpress/trunk
- Files:
-
- 4 added
- 1 edited
-
nitwpress.php (modified) (3 diffs)
-
po (added)
-
po/nitwpress-ja.mo (added)
-
po/nitwpress-ja.po (added)
-
po/nitwpress.pot (added)
Legend:
- Unmodified
- Added
- Removed
-
nitwpress/trunk/nitwpress.php
r135955 r136867 191 191 } 192 192 193 function nitwpress_display_error($mesg) { 194 echo "<p style=\"color:red\">ERROR: {$mesg}</p>"; 195 } 196 193 197 /* 194 198 * Widget manager. … … 203 207 ?> 204 208 <form method="post"> 205 <h3> Twitter account</h3>209 <h3><?php _e('Twitter account', 'nitwpress') ?></h3> 206 210 <table> 207 211 <tr> 208 <td> Username:</td>212 <td><?php _e('Username:', 'nitwpress') ?></td> 209 213 <td><input type="text" name="nitwpress_username" value="<?php echo htmlspecialchars($options['username']) ?>" /></td> 210 214 </tr> 211 215 212 216 <tr> 213 <td> Password:</td>217 <td><?php _e('Password:', 'nitwpress') ?></td> 214 218 <td><input type="password" name="nitwpress_password" value="<?php echo htmlspecialchars($options['password']) ?>" /></td> 215 219 </tr> 216 220 </table> 217 221 218 <h3> Widget title</h3>222 <h3><?php _e('Widget title', 'nitwpress') ?></h3> 219 223 220 224 <div><input type="text" name="nitwpress_widgettitle" value="<?php echo htmlspecialchars($options['widgettitle']) ?>" style="width:100%" /></div> 221 225 222 <p> (The widget suppress the widget title when this field is empty.)</p>223 224 <h3> CSS for widget content</h3>226 <p><?php _e('(The widget suppress the widget title when this field is empty.)', 'nitwpress') ?></p> 227 228 <h3><?php _e('CSS for widget content', 'nitwpress') ?></h3> 225 229 226 230 <div><input type="text" name="nitwpress_widgetstyles" value="<?php echo htmlspecialchars($options['widgetstyles']) ?>" style="width:100%" /></div> 227 <p> (The widget content area have "nitwpress_widget_content" class. You can use the CSS class for designing the widget with out this field.)</p>228 229 <h3> Font colors</h3>231 <p><?php _e('(The widget content area have "nitwpress_widget_content" class. You can use the CSS class for designing the widget with out this field.)', 'nitwpress') ?></p> 232 233 <h3><?php _e('Font colors', 'nitwpress') ?></h3> 230 234 231 235 <table> 232 236 <tr> 233 <td> Color of comments:</td>237 <td><?php _e('Color of comments:', 'nitwpress') ?></td> 234 238 <td><input type="text" name="nitwpress_fontcolor" value="<?php echo htmlspecialchars($options['fontcolor']) ?>" size="7" /></td> 235 239 </tr> 236 240 <tr> 237 <td> Color of links:</td>241 <td><?php _e('Color of links:', 'nitwpress') ?></td> 238 242 <td><input type="text" name="nitwpress_linkcolor" value="<?php echo htmlspecialchars($options['linkcolor']) ?>" size="7" /></td> 239 243 </tr> 240 244 </table> 241 245 242 <p>(Use hash color code (e.g. #ffffff) or "auto" for these fields. 243 HTML color name (e.g. white) is not acceptable. 244 The widget will read default font and link colors from Twitter API if you choose "auto".)</p> 245 246 <h3>Frame for icon image</h3> 246 <p><?php _e('(Use hash color code (e.g. #ffffff) or "auto" for these fields. HTML color name (e.g. white) is not acceptable. The widget will read default font and link colors from Twitter API if you choose "auto".)', 'nitwpress', 'nitwpress') ?></p> 247 <h3><?php _e('Frame for icon image', 'nitwpress') ?></h3> 247 248 248 249 <p><input type="checkbox" id="nitwpress_iconframe_checkbox" name="nitwpress_iconframe" value="1" <?php if ($options['iconframe']) { echo 'checked="checked"'; } ?> /> 249 <label for="nitwpress_iconframe_checkbox">Enable icon image frame.</label></p> 250 <p>Color of icon frame: <input type="text" name="nitwpress_iconframecolor" value="<?php echo htmlspecialchars($options['iconframecolor']) ?>" size="7" /><br /> 251 (Use hash color code (e.g. #ffffff) for this field. 252 HTML color name (e.g. white) is not acceptable.)</p> 253 254 <h3>Miscellaneous options</h3> 255 256 <p>Update timeline cache at every <input type="text" name="nitwpress_interval" value="<?php echo htmlspecialchars($options['interval']) ?>" size="3" /> minutes.</p> 250 <label for="nitwpress_iconframe_checkbox"><?php _e('Enable icon image frame.', 'nitwpress') ?></label></p> 251 <p><?php _e('Color of icon frame:', 'nitwpress') ?> <input type="text" name="nitwpress_iconframecolor" value="<?php echo htmlspecialchars($options['iconframecolor']) ?>" size="7" /><br /> 252 <?php _e('(Use hash color code (e.g. #ffffff) for this field. HTML color name (e.g. white) is not acceptable.)', 'nitwpress') ?></p> 253 254 <h3><?php _e('Miscellaneous options', 'nitwpress') ?></h3> 255 256 <p><?php _e('Cache updating interval:', 'nitwpress') ?> <input type="text" name="nitwpress_interval" value="<?php echo htmlspecialchars($options['interval']) ?>" size="3" /> <?php _e('(minutes)', 'nitwpress') ?></p> 257 257 258 258 <p><input type="checkbox" id="nitwpress_logo_checkbox" name="nitwpress_logo" value="1" <?php if ($options['logo']) { echo 'checked="checked"'; } ?> /> 259 <label for="nitwpress_logo_checkbox"> Display NiTwPress logo on Flash.</label></p>259 <label for="nitwpress_logo_checkbox"><?php _e('Display NiTwPress logo on Flash.', 'nitwpress') ?></label></p> 260 260 </form> 261 261 <?php 262 262 263 if (!is_dir(NITWPRESS_CACHEDIR)) : 264 ?> 265 <p style="color:red">ERROR: Missing permissions for writing on 266 <?php echo NITWPRESS_CACHEDIR ?><br /> 267 Fix the error before enter your Twitter account</p> 268 <?php 269 endif; 263 if (!is_dir(NITWPRESS_CACHEDIR)) { 264 nitwpress_display_error(sprintf(__("Missing permissions for writing on %s. Fix the error before enter your Twitter account."), NITWPRESS_CACHEDIR)); 265 } 270 266 271 267 if (!function_exists('curl_init')) { 272 ?> 273 <p style="color:red">ERROR: Missing cURL module.</p> 274 <?php 268 nitwpress_display_error(__('Missing cURL module.')); 275 269 } 276 270 } … … 281 275 function nitwpress_init() { 282 276 require_once(ABSPATH . 'wp-includes/widgets.php'); 277 load_plugin_textdomain('nitwpress', 'wp-content/plugins/nitwpress/po', 278 'nitwpress/po'); 283 279 register_sidebar_widget('NiTwPress', 'nitwpress_sidebar_widget'); 284 280 register_widget_control('NiTwPress', 'nitwpress_widget_control');
Note: See TracChangeset
for help on using the changeset viewer.