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; }
/** * Ajax function to save a new wall entry * * @param message A message that is submitted by the user * @param uniqueId The unique id for this group * * */ function onProfileDisplay() { //Load language file. JPlugin::loadLanguage('plg_community_myarticles', JPATH_ADMINISTRATOR); // Attach CSS $document = JFactory::getDocument(); $css = JURI::base() . 'plugins/community/myarticles/myarticles/style.css'; $document->addStyleSheet($css); if (JRequest::getVar('task', '', 'REQUEST') == 'app') { $app = 1; } else { $app = 0; } $user = CFactory::getRequestUser(); $userid = $user->id; $def_limit = $this->params->get('count', 10); $limit = JRequest::getVar('limit', $def_limit, 'REQUEST'); $limitstart = JRequest::getVar('limitstart', 0, 'REQUEST'); if (!file_exists($this->_path . '/config.myblog.php')) { $row = $this->getArticle($userid, $limitstart, $limit, $this->section); $myblogItemId = ""; } else { $row = $this->getArticle_with_myblog($userid, $limitstart, $limit, $this->section); include_once JPATH_ROOT . "/components/com_myblog/functions.myblog.php"; $myblogItemId = myGetItemId(); } $cat = $this->getCatAlias(); $total = $this->countArticle($userid, $this->section); $introtext = $this->params->get("introtext", 0); if ($this->params->get('hide_empty', 0) && !$total) { return ''; } $mainframe = JFactory::getApplication(); $caching = $this->params->get('cache', 1); if ($caching) { $caching = $mainframe->getCfg('caching'); } $cache = JFactory::getCache('plgCommunityMyArticles'); $cache->setCaching($caching); $callback = array('plgCommunityMyArticles', '_getArticleHTML'); $content = $cache->call($callback, $userid, $limit, $limitstart, $row, $app, $total, $cat, $myblogItemId, $introtext, $this->params); return $content; }
/** * Retrieves the correct Itemid for My Blog **/ public static function getItemId() { require_once JPATH_ROOT . '/components/com_myblog/functions.myblog.php'; return myGetItemId(); }
<a style="line-height: 18px;" href="<?php echo CRoute::_('index.php?option=com_community&view=events&task=myevents&userid=' . $myId); ?> "><?php echo JText::_('MOD_HELLOME MY EVENTS'); ?> </a> </div> <?php } ?> <?php if ($show_myblog) { if (file_exists(JPATH_ROOT . DS . "components" . DS . "com_myblog" . DS . "functions.myblog.php")) { include_once JPATH_ROOT . DS . "components" . DS . "com_myblog" . DS . "functions.myblog.php"; $myblogItemId = myGetItemId(); ?> <div style="background: transparent url(<?php echo JURI::root(); ?> modules/mod_hellome/images/icons-16x16.gif) no-repeat 0 -338px; padding: 0 0 0 22px;"> <a style="line-height: 18px;" href="<?php echo JRoute::_('index.php?option=com_myblog&blogger=' . $myName . '&Itemid=' . $myblogItemId); ?> "><?php echo JText::_('MOD_HELLOME MYBLOGS'); ?> </a> </div> <?php }
/** * Retrieves the correct Itemid for My Blog **/ function getItemId() { require_once JPATH_ROOT . DS . 'components' . DS . 'com_myblog' . DS . 'functions.myblog.php'; return myGetItemId(); }