예제 #1
0
 function getInput()
 {
     $params =& GElement::getParameters();
     $this->addJavascript($params);
     $marker = $params->get('marker', '') ? 'checked' : '';
     $html = '<div>';
     $html .= '<input type="checkbox" id="paramsmarker" name="jform[params][marker]" ' . $marker . ' onclick="updateMarker(this);" value="1" />';
     return $html;
 }
예제 #2
0
/**
 * Shortcode handler
 *
 * Determines if the gdoc is a spreadsheet or a document, and
 * calls the corresponding display functions.
 * @param	array	$atts		contains attributes given by user in shortcode
 * @param	string	$content	the raw string enclosed by the shortcode tags (optional, ignored)
 * @return	string	$html		html-formatted contents of the gdoc to be displayed in place of the shortcode
 */
function gdocs_display($atts, $content = NULL)
{
    // check parameter exists
    if (is_null($atts['type'])) {
        return $content;
    }
    try {
        return (string) GElement::getElement($atts);
    } catch (Exception $e) {
        // any error at all, return text
        return $content;
    }
}
예제 #3
0
    function getInput()
    {
        $params =& GElement::getParameters();
        $lat = $params->get('lat', 48.5747);
        $long = $params->get('lng', -123);
        $zoom = $params->get('zoom', 3);
        $height = $params->get('height', 150);
        $width = $params->get('width', 200);
        $marker = $params->get('marker');
        $markerTitle = $params->get('marker_info', '');
        $this->initMap($lat, $long, $zoom, $marker, $params);
        $search = JText::_("MOD_JGMAP_SEARCH");
        $searchMap = JText::_('MOD_JGMAP_SEARCH_LOCATION');
        $elements = <<<EOL
\t\t<div style="clear:left;">

\t\t<div id="map" style="padding: 10px,margin:4px 4px 10px; width: {$width}px; height: {$height}px"> </div>
\t\t<label for="search_location" >{$searchMap}</label>
\t\t<input type="text" size="45" id="search_location" name="search_location" />
\t\t<input type="button" value="{$search}" id="searchBtn" />
\t\t</div>
EOL;
        return $elements;
    }
예제 #4
0
 /**
  * Constructor
  * @param	array	$atts	Shortcode attributes
  * @return	GSt		$obj	GDoc element
  */
 public function __construct($atts)
 {
     $this->cache_session = new GCache($atts['st_id'], $atts['wt_id'], $atts['cell_id']);
     parent::__construct($atts);
 }