Phoca plugin for Xmap - xml site generator

Phoca plugins - support for all Phoca plugins except Phoca Gallery plugins
stania
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 13 Apr 2011, 00:33

Phoca plugin for Xmap - xml site generator

Post 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!
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Phoca plugin for Xmap - xml site generator

Post by Jan »

Hi, for now no idea :-(
If you find Phoca extensions useful, please support the project
manuxx
Phoca Newbie
Phoca Newbie
Posts: 8
Joined: 11 Mar 2011, 15:50

Re: Phoca plugin for Xmap - xml site generator

Post 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:
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Phoca plugin for Xmap - xml site generator

Post by Jan »

If you find Phoca extensions useful, please support the project
wdburgdorf
Phoca Member
Phoca Member
Posts: 13
Joined: 20 Mar 2013, 00:57

Re: Phoca plugin for Xmap - xml site generator

Post 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
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Phoca plugin for Xmap - xml site generator

Post by Jan »

Hi, I have no news regarding XMap :-(
If you find Phoca extensions useful, please support the project
manuxx
Phoca Newbie
Phoca Newbie
Posts: 8
Joined: 11 Mar 2011, 15:50

Re: Phoca plugin for Xmap - xml site generator

Post 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.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Phoca plugin for Xmap - xml site generator

Post 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/
If you find Phoca extensions useful, please support the project
b2un0
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 23 Jul 2013, 10:45

Re: Phoca plugin for Xmap - xml site generator

Post 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!
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Phoca plugin for Xmap - xml site generator

Post by Jan »

Hi, thank you very much for the info.

Jan
If you find Phoca extensions useful, please support the project
Post Reply