Plugin Directory

Changeset 646503


Ignore:
Timestamp:
12/31/2012 09:08:22 PM (13 years ago)
Author:
parkerj
Message:

Added internationalization

Location:
wp-tinyforum-widget/trunk
Files:
6 added
2 edited

Legend:

Unmodified
Added
Removed
  • wp-tinyforum-widget/trunk/readme.txt

    r645656 r646503  
    55Requires at least: 3.5
    66Tested up to: 3.5
    7 Stable tag: 1.0
     7Stable tag: 1.1
    88
    99A sidebar widget that displays a certain number of topics from a tinyForum installation.
     
    2525* Initial release
    2626
     27= 1.1 (2012-12-31) =
     28* Added internationalization
     29* Added image bullets
     30
    2731== Screenshots ==
    28321. Widget Settings Page
  • wp-tinyforum-widget/trunk/wp_tinyForum_widget.php

    r645656 r646503  
    55Description: A sidebar widget for your WordPress site that will show a certain number of topics from your tinyForum installation.
    66Author: Joshua Parker
    7 Version: 1.0
     7Version: 1.1
    88Author URI: http://www.joshparker.us/
    99*/
     
    4343?>
    4444<div class="wrap">
    45 <h2><?php _e('WP tinyForum Recent Forum Topics','wp_tinyForum'); ?></h2>
     45<h2><?php _e('WP tinyForum Recent Forum Topics','wp-tinyforum-widget'); ?></h2>
    4646
    4747<form method="post" action="options.php">
     
    4949    <table class="form-table">
    5050        <tr valign="top">
    51         <th scope="row"><?php _e('tinyForum Database Host (usually localhost)','wp_tinyForum'); ?></th>
     51        <th scope="row"><?php _e('tinyForum Database Host (usually localhost)','wp-tinyforum-widget'); ?></th>
    5252        <td><input type="text" name="wp_tinyForum_host" size="50" value="<?php echo get_option('wp_tinyForum_host'); ?>" /></td>
    5353        </tr>
    5454       
    5555        <tr valign="top">
    56         <th scope="row"><?php _e('tinyForum Database Username','wp_tinyForum'); ?></th>
     56        <th scope="row"><?php _e('tinyForum Database Username','wp-tinyforum-widget'); ?></th>
    5757        <td><input type="text" name="wp_tinyForum_user" size="50" value="<?php echo get_option('wp_tinyForum_user'); ?>" /></td>
    5858        </tr>
    5959       
    6060        <tr valign="top">
    61         <th scope="row"><?php _e('tinyForum Database Password','wp_tinyForum'); ?></th>
     61        <th scope="row"><?php _e('tinyForum Database Password','wp-tinyforum-widget'); ?></th>
    6262        <td><input type="password" name="wp_tinyForum_pass" size="50" value="<?php echo get_option('wp_tinyForum_pass'); ?>" /></td>
    6363        </tr>
    6464       
    6565        <tr valign="top">
    66         <th scope="row"><?php _e('tinyForum Database Name','wp_tinyForum'); ?></th>
     66        <th scope="row"><?php _e('tinyForum Database Name','wp-tinyforum-widget'); ?></th>
    6767        <td><input type="text" name="wp_tinyForum_database" size="50" value="<?php echo get_option('wp_tinyForum_database'); ?>" /></td>
    6868        </tr>
    6969       
    7070        <tr valign="top">
    71         <th scope="row"><?php _e('tinyForum Topics Table','wp_tinyForum'); ?></th>
     71        <th scope="row"><?php _e('tinyForum Topics Table','wp-tinyforum-widget'); ?></th>
    7272        <td><input type="text" name="wp_tinyForum_topics_table" size="50" value="<?php echo get_option('wp_tinyForum_topics_table'); ?>" /></td>
    7373        </tr>
    7474             
    7575        <tr valign="top">
    76         <th scope="row"><?php _e('Number of topics to show','wp_tinyForum'); ?></th>
     76        <th scope="row"><?php _e('Number of topics to show','wp-tinyforum-widget'); ?></th>
    7777        <td><input type="text" name="wp_tinyForum_no_of_topics" size="50" value="<?php echo get_option('wp_tinyForum_no_of_topics'); ?>" /></td>
    7878        </tr>
    7979       
    8080        <tr valign="top">
    81         <th scope="row"><?php _e('URL to Forum (including trailing slash)','wp_tinyForum'); ?></th>
     81        <th scope="row"><?php _e('URL to Forum (including trailing slash)','wp-tinyforum-widget'); ?></th>
    8282        <td><input type="text" name="wp_tinyForum_url" size="50" value="<?php echo get_option('wp_tinyForum_url'); ?>" /></td>
    8383        </tr>
     
    8686   
    8787    <p class="submit">
    88     <input type="submit" class="button-primary" value="<?php _e('Save Changes','wp_tinyForum') ?>" />
     88    <input type="submit" class="button-primary" value="<?php _e('Save Changes','wp-tinyforum-widget') ?>" />
    8989    </p>
    9090
     
    105105
    106106?>
    107 
    108 <div id="widget_wptinyForum" class="widget widget_wp_tinyForum"><h3 class="widget-title"><span><?php _e('Recent Forum Topics','wp_tinyForum'); ?></span></h3>
    109     <ul>
     107<style type="text/css">
     108        #latestTopics
     109        {
     110            margin-left: 0;
     111            padding-left: 0;
     112            list-style: none;
     113        }
     114       
     115        #latestTopics li       
     116        {
     117            padding-left: 1.8em;
     118            background-image: url(<?php echo get_option('siteurl'); ?>/wp-content/plugins/wp-tinyforum-widget/images/topic.png);
     119            background-repeat: no-repeat;
     120            background-position: 0 .3em;
     121        }
     122</style>
     123<div id="widget_wptinyForum" class="widget widget_wp_tinyForum"><h3 class="widget-title"><span><?php _e('Recent Forum Topics','wp-tinyforum-widget'); ?></span></h3>
     124    <ul id="latestTopics">
    110125        <?php if(mysqli_num_rows($q) > 0) {
    111126                while($row = mysqli_fetch_assoc($q)) {
     
    121136<?php
    122137    }   
    123     wp_register_sidebar_widget('widget_wp_tinyForum_init_2012', 'WP tinyForum Replies', 'widget_wp_tinyForum', array('description' => 'Adds a sidebar widget showing a set number of topics from your tinyForum installation.'));
     138    wp_register_sidebar_widget('widget_wp_tinyForum_init_2012', 'WP tinyForum Topics', 'widget_wp_tinyForum', array('description' => 'Adds a sidebar widget showing a set number of topics from your tinyForum installation.'));
    124139}
    125140add_action('plugins_loaded', 'widget_wp_tinyForum_init');
     141
     142// i18n
     143$plugin_dir = basename(dirname(__FILE__)). '/languages';
     144load_plugin_textdomain( 'wp-tinyforum-widget', WP_PLUGIN_DIR.'/'.$plugin_dir, $plugin_dir );
Note: See TracChangeset for help on using the changeset viewer.