コード例 #1
0
 function getObjectInfo($id, $language = null)
 {
     $info = new JCommentsObjectInfo();
     $Itemid = self::getItemid('com_marketplace');
     $Itemid = $Itemid > 0 ? '&Itemid=' . $Itemid : '';
     $marketplaceCore = JPATH_SITE . '/components/com_marketplace/controller.php';
     if (is_file($marketplaceCore)) {
         $db = JFactory::getDBO();
         $query = 'SELECT e.id, e.headline as title, e.user_id as userid' . " , CASE WHEN CHAR_LENGTH(e.alias) THEN CONCAT_WS(':', e.id, e.alias) ELSE e.id END as slug" . " , CASE WHEN CHAR_LENGTH(c.alias) THEN CONCAT_WS(':', c.id, c.alias) ELSE c.id END as categorySlug" . " FROM #__marketplace_entries AS e" . " JOIN #__marketplace_categories AS c ON c.id = e.category_id" . " WHERE e.id = " . $id;
         $db->setQuery($query);
         $row = $db->loadObject();
         $link = JRoute::_("index.php?option=com_marketplace&view=entry&catid=" . htmlspecialchars($row->categorySlug) . "&entry=" . $row->slug . $Itemid);
     } else {
         $db = JCommentsFactory::getDBO();
         $query = 'SELECT e.id, e.ad_headline as title, e.userid ' . " FROM #__marketplace_ads AS e" . " WHERE e.id = " . $id;
         $db->setQuery($query);
         $row = $db->loadObject();
         $link = JoomlaTuneRoute::_("index.php?option=com_marketplace&page=show_ad&adid=" . $id . $Itemid);
     }
     if (!empty($row)) {
         $info->title = $row->ad_headline;
         $info->userid = $row->userid;
         $info->link = $link;
     }
     return $info;
 }
コード例 #2
0
 function getObjectLink($id)
 {
     $_Itemid = JCommentsPlugin::getItemid('com_alberghi');
     $_Itemid = intval($_Itemid) ? '&Itemid=' . $_Itemid : '';
     $link = JoomlaTuneRoute::_('index.php?option=com_alberghi&task=detail&id=' . $id . $_Itemid);
     return $link;
 }
コード例 #3
0
 function getObjectLink($id)
 {
     global $mainframe;
     if (!isset($GLOBALS['jc_sobi2itemid'])) {
         $_requestOption = JCommentsInput::getVar('option', '');
         $_requestItemid = (int) JCommentsInput::getVar('Itemid', 0);
         $_Itemid = null;
         $db =& JCommentsFactory::getDBO();
         $query = "SELECT `configValue`" . "\nFROM `#__sobi2_config`" . "\nWHERE `configKey` = 'forceMenuId'" . "\n  AND `sobi2Section` = 'general'";
         $db->setQuery($query);
         $forceMenuId = (int) $db->loadResult();
         if ($_requestOption == 'com_sobi2' && !$forceMenuId) {
             $_Itemid = $_requestItemid;
         } else {
             $_Itemid = JCommentsPlugin::getItemid('com_sobi2');
         }
         $GLOBALS['jc_sobi2itemid'] = $_Itemid;
     }
     $_Itemid = $GLOBALS['jc_sobi2itemid'];
     if ($_Itemid != null) {
         $_Itemid = '&Itemid=' . $_Itemid;
     } else {
         $_Itemid = '';
     }
     $link = JoomlaTuneRoute::_('index.php?option=com_sobi2&sobi2Task=sobi2Details&sobi2Id=' . $id . $_Itemid);
     return $link;
 }
コード例 #4
0
 function getObjectLink($id)
 {
     static $_Itemid = null;
     if (!isset($_Itemid)) {
         if (JCOMMENTS_JVERSION == '1.5') {
             $needles = array('gid' => (int) $id);
             if ($item = self::_findItem($needles)) {
                 $_Itemid = $item->id;
             } else {
                 $_Itemid = '';
             }
         } else {
             $_Itemid = self::getItemid('com_docman');
         }
     }
     if (JCOMMENTS_JVERSION == '1.0') {
         $link = JoomlaTuneRoute::_("index.php?option=com_docman&task=doc_details&gid=" . $id . "&Itemid=" . $_Itemid);
     } else {
         include_once JPATH_SITE . DS . 'includes' . DS . 'application.php';
         $link = 'index.php?option=com_docman&task=doc_details&gid=' . $id;
         if ($_Itemid != '') {
             $link .= '&Itemid=' . $_Itemid;
         }
         $router = JPATH_SITE . DS . 'components' . DS . 'com_docman' . DS . 'router.php';
         if (is_file($router)) {
             include_once $router;
         }
         $link = JRoute::_($link);
     }
     return $link;
 }
