[2.0.7] Disable Censors Per Forum

The cleanup is complete. This forum is now read only.

Rating:

Excellent!
5
63%
Very Good
0
No votes
Good
0
No votes
Fair
1
13%
Poor
2
25%
 
Total votes: 8

luvz2drv
Registered User
Posts: 47
Joined: Mon Nov 21, 2005 5:31 am

RESOLVED - no left in admin panel

Post by luvz2drv » Thu Dec 21, 2006 2:54 am

I have resolved the no left in the admin panel

it is not a simple solution but one that works.

PM me for details

may need custom fix on other installs

User avatar
Seria
Registered User
Posts: 137
Joined: Thu Dec 14, 2006 8:14 am
Location: out havin’ fun

Post by Seria » Sun Jan 28, 2007 6:49 pm

Update: This mod is functional on 2.0.22
I installed it on 2.0.21 then upgraded.
(I upgraded manually.)

happy forum-ing ^_^
¿What do you call it when a blond dies her hair brunette?
Artificial intelligence ^_~ ...yes, im blond :P

I will offer as much help I can on mods that I have installed, just PM me. (i don't use easymod, so I can't help with that.)
Mods installed so far:48 {all manually and on 2.0.22}

mnp13
Registered User
Posts: 268
Joined: Fri Jan 06, 2006 11:48 pm
Contact:

Post by mnp13 » Tue Feb 20, 2007 12:53 am

The only place I could find (line 50):

Code: Select all

 f.auth_attachments
Is twice in this section of code:

Code: Select all

$count_sql = (!$post_id) ? '' : ", COUNT(p2.post_id) AS prev_posts";

$order_sql = (!$post_id) ? '' : "GROUP BY p.post_id, t.topic_id, t.topic_title, t.topic_status, t.topic_replies, t.topic_time, t.topic_type, t.topic_vote, t.topic_last_post_id, f.forum_name, f.forum_status, f.forum_id, f.auth_view, f.auth_read, f.auth_post, f.auth_reply, f.auth_edit, f.auth_delete, f.auth_sticky, f.auth_announce, f.auth_pollcreate, f.auth_vote, f.auth_attachments ORDER BY p.post_id ASC";

$sql = "SELECT t.topic_id, t.topic_title, t.topic_status, t.topic_replies, t.topic_time, t.topic_type, t.topic_vote, t.topic_last_post_id, f.forum_name, f.forum_status, f.forum_id, f.auth_view, f.auth_read, f.auth_post, f.auth_reply, f.auth_edit, f.auth_delete, f.auth_sticky, f.auth_announce, f.auth_pollcreate, f.auth_vote, f.auth_attachments" . $count_sql . "
	FROM " . TOPICS_TABLE . " t, " . FORUMS_TABLE . " f" . $join_sql_table . "
	WHERE $join_sql
		AND f.forum_id = t.forum_id
		$order_sql";
What do I do?
Michelle

patooyee
Registered User
Posts: 2
Joined: Mon Mar 05, 2007 7:34 pm

Post by patooyee » Mon Mar 05, 2007 8:37 pm

I get this error when trying to easyMod:


Critical Error

FIND FAILED: In file [viewtopic.php] could not find:

$order_sql = ( empty($post_id) ) ? '' : "GROUP BY p.post_id

MOD script line #50 :: FAQ :: Report


I'm stupid when it comes to writing code. Help please!

J. J.

User avatar
chocopi
Registered User
Posts: 18
Joined: Mon Sep 04, 2006 1:06 pm

Re: [2.0.7] Disable Censors Per Forum

Post by chocopi » Thu May 03, 2007 7:20 pm

i was wondering if it would be possible to get this to work when viewing users posts. The words are still censored when you view users posts even if it was in an uncensored forum.

I had a stab at doing this myself but had no such luck

any help would be greatly appreciated !

cwallace
Registered User
Posts: 523
Joined: Tue Dec 14, 2004 4:26 am
Location: Fort Wayne, Indiana
Contact:

Re: RESOLVED - no left in admin panel

Post by cwallace » Fri Jun 15, 2007 4:10 am

