/**
  * Generates a list of RSS feed items.
  *
  * @return    void
  */
 function display()
 {
     $app = JFactory::getApplication();
     $doc = JFactory::getDocument();
     $params = $app->getParams();
     $doc->link = htmlspecialchars(JFactory::getURI()->toString());
     $feed_email = $app->getCfg('feed_email') == '' ? 'site' : $app->getCfg('feed_email');
     $site_email = $app->getCfg('mailfrom');
     // Set the query limit to the feed setting
     JRequest::setVar('limit', (int) $app->getCfg('feed_limit', 20));
     // Get model data
     $rows = $this->get('Items');
     foreach ($rows as $row) {
         // Load individual item creator class
         $item = new JFeedItem();
         $item->title = html_entity_decode($this->escape($row->title), ENT_COMPAT, 'UTF-8');
         $item->link = JRoute::_(PFforumHelperRoute::getTopicRoute($row->slug, $row->project_slug));
         $item->description = $row->description;
         $item->date = $row->created ? date('r', strtotime($row->created)) : '';
         $item->author = $row->author_name;
         $item->authorEmail = $feed_email == 'site' ? $site_email : $row->author_email;
         // Categorize the item
         if (!empty($row->project_title)) {
             $item->category = array(html_entity_decode($this->escape($row->project_title), ENT_COMPAT, 'UTF-8'));
         }
         // Loads item info into the RSS array
         $doc->addItem($item);
     }
 }
Example #2
0
 /**
  * Returns a list of buttons for the frontend
  *
  * @return    array
  */
 public static function getSiteButtons()
 {
     $user = JFactory::getUser();
     $buttons = array();
     if ($user->authorise('core.create', 'com_pfforum')) {
         $buttons[] = array('title' => 'MOD_PF_DASH_BUTTONS_ADD_TOPIC', 'link' => PFforumHelperRoute::getTopicsRoute() . '&task=topicform.add', 'icon' => JHtml::image('com_projectfork/projectfork/header/icon-48-topicform.add.png', JText::_('MOD_PF_DASH_BUTTONS_ADD_TOPIC'), null, true));
     }
     return $buttons;
 }
Example #3
0
 protected function getTitleLink()
 {
     if ($this->client_id) {
         $link = 'index.php?option=' . $this->item->extension . '&task=' . $this->item->name . '.edit' . '&id=' . (int) $this->item->item_id;
     } else {
         $meta =& $this->item->metadata;
         if ($this->item->name == 'topic') {
             $item_slug = $this->item->item_id . ':' . $meta->get('alias');
             $p_slug = $this->item->xref_id . ':' . $meta->get('p_alias');
             $link = PFforumHelperRoute::getTopicRoute($item_slug, $p_slug);
         }
         if ($this->item->name == 'reply') {
             $t_slug = $meta->get('t_id') . ':' . $meta->get('t_alias');
             $p_slug = $this->item->xref_id . ':' . $meta->get('p_alias');
             $link = PFforumHelperRoute::getTopicRoute($t_slug, $p_slug);
         }
     }
     return JRoute::_($link);
 }
</script>
<div id="projectfork" class="category-list<?php 
echo $this->pageclass_sfx;
?>
 view-replies">

    <h1><?php 
echo $this->escape($this->topic->title);
?>
</h1>
    <div class="clearfix"></div>

    <div class="cat-items">

        <form name="adminForm" id="adminForm" action="<?php 
echo JRoute::_(PFforumHelperRoute::getRepliesRoute($topic, $project));
?>
" method="post" autocomplete="off">
	            <div class="btn-toolbar btn-toolbar-top">
                    <?php 
echo $this->toolbar;
?>
	            </div>

	            <div class="clearfix"> </div>

	            <div class="<?php 
