Zeile 15 | Zeile 15 |
---|
$templatelist = "misc_rules_forum,misc_help_helpdoc,misc_whoposted_poster,misc_whoposted,misc_smilies_popup_smilie,misc_smilies_popup,misc_smilies_popup_empty,misc_smilies_popup_row,multipage_start"; $templatelist .= ",misc_buddypopup,misc_buddypopup_user,misc_buddypopup_user_none,misc_buddypopup_user_online,misc_buddypopup_user_offline,misc_buddypopup_user_sendpm,misc_syndication_forumlist"; $templatelist .= ",misc_smilies,misc_smilies_smilie,misc_help_section_bit,misc_help_section,misc_help,forumdisplay_password_wrongpass,forumdisplay_password,misc_helpresults,misc_helpresults_bit";
|
$templatelist = "misc_rules_forum,misc_help_helpdoc,misc_whoposted_poster,misc_whoposted,misc_smilies_popup_smilie,misc_smilies_popup,misc_smilies_popup_empty,misc_smilies_popup_row,multipage_start"; $templatelist .= ",misc_buddypopup,misc_buddypopup_user,misc_buddypopup_user_none,misc_buddypopup_user_online,misc_buddypopup_user_offline,misc_buddypopup_user_sendpm,misc_syndication_forumlist"; $templatelist .= ",misc_smilies,misc_smilies_smilie,misc_help_section_bit,misc_help_section,misc_help,forumdisplay_password_wrongpass,forumdisplay_password,misc_helpresults,misc_helpresults_bit";
|
$templatelist .= ",multipage,multipage_end,multipage_jump_page,multipage_nextpage,multipage_page,multipage_page_current,multipage_page_link_current,multipage_prevpage,misc_imcenter_error";
| $templatelist .= ",multipage,multipage_end,multipage_jump_page,multipage_nextpage,multipage_page,multipage_page_current,multipage_page_link_current,multipage_prevpage,misc_whoposted_page";
|
$templatelist .= ",misc_smilies_popup_no_smilies,misc_smilies_no_smilies,misc_syndication,misc_help_search,misc_helpresults_noresults,misc_syndication_forumlist_forum,misc_syndication_feedurl";
require_once "./global.php";
| $templatelist .= ",misc_smilies_popup_no_smilies,misc_smilies_no_smilies,misc_syndication,misc_help_search,misc_helpresults_noresults,misc_syndication_forumlist_forum,misc_syndication_feedurl";
require_once "./global.php";
|
Zeile 268 | Zeile 268 |
---|
{ $mybb->settings['threadsperpage'] = 20; }
|
{ $mybb->settings['threadsperpage'] = 20; }
|
| $query = $db->simple_select("helpdocs", "COUNT(*) AS total", "hid IN(".$db->escape_string($search['querycache']).")"); $helpcount = $db->fetch_field($query, "total");
|
// Work out pagination, which page we're at, as well as the limits. $perpage = $mybb->settings['threadsperpage'];
| // Work out pagination, which page we're at, as well as the limits. $perpage = $mybb->settings['threadsperpage'];
|
Zeile 275 | Zeile 278 |
---|
if($page > 0) { $start = ($page-1) * $perpage;
|
if($page > 0) { $start = ($page-1) * $perpage;
|
| $pages = ceil($helpcount / $perpage); if($pages > $page) { $start = 0; $page = 1; }
|
} else {
| } else {
|
Zeile 288 | Zeile 297 |
---|
// Work out if we have terms to highlight $highlight = ""; if($search['keywords'])
|
// Work out if we have terms to highlight $highlight = ""; if($search['keywords'])
|
{
| {
|
$highlight = "&highlight=".urlencode($search['keywords']);
|
$highlight = "&highlight=".urlencode($search['keywords']);
|
}
| }
|
// Do Multi Pages
|
// Do Multi Pages
|
$query = $db->simple_select("helpdocs", "COUNT(*) AS total", "hid IN(".$db->escape_string($search['querycache']).")"); $helpcount = $db->fetch_array($query);
| |
if($upper > $helpcount) { $upper = $helpcount;
|
if($upper > $helpcount) { $upper = $helpcount;
|
} $multipage = multipage($helpcount['total'], $perpage, $page, "misc.php?action=helpresults&sid='".htmlspecialchars_uni($mybb->get_input('sid'))."'");
| } $multipage = multipage($helpcount, $perpage, $page, "misc.php?action=helpresults&sid='".htmlspecialchars_uni($mybb->get_input('sid'))."'");
|
$helpdoclist = '';
require_once MYBB_ROOT."inc/class_parser.php";
| $helpdoclist = '';
require_once MYBB_ROOT."inc/class_parser.php";
|
Zeile 320 | Zeile 326 |
---|
if(my_strlen($helpdoc['name']) > 50) { $helpdoc['name'] = htmlspecialchars_uni(my_substr($helpdoc['name'], 0, 50)."...");
|
if(my_strlen($helpdoc['name']) > 50) { $helpdoc['name'] = htmlspecialchars_uni(my_substr($helpdoc['name'], 0, 50)."...");
|
}
| }
|
else { $helpdoc['name'] = htmlspecialchars_uni($helpdoc['name']);
| else { $helpdoc['name'] = htmlspecialchars_uni($helpdoc['name']);
|
Zeile 333 | Zeile 339 |
---|
'allow_imgcode' => 0, 'filter_badwords' => 1 );
|
'allow_imgcode' => 0, 'filter_badwords' => 1 );
|
$helpdoc['helpdoc'] = my_strip_tags($parser->parse_message($helpdoc['document'], $parser_options));
| $helpdoc['helpdoc'] = $parser->parse_message($helpdoc['document'], $parser_options);
|
if(my_strlen($helpdoc['helpdoc']) > 350) {
| if(my_strlen($helpdoc['helpdoc']) > 350) {
|
Zeile 352 | Zeile 358 |
---|
if($db->num_rows($query) == 0) { eval("\$helpdoclist = \"".$templates->get("misc_helpresults_noresults")."\";");
|
if($db->num_rows($query) == 0) { eval("\$helpdoclist = \"".$templates->get("misc_helpresults_noresults")."\";");
|
}
$plugins->run_hooks("misc_helpresults_end");
| }
$plugins->run_hooks("misc_helpresults_end");
|
eval("\$helpresults = \"".$templates->get("misc_helpresults")."\";"); output_page($helpresults);
| eval("\$helpresults = \"".$templates->get("misc_helpresults")."\";"); output_page($helpresults);
|
Zeile 365 | Zeile 371 |
---|
$lang->load("helpsections"); $lang->load("customhelpdocs"); $lang->load("customhelpsections");
|
$lang->load("helpsections"); $lang->load("customhelpdocs"); $lang->load("customhelpsections");
|
|
|
$hid = $mybb->get_input('hid', MyBB::INPUT_INT); add_breadcrumb($lang->nav_helpdocs, "misc.php?action=help");
| $hid = $mybb->get_input('hid', MyBB::INPUT_INT); add_breadcrumb($lang->nav_helpdocs, "misc.php?action=help");
|
Zeile 417 | Zeile 423 |
---|
{ $helpdoc['document'] = $lang->sprintf($helpdoc['document'], $mybb->post_code); }
|
{ $helpdoc['document'] = $lang->sprintf($helpdoc['document'], $mybb->post_code); }
|
|
|
add_breadcrumb($helpdoc['name']);
$plugins->run_hooks("misc_help_helpdoc_end");
| add_breadcrumb($helpdoc['name']);
$plugins->run_hooks("misc_help_helpdoc_end");
|
Zeile 438 | Zeile 444 |
---|
while($helpdoc = $db->fetch_array($query)) { $helpdocs[$helpdoc['sid']][$helpdoc['disporder']][$helpdoc['hid']] = $helpdoc;
|
while($helpdoc = $db->fetch_array($query)) { $helpdocs[$helpdoc['sid']][$helpdoc['disporder']][$helpdoc['hid']] = $helpdoc;
|
}
| }
|
unset($helpdoc); $sections = ''; $query = $db->simple_select("helpsections", "*", "enabled != 0", array('order_by' => 'disporder'));
| unset($helpdoc); $sections = ''; $query = $db->simple_select("helpsections", "*", "enabled != 0", array('order_by' => 'disporder'));
|
Zeile 490 | Zeile 496 |
---|
$expcolimage = "collapse_collapsed.png"; $expdisplay = "display: none;"; $expthead = " thead_collapsed";
|
$expcolimage = "collapse_collapsed.png"; $expdisplay = "display: none;"; $expthead = " thead_collapsed";
|
}
| $expaltext = "[+]"; }
|
else { $expcolimage = "collapse.png"; $expthead = "";
|
else { $expcolimage = "collapse.png"; $expthead = "";
|
| $expaltext = "[-]";
|
} } eval("\$sections .= \"".$templates->get("misc_help_section")."\";"); }
|
} } eval("\$sections .= \"".$templates->get("misc_help_section")."\";"); }
|
}
| }
|
if($mybb->settings['helpsearch'] == 1) { eval("\$search = \"".$templates->get("misc_help_search")."\";");
| if($mybb->settings['helpsearch'] == 1) { eval("\$search = \"".$templates->get("misc_help_search")."\";");
|
Zeile 522 | Zeile 530 |
---|
}
if(isset($mybb->input['removebuddy']) && verify_post_check($mybb->input['my_post_key']))
|
}
if(isset($mybb->input['removebuddy']) && verify_post_check($mybb->input['my_post_key']))
|
{
| {
|
$buddies = $mybb->user['buddylist']; $namesarray = explode(",", $buddies); $mybb->input['removebuddy'] = $mybb->get_input('removebuddy', MyBB::INPUT_INT);
| $buddies = $mybb->user['buddylist']; $namesarray = explode(",", $buddies); $mybb->input['removebuddy'] = $mybb->get_input('removebuddy', MyBB::INPUT_INT);
|
Zeile 563 | Zeile 571 |
---|
}
if($buddy['lastactive'])
|
}
if($buddy['lastactive'])
|
{
| {
|
$last_active = $lang->sprintf($lang->last_active, my_date('relative', $buddy['lastactive']));
|
$last_active = $lang->sprintf($lang->last_active, my_date('relative', $buddy['lastactive']));
|
}
| }
|
else { $last_active = $lang->sprintf($lang->last_active, $lang->never); }
|
else { $last_active = $lang->sprintf($lang->last_active, $lang->never); }
|
|
|
$buddy['avatar'] = format_avatar($buddy['avatar'], $buddy['avatardimensions'], '44x44');
if($buddy['lastactive'] > $timecut && ($buddy['invisible'] == 0 || $mybb->user['usergroup'] == 4) && $buddy['lastvisit'] != $buddy['lastactive'])
|
$buddy['avatar'] = format_avatar($buddy['avatar'], $buddy['avatardimensions'], '44x44');
if($buddy['lastactive'] > $timecut && ($buddy['invisible'] == 0 || $mybb->user['usergroup'] == 4) && $buddy['lastvisit'] != $buddy['lastactive'])
|
{
| {
|
$bonline_alt = alt_trow(); eval("\$buddys['online'] .= \"".$templates->get("misc_buddypopup_user_online")."\";");
|
$bonline_alt = alt_trow(); eval("\$buddys['online'] .= \"".$templates->get("misc_buddypopup_user_online")."\";");
|
}
| }
|
else { $boffline_alt = alt_trow(); eval("\$buddys['offline'] .= \"".$templates->get("misc_buddypopup_user_offline")."\";"); }
|
else { $boffline_alt = alt_trow(); eval("\$buddys['offline'] .= \"".$templates->get("misc_buddypopup_user_offline")."\";"); }
|
}
| }
|
$colspan = ' colspan="2"'; if(empty($buddys['online'])) {
| $colspan = ' colspan="2"'; if(empty($buddys['online'])) {
|
Zeile 606 | Zeile 614 |
---|
$colspan = ''; $error = $lang->no_buddies; eval("\$buddies = \"".$templates->get("misc_buddypopup_user_none")."\";");
|
$colspan = ''; $error = $lang->no_buddies; eval("\$buddies = \"".$templates->get("misc_buddypopup_user_none")."\";");
|
}
| }
|
$plugins->run_hooks("misc_buddypopup_end");
| $plugins->run_hooks("misc_buddypopup_end");
|
Zeile 621 | Zeile 629 |
---|
$whoposted = ''; $tid = $mybb->get_input('tid', MyBB::INPUT_INT); $thread = get_thread($tid);
|
$whoposted = ''; $tid = $mybb->get_input('tid', MyBB::INPUT_INT); $thread = get_thread($tid);
|
| $modal = $mybb->get_input('modal', MyBB::INPUT_INT);
|
// Make sure we are looking at a real thread here. if(!$thread)
|
// Make sure we are looking at a real thread here. if(!$thread)
|
{ error($lang->error_invalidthread); }
| { error($lang->error_invalidthread); }
|
// Make sure we are looking at a real thread here. if(($thread['visible'] == -1 && !is_moderator($thread['fid'], "canviewdeleted")) || ($thread['visible'] == 0 && !is_moderator($thread['fid'], "canviewunapprove")) || $thread['visible'] > 1)
| // Make sure we are looking at a real thread here. if(($thread['visible'] == -1 && !is_moderator($thread['fid'], "canviewdeleted")) || ($thread['visible'] == 0 && !is_moderator($thread['fid'], "canviewunapprove")) || $thread['visible'] > 1)
|
Zeile 637 | Zeile 646 |
---|
if(is_moderator($thread['fid'], "canviewdeleted") || is_moderator($thread['fid'], "canviewunapprove")) { if(is_moderator($thread['fid'], "canviewunapprove") && !is_moderator($thread['fid'], "canviewdeleted"))
|
if(is_moderator($thread['fid'], "canviewdeleted") || is_moderator($thread['fid'], "canviewunapprove")) { if(is_moderator($thread['fid'], "canviewunapprove") && !is_moderator($thread['fid'], "canviewdeleted"))
|
{
| {
|
$show_posts = "p.visible IN (0,1)"; } elseif(is_moderator($thread['fid'], "canviewdeleted") && !is_moderator($thread['fid'], "canviewunapprove"))
| $show_posts = "p.visible IN (0,1)"; } elseif(is_moderator($thread['fid'], "canviewdeleted") && !is_moderator($thread['fid'], "canviewunapprove"))
|
Zeile 667 | Zeile 676 |
---|
if($forumpermissions['canview'] == 0 || $forumpermissions['canviewthreads'] == 0 || (isset($forumpermissions['canonlyviewownthreads']) && $forumpermissions['canonlyviewownthreads'] != 0 && $thread['uid'] != $mybb->user['uid'])) { error_no_permission();
|
if($forumpermissions['canview'] == 0 || $forumpermissions['canviewthreads'] == 0 || (isset($forumpermissions['canonlyviewownthreads']) && $forumpermissions['canonlyviewownthreads'] != 0 && $thread['uid'] != $mybb->user['uid'])) { error_no_permission();
|
}
| }
|
// Check if this forum is password protected and we have a valid password check_forum_password($forum['fid']);
| // Check if this forum is password protected and we have a valid password check_forum_password($forum['fid']);
|
Zeile 690 | Zeile 699 |
---|
".$sortsql." "); while($poster = $db->fetch_array($query))
|
".$sortsql." "); while($poster = $db->fetch_array($query))
|
{
| {
|
if($poster['username'] == '') { $poster['username'] = $poster['postusername'];
| if($poster['username'] == '') { $poster['username'] = $poster['postusername'];
|
Zeile 698 | Zeile 707 |
---|
$poster['username'] = htmlspecialchars_uni($poster['username']); $poster['postusername'] = htmlspecialchars_uni($poster['postusername']); $poster_name = format_name($poster['username'], $poster['usergroup'], $poster['displaygroup']);
|
$poster['username'] = htmlspecialchars_uni($poster['username']); $poster['postusername'] = htmlspecialchars_uni($poster['postusername']); $poster_name = format_name($poster['username'], $poster['usergroup'], $poster['displaygroup']);
|
if($poster['uid'])
| if($modal)
|
{
|
{
|
$onclick = "opener.location.href='".get_profile_link($poster['uid'])."'; return false;";
| $onclick = ''; if($poster['uid']) { $onclick = "opener.location.href='".get_profile_link($poster['uid'])."'; return false;"; } $profile_link = build_profile_link($poster_name, $poster['uid'], '_blank', $onclick); } else { $profile_link = build_profile_link($poster_name, $poster['uid']);
|
}
|
}
|
$profile_link = build_profile_link($poster_name, $poster['uid'], '_blank', $onclick);
| |
$numposts += $poster['posts']; eval("\$whoposted .= \"".$templates->get("misc_whoposted_poster")."\";"); $altbg = alt_trow(); } $numposts = my_number_format($numposts); $poster['posts'] = my_number_format($poster['posts']);
|
$numposts += $poster['posts']; eval("\$whoposted .= \"".$templates->get("misc_whoposted_poster")."\";"); $altbg = alt_trow(); } $numposts = my_number_format($numposts); $poster['posts'] = my_number_format($poster['posts']);
|
eval("\$whop = \"".$templates->get("misc_whoposted", 1, 0)."\";"); echo $whop; exit;
| if($modal) { eval("\$whop = \"".$templates->get("misc_whoposted", 1, 0)."\";"); echo $whop; exit; } else { require_once MYBB_ROOT."inc/class_parser.php"; $parser = new postParser;
// Get thread prefix $breadcrumbprefix = ''; $threadprefix = array('prefix' => ''); if($thread['prefix']) { $threadprefix = build_prefixes($thread['prefix']); if(!empty($threadprefix['displaystyle'])) { $breadcrumbprefix = $threadprefix['displaystyle'].' '; } }
$thread['subject'] = htmlspecialchars_uni($parser->parse_badwords($thread['subject']));
// Build the navigation. build_forum_breadcrumb($forum['fid']); add_breadcrumb($breadcrumbprefix.$thread['subject'], get_thread_link($thread['tid'])); add_breadcrumb($lang->who_posted);
eval("\$whoposted = \"".$templates->get("misc_whoposted_page")."\";"); output_page($whoposted); }
|
} elseif($mybb->input['action'] == "smilies") {
| } elseif($mybb->input['action'] == "smilies") {
|
Zeile 731 | Zeile 778 |
---|
{ $smilie['image'] = str_replace("{theme}", $theme['imgdir'], $smilie['image']); $smilie['image'] = htmlspecialchars_uni($mybb->get_asset_url($smilie['image']));
|
{ $smilie['image'] = str_replace("{theme}", $theme['imgdir'], $smilie['image']); $smilie['image'] = htmlspecialchars_uni($mybb->get_asset_url($smilie['image']));
|
$smilie['name'] = htmlspecialchars_uni($smilie['name']);
| $smilie['name'] = htmlspecialchars_uni($smilie['name']);
|
// Only show the first text to replace in the box $temp = explode("\n", $smilie['find']); // use temporary variable for php 5.3 compatibility $smilie['find'] = $temp[0];
|
// Only show the first text to replace in the box $temp = explode("\n", $smilie['find']); // use temporary variable for php 5.3 compatibility $smilie['find'] = $temp[0];
|
|
|
$smilie['find'] = htmlspecialchars_uni($smilie['find']); $smilie_insert = str_replace(array('\\', "'"), array('\\\\', "\'"), $smilie['find']);
| $smilie['find'] = htmlspecialchars_uni($smilie['find']); $smilie_insert = str_replace(array('\\', "'"), array('\\\\', "\'"), $smilie['find']);
|
Zeile 744 | Zeile 791 |
---|
eval('$smilie_image = "'.$templates->get('smilie', 1, 0).'";'); eval("\$smile_icons .= \"".$templates->get("misc_smilies_popup_smilie")."\";"); if($e == 2)
|
eval('$smilie_image = "'.$templates->get('smilie', 1, 0).'";'); eval("\$smile_icons .= \"".$templates->get("misc_smilies_popup_smilie")."\";"); if($e == 2)
|
{
| {
|
eval("\$smilies .= \"".$templates->get("misc_smilies_popup_row")."\";"); $smile_icons = ''; $e = 1;
| eval("\$smilies .= \"".$templates->get("misc_smilies_popup_row")."\";"); $smile_icons = ''; $e = 1;
|
Zeile 760 | Zeile 807 |
---|
if($e == 2) { eval("\$smilies .= \"".$templates->get("misc_smilies_popup_empty")."\";");
|
if($e == 2) { eval("\$smilies .= \"".$templates->get("misc_smilies_popup_empty")."\";");
|
}
| }
|
if(!$smilies) { eval("\$smilies = \"".$templates->get("misc_smilies_popup_no_smilies")."\";");
| if(!$smilies) { eval("\$smilies = \"".$templates->get("misc_smilies_popup_no_smilies")."\";");
|
Zeile 783 | Zeile 830 |
---|
{ $smilie['image'] = str_replace("{theme}", $theme['imgdir'], $smilie['image']); $smilie['image'] = htmlspecialchars_uni($mybb->get_asset_url($smilie['image']));
|
{ $smilie['image'] = str_replace("{theme}", $theme['imgdir'], $smilie['image']); $smilie['image'] = htmlspecialchars_uni($mybb->get_asset_url($smilie['image']));
|
$smilie['name'] = htmlspecialchars_uni($smilie['name']);
| $smilie['name'] = htmlspecialchars_uni($smilie['name']);
|
$smilie['find'] = nl2br(htmlspecialchars_uni($smilie['find'])); eval('$smilie_image = "'.$templates->get('smilie').'";'); eval("\$smilies .= \"".$templates->get("misc_smilies_smilie")."\";");
| $smilie['find'] = nl2br(htmlspecialchars_uni($smilie['find'])); eval('$smilie_image = "'.$templates->get('smilie').'";'); eval("\$smilies .= \"".$templates->get("misc_smilies_smilie")."\";");
|
Zeile 801 | Zeile 848 |
---|
output_page($smiliespage); } }
|
output_page($smiliespage); } }
|
elseif($mybb->input['action'] == "imcenter") { $mybb->input['imtype'] = $mybb->get_input('imtype'); if($mybb->input['imtype'] != "aim" && $mybb->input['imtype'] != "skype" && $mybb->input['imtype'] != "yahoo") { $message = $lang->error_invalidimtype; eval("\$error = \"".$templates->get("misc_imcenter_error", 1, 0)."\";"); echo $error; exit; }
$uid = $mybb->get_input('uid', MyBB::INPUT_INT); $user = get_user($uid);
if(!$user) { $message = $lang->error_invaliduser; eval("\$error = \"".$templates->get("misc_imcenter_error", 1, 0)."\";"); echo $error; exit; }
if(empty($user[$mybb->input['imtype']])) { $message = $lang->error_invalidimtype; eval("\$error = \"".$templates->get("misc_imcenter_error", 1, 0)."\";"); echo $error; exit; }
$settingkey = 'allow'.$mybb->input['imtype'].'field'; if(!is_member($mybb->settings[$settingkey], $user)) { $message = $lang->error_nopermission_user_ajax; eval("\$error = \"".$templates->get("misc_imcenter_error", 1, 0)."\";"); echo $error; exit; }
// Build IM navigation bar $navigationbar = $navsep = $imtype = $imtype_lang = ''; if(!empty($user['aim']) && is_member($mybb->settings['allowaimfield'], array('usergroup' => $user['usergroup'], 'additionalgroups' => $user['additionalgroups']))) { $imtype = "aim"; $imtype_lang = $lang->aol_im; eval("\$navigationbar .= \"".$templates->get("misc_imcenter_nav")."\";"); $navsep = ' - '; } if(!empty($user['skype']) && is_member($mybb->settings['allowskypefield'], array('usergroup' => $user['usergroup'], 'additionalgroups' => $user['additionalgroups']))) { $imtype = "skype"; $imtype_lang = $lang->skype; eval("\$navigationbar .= \"".$templates->get("misc_imcenter_nav")."\";"); $navsep = ' - '; } if(!empty($user['yahoo']) && is_member($mybb->settings['allowyahoofield'], array('usergroup' => $user['usergroup'], 'additionalgroups' => $user['additionalgroups']))) { $imtype = "yahoo"; $imtype_lang = $lang->yahoo_im; eval("\$navigationbar .= \"".$templates->get("misc_imcenter_nav")."\";"); } $user['skype'] = htmlspecialchars_uni($user['skype']); $user['yahoo'] = htmlspecialchars_uni($user['yahoo']); $user['aim'] = htmlspecialchars_uni($user['aim']);
$user['username'] = htmlspecialchars_uni($user['username']);
$lang->chat_on_skype = $lang->sprintf($lang->chat_on_skype, $user['username']); $lang->call_on_skype = $lang->sprintf($lang->call_on_skype, $user['username']);
| |
|
|
$imtemplate = "misc_imcenter_".$mybb->input['imtype']; eval("\$imcenter = \"".$templates->get($imtemplate, 1, 0)."\";"); echo $imcenter; exit; }
| |
elseif($mybb->input['action'] == "syndication") { $plugins->run_hooks("misc_syndication_start");
$fid = $mybb->get_input('fid', MyBB::INPUT_INT); $version = $mybb->get_input('version');
|
elseif($mybb->input['action'] == "syndication") { $plugins->run_hooks("misc_syndication_start");
$fid = $mybb->get_input('fid', MyBB::INPUT_INT); $version = $mybb->get_input('version');
|
$new_limit = $mybb->get_input('limit', MyBB::INPUT_INT);
| |
$forums = $mybb->get_input('forums', MyBB::INPUT_ARRAY);
|
$forums = $mybb->get_input('forums', MyBB::INPUT_ARRAY);
|
$limit = 15; if(!empty($new_limit) && $new_limit != $limit) { $limit = $new_limit; } $feedurl = ''; $add = false;
| $limit = $mybb->get_input('limit', MyBB::INPUT_INT); $url = $mybb->settings['bburl']."/syndication.php"; $syndicate = $urlquery = array();
|
add_breadcrumb($lang->nav_syndication); $unviewable = get_unviewable_forums(); $inactiveforums = get_inactive_forums();
|
add_breadcrumb($lang->nav_syndication); $unviewable = get_unviewable_forums(); $inactiveforums = get_inactive_forums();
|
$unexp1 = explode(',', $unviewable); $unexp2 = explode(',', $inactiveforums); $unexp = array_merge($unexp1, $unexp2); if(is_array($forums))
| $unexp = explode(',', $unviewable . ',' . $inactiveforums);
if(is_array($forums) && !in_array('all', $forums))
|
{
|
{
|
foreach($unexp as $fid) { $unview[$fid] = true; }
$syndicate = ''; $comma = ''; $all = false;
| |
foreach($forums as $fid) {
|
foreach($forums as $fid) {
|
if($fid == "all")
| if(ctype_digit($fid) && !in_array($fid, $unexp))
|
{
|
{
|
$all = true; break;
| $syndicate[] = $fid; $flist[$fid] = true;
|
}
|
}
|
elseif(ctype_digit($fid)) { if(!isset($unview[$fid])) { $syndicate .= $comma.$fid; $comma = ","; $flist[$fid] = true; } } } $url = $mybb->settings['bburl']."/syndication.php"; if(!$all) { $url .= "?fid=$syndicate"; $add = true; }
| }
|
|
|
// If the version is not RSS2.0, set the type to Atom1.0. if($version != "rss2.0")
| if(!empty($syndicate))
|
{
|
{
|
if(!$add) { $url .= "?"; } else { $url .= "&"; } $url .= "type=atom1.0"; $add = true; } if((int)$limit > 0) { if($limit > 50) { $limit = 50; } if(!$add) { $url .= "?"; } else { $url .= "&"; } if(is_numeric($limit)) { $url .= "limit=$limit"; }
| $urlquery[] = "fid=". implode(",", $syndicate);
|
}
|
}
|
eval("\$feedurl = \"".$templates->get("misc_syndication_feedurl")."\";");
| |
}
|
}
|
unset($GLOBALS['forumcache']);
| |
// If there is no version in the input, check the default (RSS2.0).
|
// If there is no version in the input, check the default (RSS2.0).
|
if($version == "atom1.0")
| $json1check = $atom1check = $rss2check = ""; if($version == "json") { $json1check = "checked=\"checked\""; $urlquery[] = "type=".$version; } elseif($version == "atom1.0")
|
{ $atom1check = "checked=\"checked\"";
|
{ $atom1check = "checked=\"checked\"";
|
$rss2check = ''; }
| $urlquery[] = "type=".$version; }
|
else {
|
else {
|
$atom1check = '';
| |
$rss2check = "checked=\"checked\""; }
|
$rss2check = "checked=\"checked\""; }
|
| // Evaluate, reset and set limit (Drive through settings?) $limit = empty($limit) ? 15 : (($limit > 50) ? 50 : $limit); $urlquery[] = "limit=" . $limit;
// Generate feed url if(!empty($urlquery)){ $url .= "?" . implode('&', $urlquery); } eval("\$feedurl = \"".$templates->get("misc_syndication_feedurl")."\";");
unset($GLOBALS['forumcache']);
|
$forumselect = makesyndicateforums();
|
$forumselect = makesyndicateforums();
|
|
|
$plugins->run_hooks("misc_syndication_end");
eval("\$syndication = \"".$templates->get("misc_syndication")."\";"); output_page($syndication);
|
$plugins->run_hooks("misc_syndication_end");
eval("\$syndication = \"".$templates->get("misc_syndication")."\";"); output_page($syndication);
|
}
| }
|
elseif($mybb->input['action'] == "clearcookies") { verify_post_check($mybb->get_input('my_post_key'));
| elseif($mybb->input['action'] == "clearcookies") { verify_post_check($mybb->get_input('my_post_key'));
|
Zeile 1028 | Zeile 956 |
---|
while($forum = $db->fetch_array($query)) { $forumcache[$forum['pid']][$forum['disporder']][$forum['fid']] = $forum;
|
while($forum = $db->fetch_array($query)) { $forumcache[$forum['pid']][$forum['disporder']][$forum['fid']] = $forum;
|
}
| }
|
}
if(!is_array($permissioncache))
| }
if(!is_array($permissioncache))
|
Zeile 1049 | Zeile 977 |
---|
if(isset($flist[$forum['fid']])) { $optionselected = 'selected="selected"';
|
if(isset($flist[$forum['fid']])) { $optionselected = 'selected="selected"';
|
$selecteddone = "1";
| |
}
|
}
|
if($forum['password'] == '' && !in_array($forum['fid'], $unexp) || $forum['password'] && isset($mybb->cookies['forumpass'][$forum['fid']]) && $mybb->cookies['forumpass'][$forum['fid']] === md5($mybb->user['uid'].$forum['password']))
| if($forum['password'] == '' && !in_array($forum['fid'], $unexp) || $forum['password'] && isset($mybb->cookies['forumpass'][$forum['fid']]) && my_hash_equals($mybb->cookies['forumpass'][$forum['fid']], md5($mybb->user['uid'].$forum['password'])))
|
{ eval("\$forumlistbits .= \"".$templates->get("misc_syndication_forumlist_forum")."\";"); }
| { eval("\$forumlistbits .= \"".$templates->get("misc_syndication_forumlist_forum")."\";"); }
|
Zeile 1061 | Zeile 988 |
---|
{ $newdepth = $depth." "; $forumlistbits .= makesyndicateforums($forum['fid'], '', 0, $newdepth);
|
{ $newdepth = $depth." "; $forumlistbits .= makesyndicateforums($forum['fid'], '', 0, $newdepth);
|
| } } else { if(isset($flist[$forum['fid']])) { unset($flist[$forum['fid']]);
|
} } } } }
|
} } } } }
|
|
|
if($addselect) {
|
if($addselect) {
|
$addsel = ''; if(empty($selecteddone)) { $addsel = ' selected="selected"'; }
| $addsel = empty($flist) ? ' selected="selected"' : '';
|
eval("\$forumlist = \"".$templates->get("misc_syndication_forumlist")."\";"); }
| eval("\$forumlist = \"".$templates->get("misc_syndication_forumlist")."\";"); }
|