Advertisement
Guest User

Untitled

a guest
May 8th, 2012
1,400
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.13 KB | None | 0 0
  1. public function Base_Render_Before($Sender) {
  2.         $Sender->AddCssFile('/plugins/Traditional/design/breadcrumb.popup.css');
  3.         $Sender->AddJsFile('jquery.defaults.js', 'plugins/Traditional/'); //default "search" text in textbox
  4.         if ($Sender->ControllerName == 'categoriescontroller')
  5.             $Sender->AddJsFile('jquery.cookie.js', 'plugins/Traditional/'); //keep track of which categories are expanded/hidden
  6.  
  7.         //News ticker stuff
  8.         if ($Sender->SelfUrl == 'activity' || ((strpos($Sender->SelfUrl, 'discussions/p') !== FALSE)) || $Sender->SelfUrl === 'discussions') {
  9.             $Sender->AddJsFile('jquery.ticker.js', 'plugins/Traditional/'); //for LESS CSS -> Regular CSS
  10.             $Sender->AddCssFile('/plugins/Traditional/design/ticker-style.css');
  11.             if (property_exists($Sender, 'Head') && is_object($Sender->Head)) {
  12.                 $Sender->Head->AddString(
  13.                         '<script type="text/javascript">
  14.                        $(function () {
  15.                            $("#js-news").ticker({
  16.                                htmlFeed: false,
  17.                                ajaxFeed: true,
  18.                                feedUrl: "' . Gdn::Request()->Domain() . '/' . Gdn::Request()->WebRoot() . '/discussions.rss",
  19.                                feedType: "xml"
  20.                            });
  21.                        });
  22.                    </script>');
  23.             }
  24.         }
  25.  
  26.  
  27.         //TEMPPORARYRYRYRYRYRYRY
  28.         $Controller = strtolower($Sender->ControllerName);
  29.         $Application = strtolower($Sender->ApplicationFolder);
  30.         $Session = Gdn::Session();
  31.         $ShowOnController = array();
  32.         if ($Sender->SelfUrl != 'categories/all')
  33.             return;
  34.         include_once(PATH_PLUGINS . DS . 'Traditional' . DS . 'class.profilemodule.php');
  35.         $ProfileModule = new ProfileModule($Sender);
  36.         $Sender->AddModule($ProfileModule);
  37.  
  38.         include_once(PATH_PLUGINS . DS . 'Traditional' . DS . 'class.forumstatsmodule.php');
  39.         $ForumStatsModule = new ForumStatsModule($Sender);
  40.         $Sender->AddModule($ForumStatsModule);
  41.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement