Last time fixes, forget to add it
This commit is contained in:
parent
5be06c4e08
commit
51ec649b3b
50
bbcode.php
50
bbcode.php
@ -15,8 +15,10 @@ if (!class_exists('cartpaujBBCodeParser'))
|
|||||||
'/\[\*\](.+)\\n/Ui',
|
'/\[\*\](.+)\\n/Ui',
|
||||||
'/\[spoil\](.+)\[\/spoil\]/Uis',
|
'/\[spoil\](.+)\[\/spoil\]/Uis',
|
||||||
'/\[b\](.+)\[\/b\]/Uis',
|
'/\[b\](.+)\[\/b\]/Uis',
|
||||||
|
'/\[quotetitle\](.+)\[\/quotetitle\]/Uis',
|
||||||
'/\[i\](.+)\[\/i\]/Uis',
|
'/\[i\](.+)\[\/i\]/Uis',
|
||||||
'/\[u\](.+)\[\/u\]/Uis',
|
'/\[u\](.+)\[\/u\]/Uis',
|
||||||
|
'/\[font size=[0-9]*\](.+)\[\/font\]/Uis',
|
||||||
'/\[s\](.+)\[\/s\]/Uis',
|
'/\[s\](.+)\[\/s\]/Uis',
|
||||||
'/\[url=(.+)\](.+)\[\/url\]/Ui',
|
'/\[url=(.+)\](.+)\[\/url\]/Ui',
|
||||||
'/\[url](.+)\[\/url\]/Ui',
|
'/\[url](.+)\[\/url\]/Ui',
|
||||||
@ -27,21 +29,13 @@ if (!class_exists('cartpaujBBCodeParser'))
|
|||||||
'/\[email=(.+)\](.+)\[\/email\]/Ui',
|
'/\[email=(.+)\](.+)\[\/email\]/Ui',
|
||||||
'/\[img\](.+)\[\/img\]/Ui',
|
'/\[img\](.+)\[\/img\]/Ui',
|
||||||
'/\[img=(.+)\](.+)\[\/img\]/Ui',
|
'/\[img=(.+)\](.+)\[\/img\]/Ui',
|
||||||
'/\[color=(\#[0-9a-f]{6}|[a-z]+)\](.+)\[\/color\]/Ui',
|
|
||||||
'/\[color=(\#[0-9a-f]{6}|[a-z]+)\](.+)\[\/color\]/Uis',
|
'/\[color=(\#[0-9a-f]{6}|[a-z]+)\](.+)\[\/color\]/Uis',
|
||||||
'/\[left\](.+)\[\/left\]/Ui',
|
|
||||||
'/\[left\](.+)\[\/left\]/Uis',
|
'/\[left\](.+)\[\/left\]/Uis',
|
||||||
'/\[center\](.+)\[\/center\]/Ui',
|
|
||||||
'/\[center\](.+)\[\/center\]/Uis',
|
'/\[center\](.+)\[\/center\]/Uis',
|
||||||
'/\[right\](.+)\[\/right\]/Ui',
|
|
||||||
'/\[right\](.+)\[\/right\]/Uis',
|
'/\[right\](.+)\[\/right\]/Uis',
|
||||||
'/\[justify\](.+)\[\/justify\]/Ui',
|
|
||||||
'/\[justify\](.+)\[\/justify\]/Uis',
|
'/\[justify\](.+)\[\/justify\]/Uis',
|
||||||
'/\[spoiler\](.+)\[\/spoiler\]/Ui',
|
|
||||||
'/\[spoiler\](.+)\[\/spoiler\]/Uis',
|
'/\[spoiler\](.+)\[\/spoiler\]/Uis',
|
||||||
'/\[spoiler=(.+)\](.+)\[\/spoiler\]/Ui',
|
|
||||||
'/\[spoiler=(.+)\](.+)\[\/spoiler\]/Uis',
|
'/\[spoiler=(.+)\](.+)\[\/spoiler\]/Uis',
|
||||||
'/\[quote](.+)\[\/quote]/Ui',
|
|
||||||
'/\[quote](.+)\[\/quote]/Uis'
|
'/\[quote](.+)\[\/quote]/Uis'
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -49,35 +43,29 @@ if (!class_exists('cartpaujBBCodeParser'))
|
|||||||
(
|
(
|
||||||
'<ul>\1</ul>',
|
'<ul>\1</ul>',
|
||||||
'<li>\1</li>',
|
'<li>\1</li>',
|
||||||
'<span style = "color:transparent">\1</span>',
|
'<span style="color:transparent">\1</span>',
|
||||||
'<b>\1</b>',
|
'<b>\1</b>',
|
||||||
|
'<div class="quotetitle">\1</div>',
|
||||||
'<i>\1</i>',
|
'<i>\1</i>',
|
||||||
'<u>\1</u>',
|
'<u>\1</u>',
|
||||||
|
'<span style="font-size:\1px;">\2</span>',
|
||||||
'<s>\1</s>',
|
'<s>\1</s>',
|
||||||
'<a href = "\1" target = "_blank">\2</a>',
|
'<a href="\1" target="_blank">\2</a>',
|
||||||
'<a href = "\1" target = "_blank">\1</a>',
|
'<a href="\1" target="_blank">\1</a>',
|
||||||
'<iframe width = "400" height = "325" frameborder = "0" scrolling = "no" marginheight = "0" marginwidth = "0" src = "\1&output=embed">Your browser does not support iFrames</iframe>',
|
'<iframe width="400" height="325" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="\1&output=embed">Your browser does not support iFrames</iframe>',
|
||||||
'\1',
|
'\1',
|
||||||
'\1',
|
'\1',
|
||||||
'<a href = "mailto:\1">\1</a>',
|
'<a href="mailto:\1">\1</a>',
|
||||||
'<a href = "mailto:\1">\2</a>',
|
'<a href="mailto:\1">\2</a>',
|
||||||
'<a href = "\1"><img src = "\1" alt = "Image" /></a>',
|
'<a href="\1"><img src="\1" alt="Image" /></a>',
|
||||||
'<a href = "\1"><img src = "\1" alt = "\2" /></a>',
|
'<a href="\1"><img src="\1" alt="\2" /></a>',
|
||||||
'<span style = "color: \1;">\2</span>',
|
'<span style="color: \1;">\2</span>',
|
||||||
'<div style = "color: \1;">\2</div>',
|
'<p style="text-align:left">\1</p>',
|
||||||
'<p style = "text-align:left">\1</p>',
|
'<p style="text-align:center">\1</p>',
|
||||||
'<p style = "text-align:left">\1</p>',
|
'<p style="text-align:right">\1</p>',
|
||||||
'<p style = "text-align:center">\1</p>',
|
'<p style="text-align:justify">\1</p>',
|
||||||
'<p style = "text-align:center">\1</p>',
|
'<ul class="mingle-spoiler-view" style="list-style-type:none"><li style="cursor:pointer"><h3><span>+</span>Spoiler</h3></li><li class="mingle-spoiler-view-hide" style="display:none">\1</li></ul>',
|
||||||
'<p style = "text-align:right">\1</p>',
|
'<ul class="mingle-spoiler-view" style="list-style-type:none"><li style="cursor:pointer"><h3><span>+</span>\1</h3></li><li style="display:none">\2</li></ul>',
|
||||||
'<p style = "text-align:right">\1</p>',
|
|
||||||
'<p style = "text-align:justify">\1</p>',
|
|
||||||
'<p style = "text-align:justify">\1</p>',
|
|
||||||
'<ul class="mingle-spoiler-view" style = "list-style-type:none"><li style = "cursor:pointer"><h3><span>+</span>Spoiler</h3></li><li class = "mingle-spoiler-view-hide" style = "display:none">\1</li></ul>',
|
|
||||||
'<ul class="mingle-spoiler-view" style = "list-style-type:none"><li style = "cursor:pointer"><h3><span>+</span>Spoiler</h3></li><li class = "mingle-spoiler-view-hide" style = "display:none">\1</li></ul>',
|
|
||||||
'<ul class="mingle-spoiler-view" style = "list-style-type:none"><li style = "cursor:pointer"><h3><span>+</span>\1</h3></li><li style = "display:none">\2</li></ul>',
|
|
||||||
'<ul class="mingle-spoiler-view" style = "list-style-type:none"><li style = "cursor:pointer"><h3><span>+</span>\1</h3></li><li style = "display:none">\2</li></ul>',
|
|
||||||
'<blockquote>\1</blockquote>',
|
|
||||||
'<blockquote>\1</blockquote>'
|
'<blockquote>\1</blockquote>'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -546,14 +546,17 @@ $image = WPFURL."images/user.png";
|
|||||||
</tr>";
|
</tr>";
|
||||||
|
|
||||||
echo "<tr class='alternate'>
|
echo "<tr class='alternate'>
|
||||||
<td>".__("Closed Categories (Admin posting only):", "mingleforum")."<br/><small>".__("Comma separated list of Category ID's (Ex: 1, 2, 3)", "mingleforum")."</small></td>
|
<td valign='top'>"
|
||||||
|
.__("Closed Categories (Admin posting only):", "mingleforum")."<br/><small>".__("Comma separated list of Category ID's (Ex: 1, 2, 3)", "mingleforum")."</small></td>
|
||||||
<td><input type='text' name='forum_disabled_cats' value='".implode(",", $op['forum_disabled_cats'])."' /></td>
|
<td><input type='text' name='forum_disabled_cats' value='".implode(",", $op['forum_disabled_cats'])."' /></td>
|
||||||
</tr><tr class='alternate'>
|
</tr><tr class='alternate'>
|
||||||
<td>".__("Users can reply in locked categories", "mingleforum")."</td>
|
<td>".__("Users can reply in locked categories", "mingleforum")."</td>
|
||||||
<td><input type='checkbox' name='allow_user_replies_locked_cats' value='true'";
|
<td>
|
||||||
|
<input type='checkbox' name='allow_user_replies_locked_cats' value='true'";
|
||||||
if($op['allow_user_replies_locked_cats'] == 'true')
|
if($op['allow_user_replies_locked_cats'] == 'true')
|
||||||
echo " checked='checked' ";
|
echo " checked='checked' ";
|
||||||
echo "/> ($defStr = ".__('Off', 'mingleforum').")</td>
|
echo "/> ($defStr = ".__('Off', 'mingleforum').")
|
||||||
|
</td>
|
||||||
</tr>";
|
</tr>";
|
||||||
|
|
||||||
echo "<tr class='alternate'>
|
echo "<tr class='alternate'>
|
||||||
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
14
readme.txt
14
readme.txt
@ -121,7 +121,15 @@ Need help?:
|
|||||||
[Cartpauj Support Forums](http://cartpauj.icomnow.com/forum "Cartpauj Support Forums")
|
[Cartpauj Support Forums](http://cartpauj.icomnow.com/forum "Cartpauj Support Forums")
|
||||||
|
|
||||||
== Frequently Asked Questions ==
|
== Frequently Asked Questions ==
|
||||||
n/a
|
* **My users can't register?** - Dashboard -> Settings -> General -> Anyone can register -> Save
|
||||||
|
* **Help! I can't create new topics** - Make sure you have watched the setup videos and have created both categories AND forums.
|
||||||
|
* **How can I hide the sidebar on the forum page?** - When editing the forum page, if your theme supports it, you should be able to change your Template to a full-width one. If you don't see this option, either hire a developer to make one for you, or bug your theme author to add it.
|
||||||
|
* **I made customizations to the forum, but they get overwritten on every update** - If you customize anything inside of the /mingle-forum/ folder it will be overwritten, there's no way around that. If all you're changing is CSS, then put it somewhere else, like at the bottom of your theme's styles.css file (which gets overwritten when you upgrade your theme FYI).
|
||||||
|
* **My skin looks bad/funny** - Your theme is most likely causing a conflict with the forum's table styles. We do our best, but can't possibly make the forum work for every conceivable WordPress theme. Find a friend who knows a thing or two about CSS and see if they'll help you get some custom styles set to fix the issue.
|
||||||
|
* **Can I put different forums on different pages?** - No. Not right now, and maybe not ever.
|
||||||
|
* **SEO friedly URL's are not working** - Make sure you have permalinks enabled in WordPress. Any setting but "default" should work. We personally like Day & Name for blogs, or Postname for non-blogs.
|
||||||
|
* **Google isn't indexing my forum pages** - Step 1: Set WordPress Permalink settings to anything but default, then enable SEO Friendly URLs in the forum's options. Step 2: Make sure you don't have Canonical URLs enabled on the forum page by another plugin like All In One SEO Pack. Mingle Forum implements some of its own SEO features making this unneccessary.
|
||||||
|
* **I can only see the front page of the forum. No matter what I click, it goes back to the front page** - Step 1: Make sure the forum isn't the home page of your site. Mingle Forum does not currently work when set to the home page. Step 2: Try enabling or disabling SEO Friendly URL's in the Forum Options. Step 3: Are you using WP SEO by Yoast? If so, disable the option to rewrite ugly permalinks.
|
||||||
|
|
||||||
== Upgrade Notice ==
|
== Upgrade Notice ==
|
||||||
|
|
||||||
@ -152,6 +160,10 @@ To make your theme compatible with this copy of Mingle Forum, in your style.css,
|
|||||||
* Fix display glitches
|
* Fix display glitches
|
||||||
* Fix -1 threads after delete the last post
|
* Fix -1 threads after delete the last post
|
||||||
* Fix Quick Reply on IE
|
* Fix Quick Reply on IE
|
||||||
|
* Fix SPAM time limit not working for guests
|
||||||
|
* Fix quote link issue
|
||||||
|
* Fix move/delete topics broken for moderators
|
||||||
|
* Fix known conflict with WordPress SEO by Yoast
|
||||||
= 1.0.34 =
|
= 1.0.34 =
|
||||||
* Added ability to limit SPAM by setting a time interval users must wait between posts
|
* Added ability to limit SPAM by setting a time interval users must wait between posts
|
||||||
* Added option to allow users to post replies in locked categories
|
* Added option to allow users to post replies in locked categories
|
||||||
|
@ -31,11 +31,16 @@ if(is_numeric($the_forum_id))
|
|||||||
//Spam time interval check
|
//Spam time interval check
|
||||||
if(!is_super_admin() && !$mingleforum->is_moderator($user_ID, $the_forum_id))
|
if(!is_super_admin() && !$mingleforum->is_moderator($user_ID, $the_forum_id))
|
||||||
{
|
{
|
||||||
$last_post_time = get_user_meta((int)$user_ID, 'mingle_forum_last_post_time_'.ip_to_string(), true);
|
//We're going to not set a user ID here, I know unconventional, but it's an easy way to account for guests.
|
||||||
|
$spam_meta_key = "mingle_forum_last_post_time_".ip_to_string();
|
||||||
|
$last_post_time = $wpdb->get_var($wpdb->prepare("SELECT `meta_value` FROM {$wpdb->usermeta} WHERE `meta_key` = %s", $spam_meta_key));
|
||||||
if((time() - (int)$last_post_time) < stripslashes($mingleforum->options['forum_posting_time_limit']))
|
if((time() - (int)$last_post_time) < stripslashes($mingleforum->options['forum_posting_time_limit']))
|
||||||
wp_die(__('To help prevent spam, we require that you wait', 'mingleforum').' '.ceil(((int)(stripslashes($mingleforum->options['forum_posting_time_limit']))/60)).' '.__('minutes before posting again. Please use your browsers back button to return.', 'mingleforum'));
|
wp_die(__('To help prevent spam, we require that you wait', 'mingleforum').' '.ceil(((int)(stripslashes($mingleforum->options['forum_posting_time_limit']))/60)).' '.__('minutes before posting again. Please use your browsers back button to return.', 'mingleforum'));
|
||||||
else
|
else
|
||||||
update_user_meta((int)$user_ID, 'mingle_forum_last_post_time_'.ip_to_string(), time());
|
if($last_post_time !== null)
|
||||||
|
$wpdb->query($wpdb->prepare("UPDATE {$wpdb->usermeta} SET `meta_value` = %d WHERE `meta_key` = %s", time(), $spam_meta_key));
|
||||||
|
else
|
||||||
|
$wpdb->query($wpdb->prepare("INSERT INTO {$wpdb->usermeta} (`meta_key`, `meta_value`) VALUES (%s, %d)", $spam_meta_key, time()));
|
||||||
}
|
}
|
||||||
|
|
||||||
function ip_to_string()
|
function ip_to_string()
|
||||||
@ -155,12 +160,12 @@ function ip_to_string()
|
|||||||
$msg .= ("<div id='error'><p>".__("You must enter a subject", "mingleforum")."</p></div>");
|
$msg .= ("<div id='error'><p>".__("You must enter a subject", "mingleforum")."</p></div>");
|
||||||
$error = true;
|
$error = true;
|
||||||
}
|
}
|
||||||
else if($content == "") {
|
elseif($content == "") {
|
||||||
$msg .= "<h2>".__("An error occured", "mingleforum")."</h2>";
|
$msg .= "<h2>".__("An error occured", "mingleforum")."</h2>";
|
||||||
$msg .= ("<div id='error'><p>".__("You must enter a message", "mingleforum")."</p></div>");
|
$msg .= ("<div id='error'><p>".__("You must enter a message", "mingleforum")."</p></div>");
|
||||||
$error = true;
|
$error = true;
|
||||||
}
|
}
|
||||||
else if(!$mingleforum->have_access($forum_id) || !$mingleforum->have_access($forum_id, 'post') || !$mingleforum->have_access($group_id) || !$mingleforum->have_access($group_id, 'post')) {
|
elseif(!$mingleforum->have_access($forum_id) || !$mingleforum->have_access($forum_id, 'post') || !$mingleforum->have_access($group_id) || !$mingleforum->have_access($group_id, 'post')) {
|
||||||
$msg .= "<h2>".__("An error occured", "mingleforum")."</h2>";
|
$msg .= "<h2>".__("An error occured", "mingleforum")."</h2>";
|
||||||
$error = true;
|
$error = true;
|
||||||
}
|
}
|
||||||
@ -219,12 +224,12 @@ function ip_to_string()
|
|||||||
$msg .= ("<div id='error'><p>".__("You must enter a subject", "mingleforum")."</p></div>");
|
$msg .= ("<div id='error'><p>".__("You must enter a subject", "mingleforum")."</p></div>");
|
||||||
$error = true;
|
$error = true;
|
||||||
}
|
}
|
||||||
else if($content == ""){
|
elseif($content == ""){
|
||||||
$msg .= "<h2>".__("An error occured", "mingleforum")."</h2>";
|
$msg .= "<h2>".__("An error occured", "mingleforum")."</h2>";
|
||||||
$msg .= ("<div id='error'><p>".__("You must enter a message", "mingleforum")."</p></div>");
|
$msg .= ("<div id='error'><p>".__("You must enter a message", "mingleforum")."</p></div>");
|
||||||
$error = true;
|
$error = true;
|
||||||
}
|
}
|
||||||
else if(!$mingleforum->have_access($forum_id) || !$mingleforum->have_access($forum_id, 'post') || !$mingleforum->have_access($group_id) || !$mingleforum->have_access($group_id, 'post')) {
|
elseif(!$mingleforum->have_access($forum_id) || !$mingleforum->have_access($forum_id, 'post') || !$mingleforum->have_access($group_id) || !$mingleforum->have_access($group_id, 'post')) {
|
||||||
$msg .= "<h2>".__("An error occured", "mingleforum")."</h2>";
|
$msg .= "<h2>".__("An error occured", "mingleforum")."</h2>";
|
||||||
$error = true;
|
$error = true;
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
Plugin Name: Mingle Forum
|
Plugin Name: Mingle Forum
|
||||||
Plugin URI: http://cartpauj.com/projects/mingle-forum-plugin
|
Plugin URI: http://cartpauj.com/projects/mingle-forum-plugin
|
||||||
Description: Mingle Forum is growing rapidly in popularity because it is simple, reliable, lightweight and does just enough to keep things interesting. If you like this plugin please consider making a donation at http://cartpauj.com/donate/
|
Description: Mingle Forum is growing rapidly in popularity because it is simple, reliable, lightweight and does just enough to keep things interesting. If you like this plugin please consider making a donation at http://cartpauj.com/donate/
|
||||||
Version: 1.0.34
|
Version: 2.0.34
|
||||||
Author: Cartpauj
|
Author: Cartpauj
|
||||||
Author URI: http://cartpauj.com/
|
Author URI: http://cartpauj.com/
|
||||||
Text Domain: mingleforum
|
Text Domain: mingleforum
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
include("wpf_define.php");
|
include("wpf_define.php");
|
||||||
include_once('bbcode.php');
|
include_once('bbcode.php');
|
||||||
|
|
||||||
if(!class_exists('mingleforum')){
|
if(!class_exists('mingleforum')) {
|
||||||
class mingleforum {
|
class mingleforum{
|
||||||
|
|
||||||
var $db_version = 2; //MANAGES DB VERSION
|
var $db_version = 2; //MANAGES DB VERSION
|
||||||
|
|
||||||
@ -21,6 +21,7 @@ class mingleforum {
|
|||||||
add_action("wp_head", array(&$this, "setup_header"));
|
add_action("wp_head", array(&$this, "setup_header"));
|
||||||
add_action("plugins_loaded", array(&$this, "wpf_load_widget"));
|
add_action("plugins_loaded", array(&$this, "wpf_load_widget"));
|
||||||
add_action("wp_footer", array(&$this, "wpf_footer"));
|
add_action("wp_footer", array(&$this, "wpf_footer"));
|
||||||
|
add_filter('wpseo_whitelist_permalink_vars', array($this, 'yoast_seo_whitelist_vars'));
|
||||||
if($this->options['wp_posts_to_forum'])
|
if($this->options['wp_posts_to_forum'])
|
||||||
{
|
{
|
||||||
add_action("add_meta_boxes", array(&$this, "send_wp_posts_to_forum"));
|
add_action("add_meta_boxes", array(&$this, "send_wp_posts_to_forum"));
|
||||||
@ -263,6 +264,12 @@ class mingleforum {
|
|||||||
<input type='hidden' id='wpf_submit' name='wpf_submit' value='1' />";
|
<input type='hidden' id='wpf_submit' name='wpf_submit' value='1' />";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Fix SEO by Yoast conflict
|
||||||
|
public function yoast_seo_whitelist_vars($vars) {
|
||||||
|
$my_vars = array('vforum', 'g', 'viewforum', 'f', 'viewtopic', 't', 'mingleforumaction', 'topic', 'user_id', 'quote', 'thread', 'id', 'action', 'forum', 'markallread', 'getNewForumID', 'delete_topic', 'remove_post', 'forumsubs', 'threadsubs', 'sticky', 'closed', 'move_topic');
|
||||||
|
return array_merge($vars, $my_vars);
|
||||||
|
}
|
||||||
|
|
||||||
function wpf_footer(){
|
function wpf_footer(){
|
||||||
if(is_page($this->get_pageid()))
|
if(is_page($this->get_pageid()))
|
||||||
{
|
{
|
||||||
@ -696,9 +703,9 @@ class mingleforum {
|
|||||||
function showforum($forum_id){
|
function showforum($forum_id){
|
||||||
global $user_ID;
|
global $user_ID;
|
||||||
if(isset($_GET['delete_topic']))
|
if(isset($_GET['delete_topic']))
|
||||||
$this->remove_topic();
|
$this->remove_topic($forum_id);
|
||||||
if(isset($_GET['move_topic']))
|
if(isset($_GET['move_topic']))
|
||||||
$this->move_topic();
|
$this->move_topic($forum_id);
|
||||||
if(!empty($forum_id)){
|
if(!empty($forum_id)){
|
||||||
$out = "";
|
$out = "";
|
||||||
$del = "";
|
$del = "";
|
||||||
@ -964,7 +971,7 @@ class mingleforum {
|
|||||||
{
|
{
|
||||||
if($this->options['forum_use_seo_friendly_urls'])
|
if($this->options['forum_use_seo_friendly_urls'])
|
||||||
{
|
{
|
||||||
if($user_ID && !$this->is_closed() && $this->have_access($this->current_forum, 'post') && $this->have_access($this->current_group, 'post'))
|
if(($user_ID || $this->allow_unreg()) && !$this->is_closed() && $this->have_access($this->current_forum, 'post') && $this->have_access($this->current_group, 'post'))
|
||||||
$o .= "<td nowrap='nowrap'><img src='$this->skin_url/images/buttons/quote.gif' alt='' align='left'><a href='$this->post_reply_link"e=$post_id.$this->curr_page'> ".__("Quote", "mingleforum")."</a></td>";
|
$o .= "<td nowrap='nowrap'><img src='$this->skin_url/images/buttons/quote.gif' alt='' align='left'><a href='$this->post_reply_link"e=$post_id.$this->curr_page'> ".__("Quote", "mingleforum")."</a></td>";
|
||||||
if($this->is_moderator($user_ID, $this->current_forum))
|
if($this->is_moderator($user_ID, $this->current_forum))
|
||||||
$o .= "<td nowrap='nowrap'><img src='$this->skin_url/images/buttons/delete.gif' alt='' align='left'><a onclick=\"return wpf_confirm();\" href='".$this->thread_link.$this->current_thread."&remove_post&id=$post_id'> ".__("Remove", "mingleforum")."</a></td>";
|
$o .= "<td nowrap='nowrap'><img src='$this->skin_url/images/buttons/delete.gif' alt='' align='left'><a onclick=\"return wpf_confirm();\" href='".$this->thread_link.$this->current_thread."&remove_post&id=$post_id'> ".__("Remove", "mingleforum")."</a></td>";
|
||||||
@ -973,7 +980,7 @@ class mingleforum {
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if($user_ID && !$this->is_closed() && $this->have_access($this->current_forum, 'post') && $this->have_access($this->current_group, 'post'))
|
if(($user_ID || $this->allow_unreg()) && !$this->is_closed() && $this->have_access($this->current_forum, 'post') && $this->have_access($this->current_group, 'post'))
|
||||||
$o .= "<td nowrap='nowrap'><img src='$this->skin_url/images/buttons/quote.gif' alt='' align='left'><a href='$this->post_reply_link"e=$post_id.$this->curr_page'> ".__("Quote", "mingleforum")."</a></td>";
|
$o .= "<td nowrap='nowrap'><img src='$this->skin_url/images/buttons/quote.gif' alt='' align='left'><a href='$this->post_reply_link"e=$post_id.$this->curr_page'> ".__("Quote", "mingleforum")."</a></td>";
|
||||||
if($this->is_moderator($user_ID, $this->current_forum))
|
if($this->is_moderator($user_ID, $this->current_forum))
|
||||||
$o .= "<td nowrap='nowrap'><img src='$this->skin_url/images/buttons/delete.gif' alt='' align='left'><a onclick=\"return wpf_confirm();\" href='".$this->get_threadlink($this->current_thread)."&remove_post&id=$post_id'> ".__("Remove", "mingleforum")."</a></td>";
|
$o .= "<td nowrap='nowrap'><img src='$this->skin_url/images/buttons/delete.gif' alt='' align='left'><a onclick=\"return wpf_confirm();\" href='".$this->get_threadlink($this->current_thread)."&remove_post&id=$post_id'> ".__("Remove", "mingleforum")."</a></td>";
|
||||||
@ -2045,10 +2052,10 @@ class mingleforum {
|
|||||||
return "<span class='wpf-pages'>".$out."</span>";
|
return "<span class='wpf-pages'>".$out."</span>";
|
||||||
}
|
}
|
||||||
|
|
||||||
function remove_topic(){
|
function remove_topic($forum_id){
|
||||||
global $user_ID, $wpdb;
|
global $user_ID, $wpdb;
|
||||||
$topic = $_GET['topic'];
|
$topic = $_GET['topic'];
|
||||||
if($this->is_moderator($user_ID, $this->current_forum)){
|
if($this->is_moderator($user_ID, $forum_id)){
|
||||||
$wpdb->query($wpdb->prepare("DELETE FROM {$this->t_posts} WHERE `parent_id` = %d", $topic));
|
$wpdb->query($wpdb->prepare("DELETE FROM {$this->t_posts} WHERE `parent_id` = %d", $topic));
|
||||||
$wpdb->query($wpdb->prepare("DELETE FROM {$this->t_threads} WHERE `id` = %d", $topic));
|
$wpdb->query($wpdb->prepare("DELETE FROM {$this->t_threads} WHERE `id` = %d", $topic));
|
||||||
}else{
|
}else{
|
||||||
@ -2094,12 +2101,12 @@ class mingleforum {
|
|||||||
return $out;
|
return $out;
|
||||||
}
|
}
|
||||||
|
|
||||||
function move_topic(){
|
function move_topic($forum_id){
|
||||||
global $user_ID, $wpdb;
|
global $user_ID, $wpdb;
|
||||||
$topic = $_GET['topic'];
|
$topic = $_GET['topic'];
|
||||||
$newForumID = !empty($_GET['newForumID']) ? (int)$_GET['newForumID'] : 0;
|
$newForumID = !empty($_GET['newForumID']) ? (int)$_GET['newForumID'] : 0;
|
||||||
$newForumID = !empty($_POST['newForumID']) ? (int)$_POST['newForumID'] : $newForumID;
|
$newForumID = !empty($_POST['newForumID']) ? (int)$_POST['newForumID'] : $newForumID;
|
||||||
if($this->is_moderator($user_ID, $this->current_forum)){
|
if($this->is_moderator($user_ID, $forum_id)){
|
||||||
$strSQL = $wpdb->prepare("UPDATE {$this->t_threads} SET `parent_id` = {$newForumID} WHERE id = %d", $topic);
|
$strSQL = $wpdb->prepare("UPDATE {$this->t_threads} SET `parent_id` = {$newForumID} WHERE id = %d", $topic);
|
||||||
$wpdb->query($strSQL);
|
$wpdb->query($strSQL);
|
||||||
@header("location: ".$this->base_url."viewforum&f=".$newForumID);
|
@header("location: ".$this->base_url."viewforum&f=".$newForumID);
|
||||||
|
Loading…
Reference in New Issue
Block a user