Exemple #1
0
 public static function initTemplateHook($hookName, &$contents, array $hookParams, XenForo_Template_Abstract $template)
 {
     if (self::$setCopyright) {
         return;
     }
     switch ($hookName) {
         case 'page_container_breadcrumb_bottom':
             if ($contents && strpos($contents, 'BRCopyright')) {
                 self::$setCopyright = true;
             }
             break;
         case 'footer_after_copyright':
             if (self::_checkCopyrightRequire()) {
                 if (self::$_copyrightNotice === null) {
                     self::_setCopyrightNotice();
                 }
                 if (self::$_copyrightNotice && self::$setCopyright === null) {
                     if (!$contents || !strpos($contents, 'BRCopyright')) {
                         $contents = $contents . self::$_copyrightNotice;
                     }
                     self::$setCopyright = true;
                 }
             }
             break;
     }
 }