[RC1] ReportSystem

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
t8b
Registered User
Posts: 7
Joined: Mon May 28, 2007 2:36 pm

Re: [BETA] ReportSystem

Post by t8b » Wed May 30, 2007 12:20 pm

Hey sorry i posted here before he updated his post, which is as follows:
This file is not designed to be used in admin context. Please report to the original author ($setmodule check ie is not at the appropriate place). This results in including two times common.php (and other files).
ill try take a gander at the code myself later.
IG - Join the fantabolous instinctive gaming community! A Gaming, Gadgets, Technology, lifestyle Magazine / Services and much more! Not only that but special promotions too!

User avatar
Wicher
Registered User
Posts: 1806
Joined: Wed May 07, 2003 10:33 pm
Location: Netherlands or Holland, your choice..
Contact:

Re: [BETA] ReportSystem

Post by Wicher » Wed May 30, 2007 2:34 pm

Try this:

Code: Select all

#
# OPEN
#
admin/admin_reports.php
#
# FIND
#
if (!class_exists('Template'))
{
	require('./pagestart.' . $phpEx);
}
#
# REPLACE WITH
#
if (!function_exists('_backtrace'))
{
	if (!class_exists('Template'))
	{
		require('./pagestart.' . $phpEx);
	}
}

t8b
Registered User
Posts: 7
Joined: Mon May 28, 2007 2:36 pm

Re: [BETA] ReportSystem

Post by t8b » Wed May 30, 2007 4:02 pm

Hey, Had a quick go with that just now and i recieve the following error:
Couldn't obtain banlist information

DEBUG MODE

SQL Error: 1146 Table 'REPORTS_TABLE' doesn't exist

SQL Request: SELECT * FROM REPORTS_TABLE

Line : 46
File : admin_reports.php
and again on line: 120

Deleting those two, gets past the error and i can access the reports admin section (although i get a "Warning: mysql_fetch_array(): 19" its workable)

Tomo ill get onto working the buttons etc in CH and ill let you know.

:)
IG - Join the fantabolous instinctive gaming community! A Gaming, Gadgets, Technology, lifestyle Magazine / Services and much more! Not only that but special promotions too!

User avatar
Wicher
Registered User
Posts: 1806
Joined: Wed May 07, 2003 10:33 pm
Location: Netherlands or Holland, your choice..
Contact:

Re: [BETA] ReportSystem

Post by Wicher » Wed May 30, 2007 4:15 pm

Code: Select all

# 
#-----[ OPEN ]-----------------------------------------
# 
includes/constants.php
#
#-----[ FIND ]------------------------------------------------
#
?>
# 
#-----[ BEFORE, ADD ]-----------------------------------------
#
// BEGIN ReportSystem by Wicher
define('REPORTS_TABLE', $table_prefix.'post_reports');
// END ReportSystem by Wicher
Be reminded that this mod is not designed to work with CH though.
I suspect it will not be easy to get it working properly.

t8b
Registered User
Posts: 7
Joined: Mon May 28, 2007 2:36 pm

Re: [BETA] ReportSystem

Post by t8b » Fri Jun 01, 2007 9:41 am

Hey wicher, just wanted to let you know before i bugger off on holiday; that the admin panel is working fine and ive got the report button to appear, now i just need to figure out how to get it to function as you intended.

file:

includes/class_posts.php:

Code: Select all

	//
		
		if ( $user->auth(POST_FORUM_URL, 'auth_mod', $this->forum_id) )
		{
			$buttons['report'] = array(
				'u' => $config->url('modcp', array('mode' => 'report', POST_POST_URL => $row['post_id'], POST_TOPIC_URL => $this->topic_id, 'sid' => $user->data['session_id']), true),
			'i' => $row['report'] ? $user->img('icon_report') : $user->img('icon_report'),
			'l' => $row['report'] ? $user->lang('report') : $user->lang('report'),	
			
			);
		}
		//
IG - Join the fantabolous instinctive gaming community! A Gaming, Gadgets, Technology, lifestyle Magazine / Services and much more! Not only that but special promotions too!

User avatar
Wicher
Registered User
Posts: 1806
Joined: Wed May 07, 2003 10:33 pm
Location: Netherlands or Holland, your choice..
Contact:

Re: [BETA] ReportSystem

