Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

how to parse content Tabs DiscussionsTabs in sidecolumn

jackmaessenjackmaessen ✭✭✭
edited March 2014 in Vanilla 2.0 - 2.8

using with Vanillabootstrap theme
I am trying to parse the Tabs (My bookmarks, My discussions etc.) into the sidepanel.
I found this function in helper_functions.php

function WriteFilterTabs(&$Sender) {
   $Session = Gdn::Session();
   $Title = property_exists($Sender, 'Category') ? GetValue('Name', $Sender->Category, '') : '';
   if ($Title == '')
      $Title = T('All Discussions');

   $Bookmarked = T('Ma Bookmarks');
   $MyDiscussions = T('My Discussions');
   $MyDrafts = T('My Drafts');
   $CountBookmarks = 0;
   $CountDiscussions = 0;
   $CountDrafts = 0;
   if ($Session->IsValid()) {
      $CountBookmarks = $Session->User->CountBookmarks;
      $CountDiscussions = $Session->User->CountDiscussions;
      $CountDrafts = $Session->User->CountDrafts;
   if ($CountBookmarks === NULL) {
      $Bookmarked .= '<span class="Popin" rel="'.Url('/discussions/UserBookmarkCount').'">-</span>';
   } elseif (is_numeric($CountBookmarks) && $CountBookmarks > 0)
      $Bookmarked .= '<span>'.$CountBookmarks.'</span>';

   if (is_numeric($CountDiscussions) && $CountDiscussions > 0)
      $MyDiscussions .= '<span>'.$CountDiscussions.'</span>';

   if (is_numeric($CountDrafts) && $CountDrafts > 0)
      $MyDrafts .= '<span>'.$CountDrafts.'</span>';

<div class="Tabs DiscussionsTabs">
      <?php $Sender->FireEvent('BeforeDiscussionTabs'); ?>
      <li<?php echo strtolower($Sender->ControllerName) == 'discussionscontroller' && strtolower($Sender->RequestMethod) == 'index' ? ' class="Active"' : ''; ?>><?php echo Anchor(T('All Discussions'), 'discussions', 'TabLink'); ?></li>
      <?php $Sender->FireEvent('AfterAllDiscussionsTab'); ?>

As you can see the content is parsed in the class "Tabs DiscussionTabs". This class is part of the content column. How can i make this class part of the sidecolumn? I want the range of My Bookmarks, My Discussions etc. be part of the sidecolumn


  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited March 2014

    @‌ jackmaessen

    You can try this plugin I made for you. It will add all the profile tabs on the panel in a dropdown menu.

    The file to edit the links is the mytabs.js , if your forum is in the root remove the forum part from the urls, if it called something else replace forum with that .

  • Options

    thanks vrijvlinder, this is a great plugin. I already tried in the default.master.tpl some changes.
    The only thing missing is the countnumbers of the tabs. I was trying in the default.master.tpl with this and i found out that you can display them by the following links:

    The only one missing is "participated links". I tried several options like {myparticipated_link}; {myparticipations_link}; {participations_link} but none of them do the job.
    Does anyone know how to catch the MyParticipated?

Sign In or Register to comment.