function initTemplate()
 {
     // Assign the userdata to the template
     $this->tpl->assign('user', $this->user);
     // Standard stuff for the sidebar
     $categories = $this->weblog->getCategories();
     $pages = $this->weblog->getPublicPages();
     $links = $this->weblog->getLinks();
     // Assign them to the template
     $this->tpl->assign('categories', $categories);
     $this->tpl->assign('pages', $pages);
     $this->tpl->assign('links', $links);
     // Assign the weblog details
     $title = $this->tpl->get_template_vars('title');
     $wltitle = YDConfig::get('weblog_title', 'Untitled Weblog');
     if ($title != null) {
         $title = $wltitle . ' » ' . $title;
     } else {
         $title = $wltitle;
     }
     $this->tpl->assign('title', $title);
     $this->tpl->assign('weblog_title', $wltitle);
     $this->tpl->assign('weblog_description', YDConfig::get('weblog_description', 'Untitled Weblog Description'));
     $this->tpl->assign('weblog_language', YDConfig::get('weblog_language', 'en'));
     $this->tpl->assign('weblog_dir', YDUrl::makeLinkAbsolute('.'));
     $this->tpl->assign('weblog_current_url', YDUrl::makeLinkAbsolute(YD_SELF_URI));
     $this->tpl->assign('weblog_link', YDUrl::makeLinkAbsolute('index.php'));
     $this->tpl->assign('weblog_link_rss', YDUrl::makeLinkAbsolute('xml.php?do=rss'));
     $this->tpl->assign('weblog_link_atom', YDUrl::makeLinkAbsolute('xml.php?do=atom'));
     $this->tpl->assign('weblog_link_comments_rss', YDUrl::makeLinkAbsolute('xml.php?do=rsscomments'));
     $this->tpl->assign('weblog_link_comments_atom', YDUrl::makeLinkAbsolute('xml.php?do=atomcomments'));
     $this->tpl->assign('weblog_link_gallery_rss', YDUrl::makeLinkAbsolute('xml.php?do=rssgallery'));
     $this->tpl->assign('weblog_link_gallery_atom', YDUrl::makeLinkAbsolute('xml.php?do=atomgallery'));
     $this->tpl->assign('weblog_link_archive', YDUrl::makeLinkAbsolute('archive.php'));
     $this->tpl->assign('weblog_link_archive_gallery', YDUrl::makeLinkAbsolute('archive_gallery.php'));
     $this->tpl->assign('bb2_comment', trim(bb2_insert_head()));
     // Add the Google Analytics tag
     if (YDConfig::get('google_analytics', '') != '') {
         $out = '<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>' . YD_CRLF;
         $out .= '<script type="text/javascript">' . YD_CRLF;
         $out .= '_uacct = "' . YDConfig::get('google_analytics', '') . '"; urchinTracker();' . YD_CRLF;
         $out .= '</script>' . YD_CRLF;
         $this->tpl->assign('weblog_google_analytics', $out);
     } else {
         $this->tpl->assign('weblog_google_analytics', '');
     }
     // Get the link to the different directories
     $uploads_dir = YDUrl::makeLinkAbsolute($this->dir_uploads);
     $skin_dir = YDUrl::makeLinkAbsolute($this->dir_skins . $this->skin);
     $image_dir = YDUrl::makeLinkAbsolute($skin_dir . '/images');
     // Add the different directories to the template
     $this->tpl->assign('uploads_dir', $uploads_dir);
     $this->tpl->assign('skin_dir', $skin_dir);
     $this->tpl->assign('image_dir', $image_dir);
 }
Example #2
0
    }
    ?>
	<script type="text/javascript" src="jscript/pixie.js.php?<?php 
    if (isset($s)) {
        print "s={$s}";
    }
    if (isset($x)) {
        print "&amp;x={$x}";
    }
    if (isset($lang['ck_toggle_advanced'])) {
        print "&amp;advmode={$lang['ck_toggle_advanced']}";
    }
    ?>
"></script>
	<!-- bad behavior -->
	<?php 
    bb2_insert_head();
    ?>
	<!-- If javascript is disabled show more of the carousel and display the ckeditor textareas -->
	<noscript><style type="text/css">.jcarousel-skin-tango{max-height:100%;}.ck-textarea{display:block;}#mycarousel {position:relative;overflow:hidden;padding:20px 0 27px 0; list-style: none; background-image:url("admin/theme/images/formbacklarge.gif");background-repeat:repeat-x;background-position:0 110px;width: 100%;}#mycarousel li { float: left; width:83px;height:129px; margin-right: 10px;}#mycarousel li:nth-child(1) { margin-left: 10px;}</style></noscript>
</body>
</html>
	<!-- page generated in: <?php 
    pagetime('print');
    ?>
 -->
	<?php 
    if ($gzip_admin == 'yes') {
        @ob_end_flush();
    }
}
Example #3
0
/**
 * Decide if we are going to enable bad behavior scanning for this user
 *
 * What it does:
 * - Admins and Moderators get a free pass
 * - Optionally existing users with post counts over a limit are bypassed
 * - Others get a humane frisking
 */
function loadBadBehavior()
{
    global $modSettings, $user_info, $bb2_results;
    // Bad Behavior Enabled?
    if (!empty($modSettings['badbehavior_enabled'])) {
        require_once EXTDIR . '/bad-behavior/badbehavior-plugin.php';
        $bb_run = true;
        // We may want to give some folks a hallway pass
        if (!$user_info['is_guest']) {
            if (!empty($user_info['is_mod']) || !empty($user_info['is_admin'])) {
                $bb_run = false;
            } elseif (!empty($modSettings['badbehavior_postcount_wl']) && $modSettings['badbehavior_postcount_wl'] < 0) {
                $bb_run = false;
            } elseif (!empty($modSettings['badbehavior_postcount_wl']) && $modSettings['badbehavior_postcount_wl'] > 0 && $user_info['posts'] > $modSettings['badbehavior_postcount_wl']) {
                $bb_run = false;
            }
        }
        // Put on the sanitary gloves, its time for a patdown !
        if ($bb_run === true) {
            $bb2_results = bb2_start(bb2_read_settings());
            addInlineJavascript(bb2_insert_head());
        }
    }
}