Changeset 135014
- Timestamp:
- 07/14/2009 12:37:58 PM (17 years ago)
- Location:
- booking-event
- Files:
-
- 10 added
- 3 edited
-
tags/0.2 (added)
-
tags/0.2/README.txt (added)
-
tags/0.2/bookable_events.css (added)
-
tags/0.2/bookable_events.php (added)
-
tags/0.2/lang (added)
-
tags/0.2/lang/bookable-events-it_IT.mo (added)
-
tags/0.2/lang/bookable-events-it_IT.po (added)
-
tags/0.2/lang/bookable-events.pot (added)
-
tags/0.2/screenshot-1.jpg (added)
-
tags/0.2/screenshot-2.JPG (added)
-
trunk/README.txt (modified) (1 diff)
-
trunk/Thumbs.db (modified) (previous)
-
trunk/bookable_events.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
booking-event/trunk/README.txt
r131774 r135014 5 5 Require: avatars plugin. you cand download from http://www.sterling-adventures.co.uk/blog/2008/03/01/avatars-plugin/ 6 6 Tested up to: 2.7.1 7 Stable tag: 0. 17 Stable tag: 0.2 8 8 9 9 Plugin that makes a post 'bookable', using the custom fields. -
booking-event/trunk/bookable_events.php
r131774 r135014 6 6 The registered users can add/remove their participation to an event (represented by a post) by links at the bottom of the post. 7 7 This plugin provides also a widget displaying the list of the last 'bookable events' added. Edited by Giovanni Caputo 8 Version: 1.0.48 Version: 0.2 9 9 Author: Francesca 'sefran' Secondo and edited by Giovani Caputo 10 10 Author URI: http://giovannicaputo.netsons.org … … 215 215 } 216 216 217 218 219 220 /*check if date on bookable_event is passed from today */ 221 222 function is_passed(){ 223 224 global $bookable_key; 225 global $bookable; 226 $meta = get_post_custom(); 227 $date = $meta[$bookable_key][0]; 228 229 if ( strtotime($date)==FALSE ) return false; 230 231 $todays_date = time(); 232 233 234 $dateArr = explode("-",$date); 235 236 $date1Int = mktime(0,0,0,$dateArr[1],$dateArr[2],$dateArr[0]) ; 237 238 239 240 if ( $todays_date > $date1Int ) { return true; } else { return false; } 241 242 243 244 } 245 246 247 248 249 217 250 /* 218 251 Adds the registration/unregistration links at the bottom of the 'bookable' post. Moreover, it adds the 'bookable event' label at the post beginning. 219 252 */ 220 253 function add_links_to_post( $content = '' ) { 221 222 if ( is_bookable() && !post_password_required() && utentePuoRegistrarsi() )254 255 if ( is_bookable() && !post_password_required() && utentePuoRegistrarsi() ) 223 256 { 224 257 if (!isset($_GET['click_register']) && !isset($_GET['click_unregister'])){ 225 258 $content = "<div class='redtext'>".__("bookable event", 'bookable-events')."</div>$content<br/><div class='event'>"; 226 259 227 if ( !untenteGiaPrenotato() ){260 if ( !untenteGiaPrenotato() && !is_passed() ){ 228 261 $content.=add_link_registration()."<br/>"; 229 262 230 263 } 231 if ( untenteGiaPrenotato() ){264 if ( untenteGiaPrenotato() && !is_passed() ){ 232 265 $content.=add_link_unregistration()."<br/>"; 233 266 } … … 361 394 } 362 395 396 397 398 399 400 401 363 402 /* 364 403 Outputs the content of the "Last bookable events" widget, that is the titles of 'bookable post'.
Note: See TracChangeset
for help on using the changeset viewer.