Maybe I'm overthinking this one, and I'm not too handy with the OOP, but I'm extending rg66's CB Advanced Search to work with a modified version of the Google Maps plugin to allow for proximity searches of user profiles, and ran into a snag.
For sake of efficacy, I'd like to retrieve the parameters and execute a function within the Google Maps CB plugin in the Advanced Search component, but I can't seem to get what I guess is a cbParameters object returned.
The code in the component looks like this...
[code:1]require_once($mosConfig_absolute_path.'/components/com_comprofiler/plugin/user/plug_geocoder/geocoder.php');
$geo = new getGeocoderTab();
$geocode_params = $geo->_getParams();
...
[/code:1]
and the function that returns the parameters within the getGeocoderTab class is just...
Am I missing a step or two to retrieve that cbParameters object, or would it not be advisable to go about it this way? Thanks in advance!
Joomlapolitan zealot and a somewhat stealthy, rather passive CB3PD developer.
www.constructionlounge.com
Construction Lounge: Online resource and networking portal for the construction and remodeling industries.
Thanks, Mikko. That approach worked out fine. Here was the end result:
[code:1]
// Results map
$params_query = "SELECT params FROM #__comprofiler_plugin p WHERE p.element = 'geocoder'";
$database->setQuery($params_query);
$params_str = $database->loadResult();
if ($params_str) {
$params_str = str_replace("\n","&",$params_str);
parse_str($params_str, $pm); // $pm is the parameter array
} else {
$message = _CB_AS_ERROR_PARAMS; // Or whatever error message you'd like to output
mosRedirect(sefRelToAbs("index.php?option=com_cb_search&Itemid=".$Itemid."&task=geocode"«»),$message);
}[/code:1]
Post edited by: pointri, at: 2006/11/13 23:58
Joomlapolitan zealot and a somewhat stealthy, rather passive CB3PD developer.
www.constructionlounge.com
Construction Lounge: Online resource and networking portal for the construction and remodeling industries.