Changeset 385943
- Timestamp:
- 05/17/2011 05:21:11 PM (15 years ago)
- Location:
- weekly-time-table/trunk
- Files:
-
- 2 edited
-
readme.txt (modified) (4 diffs)
-
wtt.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
weekly-time-table/trunk/readme.txt
r385605 r385943 8 8 Requires at least: 2.0.2 9 9 Tested up to: 3.1 10 Stable Tag: 1. 210 Stable Tag: 1.3 11 11 12 12 Create infinite time tables for the week and display them on your site … … 21 21 Then you can use a shortcode with the entry id as a parameter. 22 22 23 The plugin has been translated in spanish and french so far. 24 23 25 For more information check the plugin homepage: 24 26 http://www.fifteenpeas.com/blog/wordpress-weekly-time-table-plugin/ … … 32 34 Use this shortcode anywhere : 33 35 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. 35 37 36 38 37 39 == 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 ? = 41 Yes, 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 ? = 44 yes, just use the locale folder inside the weekly time yable plugin folder to put your translations (v1.2) 45 Spanish and french are already in place. 40 46 41 47 == Screenshots == … … 47 53 == Changelog == 48 54 55 = 1.3 = 56 - Spanish and French Translation available 57 49 58 = 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 53 63 54 64 = 1.0 = 55 *First Version65 First Version -
weekly-time-table/trunk/wtt.php
r385597 r385943 30 30 define ("WTT_DIR", "/wp-content/plugins/" . $dir); 31 31 define("WTT_DIR_URL",get_bloginfo('wpurl') .WTT_DIR); 32 define ("WTT_DIR_I18N", WTT_DIR . "/locales ");32 define ("WTT_DIR_I18N", WTT_DIR . "/locales/"); 33 33 define ("WTT_TIMETABLE",$wpdb->prefix . "wtt_timetables"); 34 34 define ("WTT_ENTRYTABLE",$wpdb->prefix . "wtt_ttentries"); 35 35 36 36 37 38 37 39 add_action('init', 'wttPlugIn_load_translation_file'); 38 40 39 41 function 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 41 49 } 42 50 … … 49 57 global $wpdb; 50 58 global $wtt_db_version; 51 $wtt_db_version = "1. 2";59 $wtt_db_version = "1.3"; 52 60 53 61 … … 99 107 if( $installed_ver != $wtt_db_version ) { 100 108 //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 ;"; 105 112 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 );"; 118 116 dbDelta($sql); 119 117 //change the version option of this plugin (not for this install) … … 159 157 $outp.= wttdsp(0); 160 158 $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> 170 163 <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'); 176 165 $outp .= '<br/><div><table class="widefat" style="margin-top: .5em"><thead><tr valign="top"> 177 166 <th>Fifteenpeas Weekly Time Table WP plugin</th></tr></thead><tbody><tr>
Note: See TracChangeset
for help on using the changeset viewer.