/** * Function to print the pathway * @param object database object * @param object category object * @param int the post id * @param boolean set title */ function KUNENA_get_pathway(&$kunena_db, $obj_fb_cat, $bool_set_title, $obj_post = 0) { global $fbIcons; $document =& JFactory::getDocument(); $fbConfig =& CKunenaConfig::getInstance(); //Get the Category's parent category name for breadcrumb $kunena_db->setQuery("SELECT name, id FROM #__fb_categories WHERE id='" . $obj_fb_cat->getParent() . "'"); $objCatParentInfo = $kunena_db->loadObject(); check_dberror("Unable to load category."); //get the Moderator list for display $kunena_db->setQuery("SELECT * FROM #__fb_moderation AS m LEFT JOIN #__users AS u ON u.id=m.userid WHERE m.catid='" . $obj_fb_cat->getId() . "'"); $modslist = $kunena_db->loadObjectList(); check_dberror("Unable to load moderators."); // echo '<div class="fb_pathway">'; // List of Forums // show folder icon $return = '<img src="' . KUNENA_URLIMAGESPATH . 'folder.gif" border="0" alt="' . _GEN_FORUMLIST . '" style="vertical-align: middle;" /> '; // link to List of Forum Categories $return .= ' ' . CKunenaLink::GetKunenaLink(_GEN_FORUMLIST) . '<br />'; // List of Categories if ($objCatParentInfo) { if ($bool_set_title) { $document->setTitle(stripslashes($objCatParentInfo->name) . ' - ' . stripslashes($obj_fb_cat->getName()) . ' - ' . stripslashes($fbConfig->board_title)); } // show lines $return .= ' <img src="' . KUNENA_URLIMAGESPATH . 'tree-end.gif" alt="|-" border="0" style="vertical-align: middle;" />'; $return .= ' <img src="' . KUNENA_URLIMAGESPATH . 'folder.gif" alt="' . $objCatParentInfo->name . '" border="0" style="vertical-align: middle;" /> '; // link to Category $return .= ' ' . CKunenaLink::GetCategoryLink('listcat', $objCatParentInfo->id, $objCatParentInfo->name) . '<br />'; $return .= ' <img src="' . KUNENA_URLIMAGESPATH . 'tree-blank.gif" alt="| " border="0" style="vertical-align: middle;" />'; } else { if ($bool_set_title) { $document->setTitle(stripslashes($obj_fb_cat->getName()) . ' - ' . stripslashes($fbConfig->board_title)); } } // Forum // show lines $return .= ' <img src="' . KUNENA_URLIMAGESPATH . 'tree-end.gif" alt="|-" border="0" style="vertical-align: middle;" />'; $return .= ' <img src="' . KUNENA_URLIMAGESPATH . 'folder.gif" alt="+" border="0" style="vertical-align: middle;" /> '; // Link to forum $return .= ' ' . CKunenaLink::GetCategoryLink('showcat', $obj_fb_cat->getId(), $obj_fb_cat->getName()); //check if this forum is locked if ($obj_fb_cat->getLocked()) { $return .= isset($fbIcons['forumlocked']) ? ' <img src="' . KUNENA_URLICONSPATH . $fbIcons['forumlocked'] . '" border="0" alt="' . _GEN_LOCKED_FORUM . '" title="' . _GEN_LOCKED_FORUM . '"/>' : ' <img src="' . KUNENA_URLIMAGESPATH . 'lock.gif" border="0" width="13" height="13" alt="' . _GEN_LOCKED_FORUM . '" title="' . _GEN_LOCKED_FORUM . '">'; } // check if this forum is reviewed if ($obj_fb_cat->getReview()) { $return .= isset($fbIcons['forumreviewed']) ? ' <img src="' . KUNENA_URLICONSPATH . $fbIcons['forumreviewed'] . '" border="0" alt="' . _GEN_REVIEWED . '" title="' . _GEN_REVIEWED . '"/>' : ' <img src="' . KUNENA_URLIMAGESPATH . 'review.gif" border="0" width="15" height="15" alt="' . _GEN_REVIEWED . '" title="' . _GEN_REVIEWED . '">'; } //check if this forum is moderated if ($obj_fb_cat->getModerated()) { $return .= isset($fbIcons['forummoderated']) ? ' <img src="' . KUNENA_URLICONSPATH . $fbIcons['forummoderated'] . '" border="0" alt="' . _GEN_MODERATED . '" title="' . _GEN_MODERATED . '"/>' : ' <img src="' . KUNENA_URLEMOTIONSPATH . 'moderate.gif" border="0" alt="' . _GEN_MODERATED . '" title="' . _GEN_MODERATED . '"/>'; $text = ''; if (count($modslist) > 0) { foreach ($modslist as $mod) { $text = $text . ', ' . $mod->username; } $return .= ' (' . _GEN_MODERATORS . ': ' . ltrim($text, ",") . ')'; } } if ($obj_post != 0) { if ($bool_set_title) { $document->setTitle($obj_post->subject . ' - ' . stripslashes($fbConfig->board_title)); } // Topic // show lines $return .= '<br /> <img src="' . KUNENA_URLIMAGESPATH . 'tree-blank.gif" alt="| " border="0" style="vertical-align: middle;" />'; $return .= ' <img src="' . KUNENA_URLIMAGESPATH . 'tree-blank.gif" alt="| " border="0" style="vertical-align: middle;" />'; $return .= ' <img src="' . KUNENA_URLIMAGESPATH . 'tree-end.gif" alt="|-" border="0" style="vertical-align: middle;" />'; $return .= ' <img src="' . KUNENA_URLIMAGESPATH . 'folder.gif" alt="+" border="0" style="vertical-align: middle;" /> '; $return .= ' <b>' . $obj_post->subject . '</b>'; // Check if the Topic is locked? if ((int) $obj_post->locked != 0) { $return .= ' <img src="' . KUNENA_URLIMAGESPATH . 'lock.gif" border="0" width="13" height="13" alt="' . _GEN_LOCKED_TOPIC . '" title="' . _GEN_LOCKED_TOPIC . '"/>'; } } // echo '</div>'; return $return; }
$fbConfig =& CKunenaConfig::getInstance(); ?> <!-- Pathway --> <?php $sfunc = JRequest::getVar("func", null); if ($func != "") { ?> <div class = "<?php echo $boardclass; ?> forum-pathway"> <?php $catids = intval($catid); $jr_path_menu = array(); echo '<div class="path-element-first">' . CKunenaLink::GetKunenaLink(kunena_htmlspecialchars(stripslashes($fbConfig->board_title))) . '</div>'; while ($catids > 0) { $query = "SELECT * FROM #__fb_categories WHERE id='{$catids}' AND published='1'"; $kunena_db->setQuery($query); $results = $kunena_db->loadObject(); if (!$results) { break; } $parent_ids = $results->parent; $fr_name = kunena_htmlspecialchars(trim(stripslashes($results->name))); //$cids=@mysql_result( $results, 0, 'id' ); $sname = CKunenaLink::GetCategoryLink('showcat', $catids, $fr_name); if ($catid == $catids && $sfunc != "view") { $fr_title_name = $fr_name; $jr_path_menu[] = $fr_name; } else {