Post by Wicher » Fri Jun 01, 2007 10:50 am

When you have it all figured out, please put it all together in a mod file if you want.

vic2007
Registered User
Posts: 40
Joined: Fri May 04, 2007 1:32 am

Re: [BETA] ReportSystem

Post by vic2007 » Sun Jun 03, 2007 2:22 pm

hello Wicher,

Great MOD - installed smoothly - no probs.

Just a request - most people on my forum are disabled (& a lot of them are blind). How do I add some alt text to the 'Report' button on the viewtopic page ?

Many Thanks,

Vic

User avatar
Wicher
Registered User
Posts: 1806
Joined: Wed May 07, 2003 10:33 pm
Location: Netherlands or Holland, your choice..
Contact:

Re: [BETA] ReportSystem

Post by Wicher » Sun Jun 03, 2007 3:35 pm

Code: Select all

#
# OPEN
#
viewtopic.php
#
# FIND
#
		$report = '<a href="' . $temp_url . '">' . $report_img . '</a>';
#
# REPLACE WITH
#
		$report = '<a href="' . $temp_url . '" alt="Report this message" title="Report this message">' . $report_img . '</a>';
#
# EOalttext
#

vic2007
Registered User
Posts: 40
Joined: Fri May 04, 2007 1:32 am

Re: [BETA] ReportSystem

Post by vic2007 » Sun Jun 03, 2007 3:45 pm

Thanks Wicher for the prompt reply but unfortunately this does not work :cry:

User avatar
Wicher
Registered User
Posts: 1806
Joined: Wed May 07, 2003 10:33 pm
Location: Netherlands or Holland, your choice..
Contact:

Re: [BETA] ReportSystem

Post by Wicher » Sun Jun 03, 2007 6:30 pm

Actually, the should have been allready a alt tooltip at the img, just above the line i told you to look for there is this line:

Code: Select all

		$report_img = '<img src="' . $images['icon_report'] . '" alt="' . $lang['Report_this'] . '" title="' . $lang['Report_this'] . '" border="0" />';
Look in lang_main.php if the lang varaiable $lang['Report_this'] is present.

User avatar
Wicher
Registered User
Posts: 1806
Joined: Wed May 07, 2003 10:33 pm
Location: Netherlands or Holland, your choice..
Contact:

Re: [BETA] ReportSystem

Post by Wicher » Sun Jun 03, 2007 6:36 pm

Stupid me :oops: has forgotten the lang variable $lang['Report_this'] to include.

so do this then:

Code: Select all

open lang_main.php

find:
$lang['ReportSystem_settings'] = 'ReportSystem Settings';

Before, add:
$lang['Report_this'] = 'Report this message';

vic2007
Registered User
Posts: 40
Joined: Fri May 04, 2007 1:32 am

Re: [BETA] ReportSystem

Post by vic2007 » Sun Jun 03, 2007 6:46 pm

Thanks mate

works like a charm.

ta,

vic

User avatar
Wicher
Registered User
Posts: 1806
Joined: Wed May 07, 2003 10:33 pm
Location: Netherlands or Holland, your choice..
Contact:

Re: [BETA] ReportSystem

Post by Wicher » Sun Jun 03, 2007 7:03 pm

ok :D

User avatar
Wicher
Registered User
Posts: 1806
Joined: Wed May 07, 2003 10:33 pm
Location: Netherlands or Holland, your choice..
Contact:

Re: [BETA] ReportSystem

Post by Wicher » Tue Jun 05, 2007 7:08 pm

Updated to 1.0.5

## 2007-06-05 Version 1.0.5
## New reports link in header now goes directly to the reports page in acp.

User avatar
Wicher
Registered User
Posts: 1806
Joined: Wed May 07, 2003 10:33 pm
Location: Netherlands or Holland, your choice..
Contact:

Re: [BETA] ReportSystem

Post by Wicher » Fri Jun 08, 2007 9:11 pm

In previous version an file called index.php has slipped into the zip which did not belong there.
If you have copied that index.php to the root of your forum files, you probably need to put your backup index.php back you made before you installed reportsystem 1.0.5.


## 2007-06-05 Version 1.0.6
## 'New reports link'. in header did not go directly to the admin/reports page
## when there was no admin session,
## Fixed some security issues

Post Reply

Return to “[2.0.x] MODs in Development”