Changeset 2898
- Timestamp:
- 01/19/11 14:22:26 (12 years ago)
- Location:
- plugins/myLocation/trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/myLocation/trunk/_admin.php
r2843 r2898 17 17 $core->auth->check('admin',$core->blog->id)); 18 18 19 $core->addBehavior('adminPostHeaders',array('myLocationBehaviors','adminHeaders')); 20 $core->addBehavior('adminPageHeaders',array('myLocationBehaviors','adminHeaders')); 21 22 class myLocationBehaviors 23 { 24 public static function adminHeaders() 25 { 26 global $core; 27 28 return 29 dcPage::jsLoad('index.php?pf=myLocation/js/post.js'). 30 '<script type="text/javascript">'."\n". 31 '//<![CDATA['."\n". 32 'var post_location_checkbox = "'.__('Add my location').'";'."\n". 33 'var post_location_search = "'.__('Searching...').'";'."\n". 34 'var post_location_error_denied = "'.__('Permission denied by your browser').'";'."\n". 35 'var post_location_error_unavailable = "'.__('You location is currently unavailable. Please, try later').'";'."\n". 36 'var post_location_error_accuracy = "'.__('You location is currently unavailable for the choosen accuracy').'";'."\n". 37 'var post_location_longitude = "'.(isset($_POST['c_location_longitude']) ? $_POST['c_location_longitude'] : '').'";'."\n". 38 'var post_location_latitude = "'.(isset($_POST['c_location_latitude']) ? $_POST['c_location_latitude'] : '').'";'."\n". 39 'var post_location_address = "'.(isset($_POST['c_location_address']) ? $_POST['c_location_address'] : '').'";'."\n". 40 'var post_location_accuracy = "'.$core->blog->settings->myLocation->accuracy.'";'."\n". 41 '//]]>'."\n". 42 '</script>'."\n"; 43 } 44 } 45 19 46 ?> -
plugins/myLocation/trunk/_define.php
r2844 r2898 15 15 /* Description*/ "Display your current location", 16 16 /* Author */ "Tomtom (http://blog.zenstyle.fr)", 17 /* Version */ '0.1. 3',17 /* Version */ '0.1.4', 18 18 /* Permissions */ 'usage,contentadmin' 19 19 ); -
plugins/myLocation/trunk/_install.php
r2843 r2898 25 25 $core->blog->settings->myLocation->put('accuracy','city','string','Geolocalisation accuracy',false,true); 26 26 $core->blog->settings->myLocation->put('css','','string','Custom CSS',false,true); 27 $core->blog->settings->myLocation->put('mask','<a href="%1$s">%2$s</a>','string','Display mask',false,true); 27 28 28 29 # --INSTALL AND UPDATE PROCEDURES-- -
plugins/myLocation/trunk/inc/class.rs.ext.comment.location.php
r2843 r2898 36 36 sprintf('http://maps.google.com/maps?q=%s,+%s+%s',$location['latitude'],$location['longitude'],''); 37 37 38 return sprintf( '<a href="%s">%s</a>',$url,$address);38 return sprintf($rs->core->blog->settings->myLocation->mask,$url,$address); 39 39 } 40 40 } -
plugins/myLocation/trunk/index.php
r2843 r2898 23 23 $core->blog->settings->myLocation->put('css',$_POST['css']); 24 24 $core->blog->settings->myLocation->put('accuracy',$_POST['accuracy']); 25 http::redirect($p_url.'&upd'); 25 $core->blog->settings->myLocation->put('mask',$_POST['mask']); 26 http::redirect($p_url.'&upd=1'); 26 27 } 27 28 catch (Exception $e) { … … 61 62 '<form method="post" action="'.$p_url.'">'. 62 63 '<fieldset><legend>'.__('General options').'</legend>'. 63 '<p><label class="classic" >'.64 '<p><label class="classic" for="enable">'. 64 65 form::checkbox('enable','1',$core->blog->settings->myLocation->enable). 65 66 __('Enable geolocation').'</label></p>'. 66 '<p><label class="field" >'.67 '<p><label class="field" for="position">'. 67 68 __('Position of location display').' '. 68 69 form::combo('position',$combo_positions,$core->blog->settings->myLocation->position). 69 70 '</label></p>'. 70 '<p><label class="field" >'.71 '<p><label class="field" for="css">'. 71 72 __('Custom CSS'). 72 73 form::field('css',100,255,$core->blog->settings->myLocation->css). 73 74 '</label></p>'. 74 75 '<p class="form-note">'.__('Leave blank to use the default plugin CSS').'</p>'. 75 '<p><label class="field" >'.76 '<p><label class="field" for="accuracy">'. 76 77 __('Geolocalisation accuracy').' '. 77 78 form::combo('accuracy',$combo_accuracy,$core->blog->settings->myLocation->accuracy). 78 79 '</label></p>'. 80 '<p><label class="field" for="mask">'. 81 __('Display mask').' '. 82 form::field('mask',100,255,html::escapeHTML($core->blog->settings->myLocation->mask)). 83 '</label></p>'. 84 '<p class="form-note">'.__('%1$s = Google Maps URL, %2$s = location text').'</p>'. 79 85 '</fieldset>'. 80 86 '<p>'.$core->formNonce().'<input type="submit" name="save" value="'.__('Save').'" /></p>'.
Note: See TracChangeset
for help on using the changeset viewer.