luvz2drv wrote:I have resolved the no left in the admin panel

it is not a simple solution but one that works.

PM me for details

may need custom fix on other installs

Could you please post the fix publicly?

Would be nice to know...

Chris
http://www.FortWayneMusic.com - Your source for the best in local music and entertainment.

Ozzie Gal
Registered User
Posts: 28
Joined: Tue Mar 06, 2007 2:55 pm
Location: NSW. AUSTRALIA
Name: Ros
Contact:

Re: [2.0.7] Disable Censors Per Forum

Post by Ozzie Gal » Fri Jun 15, 2007 6:36 am

Yes I agree, could someone please post the fix so others who download it may also be able to rectify this problem.

Thankyou in advance

Ros
Communication is the key to success in all things that life endeavours...

cwallace
Registered User
Posts: 523
Joined: Tue Dec 14, 2004 4:26 am
Location: Fort Wayne, Indiana
Contact:

Re: [2.0.7] Disable Censors Per Forum

Post by cwallace » Fri Jun 15, 2007 2:37 pm

I am having the same issue in another MOD so if I find the solution there and it looks like it might be the same here I will gladly post it publicly. As, to my knowledge, this forums is here for.

Chris
http://www.FortWayneMusic.com - Your source for the best in local music and entertainment.

User avatar
Seria
Registered User
Posts: 137
Joined: Thu Dec 14, 2006 8:14 am
Location: out havin’ fun

Re: [2.0.7] Disable Censors Per Forum

Post by Seria » Sat Jun 16, 2007 4:51 am

its been a while since I fixed this mod, I just need to look in to it for a sec to remember, i'll do my best to have an answer by sunday night at the latest

^_^
~Seria
¿What do you call it when a blond dies her hair brunette?
Artificial intelligence ^_~ ...yes, im blond :P

I will offer as much help I can on mods that I have installed, just PM me. (i don't use easymod, so I can't help with that.)
Mods installed so far:48 {all manually and on 2.0.22}

cwallace
Registered User
Posts: 523
Joined: Tue Dec 14, 2004 4:26 am
Location: Fort Wayne, Indiana
Contact:

Re: [2.0.7] Disable Censors Per Forum

Post by cwallace » Sat Jun 16, 2007 5:30 am

It is actually when you put the 'admin_forum_censors.php' file in place...THAT is the file that kills the side bar.

Everything else seems to work fine...well I mean they don't kill anything visible. :)

Chris
http://www.FortWayneMusic.com - Your source for the best in local music and entertainment.

cwallace
Registered User
Posts: 523
Joined: Tue Dec 14, 2004 4:26 am
Location: Fort Wayne, Indiana
Contact:

Re: [2.0.7] Disable Censors Per Forum

Post by cwallace » Sat Jun 16, 2007 5:32 am

Somewhere in here:

Code: Select all

<?php
// admin_forum_censors.php
// Part of the Forum Censor MOD for phpBB
// version 1.0.0

define('IN_PHPBB', 1);

if( !empty($setmodules) )
{
	$file = basename(__FILE__);
	$module['Forums']['Forum_Censor_Control'] = $file;
	return;
}

//
// Load default header
//

$phpbb_root_path = "./../";
require($phpbb_root_path . 'extension.inc');
require('./pagestart.' . $phpEx);

//
// Mode setting
//
if( isset($HTTP_POST_VARS['mode']) || isset($HTTP_GET_VARS['mode']) )
{
	$mode = ( isset($HTTP_POST_VARS['mode']) ) ? $HTTP_POST_VARS['mode'] : $HTTP_GET_VARS['mode'];
}
else
{
	$mode = "";
}

//Functions

