Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Jan 2nd, 2012  |  syntax: PHP  |  size: 0.55 KB  |  views: 47  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. public function DiscussionsController_AfterDiscussionTabs_Handler($Sender){
  2.                 $CategoryModel = new CategoryModel();
  3.                 $_CategoryData = $CategoryModel->GetFull();
  4.                 foreach ($_CategoryData->Result() as $Category) {
  5.                         if ($Category->Name <> 'Root') $CountDiscussions = $CountDiscussions + $Category->CountDiscussions;
  6.                         if ($Category->Name <> 'Root'){
  7.                                 echo '<li><a href="http://EXAMPLE.COM/VANILLA-FORUM/categories/'. strtolower($Category->Name) .'" class="TabLink">'.$Category->Name.' <span>'.$Category->CountDiscussions.'</span></a></li>';
  8.                         }
  9.                 }
  10.    }