echo $filter_in;
?>
collapse" id="filters">
	                <div class="btn-toolbar">
 /**
  * Method to generate the email message
  *
  * @param     object     $lang         Instance of the default user language
  * @param     object     $receiveer    Instance of the the receiving user
  * @param     object     $user         Instance of the user who made the change
  * @param     object     $after        Instance of the item table after it was updated
  * @param     object     $before       Instance of the item table before it was updated
  * @param     boolean    $is_new       True if the item is new ($before will be null)
  *
  * @return    string
  */
 public static function getReplyMessage($lang, $receiver, $user, $after, $before, $is_new)
 {
     if (!$is_new) {
         return false;
     }
     $txt_prefix = 'COM_PROJECTFORK_REPLY_EMAIL_' . ($is_new ? 'NEW' : 'UPD');
     $format = $lang->_($txt_prefix . '_MESSAGE');
     $footer = sprintf($lang->_('COM_PROJECTFORK_EMAIL_FOOTER'), JURI::root());
     $link = JRoute::_(JURI::root() . PFforumHelperRoute::getTopicRoute($after->topic_id, $after->project_id));
     $txt = sprintf($format, $receiver->name, $user->name, strip_tags($after->description), $link);
     $txt = str_replace('\\n', "\n", $txt . "\n\n" . $footer);
     return $txt;
 }
Example #6
0
    	    	    			<div class="btn-group">
    	    	    			    <a class="btn btn-mini" href="<?php 
        echo JRoute::_('index.php?option=com_pfforum&task=topicform.edit&id=' . $item->id);
        ?>
">
    	    	    			        <span aria-hidden="true" class="icon-pencil"></span> <?php 
        echo JText::_('COM_PROJECTFORK_ACTION_EDIT');
        ?>
    	    	    			    </a>
    	    	    			</div>
	    	    			<?php 
    }
    ?>
    	    				<div class="btn-group">
    	    					<a class="btn btn-mini" href="<?php 
    echo JRoute::_(PFforumHelperRoute::getTopicRoute($item->slug, $item->project_slug));
    ?>
">
    	    			       	    <span aria-hidden="true" class="icon-comment"></span> <?php 
    echo JText::plural('COM_PROJECTFORK_N_REPLIES', (int) $item->replies);
    ?>
    	    			        </a>
    	    			    </div>

                			<?php 
    echo $watch;
    ?>
                		</div>
    				</div>
    			</div>
    			<!-- End Topic -->
Example #7
0
    $query = $db->getQuery(true);
    $query->select('attribs')->from('#__pf_projects')->where('id = ' . $db->quote($pid));
    $db->setQuery($query);
    $project_attribs = $db->loadResult();
    $project_params = new JRegistry();
    $project_params->loadString($project_attribs);
    $repo_dir = (int) $project_params->get('repo_dir');
} else {
    $repo_dir = 1;
}
// Prepare component base links
$link_tasks = class_exists('PFtasksHelperRoute') ? PFtasksHelperRoute::getTasksRoute() : 'index.php?option=com_pftasks';
$link_projects = class_exists('PFprojectsHelperRoute') ? PFprojectsHelperRoute::getProjectsRoute() : 'index.php?option=com_pfprojects';
$link_time = class_exists('PFtimeHelperRoute') ? PFtimeHelperRoute::getTimesheetRoute() : 'index.php?option=com_pftime';
$link_ms = class_exists('PFmilestonesHelperRoute') ? PFmilestonesHelperRoute::getMilestonesRoute() : 'index.php?option=com_pfmilestones';
$link_forum = class_exists('PFforumHelperRoute') ? PFforumHelperRoute::getTopicsRoute() : 'index.php?option=com_pfforum';
$link_repo = class_exists('PFrepoHelperRoute') ? PFrepoHelperRoute::getRepositoryRoute($pid, $repo_dir) : 'index.php?option=com_pfrepo&filter_project=' . $pid . '&parent_id=' . $repo_dir;
// Logout link return
$return = base64_encode($this->baseurl);
?>
<!DOCTYPE html>
<html>
<head>
	<jdoc:include type="head" />
    <?php 
// Detecting Home
$site_app = JFactory::getApplication('Site');
$menu = $site_app->getMenu();
if ($menu->getActive() == $menu->getDefault()) {
    $siteHome = 1;
} else {
Example #8
0
 /**
  * Creates a link to a topic item view
  *
  * @param     string    $id         The topic slug
  * @param     string    $project    The project slug. Optional
  *
  * @return    string    $link       The link
  */
 public static function getTopicRoute($id, $project = '')
 {
     return PFforumHelperRoute::getRepliesRoute($id, $project);
 }