Page 1 of 1

Phoca plugin for Xmap - xml site generator

Posted: 18 Apr 2011, 19:30
by stania
Hi, anybody know how i can create sitemap for phoca? Any extension?

Or how update plugin for xmap to work with new version http://extensions.joomla.org/extensions ... e-map/3066

This is code from old plugin phocagallery:

Code: Select all

<?php 
/**
* @author Aleksandar Bogdanovic, http://www.banitech.com
* @email albog@banitech.com
* @version $Id: com_phocagallery.php
* @package Xmap
* @license GNU/GPL
* @description Xmap plugin for Phoca Gallery component
*/
defined('_JEXEC') or die ('Restricted Access');

class xmap_com_phocagallery {

	function &getTree ( &$xmap, &$parent, &$params ) {
		$link_query = parse_url( $parent->link );
                parse_str( html_entity_decode($link_query['query']), $link_vars );
                $catid = JArrayHelper::getValue($link_vars,'id',0);

		
		$priority = JArrayHelper::getValue($params,'cat_priority',$parent->priority,'');
		$changefreq = JArrayHelper::getValue($params,'cat_changefreq',$parent->changefreq,'');
		if ($priority  == '-1')
			$priority = $parent->priority;
		if ($changefreq  == '-1')
			$changefreq = $parent->changefreq;

		$params['cat_priority'] = $priority;
		$params['cat_changefreq'] = $changefreq;

		$priority = JArrayHelper::getValue($params,'file_priority',$parent->priority,'');
		$changefreq = JArrayHelper::getValue($params,'file_changefreq',$parent->changefreq,'');
		if ($priority  == '-1')
			$priority = $parent->priority;

		if ($changefreq  == '-1')
			$changefreq = $parent->changefreq;

		$params['file_priority'] = $priority;
		$params['file_changefreq'] = $changefreq;

		xmap_com_phocagallery::getPhocaCategoriesTree($xmap, $parent, $params, $catid);
	}
	
	function getPhocaCategoriesTree(&$xmap, &$parent, &$params, &$catid) {

		$cats = xmap_com_phocagallery::getDBCategories($catid);

		$xmap->changeLevel(1);
		foreach($cats as $row) {
			$node = new stdclass;
			$node->id   = $parent->id;
			$node->uid  = $parent->id.'c'.$row->id;
			$node->pid  = $row->parent_id;
			$node->name = $row->title;
			$node->priority   = $params['cat_priority'];		
			$node->changefreq = $params['cat_changefreq'];
			$node->link = 'index.php?option=com_phocagallery&view=category&id='.$row->id.':'.$row->alias;
			$node->tree = array();
			
			if( ($xmap->printNode($node) !== FALSE) && $params['expand_categories'] ) {
				xmap_com_phocagallery::getPhocaCategoriesTree($xmap, $parent, $params, $row->id);
			}
		}
		$xmap->changeLevel(-1);
	}
	function getDBCategories($catid){
		$db = &JFactory::getDBO();
		$query = 'SELECT id, title, name, alias, parent_id FROM #__phocagallery_categories WHERE parent_id = '.$catid.' AND published=1 ORDER BY ordering';
		$db->setQuery($query);
		$lists = $db->loadObjectList();
		return $lists;
	}

}

?>
sry for my eng!

Re: Phoca plugin for Xmap - xml site generator

Posted: 18 Apr 2011, 22:32
by Jan
Hi, for now no idea :-(

Re: Phoca plugin for Xmap - xml site generator

Posted: 01 Dec 2011, 00:15
by manuxx
Does someone have a plugin that shows phocagallery categories in map generated by XMAP?

I have been searching long time for this but the plugin published in joomla extensions has broken links.

Help pls :cry:

Re: Phoca plugin for Xmap - xml site generator

Posted: 04 Dec 2011, 19:44
by Jan

Re: Phoca plugin for Xmap - xml site generator

Posted: 20 Mar 2013, 17:46
by wdburgdorf
Hi,

any news on this? I need a XMap plugin for Phoca Download. Searched for a while, no luck ...

EDIT: There was one here, but now out of date:
viewtopic.php?f=31&t=3139&p=17307

Re: Phoca plugin for Xmap - xml site generator

Posted: 22 Mar 2013, 02:31
by Jan
Hi, I have no news regarding XMap :-(

Re: Phoca plugin for Xmap - xml site generator

Posted: 29 Mar 2013, 18:51
by manuxx
No plugin for phoca gallery in XMAP? Really sucks, no use creating galleries if we can't add them to our sitemap :cry:

Pls Jan look at it, those plugins are usually done by the same programmers of each component and not the Xmap programmer.

Re: Phoca plugin for Xmap - xml site generator

Posted: 31 Mar 2013, 18:14
by Jan
Hi, I will look at it but the first priority is to overwrite the extensions so they work in Joomla! :-(

It took me 8 months to overwrite only the Phoca Gallery (it is really not easy to spend all the time with overwriting :-( )

https://www.phoca.cz/phoca-needs-your-help/

Re: Phoca plugin for Xmap - xml site generator

Posted: 23 Jul 2013, 10:47
by b2un0
a phoca gallery extension for xmap can be downloaded on www.z-index.net - http://www.z-index.net/en/joomla-xmap-plugins.html - JED review in progress!

Re: Phoca plugin for Xmap - xml site generator

Posted: 23 Jul 2013, 19:26
by Jan
Hi, thank you very much for the info.

Jan