function get_info($mode, $id)
{
	global $db;

	switch($mode)
	{
		case 'category':
			$table = CATEGORIES_TABLE;
			$idfield = 'cat_id';
			$namefield = 'cat_title';
			break;

		case 'forum':
			$table = FORUMS_TABLE;
			$idfield = 'forum_id';
			$namefield = 'forum_name';
			$censorstatus = 'forum_disablecensors';
			break;

		default:
			message_die(GENERAL_ERROR, "Wrong mode for generating select list", "", __LINE__, __FILE__);
			break;
	}
	$sql = "SELECT count(*) as total
		FROM $table";
	if( !$result = $db->sql_query($sql) )
	{
		message_die(GENERAL_ERROR, "Couldn't get Forum/Category information", "", __LINE__, __FILE__, $sql);
	}
	$count = $db->sql_fetchrow($result);
	$count = $count['total'];

	$sql = "SELECT *
		FROM $table
		WHERE $idfield = $id"; 

	if( !$result = $db->sql_query($sql) )
	{
		message_die(GENERAL_ERROR, "Couldn't get Forum/Category information", "", __LINE__, __FILE__, $sql);
	}

	if( $db->sql_numrows($result) != 1 )
	{
		message_die(GENERAL_ERROR, "Forum/Category doesn't exist or multiple forums/categories with ID $id", "", __LINE__, __FILE__);
	}

	$return = $db->sql_fetchrow($result);
	$return['number'] = $count;
	return $return;
}

if( !empty($mode) ) 
{
	switch($mode)
	{
		case 'censorenable':
			$forum_id = intval($HTTP_GET_VARS[POST_FORUM_URL]);
			$sql = "UPDATE " . FORUMS_TABLE . "
				SET forum_disablecensors = 0
				WHERE forum_id = $forum_id";
			if( !$result = $db->sql_query($sql) )
			{
				message_die(GENERAL_ERROR, "Couldn't change category order", "", __LINE__, __FILE__, $sql);
			}
			$show_index = TRUE;
		break;

		case 'censordisable':
			$forum_id = intval($HTTP_GET_VARS[POST_FORUM_URL]);
			$sql = "UPDATE " . FORUMS_TABLE . "
				SET forum_disablecensors = 1
				WHERE forum_id = $forum_id";
			if( !$result = $db->sql_query($sql) )
			{
				message_die(GENERAL_ERROR, "Couldn't change category order", "", __LINE__, __FILE__, $sql);
			}
			$show_index = TRUE;
		break;
	}
	if ($show_index != TRUE)
	{
		include('./page_footer_admin.'.$phpEx);
		exit;
	}
}


//
// Generate page
//

$template->set_filenames(array(
	'body' => 'admin/forum_censors.tpl')
);

$template->assign_vars(array(
	'L_TITLE' => $lang['forumcensors_title'],
	'L_DESCRIPTION' => $lang['forumcensors_decription'],
	'L_FILTER_STATUS' => $lang['forumcensors_filter_status'],
	'L_CHANGE' => $lang['forumcensors_change_status'],
	'L_ENABLE' => $lang['forumcensors_change_enable'],
	'L_DISABLE' => $lang['forumcensors_change_disable']

) );


$sql = "SELECT cat_id, cat_title, cat_order
	FROM " . CATEGORIES_TABLE . "
	ORDER BY cat_order";
if( !$q_categories = $db->sql_query($sql) )
{
	message_die(GENERAL_ERROR, "Could not query categories list", "", __LINE__, __FILE__, $sql);
}