コード例 #5
0
 function getObjectLink($id)
 {
     $db =& JCommentsFactory::getDBO();
     $db->setQuery('SELECT folderid FROM #__puarcade_games WHERE id = ' . $id);
     $fid = $db->loadResult();
     $_Itemid = JCommentsPlugin::getItemid('com_puarcade');
     $link = JoomlaTuneRoute::_('index.php?option=com_puarcade&fid=' . $fid . '&gid=' . $id . '&Itemid=' . $_Itemid);
     return $link;
 }
コード例 #6
0
 function getObjectLink($id)
 {
     $_Itemid = self::getItemid('com_groupjive');
     $db = JCommentsFactory::getDBO();
     $db->setQuery('SELECT group_id FROM #__gj_bul WHERE id = ' . $id);
     $gid = $db->loadResult();
     $link = JoomlaTuneRoute::_('index.php?option=com_groupjive&task=showfullmessage&idm=' . $id . '&groupid=' . $gid . '&Itemid=' . $_Itemid);
     return $link;
 }
コード例 #7
0
 function getObjectLink($id)
 {
     $link = '';
     $menu = jc_com_jcomments::getMenuItem($id);
     if ($menu != null) {
         $link = JoomlaTuneRoute::_('index.php?option=com_jcomments&Itemid=' . $menu->id);
     }
     return $link;
 }
コード例 #8
0
ファイル: com_ice.plugin.php プロジェクト: sergy444/joomla
 function getObjectLink($id)
 {
     $_Itemid = self::getItemid('com_ice');
     $db = JCommentsFactory::getDBO();
     $db->setQuery('SELECT catid, imgid FROM #__icefiles WHERE imgid = ' . $id);
     $catid = $db->loadResult();
     $link = JoomlaTuneRoute::_('index.php?option=com_ice&page=view&imgid=' . $id . '&catid=' . $catid . '&Itemid=' . $_Itemid);
     return $link;
 }
コード例 #9
0
 function getObjectLink($id)
 {
     $_Itemid = JCommentsPlugin::getItemid('com_myblog');
     $db =& JCommentsFactory::getDBO();
     $db->setQuery("SELECT permalink FROM #__myblog_permalinks WHERE contentid='{$id}'");
     $permalink = $db->loadResult();
     $link = JoomlaTuneRoute::_('index.php?option=com_myblog&show=' . $permalink . '&Itemid=' . $_Itemid);
     return $link;
 }
コード例 #10
0
 function getObjectLink($id)
 {
     $_Itemid = self::getItemid('com_xfaq');
     $db = JCommentsFactory::getDBO();
     $db->setQuery('SELECT catid FROM #__xfaq WHERE id = ' . $id);
     $catid = $db->loadResult();
     $link = JoomlaTuneRoute::_('index.php?option=com_xfaq&task=answer&catid=' . $catid . '&aid=' . $id . '&Itemid=' . $_Itemid);
     return $link;
 }
コード例 #11
0
 function getObjectLink($id)
 {
     $_Itemid = self::getItemid('com_autoexp');
     $db = JCommentsFactory::getDBO();
     $db->setQuery('SELECT mark_id FROM #__autoexp_add WHERE id = ' . $id);
     $catid = $db->loadResult();
     $link = JoomlaTuneRoute::_('index.php?option=com_autoexp&page=show_adds&catid=' . $catid . '&adid=' . $id . '&Itemid=' . $_Itemid);
     return $link;
 }
コード例 #12
0
 function getObjectLink($id)
 {
     $_Itemid = self::getItemid('com_scatalog');
     $db = JCommentsFactory::getDBO();
     $id = intval($id);
     $db->setQuery("SELECT cat_id FROM #__scatalog_catproduct_xref WHERE product_id={$id} LIMIT 1");
     $catid = $db->loadResult();
     $link = JoomlaTuneRoute::_("index.php?option=com_scatalog&view=product&catid={$catid}&id=" . $id . "&Itemid=" . $_Itemid);
     return $link;
 }
コード例 #13
0
 function getObjectInfo($id, $language = null)
 {
     $info = new JCommentsObjectInfo();
     $db = JCommentsFactory::getDBO();
     $db->setQuery('SELECT id, name FROM #__easygallery WHERE id = ' . $id);
     $row = $db->loadObject();
     if (!empty($row)) {
         $_Itemid = self::getItemid('com_easygallery');
         $info->title = $row->name;
         $info->link = JoomlaTuneRoute::_('index.php?option=com_easygallery&act=photos&cid=' . $id . '&Itemid=' . $_Itemid);
     }
     return $info;
 }
