Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

How can I eliminate all this extra information?

edited October 2008 in Vanilla 1.0 Help
Hi, First time poster. How can I eliminate all this extra information from the discussion listings? All I want to have is the title of the discussion, and the number of new posts in the discussion. I want to cut out all this: Category Started by Last comment by Last Active minutes ago New thanks

Comments

  • Options
    First, make sure you are using Vanilla 1.1.5a. If not, upgrade it.
    Secondly, you seem to contradict yourself, you said you want to only show the title and the number of new posts, then you said to cut out "new". Anyway I will go by your first statement, so the code I give you below will show only the title and the new comment count.

    When you are sure you are using that version, replace themes/discussion.php (not discussions.php) with this code:
    <?php // Note: This file is included from the library/Vanilla/Vanilla.Control.SearchForm.php // class and also from the library/Vanilla/Vanilla.Control.DiscussionForm.php's // themes/discussions.php include template. $UnreadUrl = GetUnreadQuerystring($Discussion, $this->Context->Configuration, $CurrentUserJumpToLastCommentPref); $NewUrl = GetUnreadQuerystring($Discussion, $this->Context->Configuration, 1); $LastUrl = GetLastCommentQuerystring($Discussion, $this->Context->Configuration, $CurrentUserJumpToLastCommentPref); $this->DelegateParameters['Discussion'] = &$Discussion; $this->DelegateParameters['DiscussionList'] = &$DiscussionList; $DiscussionList .= ' <li id="Discussion_'.$Discussion->DiscussionID.'" class="Discussion'.$Discussion->Status.($Discussion->CountComments == 1?' NoReplies':'').($this->Context->Configuration['USE_CATEGORIES'] ? ' Category_'.$Discussion->CategoryID:'').($Alternate ? ' Alternate' : '').'">'; $this->CallDelegate('PreDiscussionOptionsRender'); $DiscussionList .= '<ul> <li class="DiscussionType"> <span>'.$this->Context->GetDefinition('DiscussionType').'</span>'.DiscussionPrefix($this->Context, $Discussion).' </li> <li class="DiscussionTopic"> <span>'.$this->Context->GetDefinition('DiscussionTopic').'</span><a href="'.$UnreadUrl.'">'.$Discussion->Name.'</a> </li> '; if ($this->Context->Session->UserID > 0) { $DiscussionList .= ' <li class="DiscussionNew"> <a href="'.$NewUrl.'"><span>'.$this->Context->GetDefinition('NewCaps').' </span>'.$Discussion->NewComments.'</a> </li> '; } $this->CallDelegate('PostDiscussionOptionsRender'); $DiscussionList .= '</ul> </li>'; $this->CallDelegate('PostDiscussionRender'); ?>
  • Options
    This wasn't my question, but thanks. IMO there was way too much info there.
  • Options
    Cool. Well you can easily remove information yourself, all you do go into that file and remove from <li> to the next </li>, and the "class" tells you what it is.
    So you see in the code above there is <li class="DiscussionTopic"> that is the part that contains the discussion topic, so to not display that you delete this:
    <li class="DiscussionTopic"> <span>'.$this->Context->GetDefinition('DiscussionTopic').'</span><a href="'.$UnreadUrl.'">'.$Discussion->Name.'</a> </li>hope that helps further
This discussion has been closed.