if( $total_categories = $db->sql_numrows($q_categories) )
{
	$category_rows = $db->sql_fetchrowset($q_categories);

	$sql = "SELECT *
		FROM " . FORUMS_TABLE . "
		ORDER BY cat_id, forum_order";
	if(!$q_forums = $db->sql_query($sql))
	{
		message_die(GENERAL_ERROR, "Could not query forums information", "", __LINE__, __FILE__, $sql);
	}

	if( $total_forums = $db->sql_numrows($q_forums) )
	{
		$forum_rows = $db->sql_fetchrowset($q_forums);
	}

	//
	// Okay, let's build the index
	//
	$gen_cat = array();

	for($i = 0; $i < $total_categories; $i++)
	{
		$cat_id = $category_rows[$i]['cat_id'];

		$template->assign_block_vars("catrow", array( 
			'S_ADD_FORUM_SUBMIT' => "addforum[$cat_id]", 
			'S_ADD_FORUM_NAME' => "forumname[$cat_id]", 

			'CAT_ID' => $cat_id,
			'CAT_DESC' => $category_rows[$i]['cat_title'],

			'U_VIEWCAT' => append_sid($phpbb_root_path."index.$phpEx?" . POST_CAT_URL . "=$cat_id"))
		);

		for($j = 0; $j < $total_forums; $j++)
		{
			$forum_id = $forum_rows[$j]['forum_id'];
			
			if ($forum_rows[$j]['cat_id'] == $cat_id)
			{

				if ($forum_rows[$j]['forum_disablecensors']==0){
					$status = $lang['forumcensors_status_enabled'];
				}else{
					$status = $lang['forumcensors_status_disabled'];
				}
				$template->assign_block_vars("catrow.forumrow",	array(
					'FORUM_NAME' => $forum_rows[$j]['forum_name'],
					'FORUM_DESC' => $forum_rows[$j]['forum_desc'],
					'ROW_COLOR' => $row_color,
					'I_STATUS' => $status,

					'U_VIEWFORUM' => append_sid($phpbb_root_path."viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id"),
					'U_ENABLE' => append_sid("admin_forum_censors.$phpEx?mode=censorenable&" . POST_FORUM_URL . "=$forum_id"),
					'U_DISABLE' => append_sid("admin_forum_censors.$phpEx?mode=censordisable&" . POST_FORUM_URL . "=$forum_id"))
				);

			}// if ... forumid == catid
			
		} // for ... forums

	} // for ... categories

}// if ... total_categories

$template->pparse("body");

include('./page_footer_admin.'.$phpEx);

?>

:)

Chris
http://www.FortWayneMusic.com - Your source for the best in local music and entertainment.

cwallace
Registered User
Posts: 523
Joined: Tue Dec 14, 2004 4:26 am
Location: Fort Wayne, Indiana
Contact:

Re: [2.0.7] Disable Censors Per Forum

Post by cwallace » Sat Jun 16, 2007 5:48 am

I should point out that is NOT an edited file...it is an INCLUDED file...came with the MOD packet...

Chris
http://www.FortWayneMusic.com - Your source for the best in local music and entertainment.

cwallace
Registered User
Posts: 523
Joined: Tue Dec 14, 2004 4:26 am
Location: Fort Wayne, Indiana
Contact:

Re: [2.0.7] Disable Censors Per Forum

Post by cwallace » Sun Jun 17, 2007 1:36 am

The MOD itself DOES in fact work as it is...

I, as someone else here has done, renamed the file and point at it directly with my browser with the NEW name.

So I have that workaround, but it is not at all fun to do...

SOOOO...once we can get that side panel blankness figured out we are in business...

LOVE the MOD...I censor our boards, but I have a V.I.P. Lounge for the staff that I disabled so they can cuss at/about users in private to let out their aggression...lol.

Chris
http://www.FortWayneMusic.com - Your source for the best in local music and entertainment.

cwallace
Registered User
Posts: 523
Joined: Tue Dec 14, 2004 4:26 am
Location: Fort Wayne, Indiana
Contact:

Re: [2.0.7] Disable Censors Per Forum

Post by cwallace » Tue Jun 19, 2007 4:03 am

Was hoping there would be a solution to this 'by Sunday night' ;) Any progress?

Thanks,
Chris
http://www.FortWayneMusic.com - Your source for the best in local music and entertainment.

cwallace
Registered User
Posts: 523
Joined: Tue Dec 14, 2004 4:26 am
Location: Fort Wayne, Indiana
Contact:

Re: [2.0.7] Disable Censors Per Forum

Post by cwallace » Sat Jun 23, 2007 3:01 pm

So I take it there is no actual fix for this? <sigh> Such a great MOD...I guess I will have to leave it broken and do the 'ghetto' approach when using it...

Thanks anyways..
Chris
http://www.FortWayneMusic.com - Your source for the best in local music and entertainment.

Post Reply

Return to “[2.0.x] MOD Database Cleanup”

Who is online

Users browsing this forum: No registered users and 11 guests