コード例 #14
0
 function getObjectLink($id)
 {
     $_Itemid = JCommentsPlugin::getItemid('com_virtuemart');
     if ($_Itemid != 0) {
         $_Itemid = '&Itemid=' . $_Itemid;
     } else {
         $_Itemid = '';
     }
     $db =& JCommentsFactory::getDBO();
     $query = "SELECT CONCAT('index.php?option=com_virtuemart&page=shop.product_details&flypage=', c.category_flypage,'&category_id=',c.category_id,'&product_id=', a.product_id, '" . $_Itemid . "' )" . "\n FROM #__vm_product AS a" . "\n LEFT JOIN #__vm_product_category_xref AS b ON b.product_id = a.product_id" . "\n LEFT JOIN #__vm_category AS c ON b.category_id = c.category_id" . "\n WHERE a.product_id = '{$id}'";
     $db->setQuery($query);
     $link = JoomlaTuneRoute::_($db->loadResult());
     return $link;
 }
コード例 #15
0
 function getObjectLink($id)
 {
     $_Itemid = JCommentsPlugin::getItemid('com_apoll');
     if (JCOMMENTS_JVERSION == '1.5') {
         $db =& JCommentsFactory::getDBO();
         $db->setQuery('SELECT alias, id FROM #__apolls WHERE id = ' . $id);
         $alias = $db->loadResult();
         $link = 'index.php?option=com_apoll&task=view&view=apoll&id=' . $id . ':' . $alias;
         $link .= $_Itemid > 0 ? '&Itemid=' . $_Itemid : '';
         $link = JRoute::_($link);
     } else {
         $link = JoomlaTuneRoute::_('index.php?option=com_apoll&task=view&view=apoll&id=' . $id . '&Itemid=' . $_Itemid);
     }
     return $link;
 }
コード例 #16
0
ファイル: com_myblog.plugin.php プロジェクト: enjoy2000/smcd
 function getObjectLink($id)
 {
     $app = JCommentsFactory::getApplication();
     $myBlogFunctions = $app->getCfg('absolute_path') . DS . 'components' . DS . 'com_myblog' . DS . 'functions.myblog.php';
     if (is_file($myBlogFunctions)) {
         require_once $myBlogFunctions;
         $_Itemid = myGetItemId();
     } else {
         $_Itemid = self::getItemid('com_myblog');
     }
     $db = JCommentsFactory::getDBO();
     $db->setQuery('SELECT permalink FROM #__myblog_permalinks WHERE contentid=' . $id);
     $permalink = $db->loadResult();
     $link = JoomlaTuneRoute::_('index.php?option=com_myblog&show=' . $permalink . '&Itemid=' . $_Itemid);
     return $link;
 }
コード例 #17
0
 function getObjectLink($id)
 {
     $_Itemid = self::getItemid('com_rokdownloads');
     if (JCOMMENTS_JVERSION == '1.0') {
         $link = JoomlaTuneRoute::_('index.php?option=com_rokdownloads&view=file&Itemid=' . $_Itemid . '&id=' . $id);
     } else {
         include_once JPATH_SITE . DS . 'includes' . DS . 'application.php';
         $link = 'index.php?option=com_rokdownloads&view=file&Itemid=' . $_Itemid . '&id=' . $id;
         $router = JPATH_SITE . DS . 'components' . DS . 'com_rokdownloads' . DS . 'router.php';
         if (is_file($router)) {
             include_once $router;
         }
         $link = JRoute::_($link);
     }
     return $link;
 }
コード例 #18
0
 function getObjectLink($id)
 {
     $_Itemid = self::getItemid('com_virtuemart');
     $_Itemid = $_Itemid > 0 ? '&Itemid=' . $_Itemid : '';
     $categoryFlypage = '';
     if (!defined('FLYPAGE')) {
         include_once JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_virtuemart' . DS . 'virtuemart.cfg.php';
         if (defined('FLYPAGE')) {
             $categoryFlypage = FLYPAGE;
         }
     }
     $db = JCommentsFactory::getDBO();
     $query = "SELECT CASE WHEN c.category_flypage IS NULL OR c.category_flypage = '' " . "\n          THEN CONCAT('index.php?option=com_virtuemart&page=shop.product_details&flypage=', '" . $categoryFlypage . "','&category_id=',c.category_id,'&product_id=', a.product_id, '" . $_Itemid . "' )" . "\n          ELSE CONCAT('index.php?option=com_virtuemart&page=shop.product_details&flypage=', c.category_flypage,'&category_id=',c.category_id,'&product_id=', a.product_id, '" . $_Itemid . "' )" . "\n          END" . "\n FROM #__vm_product AS a" . "\n LEFT JOIN #__vm_product_category_xref AS b ON b.product_id = a.product_id" . "\n LEFT JOIN #__vm_category AS c ON b.category_id = c.category_id" . "\n WHERE a.product_id = '{$id}'";
     $db->setQuery($query);
     $link = JoomlaTuneRoute::_($db->loadResult());
     return $link;
 }
