Thursday, 29 January 2015 22:28


Modified xmap plugin for adsmanager not work

Suggest/Comment/Post new extensions for Xmap!

Modified xmap plugin for adsmanager not work

Postby magistr_yoda » Mon Apr 01, 2013 4:22 pm

Hello, i have site with j2.5 adsmanager 2.7 - component was modified, and so needed to write sitemap for him. Standart xmap plugin was modified
category display - hidded
ads urls, - modified

part of plugin code
Code: Select all
static function getTree( &$xmap, &$parent, &$params )
xmap_com_adsmanager::getAds($xmap); // only this function called in plugin

function getAds( &$xmap){
// $xmap->changeLevel(1);
$database = &JFactory::getDBO();
$database->setQuery("SELECT id,name,ad_headline,city,category FROM #__adsmanager_ads WHERE published='1' ORDER BY city, category");
foreach($items as $item){
$node = new stdclass;
$node->id = $parent->id;
$node->uid = $parent->uid.'c'.$item->id;
$node->browserNav = $parent->browserNav;
$node->name = stripslashes($item->ad_headline);
$node->priority = $params['entry_priority'];
$node->changefreq = $params['entry_changefreq'];
$node->link = ''.$item->category.'-'.getCategoryName($item->category).'/'.$item->id.'-'.getADName($item->id).'/'.$item->city.'-'.getCityForSM($item->city);
$node->pid = $item->id;
$node->expandible = false;
// $xmap->changeLevel(-1);
return true;

but xml file is almost empty
7: <changefreq>weekly</changefreq>
8: <priority>0.5</priority>
9: </url>

Where error ? or give link to doc how to write xmap plugin.
Fresh Boarder
Fresh Boarder
Posts: 1
Joined: Mon Apr 01, 2013 4:18 pm

Return to Plugins

Who is online

Users browsing this forum: Bing [Bot] and 1 guest