if ($r['lat'] == 0 || $r['lon'] == 0) {
$r['bad_lat_lon'] = true;
}
-
}
// Only run these tests for 'l' (getList), 'g' (getEntry), 'e' (editEntry), 'u' (updateEntry)
return $r;
}
+ // Check that URLs have http:// in front of them.
+ if (strtolower(substr($r['url'],0,4)) != 'http') {
+ $r['url'] = 'http://'.$r['url'];
+ }
+ if (strtolower(substr($r['reservation_url'],0,4)) != 'http') {
+ $r['reservation_url'] = 'http://'.$r['reservation_url'];
+ }
+
// Get Amenity Data for this entry
if ($this->doPostProcessing || $this->postProcessAmenity) {
$sql = "
// Load Smarty Template support
$smarty = new smartyTemplateSupport();
+ // Build Admin Page Text using "adminPageText.html". That template should include a pop-up form and display any selected text.
+ $pageTopText = '';
+ // **** NEED TO GET PAGE TOP TEXT HERE ****
+ $smarty->templateAssign( 'glmAdminPageTopText', $pageTopText);
+ $output = $smarty->template->fetch('admin/adminPageText.html');
+
// Add standard template parameters
require GLM_MEMBERS_PLUGIN_SETUP_PATH.'/standardTemplateParams.php';
$smarty->templateAssign('errorMsg', $errorMsg);
}
- // Update the Smarty view path - *** NEEED TO FIX THIS TO SUPPORT THEME VIEWS SOMEHOW ****
+ // Update the Smarty view path
$smarty->template->addTemplateDir($viewPath);
// Generate output from model data and view
if ( $returnOutput ) {
- $output = $smarty->template->fetch( $viewFile );
+ $output = $output.$smarty->template->fetch( $viewFile );
} else {
+ echo $output;
$smarty->template->display( $viewFile );
}
--- /dev/null
+{* This is a template for entering and displaying text on the top of each admin page. Included by admin controller. *}
+{* Needs to be developed. Admin Controller needs to get page top text if any and it should be displayed here along with a form accessible by a button to add or edit text. *}
\ No newline at end of file