Zeile 11 | Zeile 11 |
---|
define("IN_MYBB", 1); define('THIS_SCRIPT', 'newthread.php');
|
define("IN_MYBB", 1); define('THIS_SCRIPT', 'newthread.php');
|
$templatelist = "newthread,previewpost,loginbox,changeuserbox,newthread_postpoll,posticons,codebuttons,postbit,post_attachments_attachment_unapproved,newthread_disablesmilies_hidden,postbit_icon"; $templatelist .= ",newthread_disablesmilies,post_attachments_new,post_attachments,post_savedraftbutton,post_subscription_method,post_attachments_attachment_remove,postbit_warninglevel_formatted"; $templatelist .= ",forumdisplay_rules,forumdisplay_rules_link,post_attachments_attachment_postinsert,post_attachments_attachment,newthread_options_signature,post_prefixselect_prefix,post_prefixselect_single"; $templatelist .= ",member_register_regimage,member_register_regimage_recaptcha,post_captcha_hidden,post_captcha,post_captcha_recaptcha,post_captcha_nocaptcha,postbit_gotopost,posticons_icon";
| $templatelist = "newthread,previewpost,loginbox,changeuserbox,newthread_postpoll,posticons,codebuttons,postbit,post_attachments_attachment_unapproved,newreply_modoptions_close,newreply_modoptions_stick"; $templatelist .= ",newthread_disablesmilies,post_attachments_new,post_attachments,post_savedraftbutton,post_subscription_method,post_attachments_attachment_remove,postbit_warninglevel_formatted,postbit_icon"; $templatelist .= ",forumdisplay_rules,forumdisplay_rules_link,post_attachments_attachment_postinsert,post_attachments_attachment,newthread_signature,post_prefixselect_prefix,post_prefixselect_single"; $templatelist .= ",member_register_regimage,member_register_regimage_recaptcha,post_captcha_hidden,post_captcha,post_captcha_recaptcha,post_captcha_nocaptcha,postbit_gotopost,newthread_postoptions";
|
$templatelist .= ",postbit_avatar,postbit_find,postbit_pm,postbit_rep_button,postbit_www,postbit_email,postbit_reputation,postbit_warn,postbit_warninglevel,postbit_author_user,postbit_author_guest"; $templatelist .= ",postbit_signature,postbit_classic,postbit_attachments_thumbnails_thumbnail,postbit_attachments_images_image,postbit_attachments_attachment,postbit_attachments_attachment_unapproved";
|
$templatelist .= ",postbit_avatar,postbit_find,postbit_pm,postbit_rep_button,postbit_www,postbit_email,postbit_reputation,postbit_warn,postbit_warninglevel,postbit_author_user,postbit_author_guest"; $templatelist .= ",postbit_signature,postbit_classic,postbit_attachments_thumbnails_thumbnail,postbit_attachments_images_image,postbit_attachments_attachment,postbit_attachments_attachment_unapproved";
|
$templatelist .= ",postbit_attachments_thumbnails,postbit_attachments_images,postbit_attachments,postbit_reputation_formatted_link,post_attachments_update,postbit_offline,newreply_modoptions";
| $templatelist .= ",postbit_attachments_thumbnails,postbit_attachments_images,postbit_attachments,postbit_reputation_formatted_link,post_attachments_update,postbit_offline,newreply_modoptions,posticons_icon";
|
$templatelist .= ",newthread_draftinput,global_moderation_notice,postbit_online,postbit_away,attachment_icon,postbit_userstar,newthread_multiquote_external,postbit_groupimage,post_attachments_add";
require_once "./global.php";
| $templatelist .= ",newthread_draftinput,global_moderation_notice,postbit_online,postbit_away,attachment_icon,postbit_userstar,newthread_multiquote_external,postbit_groupimage,post_attachments_add";
require_once "./global.php";
|
Zeile 558 | Zeile 558 |
---|
else { $visible_where = "AND p.visible > 0";
|
else { $visible_where = "AND p.visible > 0";
|
| }
// Check group permissions if we can't view threads not started by us $group_permissions = forum_permissions(); $onlyusfids = array(); $onlyusforums = ''; foreach($group_permissions as $gpfid => $forum_permissions) { if(isset($forum_permissions['canonlyviewownthreads']) && $forum_permissions['canonlyviewownthreads'] == 1) { $onlyusfids[] = $gpfid; } } if(!empty($onlyusfids)) { $onlyusforums = "AND ((t.fid IN(".implode(',', $onlyusfids).") AND t.uid='{$mybb->user['uid']}') OR t.fid NOT IN(".implode(',', $onlyusfids)."))";
|
}
if($mybb->get_input('load_all_quotes', MyBB::INPUT_INT) == 1)
| }
if($mybb->get_input('load_all_quotes', MyBB::INPUT_INT) == 1)
|
Zeile 567 | Zeile 583 |
---|
FROM ".TABLE_PREFIX."posts p LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid) LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=p.uid)
|
FROM ".TABLE_PREFIX."posts p LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid) LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=p.uid)
|
WHERE p.pid IN ({$quoted_posts}) {$unviewable_forums} {$inactiveforums} {$visible_where}
| WHERE p.pid IN ({$quoted_posts}) {$unviewable_forums} {$inactiveforums} {$onlyusforums} {$visible_where}
|
ORDER BY p.dateline "); while($quoted_post = $db->fetch_array($query))
| ORDER BY p.dateline "); while($quoted_post = $db->fetch_array($query))
|
Zeile 590 | Zeile 606 |
---|
SELECT COUNT(*) AS quotes FROM ".TABLE_PREFIX."posts p LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid)
|
SELECT COUNT(*) AS quotes FROM ".TABLE_PREFIX."posts p LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid)
|
WHERE p.pid IN ({$quoted_posts}) {$unviewable_forums} {$inactiveforums} {$visible_where}
| WHERE p.pid IN ({$quoted_posts}) {$unviewable_forums} {$inactiveforums} {$onlyusforums} {$visible_where}
|
"); $external_quotes = $db->fetch_field($query, 'quotes');
| "); $external_quotes = $db->fetch_field($query, 'quotes');
|
Zeile 645 | Zeile 661 |
---|
$postoptions_subscriptionmethod_email = "checked=\"checked\""; } else if(isset($postoptions['subscriptionmethod']) && $postoptions['subscriptionmethod'] == "pm")
|
$postoptions_subscriptionmethod_email = "checked=\"checked\""; } else if(isset($postoptions['subscriptionmethod']) && $postoptions['subscriptionmethod'] == "pm")
|
{ $postoptions_subscriptionmethod_pm = "checked=\"checked\""; } else { $postoptions_subscriptionmethod_dont = "checked=\"checked\"";
| { $postoptions_subscriptionmethod_pm = "checked=\"checked\""; } else { $postoptions_subscriptionmethod_dont = "checked=\"checked\"";
|
} if(isset($postoptions['disablesmilies']) && $postoptions['disablesmilies'] == 1) {
| } if(isset($postoptions['disablesmilies']) && $postoptions['disablesmilies'] == 1) {
|
Zeile 679 | Zeile 695 |
---|
} $icon = $post['icon']; if($forum['allowpicons'] != 0)
|
} $icon = $post['icon']; if($forum['allowpicons'] != 0)
|
{
| {
|
$posticons = get_post_icons(); } if($postoptions['subscriptionmethod'] == "none")
| $posticons = get_post_icons(); } if($postoptions['subscriptionmethod'] == "none")
|
Zeile 691 | Zeile 707 |
---|
$postoptions_subscriptionmethod_email = "checked=\"checked\""; } else if($postoptions['subscriptionmethod'] == "pm")
|
$postoptions_subscriptionmethod_email = "checked=\"checked\""; } else if($postoptions['subscriptionmethod'] == "pm")
|
{ $postoptions_subscriptionmethod_pm = "checked=\"checked\""; } else {
| { $postoptions_subscriptionmethod_pm = "checked=\"checked\""; } else {
|
$postoptions_subscriptionmethod_dont = "checked=\"checked\""; } }
| $postoptions_subscriptionmethod_dont = "checked=\"checked\""; } }
|
Zeile 784 | Zeile 800 |
---|
// guest post --> verify author if($new_thread['uid'] == 0)
|
// guest post --> verify author if($new_thread['uid'] == 0)
|
{
| {
|
$valid_username = $posthandler->verify_author(); } else
| $valid_username = $posthandler->verify_author(); } else
|
Zeile 873 | Zeile 889 |
---|
{ $message = htmlspecialchars_uni($mybb->get_input('message')); $subject = htmlspecialchars_uni($mybb->get_input('subject'));
|
{ $message = htmlspecialchars_uni($mybb->get_input('message')); $subject = htmlspecialchars_uni($mybb->get_input('subject'));
|
}
| }
|
// Generate thread prefix selector if(!$mybb->get_input('threadprefix', MyBB::INPUT_INT)) { $mybb->input['threadprefix'] = 0;
|
// Generate thread prefix selector if(!$mybb->get_input('threadprefix', MyBB::INPUT_INT)) { $mybb->input['threadprefix'] = 0;
|
}
| }
|
$prefixselect = build_prefix_select($forum['fid'], $mybb->get_input('threadprefix', MyBB::INPUT_INT));
$posthash = htmlspecialchars_uni($mybb->get_input('posthash'));
|
$prefixselect = build_prefix_select($forum['fid'], $mybb->get_input('threadprefix', MyBB::INPUT_INT));
$posthash = htmlspecialchars_uni($mybb->get_input('posthash'));
|
| // Hide signature option if no permission $signature = ''; if($mybb->usergroup['canusesig'] == 1 && !$mybb->user['suspendsignature']) { eval("\$signature = \"".$templates->get('newthread_signature')."\";"); }
|
// Can we disable smilies or are they disabled already? $disablesmilies = ''; if($forum['allowsmilies'] != 0) { eval("\$disablesmilies = \"".$templates->get("newthread_disablesmilies")."\";");
|
// Can we disable smilies or are they disabled already? $disablesmilies = ''; if($forum['allowsmilies'] != 0) { eval("\$disablesmilies = \"".$templates->get("newthread_disablesmilies")."\";");
|
}
| }
$postoptions = ''; if(!empty($signature) || !empty($disablesmilies)) { eval("\$postoptions = \"".$templates->get("newthread_postoptions")."\";"); $bgcolor = "trow2"; $bgcolor2 = "trow1"; }
|
else {
|
else {
|
eval("\$disablesmilies = \"".$templates->get("newthread_disablesmilies_hidden")."\";");
| $bgcolor = "trow1"; $bgcolor2 = "trow2";
|
}
$modoptions = '';
| }
$modoptions = '';
|
Zeile 902 | Zeile 934 |
---|
{ $modoptions = $mybb->get_input('modoptions', MyBB::INPUT_ARRAY); if(isset($modoptions['closethread']) && $modoptions['closethread'] == 1)
|
{ $modoptions = $mybb->get_input('modoptions', MyBB::INPUT_ARRAY); if(isset($modoptions['closethread']) && $modoptions['closethread'] == 1)
|
{
| {
|
$closecheck = "checked=\"checked\""; } else
| $closecheck = "checked=\"checked\""; } else
|
Zeile 915 | Zeile 947 |
---|
} else {
|
} else {
|
$stickycheck = '';
| $stickycheck = ''; }
$closeoption = ''; if(is_moderator($thread['fid'], "canopenclosethreads")) { eval("\$closeoption = \"".$templates->get("newreply_modoptions_close")."\";"); }
$stickoption = ''; if(is_moderator($thread['fid'], "canstickunstickthreads")) { eval("\$stickoption = \"".$templates->get("newreply_modoptions_stick")."\";"); }
if(!empty($closeoption) || !empty($stickoption)) { eval("\$modoptions = \"".$templates->get("newreply_modoptions")."\";"); $bgcolor = "trow1"; $bgcolor2 = "trow2"; } else { $bgcolor = "trow2"; $bgcolor2 = "trow1";
|
}
|
}
|
eval("\$modoptions = \"".$templates->get("newreply_modoptions")."\";"); $bgcolor = "trow1"; $bgcolor2 = "trow2";
| |
} else {
| } else {
|