|
Page 1 of 2 Using the WISroGIS extension for SOBI2 component you can automatically display directory's content (full listing, categories and custom entry display) on maps in your SOBI2 component. To enjoy the full power of WISroGIS extension for SOBI2, some changes are needed to the SOBI2 front-end files. This article describes some of the possible combinations/changes: - full directory listing;
- automated category mapping;
- customized directory entry map.
Full SOBI2 directory listing / automated category listing The full Directory listing can be published as a map layer and added to the default SOBI2 entry page. The plugin's code uses the following parameters: {WISroGIS width='100%'|height='400px'|
sobi2_task='directory' ~}
To automatically create a layer and display a map for each SOBI2's category, the following code can be further customized: {WISroGIS width='100%'|height='400px'|
sobi2_task='category'|sobi2_id='CATEGORY_ID' ~}
Before making the changes, please make sure that WISroGIS is enabled and properly configured - see also the article 'Using the WISroGIS extension for SOBI2'. The required changes for these maps are described below, for Joomla 1.0 and 1.5: Joomla 1.0  | In /components/com_sobi2, edit the file sobi2.listing.php: Around line 58, find the text /* * case no catid we shown frontpage */ if( $catid < 2 ) {
before it, add the following code to trigger the plugin's code and inject the map to the SOBI2 directory and category listing: /* --- WISroGIS plugin injection --- */ global $_MAMBOTS; $row =& new stdClass(); $row->text = "{WISroGIS width='100%'|height='400px'|"; if(!$catid) $row->text .= "sobi2_task='directory' ~}"; else $row->text .= "sobi2_task='category'| sobi2_id='{$catid}' ~}"; $_MAMBOTS->loadBotGroup( 'content' ); $args = array( 1,&$row,&$params); $_MAMBOTS->trigger( 'onPrepareContent', $args, false ); echo $row->text; /* --- end WISroGIS plugin injection --- */
| Joomla 1.5  | | In /components/com_sobi2, edit the file sobi2.listing.php: Around line 58, find the text /* * case no catid we shown frontpage */ if( $catid < 2 ) {
before it, add the following code to trigger the plugin's code and inject the map to the SOBI2 directory and category listing: /* --- WISroGIS plugin injection --- */ $row = new StdClass(); $row->text = "{WISroGIS width='100%'|height='400px'|"; if(!$catid) $row->text .= "sobi2_task='directory' ~}"; else $row->text .= "sobi2_task='category'| sobi2_id='{$catid}' ~}"; $args = array( 1,&$row,&$params); JPluginHelper::importPlugin( 'content' ); $dispatcher =& JDispatcher::getInstance(); $params = & new JParameter(''); $results = $dispatcher->trigger('onPrepareContent', array(&$row,&$params,0)); echo $row->text; /* --- end WISroGIS plugin injection --- */
|
|