コード例 #19
0
 function getObjectLink($id)
 {
     global $mainframe;
     $_Itemid = JCommentsPlugin::getItemid('com_zoom');
     $db =& JCommentsFactory::getDBO();
     $db->setQuery('SELECT catid, imgid FROM #__zoomfiles WHERE imgid = ' . $id);
     $catid = $db->loadResult();
     $key = 0;
     $zoomCfg = JOOMLATUNE_JPATH_SITE . DS . 'components' . DS . 'com_zoom' . DS . 'etc' . DS . 'zoom_config.php';
     if (is_file($zoomCfg)) {
         global $zoomConfig;
         require $zoomCfg;
         $orderMethod = '';
         switch ($zoomConfig['orderMethod']) {
             case 1:
                 $orderMethod = "imgdate ASC";
                 break;
             case 2:
                 $orderMethod = "imgdate DESC";
                 break;
             case 3:
                 $orderMethod = "imgfilename ASC";
                 break;
             case 4:
                 $orderMethod = "imgfilename DESC";
                 break;
             case 5:
                 $orderMethod = "imgname ASC";
                 break;
             case 6:
                 $orderMethod = "imgname DESC";
                 break;
         }
         $db->setQuery('SELECT imgid FROM #__zoomfiles WHERE catid = ' . $catid . ' ORDER BY ' . $orderMethod);
         $rows = $db->loadObjectList();
         for ($i = 0, $n = count($rows); $i < $n; $i++) {
             if ($rows[$i]->imgid == $id) {
                 $key = $i;
                 break;
             }
         }
         unset($rows);
     }
     $link = JoomlaTuneRoute::_('index.php?option=com_zoom&amp;page=view&amp;catid=' . $catid . '&amp;PageNo=1&amp;key=' . $key . '&amp;Itemid=' . $_Itemid);
     return $link;
 }
コード例 #20
0
 function getObjectLink($id)
 {
     static $_Itemid = null;
     if (!isset($_Itemid)) {
         if (JCOMMENTS_JVERSION == '1.5') {
             $needles = array('gid' => (int) $id);
             if ($item = jc_com_hwdvideoshare_v::_findItem($needles)) {
                 $_Itemid = $item->id;
             } else {
                 $_Itemid = '';
             }
         } else {
             $_Itemid = JCommentsPlugin::getItemid('com_hwdvideoshare_v');
         }
     }
     $link = JoomlaTuneRoute::_("index.php?option=com_hwdvideoshare&amp;task=viewvideo&amp;video_id=" . $id . "&amp;Itemid=" . $_Itemid);
     return $link;
 }
コード例 #21
0
 function getObjectLink($id)
 {
     static $_Itemid = null;
     if (!isset($_Itemid)) {
         if (JCOMMENTS_JVERSION == '1.0') {
             $_Itemid = self::getItemid('com_hwdvideoshare_g');
         } else {
             $needles = array('gid' => (int) $id);
             if ($item = self::_findItem($needles)) {
                 $_Itemid = $item->id;
             } else {
                 $_Itemid = '';
             }
         }
     }
     $link = JoomlaTuneRoute::_("index.php?option=com_hwdvideoshare&amp;task=viewgroup&amp;group_id=" . $id . "&amp;Itemid=" . $_Itemid);
     return $link;
 }
コード例 #22
0
 function getObjectInfo($id, $language)
 {
     $info = new JCommentsObjectInfo();
     $menu = self::getMenuItem($id);
     if ($menu != '') {
         if (JCOMMENTS_JVERSION == '1.0') {
             $params = new mosParameters($menu->params);
         } elseif (JCOMMENTS_JVERSION == '1.5') {
             $params = new JParameter($menu->params);
         } else {
             $params = new JRegistry($menu->params);
         }
         $info->title = $params->get('page_title') ? $params->get('page_title') : $menu->title;
         $info->access = $menu->access;
         $info->link = JoomlaTuneRoute::_('index.php?option=com_jcomments&amp;Itemid=' . $menu->id);
         $info->userid = 0;
     }
     return $info;
 }
