示例#1
0
	/**
	 * Method to retrieve category icon
	 *
	 * @param   KunenaCategory $category The KunenaCategory object
	 *
	 * @return string
	 */
	public function getCategoryIcon($category)
	{
		$template = KunenaFactory::getTemplate();
		$catimagepath = $template->params->get('DefaultCategoryicon');

		$path = JPATH_ROOT . '/media/kunena/' . $catimagepath . '/';
		$uri  = JUri::root(true) . '/media/kunena/' . $catimagepath . '/';

		if ($category->getNewCount())
		{
			if (!empty($category->icon))
			{
				return '<i class="' . $category->icon . ' icon-big icon-knewchar" alt="' . JText::_('COM_KUNENA_GEN_FORUM_NEWPOST') . '"> </i>';
			}
			else
			{
				return '<i class="'. $catimagepath .' icon-big icon-knewchar" alt="' . JText::_('COM_KUNENA_GEN_FORUM_NEWPOST') . '"> </i>';
			}
		}
		else
		{
			if (!empty($category->icon))
			{
				return '<i class="' . $category->icon . ' icon-big" alt="' . JText::_('COM_KUNENA_GEN_FORUM_NEWPOST') . '"> </i>';
			}
			else
			{
				return '<i class="'. $catimagepath .' icon-big" alt="' . JText::_('COM_KUNENA_GEN_FORUM_NEWPOST') . '"> </i>';
			}
		}
	}
示例#2
0
 /**
  * Method to retrieve category icon
  *
  * @param   KunenaCategory $category The KunenaCategory object
  *
  * @return string
  */
 public function getCategoryIcon($category)
 {
     $this->ktemplate = KunenaFactory::getTemplate();
     $defaultcategoryicon = $this->ktemplate->params->get('DefaultCategoryicon');
     if ($category->getNewCount()) {
         if (!empty($category->icon)) {
             return '<i class="' . $category->icon . ' icon-big icon-knewchar" alt="' . JText::_('COM_KUNENA_GEN_FORUM_NEWPOST') . '"> </i>';
         } else {
             return '<i class="' . $defaultcategoryicon . ' icon-big icon-knewchar" alt="' . JText::_('COM_KUNENA_GEN_FORUM_NEWPOST') . '"> </i>';
         }
     } else {
         if (!empty($category->icon)) {
             return '<i class="' . $category->icon . ' icon-big" alt="' . JText::_('COM_KUNENA_GEN_FORUM_NEWPOST') . '"> </i>';
         } else {
             return '<i class="' . $defaultcategoryicon . ' icon-big" alt="' . JText::_('COM_KUNENA_GEN_FORUM_NEWPOST') . '"> </i>';
         }
     }
 }