Add About metabox to options page, and add Localization section to readme.txt
This commit is contained in:
1 parent
8077076063
commit
4407634a08
10 files changed
+54
No files matched your search
@@ -17,6 +17,7 @@ class auto_thickbox_options {
|
||||
add_meta_box( 'text-box', __('Text'), array(&$this, 'text_metabox'), 'auto-thickbox-options', 'normal' );
|
||||
add_meta_box( 'image-box', $this->texts['image'], array(&$this, 'image_metabox'), 'auto-thickbox-options', 'normal' );
|
||||
add_meta_box( 'effect-box', __('Effect', 'auto-thickbox') . ' (' . __('beta', 'auto-thickbox') . ')', array(&$this, 'effect_metabox'), 'auto-thickbox-options', 'normal' );
|
||||
add_meta_box( 'about-box', $this->texts['about'], array(&$this, 'about_metabox'), 'auto-thickbox-options', 'normal' );
|
||||
if (isset($_SERVER['HTTP_REFERER']) && strpos($_SERVER['HTTP_REFERER'], 'post_id=' . $this->options['post_id']) !== false) {
|
||||
add_filter('gettext', array(&$this, 'replace_insert_button'), 20, 3);
|
||||
register_post_type('auto-thickbox-plus', array('label' => AUTO_THICKBOX_PLUS));
|
||||
@@ -816,6 +817,19 @@ class auto_thickbox_options {
|
||||
<?php
|
||||
}
|
||||
|
||||
function about_metabox() {
|
||||
?>
|
||||
<ul class="about">
|
||||
<li class="wp"><a href="http://wordpress.org/extend/plugins/auto-thickbox-plus/" target="_blank"><?php echo $this->texts['visit']; ?></a></li>
|
||||
<li class="star"><a href="http://wordpress.org/extend/plugins/auto-thickbox-plus/" target="_blank"><?php _e('Put rating stars or vote compatibility (works/broken)', 'auto-thickbox'); ?></a></li>
|
||||
<li class="forum"><a href="http://wordpress.org/support/plugin/auto-thickbox-plus" target="_blank"><?php _e('View support forum or post a new topic', 'auto-thickbox'); ?></a></li>
|
||||
<li class="l10n"><a href="http://wordpress.org/extend/plugins/auto-thickbox-plus/other_notes/#Localization" target="_blank"><?php _e('Translate the plugin into your language', 'auto-thickbox'); ?></a></li>
|
||||
<li class="donate"><a href="<?php _e('https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=D2DLJNSUFBU4U', 'auto-thickbox'); ?>" target="_blank"><?php _e('Donate to support plugin development', 'auto-thickbox'); ?></a></li>
|
||||
<li class="contact"><a href="<?php _e('http://attosoft.info/en/', 'auto-thickbox'); ?>contact/" target="_blank"><?php _e('Contact me if you have any feedback', 'auto-thickbox'); ?></a></li>
|
||||
</ul>
|
||||
<?php
|
||||
}
|
||||
|
||||
/**
|
||||
* XXX: disabled() function is defined from WordPress 3.0
|
||||
* @see /wp-includes/general-template.php
|
||||
|
||||
@@ -5,6 +5,10 @@
|
||||
* attosoft <contact@attosoft.info>, 2012.
|
||||
*/
|
||||
|
||||
|
||||
.form-table { font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, sans-serif; }
|
||||
ul.about { font-family: Georgia, "Times New Roman", "Bitstream Charter", Times, serif; }
|
||||
|
||||
label.item, input.button { margin-right:3px; }
|
||||
|
||||
.form-table th { width: 180px; font-weight: bold; }
|
||||
@@ -44,6 +48,19 @@ ol.sortable li {
|
||||
}
|
||||
ol.sortable .ui-sortable-helper { list-style-type: none; }
|
||||
|
||||
ul.about li {
|
||||
margin: 0 0 15px 10px;
|
||||
padding-left: 70px;
|
||||
font-size: 14px;
|
||||
line-height: 48px;
|
||||
}
|
||||
li.wp { background: url(images/wp.png) no-repeat; }
|
||||
li.star { background: url(images/star.png) no-repeat; }
|
||||
li.forum { background: url(images/forum.png) no-repeat; }
|
||||
li.l10n { background: url(images/l10n.png) no-repeat; }
|
||||
li.donate { background: url(images/donate.png) no-repeat; }
|
||||
li.contact { background: url(images/contact.png) no-repeat; }
|
||||
|
||||
/* @see also jquery.ui.css in Smoothness theme */
|
||||
.ui-disabled a { cursor: default !important; }
|
||||
.ui-widget-content { border: 1px solid #aaaaaa; background: #ffffff; }
|
||||
|
||||
@@ -693,6 +693,8 @@ SCRIPT;
|
||||
$this->texts['contact'] = ucfirst($this->gettext('Contact Me', array('contact')));
|
||||
$this->texts['link'] = ucfirst($this->gettext('Link', array('Links')));
|
||||
$this->texts['insert'] = $this->gettext('Insert Image', array('Insert an Image', 'Insert'));
|
||||
$this->texts['about'] = $this->gettext('About');
|
||||
$this->texts['visit'] = $this->gettext('Visit plugin site', array('Visit plugin homepage'));
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.4 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 6.2 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 7.0 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.6 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 3.6 KiB |
+21
@@ -538,3 +538,24 @@ To force internal files to open inside `<iframe>`, Add `TB_iframe=true` paramete
|
||||
<a href="file.php?bar=baz&TB_iframe=true&modal=true" class="thickbox">Dynamic page</a>
|
||||
|
||||
\* Note: Parameters after `TB_iframe` are removed (i.e. Parameters before `TB_iframe` are kept as query). In the code above, "&TB_iframe=true&modal=true" is removed and "bar=baz" is kept as query.
|
||||
|
||||
== Localization ==
|
||||
|
||||
You can localize the plugin with [Poedit](http://www.poedit.net/). Here is how to translate the plugin into your language.
|
||||
|
||||
1. [Download Poedit](http://www.poedit.net/download.php) and install it
|
||||
2. Run Poedit and select your language
|
||||
3. Input your name and mail address (optional)
|
||||
4. Open "auto-thickbox-plus/languages/auto-thickbox.pot" file
|
||||
5. Select original string and input its translation
|
||||
6. Save the file as "auto-thickbox-[LANG].po"
|
||||
|
||||
"[LANG]" is a language code. For instance, "de_DE" is for German, "sv_SE" is for Swedish, "pt_BR" is for Portuguese spoken in Brazil. If you want to know your language code, see [WordPress in Your Language](http://codex.wordpress.org/WordPress_in_Your_Language). If you need more information, see [Translating WordPress](http://codex.wordpress.org/Translating_WordPress).
|
||||
|
||||
I would be grateful if you would [send me](http://attosoft.info/en/contact/) any translation files. Here are the available translations included in the latest plugin.
|
||||
|
||||
* Dutch (nl_NL) translations by [Michel Bats](http://www.batssoft.nl/)
|
||||
* French (fr_FR) translations by [Jean-Bastien Prévots](http://www.jbprevots.fr/)
|
||||
* Japanese (ja) translations by [attosoft](http://attosoft.info/)
|
||||
|
||||
If you have any questions, feel free to [contact me](http://attosoft.info/en/contact/).
|
||||
Reference in new issue
Block a user