AAAAPK >\) com_virtuemart/.htaccessnu W+A
Order allow,deny
Deny from all
PK >\; ! com_virtuemart/com_virtuemart.phpnu W+A link);
parse_str(html_entity_decode($link_query['query']), $link_vars);
$catid = JArrayHelper::getValue($link_vars, 'virtuemart_category_id', 0);
$prodid = JArrayHelper::getValue($link_vars, 'virtuemart_product_id', 0);
if (!$catid) {
$menu = & JSite::getMenu();
$menuParams = $menu->getParams($node->id);
$catid = $menuParams->get('virtuemart_category_id', 0);
}
if (!$prodid) {
$menu = & JSite::getMenu();
$menuParams = $menu->getParams($node->id);
$prodid = $menuParams->get('virtuemart_product_id', 0);
}
if ($prodid && $catid) {
$node->uid = 'com_virtuemartc' . $catid . 'p' . $prodid;
$node->expandible = false;
} elseif ($catid) {
$node->uid = 'com_virtuemartc' . $catid;
$node->expandible = true;
}
}
/** Get the content tree for this kind of content */
static function getTree($xmap, $parent, &$params)
{
self::initialize();
$menu = & JSite::getMenu();
$link_query = parse_url($parent->link);
parse_str(html_entity_decode($link_query['query']), $link_vars);
$catid = intval(JArrayHelper::getValue($link_vars, 'virtuemart_category_id', 0));
$params['Itemid'] = intval(JArrayHelper::getValue($link_vars, 'Itemid', $parent->id));
$view = JArrayHelper::getValue($link_vars, 'view', '');
// we currently support only categories
if (!in_array($view, array('categories','category'))) {
return true;
}
$include_products = JArrayHelper::getValue($params, 'include_products', 1);
$include_products = ( $include_products == 1
|| ( $include_products == 2 && $xmap->view == 'xml')
|| ( $include_products == 3 && $xmap->view == 'html'));
$params['include_products'] = $include_products;
$params['include_product_images'] = (JArrayHelper::getValue($params, 'include_product_images', 1) && $xmap->view == 'xml');
$params['product_image_license_url'] = trim(JArrayHelper::getValue($params, 'product_image_license_url', ''));
$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, 'prod_priority', $parent->priority);
$changefreq = JArrayHelper::getValue($params, 'prod_changefreq', $parent->changefreq);
if ($priority == '-1')
$priority = $parent->priority;
if ($changefreq == '-1')
$changefreq = $parent->changefreq;
$params['prod_priority'] = $priority;
$params['prod_changefreq'] = $changefreq;
xmap_com_virtuemart::getCategoryTree($xmap, $parent, $params, $catid);
return true;
}
/** Virtuemart support */
static function getCategoryTree($xmap, $parent, &$params, $catid=0)
{
$database = &JFactory::getDBO();
if (!isset($urlBase)) {
$urlBase = JURI::base();
}
$vendorId = 1;
$cache = & JFactory::getCache('com_virtuemart','callback');
$children = $cache->call( array( 'VirtueMartModelCategory', 'getChildCategoryList' ),$vendorId, $catid );
$xmap->changeLevel(1);
foreach ($children as $row) {
$node = new stdclass;
$node->id = $parent->id;
$node->uid = $parent->uid . 'c' . $row->virtuemart_category_id;
$node->browserNav = $parent->browserNav;
$node->name = stripslashes($row->category_name);
$node->priority = $params['cat_priority'];
$node->changefreq = $params['cat_changefreq'];
$node->expandible = true;
$node->link = 'index.php?option=com_virtuemart&view=category&virtuemart_category_id=' . $row->virtuemart_category_id . '&Itemid='.$parent->id;
if ($xmap->printNode($node) !== FALSE) {
xmap_com_virtuemart::getCategoryTree($xmap, $parent, $params, $row->virtuemart_category_id);
}
}
$xmap->changeLevel(-1);
if ($params['include_products']) {
$products = self::$productModel->getProductsInCategory($catid);
if ($params['include_product_images']) {
self::$categoryModel->addImages($products,1);
}
$xmap->changeLevel(1);
foreach ($products as $row) {
$node = new stdclass;
$node->id = $parent->id;
$node->uid = $parent->uid . 'c' . $row->virtuemart_category_id . 'p' . $row->virtuemart_product_id;
$node->browserNav = $parent->browserNav;
$node->priority = $params['prod_priority'];
$node->changefreq = $params['prod_changefreq'];
$node->name = $row->product_name;
$node->modified = strtotime($row->modified_on);
$node->expandible = false;
$node->link = 'index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' . $row->virtuemart_product_id.'&virtuemart_category_id=' . $row->virtuemart_category_id . '&Itemid='.$parent->id;
if ($params['include_product_images']) {
foreach ($row->images as $image) {
if (isset($image->file_url)) {
$imagenode = new stdClass;
$imagenode->src = $urlBase . $image->file_url_thumb;
$imagenode->title = $row->product_name;
$imagenode->license = $params['product_image_license_url'];
$node->images[] = $imagenode;
}
}
}
$xmap->printNode($node);
}
$xmap->changeLevel(-1);
}
}
static protected function initialize()
{
if (self::$initialized) return;
$app = JFactory::getApplication ();
if (!class_exists( 'VmConfig' )) {
require(JPATH_ADMINISTRATOR . '/components/com_virtuemart/helpers/config.php');
VmConfig::loadConfig();
}
JTable::addIncludePath(JPATH_VM_ADMINISTRATOR . '/tables');
$app->setUserState('com_virtuemart.htmlc0.limit',9000);
$app->setUserState('com_virtuemart.xmlc0.limit',9000);
if (!class_exists('VirtueMartModelCategory')) require(JPATH_VM_ADMINISTRATOR . '/models/category.php');
self::$categoryModel = new VirtueMartModelCategory();
if (!class_exists('VirtueMartModelProduct')) require(JPATH_VM_ADMINISTRATOR . '/models/product.php');
self::$productModel = new VirtueMartModelProduct();
}
}
PK >\(# # ! com_virtuemart/com_virtuemart.xmlnu W+A
Xmap - Virtuemart Plugin
Guillermo Vargas
January 2012
GNU GPL
http://www.gnu.org/copyleft/gpl.html GNU/GPL
guille@vargas.co.cr
joomla.vargas.co.cr
2.0.1
XMAP_VM_PLUGIN_DESCRIPTION
com_virtuemart.php
index.html
en-GB.plg_xmap_com_virtuemart.ini
es-ES.plg_xmap_com_virtuemart.ini
fa-IR.plg_xmap_com_virtuemart.ini
cs-CZ.plg_xmap_com_virtuemart.ini
nl-NL.plg_xmap_com_virtuemart.ini
ru-RU.plg_xmap_com_virtuemart.ini
PK >\6 com_virtuemart/index.htmlnu W+A
PK >\65^ ^ com_content/com_content.xmlnu W+A
Xmap - Content Plugin
Guillermo Vargas
01/26/2011
GNU GPL
http://www.gnu.org/copyleft/gpl.html GNU/GPL
guille@vargas.co.cr
joomla.vargas.co.cr
2.0.4
XMAP_CONTENT_PLUGIN_DESCRIPTION
com_content.php
index.html
en-GB.plg_xmap_com_content.ini
es-ES.plg_xmap_com_content.ini
fa-IR.plg_xmap_com_content.ini
cs-CZ.plg_xmap_com_content.ini
nl-NL.plg_xmap_com_content.ini
ru-RU.plg_xmap_com_content.ini
PK >\6 com_content/index.htmlnu W+A PK >\QXS S com_content/com_content.phpnu W+A link);
if (!isset($link_query['query'])) {
return;
}
parse_str(html_entity_decode($link_query['query']), $link_vars);
$view = JArrayHelper::getValue($link_vars, 'view', '');
$layout = JArrayHelper::getValue($link_vars, 'layout', '');
$id = JArrayHelper::getValue($link_vars, 'id', 0);
//----- Set add_images param
$params['add_images'] = JArrayHelper::getValue($params, 'add_images', 0);
//----- Set add pagebreaks param
$add_pagebreaks = JArrayHelper::getValue($params, 'add_pagebreaks', 1);
$params['add_pagebreaks'] = JArrayHelper::getValue($params, 'add_pagebreaks', 1);
switch ($view) {
case 'category':
if ($id) {
$node->uid = 'com_contentc' . $id;
} else {
$node->uid = 'com_content' . $layout;
}
$node->expandible = true;
break;
case 'article':
$node->uid = 'com_contenta' . $id;
$node->expandible = false;
$query = $db->getQuery(true);
$query->select($db->quoteName('created'))
->select($db->quoteName('modified'))
->from($db->quoteName('#__content'))
->where($db->quoteName('id').'='.intval($id));
if ($params['add_pagebreaks'] || $params['add_images']){
$query->select($db->quoteName('introtext'))
->select($db->quoteName('fulltext'));
}
$db->setQuery($query);
if (($row = $db->loadObject()) != NULL) {
$node->modified = $row->modified;
$text = @$item->introtext . @$item->fulltext;
if ($params['add_images']) {
$node->images = XmapHelper::getImages($text,JArrayHelper::getValue($params, 'max_images', 1000));
}
if ($params['add_pagebreaks']) {
$node->subnodes = XmapHelper::getPagebreaks($text,$node->link);
$node->expandible = (count($node->subnodes) > 0); // This article has children
}
}
break;
case 'archive':
$node->expandible = true;
break;
case 'featured':
$node->uid = 'com_contentfeatured';
$node->expandible = false;
}
}
/**
* Expands a com_content menu item
*
* @return void
* @since 1.0
*/
static function getTree($xmap, $parent, &$params)
{
$db = JFactory::getDBO();
$app = JFactory::getApplication();
$user = JFactory::getUser();
$result = null;
$link_query = parse_url($parent->link);
if (!isset($link_query['query'])) {
return;
}
parse_str(html_entity_decode($link_query['query']), $link_vars);
$view = JArrayHelper::getValue($link_vars, 'view', '');
$id = intval(JArrayHelper::getValue($link_vars, 'id', ''));
/* * *
* Parameters Initialitation
* */
//----- Set expand_categories param
$expand_categories = JArrayHelper::getValue($params, 'expand_categories', 1);
$expand_categories = ( $expand_categories == 1
|| ( $expand_categories == 2 && $xmap->view == 'xml')
|| ( $expand_categories == 3 && $xmap->view == 'html')
|| $xmap->view == 'navigator');
$params['expand_categories'] = $expand_categories;
//----- Set expand_featured param
$expand_featured = JArrayHelper::getValue($params, 'expand_featured', 1);
$expand_featured = ( $expand_featured == 1
|| ( $expand_featured == 2 && $xmap->view == 'xml')
|| ( $expand_featured == 3 && $xmap->view == 'html')
|| $xmap->view == 'navigator');
$params['expand_featured'] = $expand_featured;
//----- Set expand_featured param
$include_archived = JArrayHelper::getValue($params, 'include_archived', 2);
$include_archived = ( $include_archived == 1
|| ( $include_archived == 2 && $xmap->view == 'xml')
|| ( $include_archived == 3 && $xmap->view == 'html')
|| $xmap->view == 'navigator');
$params['include_archived'] = $include_archived;
//----- Set show_unauth param
$show_unauth = JArrayHelper::getValue($params, 'show_unauth', 1);
$show_unauth = ( $show_unauth == 1
|| ( $show_unauth == 2 && $xmap->view == 'xml')
|| ( $show_unauth == 3 && $xmap->view == 'html'));
$params['show_unauth'] = $show_unauth;
//----- Set add_images param
$add_images = JArrayHelper::getValue($params, 'add_images', 0) && $xmap->isImages;
$add_images = ( $add_images && $xmap->view == 'xml');
$params['add_images'] = $add_images;
$params['max_images'] = JArrayHelper::getValue($params, 'max_images', 1000);
//----- Set add pagebreaks param
$add_pagebreaks = JArrayHelper::getValue($params, 'add_pagebreaks', 1);
$add_pagebreaks = ( $add_pagebreaks == 1
|| ( $add_pagebreaks == 2 && $xmap->view == 'xml')
|| ( $add_pagebreaks == 3 && $xmap->view == 'html')
|| $xmap->view == 'navigator');
$params['add_pagebreaks'] = $add_pagebreaks;
if ($params['add_pagebreaks'] && !defined('_XMAP_COM_CONTENT_LOADED')) {
define('_XMAP_COM_CONTENT_LOADED',1); // Load it just once
$lang = JFactory::getLanguage();
$lang->load('plg_content_pagebreak');
}
//----- Set cat_priority and cat_changefreq params
$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;
//----- Set art_priority and art_changefreq params
$priority = JArrayHelper::getValue($params, 'art_priority', $parent->priority);
$changefreq = JArrayHelper::getValue($params, 'art_changefreq', $parent->changefreq);
if ($priority == '-1')
$priority = $parent->priority;
if ($changefreq == '-1')
$changefreq = $parent->changefreq;
$params['art_priority'] = $priority;
$params['art_changefreq'] = $changefreq;
$params['max_art'] = intval(JArrayHelper::getValue($params, 'max_art', 0));
$params['max_art_age'] = intval(JArrayHelper::getValue($params, 'max_art_age', 0));
$params['nullDate'] = $db->Quote($db->getNullDate());
$params['nowDate'] = $db->Quote(JFactory::getDate()->toSql());
$params['groups'] = implode(',', $user->getAuthorisedViewLevels());
// Define the language filter condition for the query
$params['language_filter'] = $app->getLanguageFilter();
switch ($view) {
case 'category':
if (!$id) {
$id = intval(JArrayHelper::getValue($params, 'id', 0));
}
if ($params['expand_categories'] && $id) {
$result = self::expandCategory($xmap, $parent, $id, $params, $parent->id);
}
break;
case 'featured':
if ($params['expand_featured']) {
$result = self::includeCategoryContent($xmap, $parent, 'featured', $params,$parent->id);
}
break;
case 'categories':
if ($params['expand_categories']) {
$result = self::expandCategory($xmap, $parent, ($id ? $id : 1), $params, $parent->id);
}
break;
case 'archive':
if ($params['expand_featured']) {
$result = self::includeCategoryContent($xmap, $parent, 'archived', $params,$parent->id);
}
break;
case 'article':
// if it's an article menu item, we have to check if we have to expand the
// article's page breaks
if ($params['add_pagebreaks']){
$query = $db->getQuery(true);
$query->select($db->quoteName('introtext'))
->select($db->quoteName('fulltext'))
->select($db->quoteName('alias'))
->select($db->quoteName('catid'))
->from($db->quoteName('#__content'))
->where($db->quoteName('id').'='.intval($id));
$db->setQuery($query);
$row = $db->loadObject();
$parent->slug = $row->alias ? ($id . ':' . $row->alias) : $id;
$parent->link = ContentHelperRoute::getArticleRoute($parent->slug, $row->catid);
$subnodes = XmapHelper::getPagebreaks($row->introtext.$row->fulltext,$parent->link);
self::printNodes($xmap, $parent, $params, $subnodes);
}
}
return $result;
}
/**
* Get all content items within a content category.
* Returns an array of all contained content items.
*
* @param object $xmap
* @param object $parent the menu item
* @param int $catid the id of the category to be expanded
* @param array $params an assoc array with the params for this plugin on Xmap
* @param int $itemid the itemid to use for this category's children
*/
static function expandCategory($xmap, $parent, $catid, &$params, $itemid)
{
$db = JFactory::getDBO();
$where = array('a.parent_id = ' . $catid . ' AND a.published = 1 AND a.extension=\'com_content\'');
if ($params['language_filter'] ) {
$where[] = 'a.language in ('.$db->quote(JFactory::getLanguage()->getTag()).','.$db->quote('*').')';
}
if (!$params['show_unauth']) {
$where[] = 'a.access IN (' . $params['groups'] . ') ';
}
$orderby = 'a.lft';
$query = 'SELECT a.id, a.title, a.alias, a.access, a.path AS route, '
. 'a.created_time created, a.modified_time modified '
. 'FROM #__categories AS a '
. 'WHERE '. implode(' AND ',$where)
. ( $xmap->view != 'xml' ? "\n ORDER BY " . $orderby . "" : '' );
$db->setQuery($query);
#echo nl2br(str_replace('#__','jos_',$db->getQuery()));exit;
$items = $db->loadObjectList();
if (count($items) > 0) {
$xmap->changeLevel(1);
foreach ($items as $item) {
$node = new stdclass();
$node->id = $parent->id;
$node->uid = $parent->uid . 'c' . $item->id;
$node->browserNav = $parent->browserNav;
$node->priority = $params['cat_priority'];
$node->changefreq = $params['cat_changefreq'];
$node->name = $item->title;
$node->expandible = true;
$node->secure = $parent->secure;
// TODO: Should we include category name or metakey here?
// $node->keywords = $item->metakey;
$node->newsItem = 0;
// For the google news we should use te publication date instead
// the last modification date. See
if ($xmap->isNews || !$item->modified)
$item->modified = $item->created;
$node->slug = $item->route ? ($item->id . ':' . $item->route) : $item->id;
$node->link = ContentHelperRoute::getCategoryRoute($node->slug);
if (strpos($node->link,'Itemid=')===false) {
$node->itemid = $itemid;
$node->link .= '&Itemid='.$itemid;
} else {
$node->itemid = preg_replace('/.*Itemid=([0-9]+).*/','$1',$node->link);
}
if ($xmap->printNode($node)) {
self::expandCategory($xmap, $parent, $item->id, $params, $node->itemid);
}
}
$xmap->changeLevel(-1);
}
// Include Category's content
self::includeCategoryContent($xmap, $parent, $catid, $params, $itemid);
return true;
}
/**
* Get all content items within a content category.
* Returns an array of all contained content items.
*
* @since 2.0
*/
static function includeCategoryContent($xmap, $parent, $catid, &$params,$Itemid)
{
$db = JFactory::getDBO();
// We do not do ordering for XML sitemap.
if ($xmap->view != 'xml') {
$orderby = self::buildContentOrderBy($parent->params,$parent->id,$Itemid);
//$orderby = !empty($menuparams['orderby']) ? $menuparams['orderby'] : (!empty($menuparams['orderby_sec']) ? $menuparams['orderby_sec'] : 'rdate' );
//$orderby = self::orderby_sec($orderby);
}
if ($params['include_archived']) {
$where = array('(a.state = 1 or a.state = 2)');
} else {
$where = array('a.state = 1');
}
if ($catid=='featured') {
$where[] = 'a.featured=1';
} elseif ($catid=='archived') {
$where = array('a.state=2');
} elseif(is_numeric($catid)) {
$where[] = 'a.catid='.(int) $catid;
}
if ($params['max_art_age'] || $xmap->isNews) {
$days = (($xmap->isNews && ($params['max_art_age'] > 3 || !$params['max_art_age'])) ? 3 : $params['max_art_age']);
$where[] = "( a.created >= '"
. date('Y-m-d H:i:s', time() - $days * 86400) . "' ) ";
}
if ($params['language_filter'] ) {
$where[] = 'a.language in ('.$db->quote(JFactory::getLanguage()->getTag()).','.$db->quote('*').')';
}
if (!$params['show_unauth'] ){
$where[] = 'a.access IN (' . $params['groups'] . ') ';
}
$query = 'SELECT a.id, a.title, a.alias, a.catid, '
. 'a.created created, a.modified modified'
. ',a.language'
. (($params['add_images'] || $params['add_pagebreaks']) ? ',a.introtext, a.fulltext ' : ' ')
. 'FROM #__content AS a '
. ($catid =='featured'? 'LEFT JOIN #__content_frontpage AS fp ON a.id = fp.content_id ' : ' ')
. 'WHERE ' . implode(' AND ',$where) . ' AND '
. ' (a.publish_up = ' . $params['nullDate']
. ' OR a.publish_up <= ' . $params['nowDate'] . ') AND '
. ' (a.publish_down = ' . $params['nullDate']
. ' OR a.publish_down >= ' . $params['nowDate'] . ') '
. ( $xmap->view != 'xml' ? "\n ORDER BY $orderby " : '' )
. ( $params['max_art'] ? "\n LIMIT {$params['max_art']}" : '');
$db->setQuery($query);
//echo nl2br(str_replace('#__','mgbj2_',$db->getQuery()));
$items = $db->loadObjectList();
if (count($items) > 0) {
$xmap->changeLevel(1);
foreach ($items as $item) {
$node = new stdclass();
$node->id = $parent->id;
$node->uid = $parent->uid . 'a' . $item->id;
$node->browserNav = $parent->browserNav;
$node->priority = $params['art_priority'];
$node->changefreq = $params['art_changefreq'];
$node->name = $item->title;
$node->modified = $item->modified;
$node->expandible = false;
$node->secure = $parent->secure;
// TODO: Should we include category name or metakey here?
// $node->keywords = $item->metakey;
$node->newsItem = 1;
$node->language = $item->language;
// For the google news we should use te publication date instead
// the last modification date. See
if ($xmap->isNews || !$node->modified)
$node->modified = $item->created;
$node->slug = $item->alias ? ($item->id . ':' . $item->alias) : $item->id;
//$node->catslug = $item->category_route ? ($catid . ':' . $item->category_route) : $catid;
$node->catslug = $item->catid;
$node->link = ContentHelperRoute::getArticleRoute($node->slug, $node->catslug);
// Add images to the article
$text = @$item->introtext . @$item->fulltext;
if ($params['add_images']) {
$node->images = XmapHelper::getImages($text,$params['max_images']);
}
if ($params['add_pagebreaks']) {
$subnodes = XmapHelper::getPagebreaks($text,$node->link);
$node->expandible = (count($subnodes) > 0); // This article has children
}
if ($xmap->printNode($node) && $node->expandible) {
self::printNodes($xmap, $parent, $params, $subnodes);
}
}
$xmap->changeLevel(-1);
}
return true;
}
static private function printNodes($xmap, $parent, &$params, &$subnodes)
{
$xmap->changeLevel(1);
$i=0;
foreach ($subnodes as $subnode) {
$i++;
$subnode->id = $parent->id;
$subnode->uid = $parent->uid.'p'.$i;
$subnode->browserNav = $parent->browserNav;
$subnode->priority = $params['art_priority'];
$subnode->changefreq = $params['art_changefreq'];
$subnode->secure = $parent->secure;
$xmap->printNode($subnode);
}
$xmap->changeLevel(-1);
}
/**
* Generates the order by part of the query according to the
* menu/component/user settings. It checks if the current user
* has already changed the article's ordering column in the frontend
*
* @param JRegistry $params
* @param int $parentId
* @param int $itemid
* @return string
*/
static function buildContentOrderBy(&$params,$parentId,$itemid)
{
$app = JFactory::getApplication('site');
// Case when the child gets a different menu itemid than it's parent
if ($parentId != $itemid) {
$menu = $app->getMenu();
$item = $menu->getItem($itemid);
$menuParams = clone($params);
$itemParams = new JRegistry($item->params);
$menuParams->merge($itemParams);
} else {
$menuParams =& $params;
}
$filter_order = $app->getUserStateFromRequest('com_content.category.list.' . $itemid . '.filter_order', 'filter_order', '', 'string');
$filter_order_Dir = $app->getUserStateFromRequest('com_content.category.list.' . $itemid . '.filter_order_Dir', 'filter_order_Dir', '', 'cmd');
$orderby = ' ';
if ($filter_order && $filter_order_Dir) {
$orderby .= $filter_order . ' ' . $filter_order_Dir . ', ';
}
$articleOrderby = $menuParams->get('orderby_sec', 'rdate');
$articleOrderDate = $menuParams->get('order_date');
//$categoryOrderby = $menuParams->def('orderby_pri', '');
$secondary = ContentHelperQuery::orderbySecondary($articleOrderby, $articleOrderDate) . ', ';
//$primary = ContentHelperQuery::orderbyPrimary($categoryOrderby);
//$orderby .= $primary . ' ' . $secondary . ' a.created ';
$orderby .= $secondary . ' a.created ';
return $orderby;
}
}PK >\) com_content/.htaccessnu W+A
Order allow,deny
Deny from all
PK >\) com_k2/.htaccessnu W+A
Order allow,deny
Deny from all
PK >\FrK K com_k2/com_k2.xmlnu W+A
XMAP_PLUGIN_K2
Mohammad Hasani Eghtedar
November 2011
GNU GPL
http://www.gnu.org/copyleft/gpl.html GNU/GPL
m.h.eghtedar@gmail.com
https://github.com/mhehm/Xmap
1.3
XMAP_PLUGIN_K2_DESC
com_k2.php
index.html
en-GB/en-GB.plg_xmap_com_k2.ini
en-GB/en-GB.plg_xmap_com_k2.sys.ini
fr-FR/fr-FR.plg_xmap_com_k2.ini
fr-FR/fr-FR.plg_xmap_com_k2.sys.ini
fa-IR/fa-IR.plg_xmap_com_k2.ini
fa-IR/fa-IR.plg_xmap_com_k2.sys.ini
PK >\q
(7 (7 com_k2/com_k2.phpnu W+A link );
parse_str( html_entity_decode($link_query['query']), $link_vars);
$parm_vars = $parent->params->toArray();
$option = xmap_com_k2::getParam($link_vars,'option',"");
if ($option != "com_k2")
return;
$view = xmap_com_k2::getParam($link_vars,'view',"");
$showMode = xmap_com_k2::getParam($params, 'showk2items', "always");
if ($showMode == "never" || ($showMode == "xml" && $xmap->view == "html") || ($showMode == "html" && $xmap->view == "xml"))
return;
self::$suppressDups = (xmap_com_k2::getParam($params,'suppressdups', 'yes') == "yes");
self::$suppressSub = (xmap_com_k2::getParam($params,'subcategories',"yes") != "yes");
if ($view == "item") // for Items the sitemap already contains the correct reference
{
if (!isset($xmap->IDS))
$xmap->IDS = "";
$xmap->IDS = $xmap->IDS."|".xmap_com_k2::getParam($link_vars, 'id', $id);
return;
}
if ($xmap->view == "xml")
self::$maxAccess = 1; // XML sitemaps will only see content for guests
else
self::$maxAccess = implode(",", JFactory::getUser()->getAuthorisedViewLevels());
switch(xmap_com_k2::getParam($link_vars,'task',""))
{
case "user":
$tag = xmap_com_k2::getParam($link_vars, 'id', $id);
$ids = array_key_exists('userCategoriesFilter',$parm_vars) ? $parm_vars['userCategoriesFilter'] : array("");
$mode = "single user";
break;
case "tag":
$tag = xmap_com_k2::getParam($link_vars, 'tag',"");
$ids = array_key_exists('categoriesFilter',$parm_vars) ? $parm_vars['categoriesFilter'] : array("");
$mode = "tag";
break;
case "category":
$ids = explode("|", xmap_com_k2::getParam($link_vars, 'id',""));
$mode = "category";
break;
case "":
switch(xmap_com_k2::getParam($link_vars,'layout',""))
{
case "category":
if(array_key_exists('categories', $parm_vars)) $ids = $parm_vars["categories"];
else $ids = '';
$mode = "categories";
break;
case "latest":
$limit = xmap_com_k2::getParam($parm_vars, 'latestItemsLimit', "");
if (xmap_com_k2::getParam($parm_vars, 'source', "") == "0")
{
$ids = array_key_exists("userIDs",$parm_vars) ? $parm_vars["userIDs"] : '';
$mode = "latest user";
}
else
{
$ids = array_key_exists("categoryIDs",$parm_vars) ? $parm_vars["categoryIDs"] : '';
$mode = "latest category";
}
break;
default:
return;
}
break;
default:
return;
}
$priority = xmap_com_k2::getParam($params,'priority',$parent->priority);
$changefreq = xmap_com_k2::getParam($params,'changefreq',$parent->changefreq);
if ($priority == '-1')
$priority = $parent->priority;
if ($changefreq == '-1')
$changefreq = $parent->changefreq;
$params['priority'] = $priority;
$params['changefreq'] = $changefreq;
$db = JFactory::getDBO();
xmap_com_k2::processTree($db, $xmap, $parent, $params, $mode, $ids, $tag, $limit);
return;
}
static function collectByCat($db, $catid, &$allrows)
{
if (trim($catid) == "") // in this case something strange went wrong
return;
$query = "select id,title,alias,UNIX_TIMESTAMP(created) as created, UNIX_TIMESTAMP(modified) as modified, metakey from #__k2_items where "
."published = 1 and trash = 0 and (publish_down = \"0000-00-00\" OR publish_down > NOW()) "
."and catid = ".$catid. " order by 1 desc";
$db->setQuery($query);
$rows = $db->loadObjectList();
if ($rows != null)
$allrows = array_merge($allrows, $rows);
$query = "select id, name, alias from #__k2_categories where published = 1 and trash = 0 and parent = ".$catid." order by id";
$db->setQuery($query);
$rows = $db->loadObjectList();
if ($rows == null)
$rows = array();
foreach ($rows as $row)
{
xmap_com_k2::collectByCat($db, $row->id, $allrows);
}
}
static function processTree($db, &$xmap, &$parent, &$params, $mode, $ids, $tag, $limit)
{
$baseQuery = "select id,title,alias,UNIX_TIMESTAMP(created) as created, UNIX_TIMESTAMP(modified) as modified, metakey from #__k2_items where "
."published = 1 and trash = 0 and (publish_down = \"0000-00-00\" OR publish_down > NOW()) and "
."access in (".self::$maxAccess.") and ";
switch($mode)
{
case "single user":
$query = $baseQuery."created_by = ".$tag." ";
if ($ids[0] != "")
$query .= " and catid in (".implode(",", $ids).")";
$query .= " order by 1 DESC ";
$db->setQuery($query);
$rows = $db->loadObjectList();
break;
case "tag":
$query = "SELECT c.id, title, alias, UNIX_TIMESTAMP(c.created) as created, UNIX_TIMESTAMP(c.modified) as modified FROM #__k2_tags a, #__k2_tags_xref b, #__k2_items c where "."c.published = 1 and c.trash = 0 and (c.publish_down = \"0000-00-00\" OR c.publish_down > NOW()) "
."and a.Name = '".$tag."' and a.id = b.tagId and c.id = b.itemID and c.access in (".self::$maxAccess.")";
if ($ids[0] != "")
$query .= " and c.catid in (".implode(",", $ids).")";
$query .= " order by 1 DESC ";
$db->setQuery($query);
$rows = $db->loadObjectList();
break;
case "category":
$query = $baseQuery."catid = ".$ids[0]." order by 1 DESC ";
$db->setQuery($query);
$rows = $db->loadObjectList();
break;
case "categories":
if (!self::$suppressSub)
{
if($ids) $query = $baseQuery."catid in (".implode(",", $ids).") order by 1 DESC ";
else $query = $baseQuery."1 order by 1 DESC ";
$db->setQuery($query);
$rows = $db->loadObjectList ();
}
else
{
$rows = array();
if (is_array($ids))
{
foreach($ids as $id)
{
$allrows = array();
xmap_com_k2::collectByCat($db, $id, $allrows);
$rows = array_merge($rows, $allrows);
}
}
}
break;
case "latest user":
$rows = array();
if (is_array($ids))
{
foreach ($ids as $id)
{
$query = $baseQuery."created_by = ".$id." order by 1 DESC LIMIT ".$limit;
$db->setQuery($query);
$res = $db->loadObjectList();
if ($res != null)
$rows = array_merge($rows, $res);
}
}
break;
case "latest category":
$rows = array();
if (is_array($ids))
{
foreach ($ids as $id)
{
$query = $baseQuery."catid = ".$id." order by 1 DESC LIMIT ".$limit;
$db->setQuery($query);
$res = $db->loadObjectList();
if ($res != null)
$rows = array_merge($rows, $res);
}
}
break;
default:
return;
}
$xmap->changeLevel(1);
$node = new stdclass ();
$node->id = $parent->id;
if ($rows == null)
{
$rows = array();
}
foreach ($rows as $row )
{
if (!(self::$suppressDups && isset($xmap->IDS) && strstr($xmap->IDS, "|".$row->id)))
xmap_com_k2::addNode($xmap, $node, $row, false, $parent, $params);
}
if ($mode == "category" && !self::$suppressSub)
{
$query = "select id, name, alias from #__k2_categories where published = 1 and trash = 0 and parent = ".$ids[0]
." and access in (".self::$maxAccess.") order by id";
$db->setQuery($query);
$rows = $db->loadObjectList();
if ($rows == null)
{
$rows = array();
}
foreach ($rows as $row)
{
if (!isset($xmap->IDS))
$xmap->IDS = "";
if (!(self::$suppressDups && strstr($xmap->IDS, "|c".$row->id)))
{
xmap_com_k2::addNode($xmap, $node, $row, true, $parent, $params);
$newID = array();
$newID[0] = $row->id;
xmap_com_k2::processTree($db, $xmap, $parent, $params, $mode, $newID, "", "");
}
}
}
$xmap->changeLevel (-1);
}
static function addNode($xmap, $node, $row, $iscat, &$parent, &$params)
{
$sef = ($_REQUEST['option'] == "com_sefservicemap"); // verallgemeinern
if ($xmap->isNews && ($row->modified ? $row->modified : $row->created) > ($xmap->now - (2 * 86400)))
{
$node->newsItem = 1;
$node->keywords = $row->metakey;
}
else
{
$node->newsItem = 0;
$node->keywords = "";
}
if (!isset($xmap->IDS))
$xmap->IDS = "";
$node->browserNav = $parent->browserNav;
$node->pid = $row->id;
$node->uid = $parent->uid . 'item' . $row->id;
if (isset($row->modified) || isset($row->created))
$node->modified = (isset($row->modified) ? $row->modified : $row->created);
if ($sef)
$node->modified = date('Y-m-d',$node->modified);
$node->name = ($iscat ? $row->name : $row->title);
$node->priority = $params['priority'];
$node->changefreq = $params['changefreq'];
if ($iscat)
{
$xmap->IDS .= "|c".$row->id;
$node->link = 'index.php?option=com_k2&view=itemlist&task=category&id='.$row->id.':'.$row->alias.'&Itemid='.$parent->id;
$node->expandible = true;
}
else
{
$xmap->IDS .= "|".$row->id;
$node->link = 'index.php?option=com_k2&view=item&id='.$row->id.':'.$row->alias.'&Itemid='.$parent->id;
$node->expandible = false;
}
$node->tree = array ();
$xmap->printNode($node);
}
static function &getParam($arr, $name, $def)
{
$var = JArrayHelper::getValue( $arr, $name, $def, '' );
return $var;
}
}
?>PK >\6 com_k2/index.htmlnu W+A PK >\) com_weblinks/.htaccessnu W+A
Order allow,deny
Deny from all
PK >\z com_weblinks/com_weblinks.phpnu W+A link);
parse_str(html_entity_decode($link_query['query']), $link_vars);
$view = JArrayHelper::getValue($link_vars, 'view', '');
if ($view == 'weblink') {
$id = intval(JArrayHelper::getValue($link_vars, 'id', 0));
if ($id) {
$node->uid = 'com_weblinksi' . $id;
$node->expandible = false;
}
} elseif ($view == 'categories') {
$node->uid = 'com_weblinkscategories';
$node->expandible = true;
} elseif ($view == 'category') {
$catid = intval(JArrayHelper::getValue($link_vars, 'id', 0));
$node->uid = 'com_weblinksc' . $catid;
$node->expandible = true;
}
}
static function getTree($xmap, $parent, &$params)
{
self::initialize($params);
$app = JFactory::getApplication();
$weblinks_params = $app->getParams('com_weblinks');
$link_query = parse_url($parent->link);
parse_str(html_entity_decode($link_query['query']), $link_vars);
$view = JArrayHelper::getValue($link_vars, 'view', 0);
$app = JFactory::getApplication();
$menu = $app->getMenu();
$menuparams = $menu->getParams($parent->id);
if ($view == 'category') {
$catid = intval(JArrayHelper::getValue($link_vars, 'id', 0));
} elseif ($view == 'categories') {
$catid = 0;
} else { // Only expand category menu items
return;
}
$include_links = JArrayHelper::getValue($params, 'include_links', 1, '');
$include_links = ( $include_links == 1
|| ( $include_links == 2 && $xmap->view == 'xml')
|| ( $include_links == 3 && $xmap->view == 'html')
|| $xmap->view == 'navigator');
$params['include_links'] = $include_links;
$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, 'link_priority', $parent->priority, '');
$changefreq = JArrayHelper::getValue($params, 'link_changefreq', $parent->changefreq, '');
if ($priority == '-1')
$priority = $parent->priority;
if ($changefreq == '-1')
$changefreq = $parent->changefreq;
$params['link_priority'] = $priority;
$params['link_changefreq'] = $changefreq;
$options = array();
$options['countItems'] = false;
$options['catid'] = rand();
$categories = JCategories::getInstance('Weblinks', $options);
$category = $categories->get($catid? $catid : 'root', true);
$params['count_clicks'] = $weblinks_params->get('count_clicks');
xmap_com_weblinks::getCategoryTree($xmap, $parent, $params, $category);
}
static function getCategoryTree($xmap, $parent, &$params, $category)
{
$db = JFactory::getDBO();
$children = $category->getChildren();
$xmap->changeLevel(1);
foreach ($children as $cat) {
$node = new stdclass;
$node->id = $parent->id;
$node->uid = $parent->uid . 'c' . $cat->id;
$node->name = $cat->title;
$node->link = WeblinksHelperRoute::getCategoryRoute($cat);
$node->priority = $params['cat_priority'];
$node->changefreq = $params['cat_changefreq'];
$node->expandible = true;
if ($xmap->printNode($node) !== FALSE) {
xmap_com_weblinks::getCategoryTree($xmap, $parent, $params, $cat);
}
}
$xmap->changeLevel(-1);
if ($params['include_links']) { //view=category&catid=...
$linksModel = new WeblinksModelCategory();
$linksModel->getState(); // To force the populate state
$linksModel->setState('list.limit', JArrayHelper::getValue($params, 'max_links', NULL));
$linksModel->setState('list.start', 0);
$linksModel->setState('list.ordering', 'ordering');
$linksModel->setState('list.direction', 'ASC');
$linksModel->setState('category.id', $category->id);
$links = $linksModel->getItems();
$xmap->changeLevel(1);
foreach ($links as $link) {
$item_params = new JRegistry;
$item_params->loadString($link->params);
$node = new stdclass;
$node->id = $parent->id;
$node->uid = $parent->uid . 'i' . $link->id;
$node->name = $link->title;
// Find the Itemid
$Itemid = intval(preg_replace('/.*Itemid=([0-9]+).*/','$1',WeblinksHelperRoute::getWeblinkRoute($link->id, $category->id)));
if ($item_params->get('count_clicks', $params['count_clicks']) == 1) {
$node->link = 'index.php?option=com_weblinks&task=weblink.go&id='. $link->id.'&Itemid='.($Itemid ? $Itemid : $parent->id);
} else {
$node->link = $link->url;
}
$node->priority = $params['link_priority'];
$node->changefreq = $params['link_changefreq'];
$node->expandible = false;
$xmap->printNode($node);
}
$xmap->changeLevel(-1);
}
}
static public function initialize(&$params)
{
if (self::$_initialized) {
return;
}
self::$_initialized = true;
require_once JPATH_SITE.'/components/com_weblinks/models/category.php';
require_once JPATH_SITE.'/components/com_weblinks/helpers/route.php';
}
}PK >\(- - com_weblinks/com_weblinks.xmlnu W+A
Xmap - WebLinks Plugin
Guillermo Vargas
Apr 2004
GNU GPL
http://www.gnu.org/copyleft/gpl.html GNU/GPL
guille@vargas.co.cr
joomla.vargas.co.cr
2.0.1
XMAP_WL_PLUGIN_DESCRIPTION
com_weblinks.php
index.html
en-GB.plg_xmap_com_weblinks.ini
es-ES.plg_xmap_com_weblinks.ini
fa-IR.plg_xmap_com_weblinks.ini
cs-CZ.plg_xmap_com_weblinks.ini
nl-NL.plg_xmap_com_weblinks.ini
ru-RU.plg_xmap_com_weblinks.ini
PK >\6 com_weblinks/index.htmlnu W+A PK >\=g g com_sobipro/com_sobipro.xmlnu W+A
Xmap - SobiPro Plugin
Guillermo Vargas
07/15/2011
GNU GPL
http://www.gnu.org/copyleft/gpl.html GNU/GPL
guille@vargas.co.cr
joomla.vargas.co.cr
2.0.2
Xmap Plugin for SobiPro component
com_sobipro.php
en-GB.plg_xmap_com_sobipro.ini
es-ES.plg_xmap_com_sobipro.ini
fa-IR.plg_xmap_com_sobipro.ini
cs-CZ.plg_xmap_com_sobipro.ini
nl-NL.plg_xmap_com_sobipro.ini
ru-RU.plg_xmap_com_sobipro.ini
PK >\Qh( ( com_sobipro/com_sobipro.phpnu W+A link );
parse_str( html_entity_decode($link_query['query']), $link_vars);
$sid = JArrayHelper::getValue($link_vars,'sid',0);
$db = JFactory::getDbo();
$db->setQuery('SELECT * FROM `#__sobipro_object` where id='.(int)$sid);
$row = $db->loadObject();
$node->uid = 'com_sobiproo'.$sid;
if ( $row->oType == 'section' || $row->oType == 'category' ) {
$node->expandible = true;
} else {
$node->expandible = false;
}
}
/** Get the content tree for this kind of content */
function getTree( $xmap, $parent, &$params ) {
if ($xmap->isNews) // This component does not provide news content. don't waste time/resources
return false;
if (!self::loadSobi()){
return;
}
$link_query = parse_url( $parent->link );
parse_str( html_entity_decode($link_query['query']), $link_vars);
$sid =JArrayHelper::getValue($link_vars,'sid',1);
$task =JArrayHelper::getValue($link_vars,'task', null);
if (in_array($task, array('search', 'entry.add'))) {
return;
}
$db = JFactory::getDbo();
$db->setQuery('SELECT * FROM `#__sobipro_object` where id='.(int)$sid);
$object = $db->loadObject();
if ($object->oType == 'entry') {
return;
} elseif ( $object->oType == 'category' ) {
$sectionId = self::findCategorySection($object->parent);
} else {
$sectionId = $sid;
}
self::$sectionConfig = self::getSectionConfig($sectionId);
$include_entries =JArrayHelper::getValue($params,'include_entries',1);
$include_entries = ( $include_entries == 1
|| ( $include_entries == 2 && $xmap->view == 'xml')
|| ( $include_entries == 3 && $xmap->view == 'html')
|| $xmap->view == 'navigator');
$params['include_entries'] = $include_entries;
$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,'entry_priority',$parent->priority);
$changefreq =JArrayHelper::getValue($params,'entry_changefreq',$parent->changefreq);
if ($priority == '-1')
$priority = $parent->priority;
if ($changefreq == '-1')
$changefreq = $parent->changefreq;
$params['entry_priority'] = $priority;
$params['entry_changefreq'] = $changefreq;
$date = JFactory::getDate();
$params['now'] = $date->toMySql();
if ( $include_entries ) {
$ordering = JArrayHelper::getValue($params,'entries_order','b.position');
$orderdir = JArrayHelper::getValue($params,'entries_orderdir','ASC');
if ( !in_array($ordering,array('b.position','a.counter','b.validSince','a.updatedTime')) ){
$ordering = 'b.position';
}
if ( !in_array($orderdir,array('ASC','DESC')) ){
$orderdir = 'ASC';
}
$params['ordering'] = $ordering. ' '. $orderdir;
$params['limit'] = '';
$params['days'] = '';
$limit = JArrayHelper::getValue($params,'max_entries','');
if ( intval($limit) )
$params['limit'] = ' LIMIT '.$limit;
$days = JArrayHelper::getValue($params,'max_age','');
if ( intval($days) )
$params['days'] = ' AND a.publish_up >=\''.strftime("%Y-%m-%d %H:%M:%S",$xmap->now - ($days*86400)) ."' ";
}
xmap_com_sobipro::getCategoryTree($xmap, $parent, $sid, $params);
}
/** SobiPro support */
function getCategoryTree( $xmap, $parent, $sid, &$params ) {
$database =& JFactory::getDBO();
$query =
"SELECT a.id,a.nid, a.name, b.pid as pid "
."\n FROM #__sobipro_object AS a, #__sobipro_relations AS b "
."\n WHERE a.parent=$sid"
." AND a.oType='category'"
." AND b.oType=a.oType"
." AND a.state=1 "
." AND a.approved=1 "
."\n AND a.id=b.id "
."\n ORDER BY b.position ASC";
$database->setQuery( $query );
$rows = $database->loadObjectList();
$modified = time();
$xmap->changeLevel(1);
foreach($rows as $row) {
$node = new stdclass;
$node->id = $parent->id;
$node->uid = 'com_sobiproc'.$row->id; // Unique ID
$node->browserNav = $parent->browserNav;
$node->name = html_entity_decode($row->name);
$node->modified = $modified;
#$node->link = 'index.php?option=com_sobipro&sid='.$row->id.':'.trim( SPLang::urlSafe( $row->name ) ).'&Itemid='.$parent->id;
$node->link = SPJoomlaMainFrame::url( array('sid' => $row->id, 'title' => $row->name), false, false );
$node->priority = $params['cat_priority'];
$node->changefreq = $params['cat_changefreq'];
$node->expandible = true;
$node->secure = $parent->secure;
if ( $xmap->printNode($node) !== FALSE ) {
xmap_com_sobipro::getCategoryTree($xmap, $parent, $row->id, $params);
}
}
if ( $params['include_entries'] ) {
$query =
"SELECT a.id, c.baseData as name,a.updatedTime as modified,b.validSince as publish_up, b.pid as catid "
."\n FROM #__sobipro_object AS a, #__sobipro_relations AS b, #__sobipro_field_data c"
."\n WHERE a.state=1 "
."\n AND a.id=b.id "
."\n AND b.oType = 'entry'"
."\n AND b.pid = $sid"
."\n AND a.approved=1 "
."\n AND (a.validUntil>='{$params['now']}' or a.validUntil='0000-00-00 00:00:00' ) "
."\n AND (a.validSince<='{$params['now']}' or a.validSince='0000-00-00 00:00:00' ) "
."\n AND a.id=c.sid AND c.fid=".self::$sectionConfig['name_field']->sValue
."\n AND c.section=".self::$sectionConfig['name_field']->section
. $params['days']
."\n ORDER BY " . $params['ordering']
. $params['limit'];
$database->setQuery( $query );
$rows = $database->loadObjectList();
foreach($rows as $row) {
$node = new stdclass;
$node->id = $parent->id;
$node->uid = 'com_sobiproe'.$row->id; // Unique ID
$node->browserNav = $parent->browserNav;
$node->name = html_entity_decode($row->name);
$node->modified = $row->modified? $row->modified : $row->publish_up;
$node->priority = $params['entry_priority'];
$node->changefreq = $params['entry_changefreq'];
$node->expandible = false;
$node->secure = $parent->secure;
# $node->link = 'index.php?option=com_sobipro&pid='.$row->catid . '&sid=' . $row->id.':'.trim( SPLang::urlSafe( $row->name )).'&Itemid='.$parent->id;
$node->link = SPJoomlaMainFrame::url( array('sid' => $row->id, 'pid' => $row->catid, 'title' => $row->name), false, false );
$xmap->printNode($node);
}
}
$xmap->changeLevel(-1);
}
static protected function getSectionConfig($sectionId)
{
$db = JFactory::getDbo();
$db->setQuery('SELECT * FROM `#__sobipro_config` where section='.(int)$sectionId);
return $db->loadObjectList('sKey');
}
static protected function loadSobi()
{
if (defined('SOBI_TESTS')) {
return true;
}
define( 'SOBI_TESTS', false );
$ver = new JVersion();
$ver = str_replace( '.', null, $ver->RELEASE );
// added by Pierre Burri-Wittke globeall.de
if ($ver > '15') { $ver = '16'; }
define( 'SOBI_CMS', 'joomla'. $ver );
define( 'SOBIPRO', true );
define( 'SOBI_TASK', 'task' );
define( 'SOBI_DEFLANG', JFactory::getLanguage()->getDefault() );
define( 'SOBI_ACL', 'front' );
define( 'SOBI_ROOT', JPATH_ROOT );
define( 'SOBI_MEDIA', implode( '/', array( JPATH_ROOT, 'media', 'sobipro' ) ) );
define( 'SOBI_MEDIA_LIVE', JURI::root().'/media/sobipro' );
define( 'SOBI_PATH', SOBI_ROOT.'/components/com_sobipro' );
if (!file_exists(SOBI_PATH.'/lib/base/fs/loader.php')) {
return false;
}
require_once SOBI_PATH.'/lib/base/fs/loader.php';
SPLoader::loadClass( 'sobi' );
SPLoader::loadClass( 'base.request' );
SPLoader::loadClass( 'base.object' );
SPLoader::loadClass( 'base.factory' );
SPLoader::loadClass( 'base.mainframe' );
// added by Pierre Burri-Wittke globeall.de
SPLoader::loadClass( 'base.const' );
SPLoader::loadClass( 'cms.base.mainframe' );
SPLoader::loadClass( 'cms.base.lang' );
return true;
}
static protected function findCategorySection($sid)
{
$db = JFactory::getDbo();
$db->setQuery('SELECT id,parent,oType FROM `#__sobipro_object` where id='.(int)$sid);
$row = $db->loadObject();
if ($row->oType == 'section') {
return $row->id;
} else {
return self::findCategorySection($row->parent);
}
}
}
PK >\) com_sobipro/.htaccessnu W+A
Order allow,deny
Deny from all
PK >\6 com_mtree/index.htmlnu W+A PK >\ com_mtree/com_mtree.phpnu W+A isNews) // This component does not provide news content. don't waste time/resources
return false;
$db = JFactory::getDbo();
$catid=0;
if ( strpos($parent->link, 'task=listcats') ) {
$link_query = parse_url( $parent->link );
parse_str( html_entity_decode($link_query['query']), $link_vars);
$catid = JArrayHelper::getValue($link_vars,'cat_id',0);
}
$include_links = JArrayHelper::getValue($params,'include_links',1);
$include_links = ( $include_links == 1
|| ( $include_links == 2 && $xmap->view == 'xml')
|| ( $include_links == 3 && $xmap->view == 'html')
|| $xmap->view == 'navigator');
$params['include_links'] = $include_links;
$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,'link_priority',$parent->priority);
$changefreq = JArrayHelper::getValue($params,'link_changefreq',$parent->changefreq);
if ($priority == '-1')
$priority = $parent->priority;
if ($changefreq == '-1')
$changefreq = $parent->changefreq;
$params['link_priority'] = $priority;
$params['link_changefreq'] = $changefreq;
$ordering = JArrayHelper::getValue($params,'cats_order','cat_name');
$orderdir = JArrayHelper::getValue($params,'cats_orderdir','ASC');
if ( !in_array($ordering,array('ordering','cat_name','cat_created')) )
$ordering = 'cat_name';
if ( !in_array($orderdir,array('ASC','DESC')) ){
$orderdir = 'ASC';
}
$params['cats_order'] = $db->quoteName($ordering)." $orderdir";
if ( $include_links ) {
$ordering = JArrayHelper::getValue($params,'links_order','ordering');
$orderdir = JArrayHelper::getValue($params,'links_orderdir','ASC');
if ( !in_array($ordering,array('ordering','link_name','link_modified','link_created','link_hits')) )
$ordering = 'ordering';
if ( !in_array($orderdir,array('ASC','DESC')) ){
$orderdir = 'ASC';
}
$params['links_order'] = $db->quoteName($ordering)." $orderdir";
$params['limit'] = '';
$params['days'] = '';
$limit = JArrayHelper::getValue($params,'max_links',0);
if ( intval($limit) )
$params['limit'] = ' LIMIT '.intval($limit);
$days = JArrayHelper::getValue($params,'max_age','');
if ( intval($days) )
$params['days'] = ' AND a.link_created >=\''.date('Y-m-d H:i:s',($xmap->now - ($days*86400))) ."' ";
}
xmap_com_mtree::getMtreeCategory($xmap,$parent,$params,$catid);
}
/* Returns URLs of all Categories and links in of one category using recursion */
static function getMtreeCategory ($xmap, $parent, &$params, $catid )
{
$database =& JFactory::getDbo();
$query = "SELECT cat_name, cat_id ".
"FROM #__mt_cats WHERE cat_published='1' AND cat_approved='1' AND cat_parent = $catid " .
"ORDER BY " . $params['cats_order'];
$database->setQuery($query);
$rows = $database->loadObjectList();
$xmap->changeLevel(1);
foreach($rows as $row) {
$node = new stdclass;
$node->name = $row->cat_name;
$node->link = 'index.php?option=com_mtree&task=listcats&cat_id='.$row->cat_id.'&Itemid='.$parent->id;
$node->id = $parent->id;
$node->uid = $parent->uid .'c'.$row->cat_id;
$node->browserNav = $parent->browserNav;
$node->modified = NULL;
$node->priority = $params['cat_priority'];
$node->changefreq = $params['cat_changefreq'];
$node->expandible = true;
$node->secure = $parent->secure;
if ( $xmap->printNode($node) !== FALSE) {
xmap_com_mtree::getMtreeCategory($xmap,$parent,$params,$row->cat_id);
}
}
/* Returns URLs of all listings in the current category */
if ($params['include_links']) {
$query = " SELECT a.link_name, a.link_id, a.link_created as created, a.link_modified as modified \n".
" FROM #__mt_links AS a, #__mt_cl as b \n".
" WHERE a.link_id = b.link_id \n".
" AND b.cat_id = $catid " .
" AND ( link_published='1' AND link_approved='1' ) " .
$params['days'] .
" ORDER BY " . $params['links_order'] .
$params['limit'];
$database->setQuery($query);
$rows = $database->loadObjectList();
foreach($rows as $row) {
if ( !$row->modified || ($row->modified == $database->getNullDate())) {
$row->modified = $row->created;
}
$node = new stdclass;
$node->name = $row->link_name;
$node->link = 'index.php?option=com_mtree&task=viewlink&link_id='.$row->link_id.'&Itemid='.$parent->id;
$node->id = $parent->id;
$node->uid = $parent->uid.'l'.$row->link_id;
$node->browserNav = $parent->browserNav;
$node->modified = $row->modified;
$node->priority = $params['link_priority'];
$node->changefreq = $params['link_changefreq'];
$node->expandible = false;
$node->secure = $parent->secure;
$xmap->printNode($node);
}
}
$xmap->changeLevel(-1);
}
}
PK >\) com_mtree/.htaccessnu W+A
Order allow,deny
Deny from all
PK >\;O+n n com_mtree/com_mtree.xmlnu W+A
Xmap - Mosets Tree Plugin
Guillermo Vargas
07/20/2011
GNU GPL
http://www.gnu.org/copyleft/gpl.html GNU/GPL
guille@vargas.co.cr
joomla.vargas.co.cr
2.0.2
XMAP_MTREE_PLUGIN_DESCRIPTION
com_mtree.php
index.html
en-GB.plg_xmap_com_mtree.ini
es-ES.plg_xmap_com_mtree.ini
fa-IR.plg_xmap_com_mtree.ini
cs-CZ.plg_xmap_com_mtree.ini
nl-NL.plg_xmap_com_mtree.ini
ru-RU.plg_xmap_com_mtree.ini
PK >\) .htaccessnu W+A
Order allow,deny
Deny from all
PK >\/X com_kunena/com_kunena.xmlnu W+A
Xmap - Kunena Plugin
Guillermo Vargas
September 2007
GNU GPL
http://www.gnu.org/copyleft/gpl.html GNU/GPL
guille@vargas.co.cr
joomla.vargas.co.cr
2.0.3
Xmap Plugin for Kunena component
com_kunena.php
en-GB.plg_xmap_com_kunena.ini
es-ES.plg_xmap_com_kunena.ini
fa-IR.plg_xmap_com_kunena.ini
cs-CZ.plg_xmap_com_kunena.ini
nl-NL.plg_xmap_com_kunena.ini
ru-RU.plg_xmap_com_kunena.ini
PK >\/ / com_kunena/com_kunena.phpnu W+A link);
parse_str(html_entity_decode($link_query['query']), $link_vars);
$catid = intval(JArrayHelper::getValue($link_vars, 'catid', 0));
$id = intval(JArrayHelper::getValue($link_vars, 'id', 0));
$func = JArrayHelper::getValue($link_vars, 'func', '', '');
if ($func = 'showcat' && $catid) {
$node->uid = 'com_kunenac' . $catid;
$node->expandible = false;
} elseif ($func = 'view' && $id) {
$node->uid = 'com_kunenaf' . $id;
$node->expandible = false;
}
}
function getTree($xmap, $parent, &$params)
{
if ($xmap->isNews) // This component does not provide news content. don't waste time/resources
return false;
// Make sure that we can load the kunena api
if (!xmap_com_kunena::loadKunenaApi()) {
return false;
}
if (!self::$profile) {
self::$config = KunenaFactory::getConfig ();;
self::$profile = KunenaFactory::getUser ();
}
$user = JFactory::getUser();
$catid = 0;
$link_query = parse_url($parent->link);
if (!isset($link_query['query'])) {
return;
}
parse_str(html_entity_decode($link_query['query']), $link_vars);
$view = JArrayHelper::getValue($link_vars, 'view', '');
switch ($view){
case 'showcat': case 'category':
$link_query = parse_url($parent->link);
parse_str(html_entity_decode($link_query['query']), $link_vars);
$catid = JArrayHelper::getValue($link_vars, 'catid', 0);
break;
case 'listcat':
case 'entrypage':
$catid = 0;
break;
default:
return true; // Do not expand links to posts
}
$include_topics = JArrayHelper::getValue($params, 'include_topics', 1);
$include_topics = ( $include_topics == 1
|| ( $include_topics == 2 && $xmap->view == 'xml')
|| ( $include_topics == 3 && $xmap->view == 'html')
|| $xmap->view == 'navigator');
$params['include_topics'] = $include_topics;
$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;
$params['groups'] = implode(',', $user->authorisedLevels());
$priority = JArrayHelper::getValue($params, 'topic_priority', $parent->priority);
$changefreq = JArrayHelper::getValue($params, 'topic_changefreq', $parent->changefreq);
if ($priority == '-1')
$priority = $parent->priority;
if ($changefreq == '-1')
$changefreq = $parent->changefreq;
$params['topic_priority'] = $priority;
$params['topic_changefreq'] = $changefreq;
if ($include_topics) {
$ordering = JArrayHelper::getValue($params, 'topics_order', 'ordering');
if ( !in_array($ordering,array('id', 'ordering','time','subject','hits')) )
$ordering = 'ordering';
$params['topics_order'] = 't.`'.$ordering.'`';
$params['include_pagination'] = ($xmap->view == 'xml');
$params['limit'] = '';
$params['days'] = '';
$limit = JArrayHelper::getValue($params, 'max_topics', '');
if (intval($limit))
$params['limit'] = ' LIMIT ' . $limit;
$days = JArrayHelper::getValue($params, 'max_age', '');
$params['days'] = false;
if (intval($days))
$params['days'] = ($xmap->now - (intval($days) * 86400));
}
$params['table_prefix'] = xmap_com_kunena::getTablePrefix();
xmap_com_kunena::getCategoryTree($xmap, $parent, $params, $catid);
}
/*
* Builds the Kunena's tree
*/
function getCategoryTree($xmap, $parent, &$params, $parentCat)
{
$db = JFactory::getDBO();
// Load categories
if (self::getKunenaMajorVersion() >= '2.0') {
// Kunena 2.0+
$catlink = 'index.php?option=com_kunena&view=category&catid=%s&Itemid='.$parent->id;
$toplink = 'index.php?option=com_kunena&view=topic&catid=%s&id=%s&Itemid='.$parent->id;
kimport('kunena.forum.category.helper');
$categories = KunenaForumCategoryHelper::getChildren($parentCat);
} else {
$catlink = 'index.php?option=com_kunena&func=showcat&catid=%s&Itemid='.$parent->id;
$toplink = 'index.php?option=com_kunena&func=view&catid=%s&id=%s&Itemid='.$parent->id;
if (self::getKunenaMajorVersion() >= '1.6') {
// Kunena 1.6+
kimport('session');
$session = KunenaFactory::getSession();
$session->updateAllowedForums();
$allowed = $session->allowed;
$query = "SELECT id, name FROM `#__kunena_categories` WHERE parent={$parentCat} AND id IN ({$allowed}) ORDER BY ordering";
} else {
// Kunena 1.0+
$query = "SELECT id, name FROM `{$params['table_prefix']}_categories` WHERE parent={$parentCat} AND published=1 AND pub_access=0 ORDER BY ordering";
}
$db->setQuery($query);
$categories = $db->loadObjectList();
}
/* get list of categories */
$xmap->changeLevel(1);
foreach ($categories as $cat) {
$node = new stdclass;
$node->id = $parent->id;
$node->browserNav = $parent->browserNav;
$node->uid = 'com_kunenac' . $cat->id;
$node->name = $cat->name;
$node->priority = $params['cat_priority'];
$node->changefreq = $params['cat_changefreq'];
$node->link = sprintf($catlink, $cat->id);
$node->expandible = true;
$node->secure = $parent->secure;
if ($xmap->printNode($node) !== FALSE) {
xmap_com_kunena::getCategoryTree($xmap, $parent, $params, $cat->id);
}
}
if ($params['include_topics']) {
if (self::getKunenaMajorVersion() >= '2.0') {
// Kunena 2.0+
kimport('kunena.forum.topic.helper');
// TODO: orderby parameter is missing:
$topics = KunenaForumTopicHelper::getLatestTopics($parentCat, 0, $params['limit'], array('starttime', $params['days']));
if (count($topics)==2 && is_numeric($topics[0])){
$topics = $topics[1];
}
} else {
$access = KunenaFactory::getAccessControl();
$hold = $access->getAllowedHold(self::$profile, $parentCat);
// Kunena 1.0+
$query = "SELECT t.id, t.catid, t.subject, max(m.time) as time, count(m.id) as msgcount
FROM {$params['table_prefix']}_messages t
INNER JOIN {$params['table_prefix']}_messages AS m ON t.id = m.thread
WHERE t.catid=$parentCat AND t.parent=0
AND t.hold in ({$hold})
GROUP BY m.`thread`
ORDER BY {$params['topics_order']} DESC";
if ($params['days']) {
$query = "SELECT * FROM ($query) as topics WHERE time >= {$params['days']}";
}
#echo str_replace('#__','mgbj2_',$query);
$db->setQuery($query, 0, $params['limit']);
$topics = $db->loadObjectList();
}
//get list of topics
foreach ($topics as $topic) {
$node = new stdclass;
$node->id = $parent->id;
$node->browserNav = $parent->browserNav;
$node->uid = 'com_kunenat' . $topic->id;
$node->name = $topic->subject;
$node->priority = $params['topic_priority'];
$node->changefreq = $params['topic_changefreq'];
$node->modified = intval(@$topic->last_post_time? $topic->last_post_time : $topic->time);
$node->link = sprintf($toplink, (@$topic->category_id? $topic->category_id : $topic->catid), $topic->id);
$node->expandible = false;
$node->secure = $parent->secure;
if ($xmap->printNode($node) !== FALSE) {
// Pagination will not work with K2.0, revisit this when that version is out and stable
if ($params['include_pagination'] && isset($topic->msgcount) && $topic->msgcount > self::$config->messages_per_page ){
$msgPerPage = self::$config->messages_per_page;
$threadPages = ceil ( $topic->msgcount / $msgPerPage );
for ($i=2;$i<=$threadPages;$i++) {
$subnode = new stdclass;
$subnode->id = $node->id;
$subnode->uid = $node->uid.'p'.$i;
$subnode->name = "[$i]";
$subnode->seq = $i;
$subnode->link = $node->link.'&limit='.$msgPerPage.'&limitstart='.(($i-1)*$msgPerPage);
$subnode->browserNav = $node->browserNav;
$subnode->priority = $node->priority;
$subnode->changefreq = $node->changefreq;
$subnode->modified = $node->modified;
$subnode->secure = $node->secure;
$xmap->printNode($subnode);
}
}
}
}
}
$xmap->changeLevel(-1);
}
private static function loadKunenaApi()
{
if (!defined('KUNENA_LOADED')) {
jimport ( 'joomla.application.component.helper' );
// Check if Kunena component is installed/enabled
if (! JComponentHelper::isEnabled ( 'com_kunena', true )) {
return false;
}
// Check if Kunena API exists
$kunena_api = JPATH_ADMINISTRATOR . '/components/com_kunena/api.php';
if (! is_file ( $kunena_api ))
return false;
// Load Kunena API
require_once ($kunena_api);
}
return true;
}
/**
* Based on Matias' version (Thanks)
* See: http://docs.kunena.org/index.php/Developing_Kunena_Router
*/
function getKunenaMajorVersion() {
static $version;
if (!$version) {
if (class_exists('KunenaForum')) {
$version = KunenaForum::versionMajor();
} elseif (class_exists('Kunena')) {
$version = substr(Kunena::version(), 0, 3);
} elseif (is_file(JPATH_ROOT.'/components/com_kunena/lib/kunena.defines.php')) {
$version = '1.5';
} elseif (is_file(JPATH_ROOT.'/components/com_kunena/lib/kunena.version.php')) {
$version = '1.0';
}
}
return $version;
}
function getTablePrefix() {
$version = self::getKunenaMajorVersion();
if ($version <= 1.5) {
return '#__fb';
}
return '#__kunena';
}
}
PK >\) com_kunena/.htaccessnu W+A
Order allow,deny
Deny from all
PK >\) com_virtuemart/.htaccessnu W+A PK >\; ! com_virtuemart/com_virtuemart.phpnu W+A PK >\(# # ! 1 com_virtuemart/com_virtuemart.xmlnu W+A PK >\6 6 com_virtuemart/index.htmlnu W+A PK >\65^ ^ 7 com_content/com_content.xmlnu W+A PK >\6 V com_content/index.htmlnu W+A PK >\QXS S W com_content/com_content.phpnu W+A PK >\) 2 com_content/.htaccessnu W+A PK >\) com_k2/.htaccessnu W+A PK >\FrK K com_k2/com_k2.xmlnu W+A PK >\q
(7 (7 A com_k2/com_k2.phpnu W+A PK >\6 com_k2/index.htmlnu W+A PK >\) com_weblinks/.htaccessnu W+A PK >\z com_weblinks/com_weblinks.phpnu W+A PK >\(- - com_weblinks/com_weblinks.xmlnu W+A PK >\6 _# com_weblinks/index.htmlnu W+A PK >\=g g # com_sobipro/com_sobipro.xmlnu W+A PK >\Qh( ( v< com_sobipro/com_sobipro.phpnu W+A PK >\) Xe com_sobipro/.htaccessnu W+A PK >\6 f com_mtree/index.htmlnu W+A PK >\ ~f com_mtree/com_mtree.phpnu W+A PK >\) Y com_mtree/.htaccessnu W+A PK >\;O+n n com_mtree/com_mtree.xmlnu W+A PK >\) Н .htaccessnu W+A PK >\/X com_kunena/com_kunena.xmlnu W+A PK >\/ / com_kunena/com_kunena.phpnu W+A PK >\) com_kunena/.htaccessnu W+A PK -