Пример #1
0
     }
 }
 $calrules['allowbbcode'] = $calendarinfo['allowbbcode'];
 $calrules['allowimages'] = $calendarinfo['allowimgcode'];
 $calrules['allowvideos'] = $calendarinfo['allowvideocode'];
 $calrules['allowhtml'] = $calendarinfo['allowhtml'];
 $calrules['allowsmilies'] = $calendarinfo['allowsmilies'];
 $bbcodeon = !empty($calrules['allowbbcode']) ? $vbphrase['on'] : $vbphrase['off'];
 $imgcodeon = !empty($calrules['allowimages']) ? $vbphrase['on'] : $vbphrase['off'];
 $videocodeon = !empty($calrules['allowvideos']) ? $vbphrase['on'] : $vbphrase['off'];
 $htmlcodeon = !empty($calrules['allowhtml']) ? $vbphrase['on'] : $vbphrase['off'];
 $smilieson = !empty($calrules['allowsmilies']) ? $vbphrase['on'] : $vbphrase['off'];
 // only show posting code allowances in forum rules template
 $show['codeonly'] = true;
 require_once DIR . '/includes/functions_bigthree.php';
 construct_forum_rules($calrules, $permissions);
 $usernamecode = vB_Template::create('newpost_usernamecode')->render();
 if (($pos = strpos($vbulletin->options['timeformat'], 'H')) !== false) {
     $show['24hour'] = true;
 }
 $user_from_time = fetch_time_options('', $show['24hour']);
 $user_to_time = fetch_time_options('', $show['24hour']);
 $passedday = false;
 // did a day value get passed in?
 if ($vbulletin->GPC['day'] != '') {
     $daybits = explode('-', $vbulletin->GPC['day']);
     foreach ($daybits as $key => $val) {
         $daybits["{$key}"] = intval($val);
     }
     if (checkdate($daybits[1], $daybits[2], $daybits[0])) {
         $to_day = $from_day = $daybits[2];
Пример #2
0
$show['movethread'] = (can_moderate($threadinfo['forumid'], 'canmanagethreads') or $forumperms & $vbulletin->bf_ugp_forumpermissions['canmove'] and $threadinfo['postuserid'] == $vbulletin->userinfo['userid']) ? true : false;
$show['stickunstick'] = can_moderate($threadinfo['forumid'], 'canmanagethreads') ? true : false;
$show['openclose'] = (can_moderate($threadinfo['forumid'], 'canopenclose') or $forumperms & $vbulletin->bf_ugp_forumpermissions['canopenclose'] and $threadinfo['postuserid'] == $vbulletin->userinfo['userid']) ? true : false;
$show['moderatethread'] = can_moderate($threadinfo['forumid'], 'canmoderateposts') ? true : false;
$show['deletethread'] = ($threadinfo['visible'] != 2 and can_moderate($threadinfo['forumid'], 'candeleteposts') or can_moderate($threadinfo['forumid'], 'canremoveposts') or $forumperms & $vbulletin->bf_ugp_forumpermissions['candeletepost'] and $forumperms & $vbulletin->bf_ugp_forumpermissions['candeletethread'] and $vbulletin->userinfo['userid'] == $threadinfo['postuserid'] and ($vbulletin->options['edittimelimit'] == 0 or $threadinfo['dateline'] > TIMENOW - $vbulletin->options['edittimelimit'] * 60)) ? true : false;
$show['adminoptions'] = ($show['editpoll'] or $show['movethread'] or $show['deleteposts'] or $show['editthread'] or $show['managethread'] or $show['openclose'] or $show['deletethread']) ? true : false;
// #############################################################################
// Setup Add Poll Conditional
if ($vbulletin->userinfo['userid'] != $threadinfo['postuserid'] and !can_moderate($foruminfo['forumid'], 'caneditpoll') or !($forumperms & $vbulletin->bf_ugp_forumpermissions['canpostnew']) or !($forumperms & $vbulletin->bf_ugp_forumpermissions['canpostpoll']) or $threadinfo['pollid'] or !can_moderate($foruminfo['forumid'], 'caneditpoll') and $vbulletin->options['addpolltimeout'] and TIMENOW - $vbulletin->options['addpolltimeout'] * 60 > $threadinfo['dateline']) {
    $show['addpoll'] = false;
} else {
    $show['addpoll'] = true;
}
// #############################################################################
// show forum rules
construct_forum_rules($forum, $forumperms);
// #############################################################################
// build social bookmarking links
$guestuser = array('userid' => 0, 'usergroupid' => 0);
cache_permissions($guestuser);
$bookmarksites = '';
if ($thread['visible'] and !$thread['isdeleted'] and $guestuser['permissions']['forumpermissions'] & $vbulletin->bf_ugp_forumpermissions['canview'] and $guestuser['forumpermissions']["{$foruminfo['forumid']}"] & $vbulletin->bf_ugp_forumpermissions['canview'] and $guestuser['forumpermissions']["{$foruminfo['forumid']}"] & $vbulletin->bf_ugp_forumpermissions['canviewthreads'] and ($guestuser['forumpermissions']["{$foruminfo['forumid']}"] & $vbulletin->bf_ugp_forumpermissions['canviewothers'] or $threadinfo['postuserid'] == 0)) {
    if ($vbulletin->options['socialbookmarks'] and is_array($vbulletin->bookmarksitecache) and !empty($vbulletin->bookmarksitecache)) {
        $raw_title = html_entity_decode($thread['title'], ENT_QUOTES);
        foreach ($vbulletin->bookmarksitecache as $bookmarksite) {
            //this was done as a friendly url and then changed back as part of a bug ported from 3.8.x a while back.
            //There appear to be some issues with UTF in titles and twitter (which was part of the bug fix from 3.8.x)
            //This needs to be looked at in order to properly use the friendly urls, however I don't want to do it as part
            //of this effort (making things available in subdirectories).  However I'm generating the url out of the
            //seo url framework to centralized some of the other url logic made available.
            $threadlink = vB_Friendly_Url::fetchLibrary($vbulletin, 'thread|nosession|bburl', $thread)->get_url(FRIENDLY_URL_OFF);
Пример #3
0
	/////////////////////////////////
} // end forum can contain threads
else
{
	$show['threadslist'] = false;
}
/////////////////////////////////

if (!$vbulletin->GPC['prefixid'] AND $newthreads < 1 AND $unreadchildforums < 1)
{
	mark_forum_read($foruminfo, $vbulletin->userinfo['userid'], TIMENOW);
}

$forumhome_markread_script = vB_Template::create('forumhome_markread_script')->render();

construct_forum_rules($foruminfo, $forumperms);

// Revisit this at a later date as it can be made to work with each SEO option
$show['displayoptions'] = (!$vbulletin->options['friendlyurl']);

$show['forumsearch'] = (!$show['search_engine'] AND $forumperms & $vbulletin->bf_ugp_forumpermissions['cansearch'] AND $vbulletin->options['enablesearches']);
$show['forumslist'] = $forumshown ? true : false;
$show['stickies'] = ($threadbits_sticky != '');
$show['optionbox'] = ($show['moderators'] OR $show['activeusers'] OR $show['displayoptions']);

$ad_location['forum_below_threadlist'] = vB_Template::create('ad_forum_below_threadlist')->render();

$foruminfo['parenttitle'] = $vbulletin->forumcache["$foruminfo[parentid]"]['title'];

($hook = vBulletinHook::fetch_hook('forumdisplay_complete')) ? eval($hook) : false;