コード例 #23
0
 function getObjectLink($id)
 {
     $link = '';
     if (JCOMMENTS_JVERSION == '1.5') {
         require_once JPATH_ROOT . DS . 'components' . DS . 'com_moofaq' . DS . 'helpers' . DS . 'route.php';
         $query = 'SELECT a.id, a.sectionid, a.access,' . ' CASE WHEN CHAR_LENGTH(a.alias) THEN CONCAT_WS(":", a.id, a.alias) ELSE a.id END as slug,' . ' CASE WHEN CHAR_LENGTH(cc.alias) THEN CONCAT_WS(":", cc.id, cc.alias) ELSE cc.id END as catslug' . ' FROM #__content AS a' . ' LEFT JOIN #__categories AS cc ON cc.id = a.catid' . ' WHERE a.id = ' . $id;
         $db = JCommentsFactory::getDBO();
         $db->setQuery($query);
         $row = $db->loadObject();
         $user = JFactory::getUser();
         if ($row->access <= $user->get('aid', 0)) {
             $link = JRoute::_(MoofaqHelperRoute::getArticleRoute($row->slug, $row->catslug, $row->sectionid));
         } else {
             $link = JRoute::_("index.php?option=com_user&task=register");
         }
     }
     if (JCOMMENTS_JVERSION == '1.0') {
         global $mainframe, $Itemid;
         $compat = $mainframe->getCfg('itemid_compat');
         if ($compat == null) {
             // Joomla 1.0.12 or below
             if ($Itemid && $Itemid != 99999999) {
                 $_Itemid = $Itemid;
             } else {
                 $_Itemid = $mainframe->getItemid($id);
             }
         } else {
             if ((int) $compat > 0 && (int) $compat <= 11) {
                 // Joomla 1.0.13 or higher and Joomla 1.0.11 compability
                 $_Itemid = $mainframe->getItemid($id, 0, 0);
             } else {
                 // Joomla 1.0.13 or higher and new Itemid algoritm
                 $_Itemid = $Itemid;
             }
         }
         $link = JoomlaTuneRoute::_('index.php?option=com_content&amp;task=view&amp;id=' . $id . '&amp;Itemid=' . $_Itemid);
     }
     return $link;
 }
コード例 #24
0
 function getObjectLink($id)
 {
     $_Itemid = self::getItemid('com_jmovies');
     $link = JoomlaTuneRoute::_('index.php?option=com_jmovies&amp;task=detail&amp;id=' . $id . '&amp;Itemid=' . $_Itemid);
     return $link;
 }
コード例 #25
0
 function getObjectLink($id)
 {
     $_Itemid = JCommentsPlugin::getItemid('com_easygallery');
     $link = JoomlaTuneRoute::_('index.php?option=com_easygallery&amp;act=photos&amp;cid=' . $id . '&amp;Itemid=' . $_Itemid);
     return $link;
 }
コード例 #26
0
 function getObjectLink($id)
 {
     $_Itemid = self::getItemid('com_estateagent');
     $link = JoomlaTuneRoute::_('index.php?option=com_estateagent&amp;act=object&amp;task=showEO&amp;id=' . $id . '&amp;Itemid=' . $_Itemid);
     return $link;
 }
コード例 #27
0
 function getObjectLink($id)
 {
     $_Itemid = self::getItemid('com_jcalpro');
     $link = JoomlaTuneRoute::_('index.php?option=com_jcalpro&amp;extmode=view&amp;extid=' . $id . '&amp;Itemid=' . $_Itemid);
     return $link;
 }
コード例 #28
0
 function getObjectLink($id)
 {
     $_Itemid = self::getItemid('com_garyscookbook');
     $link = JoomlaTuneRoute::_('index.php?option=com_garyscookbook&amp;func=detail&amp;id=' . $id . '&amp;Itemid=' . $_Itemid);
     return $link;
 }
コード例 #29
0
 function getObjectLink($id)
 {
     $_Itemid = JCommentsPlugin::getItemid('com_jooget');
     $link = JoomlaTuneRoute::_('index.php?option=com_jooget&amp;task=detail&amp;id=' . $id . '&amp;Itemid=' . $_Itemid);
     return $link;
 }
コード例 #30
0
 function getObjectLink($id)
 {
     $_Itemid = self::getItemid('com_easycalendar');
     $link = JoomlaTuneRoute::_('index.php?option=com_easycalendar&amp;task=view&amp;id=' . $id . '&amp;Itemid=' . $_Itemid);
     return $link;
 }