Web Intelligent Solutions
EnglishRomana
font size Increase font size Default font size Decrease font size
screen size Narrow screen resolution Wide screen resolution Auto adjust screen size
Home arrow WISroGIS Tutorials arrow Map automation for SOBI2 directory, categories and entries

Map automation for SOBI2 directory, categories and entries

Print E-mail
Article Index
Map automation for SOBI2 directory, categories and entries
Customized directory entry map

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:

  1. full directory listing;
  2. automated category mapping;
  3. 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 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 Joomla!1.5native

 

 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 --- */

  


 
< Prev   Next >
  • Bityard.com was looking for an easy solution to add more value to its business articles and reviews.  Fortunately, Cristi Teodoreau…
  • Rezultatul colaborarii noastre cu echipa WIS este faptul ca firma Eurosprint Travel a avut de castigat atat ca imagine, care s-a imbunatatit considerabil, cat si…
  • Societatea Romana de ORL - Revista Societatii de ORL apreciaza colaborarea cu firma dvs., calitatea serviciilor si promptitudinea cu care ne-ati onorat contractul. Dorim in…
  • "Excellent products, at very competitive prices, backed up with great support when needed. A top choice!"
    (Alec Ionescu, Manager)
  • You are characterized by quality, efficiency, professionalism, and seriousness. Thank you for your service !
    Dorel Nitulescu, Manager
    vreaupermis.wis.ro