Advertisement
Guest User

Untitled

a guest
Sep 1st, 2011
249
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.48 KB | None | 0 0
  1. <?php if (!defined('APPLICATION')) exit();
  2. /*
  3. Copyright 2008, 2009 Vanilla Forums Inc.
  4. This file is part of Garden.
  5. Garden is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
  6. Garden is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  7. You should have received a copy of the GNU General Public License along with Garden.  If not, see <http://www.gnu.org/licenses/>.
  8. Contact Vanilla Forums Inc. at support [at] vanillaforums [dot] com
  9. */
  10.  
  11. class MyThemeNameThemeHooks implements Gdn_IPlugin {
  12.    
  13.    public function Setup() {
  14.         return TRUE;
  15.    }
  16.  
  17.    public function OnDisable() {
  18.       return TRUE;
  19.    }
  20.    
  21.     /**
  22.      * Add stylesheets and js
  23.      */
  24.     public function Base_Render_Before($Sender) {
  25.         if (is_object($Sender->Head)) {
  26.            
  27.             // Add Css
  28.             $Sender->Head->AddCss("/themes/mythemename/design/reset.css", "screen");
  29.             $Sender->Head->AddCss("/themes/mythemename/design/main.css", "screen");
  30.  
  31.             // Add js - The number is the script order to be displayed in
  32.             $Sender->Head->AddScript("/themes/mythemename/js/cufon.js", "text/javascript", 12);
  33.             $Sender->Head->AddScript("/themes/mythemename/js/font.js", "text/javascript", 13);
  34.  
  35.         }
  36.     }
  37.    
  38.  
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement