Plugin Directory

Changeset 385943


Ignore:
Timestamp:
05/17/2011 05:21:11 PM (15 years ago)
Author:
xavsio4
Message:

version 1.3

Location:
weekly-time-table/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • weekly-time-table/trunk/readme.txt

    r385605 r385943  
    88Requires at least: 2.0.2
    99Tested up to: 3.1
    10 Stable Tag: 1.2
     10Stable Tag: 1.3
    1111
    1212Create infinite time tables for the week and display them on your site
     
    2121Then you can use a shortcode with the entry id as a parameter.
    2222
     23The plugin has been translated in spanish and french so far.
     24
    2325For more information check the plugin homepage:
    2426http://www.fifteenpeas.com/blog/wordpress-weekly-time-table-plugin/
     
    3234Use this shortcode anywhere :
    3335
    34 [wttdsp entry_id=5] where 5 is the id of the time table...or [wttdsp entry_id=5,17,8] for multiple entries (version1.2).
     36[wttdsp entry_id=5] where 5 is the id of the time table...or [wttdsp entry_id=5,17,8] for multiple entries.
    3537 
    3638
    3739== Frequently Asked Questions ==
    38 = Is it possible to make multiple entries ? =
    39 Yes, just use the shorcoce with a list : [wttdsp entry_id=5,17,8]
     40= Can I add multiple entries to a timetable ? =
     41Yes, just use a list of IDs separated by a comma instead of one ID (v1.2)
     42
     43= Can I use the timetable in spanish ? =
     44yes, just use the locale folder inside the weekly time yable plugin folder to put your translations (v1.2)
     45Spanish and french are already in place.
    4046
    4147== Screenshots ==
     
    4753== Changelog ==
    4854
     55= 1.3 =
     56- Spanish and French Translation available
     57
    4958= 1.2 =
    50 -I18n ready
    51 -Possibility to add multiple entries (shortcode with ID list) for one time table
    52 -Possibility to enter html as entries
     59- I18n ready
     60- Possibility to add multiple entries (shortcode with ID list) for one time table
     61- Possibility to enter html as entries
     62- translated in spanish and french
    5363
    5464= 1.0 =
    55 * First Version
     65First Version
  • weekly-time-table/trunk/wtt.php

    r385597 r385943  
    3030define ("WTT_DIR", "/wp-content/plugins/" . $dir);
    3131define("WTT_DIR_URL",get_bloginfo('wpurl') .WTT_DIR);
    32 define ("WTT_DIR_I18N", WTT_DIR . "/locales");
     32define ("WTT_DIR_I18N", WTT_DIR . "/locales/");
    3333define ("WTT_TIMETABLE",$wpdb->prefix . "wtt_timetables");
    3434define ("WTT_ENTRYTABLE",$wpdb->prefix . "wtt_ttentries");
    3535
    3636
     37
     38
    3739add_action('init', 'wttPlugIn_load_translation_file');
    3840
    3941function wttPlugIn_load_translation_file() {
    40     load_plugin_textdomain( 'wttPlugIn', false, WTT_DIR_I18N );
     42    // get current language
     43    $locale = get_locale();
     44        $plugin_dir = basename(dirname(__FILE__));
     45    load_plugin_textdomain( 'wttPlugIn','wp-content/plugins/' . $plugin_dir,$plugin_dir.'\locales' );
     46        //WTT_DIR_I18N.'wttPlugIn_'.$locale.'.mo'
     47       
     48       
    4149}
    4250
     
    4957           global $wpdb;
    5058           global $wtt_db_version;
    51            $wtt_db_version      = "1.2";
     59           $wtt_db_version      = "1.3";
    5260           
    5361           
     
    99107            if( $installed_ver != $wtt_db_version ) {
    100108                //the new sql version (but this is fake)
    101                 $sql = "CREATE TABLE " . WTT_ENTRYTABLE . " (
    102                         id INT NOT NULL AUTO_INCREMENT  PRIMARY KEY,
    103                         entryname VARCHAR( 180 )
    104                         );";
     109                $sql = "Alter TABLE " . WTT_ENTRYTABLE . "
     110                        MODIFY  entryname VARCHAR( 180 )
     111                        ;";
    105112                dbDelta($sql);
    106                                 $sql = "CREATE TABLE " . WTT_TIMETABLE . " (
    107                         id INT NOT NULL AUTO_INCREMENT,
    108                         id_entry INT NOT NULL ,
    109                         mon VARCHAR( 30 ) NULL ,
    110                         tue VARCHAR( 30 ) NULL ,
    111                         wed VARCHAR( 30 ) NULL ,
    112                         thu VARCHAR( 30 ) NULL ,
    113                         fri VARCHAR( 30 ) NULL ,
    114                         sat VARCHAR( 30 ) NULL ,
    115                         sun VARCHAR( 30 ) NULL,
    116                         UNIQUE KEY id (id)
    117                         );";
     113                                $sql = "alter TABLE " . WTT_TIMETABLE . "
     114                                        MODIFY mon VARCHAR( 30 ), MODIFY tue VARCHAR( 30 ),MODIFY wed VARCHAR( 30 ),
     115                        MODIFY thu VARCHAR( 30 ),MODIFY fri VARCHAR( 30 ) ,MODIFY sat VARCHAR( 30 ),MODIFY sun VARCHAR( 30 );";
    118116                dbDelta($sql);
    119117                //change the version option of this plugin (not for this install)
     
    159157            $outp.= wttdsp(0);
    160158            $outp .= "<h2>".__('Usage','wttPlugIn')."</h2>";
    161             $outp .= __('You must first create an entry to create a Time Table.
    162                         Then create a time table for that entry.<br/> You can input whatever you want to display in the fields.
    163                         The plugin doesn\'t format. However, length is limited to 30 caracters. Each <em>Wtt time table</em> has
    164                         an id that should be used when displaying it using the shortcode.<br/>
    165             The shortcode to display the time table is <em><strong>[wttdsp entry_id=5]</strong></em>, where 5
    166                         is an id of a <em>time table</em>. You can put a list of IDs in the shortcode to have a
    167                         multiple entries time table, just like this <em><strong>[wttdsp entry_id=5,17,9]</strong></em>.<br/>
    168             Use css to style your timetable. A time table as an <em>id=\'wtt\'</em> attribute.<br/>
    169             When displayed, the entry is in a container with attribute : <em>id=\'wttentry\'</em>
     159            $outp .= __('You must first create an entry to create a Time Table.The plugin doesn\'t format. However, length is limited to 30 caracters. Each <em>Wtt time table</em> has
     160                        an id that should be used when displaying it using the shortcode.<br/>The shortcode to display the time table is <em><strong>[wttdsp entry_id=5]</strong></em>, where 5
     161                        is an id of a <em>time table</em>. You can put a list of IDs in the shortcode to have a multiple entries time table, just like this <em><strong>[wttdsp entry_id=5,17,9]</strong></em>.<br/>
     162            Use css to style your timetable. A time table as an <em>id=\'wtt\'</em> attribute.<br/> When displayed, the entry is in a container with attribute : <em>id=\'wttentry\'</em>
    170163            <br/><br/>As an example, this is the css that is used in the admin side :<br/>
    171             <em>#wtt {padding:2px;}<br/>
    172             #wtt th { background-color:#DDDDDD; padding:5px;}<br/>
    173             #wtt tr { background-color:#EEEEEE;padding:5px;}<br/>
    174             #wtt td {padding:3px; } </em>
    175             <br/><br/>It\'s a simple plugin, feel free to adapt it at will !','wttPlugIn');
     164            <em>#wtt {padding:2px;}<br/>#wtt th { background-color:#DDDDDD; padding:5px;}<br/>#wtt tr { background-color:#EEEEEE;padding:5px;}<br/>#wtt td {padding:3px; } </em><br/><br/>It\'s a simple plugin, feel free to adapt it at will !','wttPlugIn');
    176165            $outp .= '<br/><div><table class="widefat" style="margin-top: .5em"><thead><tr valign="top">
    177166            <th>Fifteenpeas Weekly Time Table WP plugin</th></tr></thead><tbody><tr>   
Note: See TracChangeset for help on using the changeset viewer.