[2.0.17] Report Posts

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in here. No new MODs will be accepted into the MOD Database for phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.

Rating:

Excellent!
50
62%
Very Good
16
20%
Good
7
9%
Fair
2
2%
Poor
6
7%
 
Total votes: 81

User avatar
RATT
Registered User
Posts: 734
Joined: Fri Aug 19, 2005 6:27 am

Re: Tried to install with EasyMOD

Post by RATT »

NappilyEvahAftah wrote: Image

I got this "critical error" and the MOD didn't install. What is it looking for? How do I supply the file?

Also, please explain it so a non-techie can understand it.

Thanks a bunch!


That means easymod doesnt recognize that code for it to find, if you will open language/lang_english/lang_main.php and look towards the bottom of your file you will see that code its looking for, easymod for some reason doesnt always detect that line of code.

You may want to edit that part manually.The correct string at the bottom it should be looking for is this

Code: Select all

//
// That's all, Folks!
// -------------------------------------------------


If you add it manually it will look like this

Code: Select all


/*******************
** MOD: Report Posts
*******************/
// BEGIN : BEFORE, ADD
$lang['Post_reports_none_cp'] = 'There aren\'t any open Reported Posts';
$lang['Post_reports_one_cp'] = 'There is %s open Reported Post';
$lang['Post_reports_many_cp'] = 'There are %s open Reported Posts';

$lang['All'] = 'All';
$lang['Display'] = 'Display only';
$lang['Report_post'] = 'Report Post';

$lang['Reporter'] = 'Reporter';
$lang['Status'] = 'Status';
$lang['Select_one'] = 'Select One';

$lang['Opt_in'] = 'Opt in to receive emails when a report is submitted';
$lang['Opt_out'] = 'Opt out so you don\'t receive emails when a report is submitted';

$lang['Post_reported'] = 'Post report submitted successfully.';
$lang['Close_success'] = 'Reports were Opened/Closed successfully.';
$lang['Opt_success'] = 'You have opt out/in successfully.';

$lang['Delete_success'] = 'Reports were deleted successfully.';
$lang['Click_return_reports'] = 'Click %shere%s to return to the Report Posts control panel.';
$lang['Report_email'] = 'Send Email when Post Reported';

$lang['Post_already_reported'] = 'This post has already been reported.';

$lang['Report_not_selected'] = 'You haven\'t selected any reports.';

$lang['Comments'] = 'Comments';
$lang['Last_action_comments'] = 'Comments from Moderators';
$lang['Last_action_comments_explain'] = 'Please write some comments about your action on this specific report';
$lang['Comments_explain'] = 'Please write some comments about your report on this specific post.';

$lang['Action'] = 'Action';
$lang['Report_comment'] = 'Comments regarding your action';
$lang['Previous_comments'] = 'Previous comments';

$lang['Last_action_checkbox'] = 'This action was done through the checkbox and drop down menu.';

$lang['Opened_by_user_on_date'] = 'Opened by %s on %s';
$lang['Closed_by_user_on_date'] = 'Closed by %s on %s';
$lang['Opened'] = 'Open';
$lang['Closed'] = 'Closed';
$lang['Open'] = 'Open';
$lang['Close'] = 'Close';

$lang['Non_existent_posts'] = 'Found and deleted %s leftover report(s) pointing to non-existent (deleted) posts';
// END : BEFORE, ADD

//
// That's all, Folks!
// -------------------------------------------------

?>
User avatar
NappilyEvahAftah
Registered User
Posts: 94
Joined: Wed Apr 12, 2006 1:24 am
Location: Michigan
Contact:

Okay....

Post by NappilyEvahAftah »

It's looking for code. The MOD didn't install. So I gotta ADD the code, because it's not there? Or, I gotta help EasyMOD find the code?

Is the file located in my standard PHP files? So, I can go to my FTP file manager, look for the file, and ADD the line at the bottom? Or what?

Do I go modify the file, and then attempt a reinstall? Sorry, but again, I don't know a lot about coding, and it's difficult for me to understand, sometimes.

Please give me a step-by-step breakdown. Meaning, say, "Go here and do this." "Then go here and do this". I'm assuming I need to fix the code, and then attempt a reinstall.

Thanks for your help. I really, really appreciate it. One day, I'll be a "code specialist" :wink:
User avatar
RATT
Registered User
Posts: 734
Joined: Fri Aug 19, 2005 6:27 am

Post by RATT »

sure No problem..ok first off
Try to edit the install.txt file to tell easymod to look for this

Code: Select all

//
// That's all, Folks!
// -------------------------------------------------
If it wont find that for you, do this
Go to; language/lang_english/lang_main.php
around line 1020 and 1023 if this is a non-modded board, if its been modded it may be a little higher in numbers.

Look for that code i just said, before the very first // copy and paste this code
there

Code: Select all

/*******************
** MOD: Report Posts
*******************/
// BEGIN : BEFORE, ADD
$lang['Post_reports_none_cp'] = 'There aren\'t any open Reported Posts';
$lang['Post_reports_one_cp'] = 'There is %s open Reported Post';
$lang['Post_reports_many_cp'] = 'There are %s open Reported Posts';

$lang['All'] = 'All';
$lang['Display'] = 'Display only';
$lang['Report_post'] = 'Report Post';

$lang['Reporter'] = 'Reporter';
$lang['Status'] = 'Status';
$lang['Select_one'] = 'Select One';

$lang['Opt_in'] = 'Opt in to receive emails when a report is submitted';
$lang['Opt_out'] = 'Opt out so you don\'t receive emails when a report is submitted';

$lang['Post_reported'] = 'Post report submitted successfully.';
$lang['Close_success'] = 'Reports were Opened/Closed successfully.';
$lang['Opt_success'] = 'You have opt out/in successfully.';
$lang['Delete_success'] = 'Reports were deleted successfully.';
$lang['Click_return_reports'] = 'Click %shere%s to return to the Report Posts control panel.';
$lang['Report_email'] = 'Send Email when Post Reported';

$lang['Post_already_reported'] = 'This post has already been reported.';

$lang['Report_not_selected'] = 'You haven\'t selected any reports.';

$lang['Comments'] = 'Comments';
$lang['Last_action_comments'] = 'Comments from Moderators';
$lang['Last_action_comments_explain'] = 'Please write some comments about your action on this specific report';
$lang['Comments_explain'] = 'Please write some comments about your report on this specific post.';

$lang['Action'] = 'Action';
$lang['Report_comment'] = 'Comments regarding your action';
$lang['Previous_comments'] = 'Previous comments';

$lang['Last_action_checkbox'] = 'This action was done through the checkbox and drop down menu.';

$lang['Opened_by_user_on_date'] = 'Opened by %s on %s';
$lang['Closed_by_user_on_date'] = 'Closed by %s on %s';
$lang['Opened'] = 'Open';
$lang['Closed'] = 'Closed';
$lang['Open'] = 'Open';
$lang['Close'] = 'Close';

$lang['Non_existent_posts'] = 'Found and deleted %s leftover report(s) pointing to non-existent (deleted) posts';
// END : BEFORE, ADD
Lines 395 to 446 of the mod code and then comment out that part of the mod install.tx file or remove that part of the install.txt file (your choice) and reinstall the mod with easymod again.Be sure to backup all files and your database before modding any part of your files.
User avatar
NappilyEvahAftah
Registered User
Posts: 94
Joined: Wed Apr 12, 2006 1:24 am
Location: Michigan
Contact:

That's okay

Post by NappilyEvahAftah »

I'm not getting this. Sorry. I'll just leave it alone.
oldcqr
Registered User
Posts: 18
Joined: Sat Jan 28, 2006 9:25 pm

Post by oldcqr »

I'm not sure if this is because of 2.0.21, of if I (or anyone else) had not found this yet.

I'm getting an SQL error:

Code: Select all

Could not insert/update private message sent text.

DEBUG MODE

INSERT INTO phpbb_privmsgs_text (privmsgs_text_id, privmsgs_bbcode_uid, privmsgs_text) VALUES (3341, 'e7e02a1f2a', 'Hello Oldcqr, \n On Thu Jun 08, 2006 1:51 pm, you submitted a report about a post in topic [url=http://www.theetcc.net/main/forums/viewtopic.php?p=9169#9169]Jabberjawographicsnorkasaurus's want list[/url], made by JJawographicsnorkasaurus.\n We would like to inform you that the following actions were taken:\n [b:e7e02a1f2a]Actions:[/b:e7e02a1f2a] Post deleted [b:e7e02a1f2a]Comments:[/b:e7e02a1f2a] You are not allowed to bump a want list more than once a week.')

Line : 844
File : functions_report.php
It looks like the ' from the title of the original message is not being escaped properly (I think):
Jabberjawographicsnorkasaurus's want list

should be:
Jabberjawographicsnorkasaurus\'s want list

or possibly:
Jabberjawographicsnorkasaurus''s want list

Update 1:
I'm looking at the comments in functions_report.php right now just above that line. They say:

Code: Select all

	// we use str_replace("'", "''", $privmsg_subject) instead of str_replace("\'", "''", $privmsg_subject)
	// because we don't get input from an html form
However, the code is actually using this:

Code: Select all

VALUES ($privmsg_sent_id, '" . $bbcode_uid . "', '" . str_replace("\'", "''", $privmsg_message) . "')";
Either the comment or the code is wrong.

Update 2:
I changed the code to:

Code: Select all

VALUES ($privmsg_sent_id, '" . $bbcode_uid . "', '" . str_replace("'", "''", $privmsg_message) . "')";
The error went away, and it appears to be working. It looks like the code is wrong.
Last edited by oldcqr on Thu Jun 08, 2006 6:57 pm, edited 1 time in total.
de$ert
Registered User
Posts: 57
Joined: Fri Mar 17, 2006 10:56 pm
Contact:

Post by de$ert »

gives a demo or screens? :)
User avatar
NappilyEvahAftah
Registered User
Posts: 94
Joined: Wed Apr 12, 2006 1:24 am
Location: Michigan
Contact:

My language file

Post by NappilyEvahAftah »

Image

This is what's at the end of my language file. There is no // That's All Folks!
anything. So, I just add that at the end? This is what's making this frustrating. I'm looking for stuff that's not there.
chatasos
Registered User
Posts: 748
Joined: Wed May 15, 2002 1:16 pm
Location: Paralia

Post by chatasos »

oldcqr wrote: I'm not sure if this is because of 2.0.21, of if I (or anyone else) had not found this yet.

I'm getting an SQL error:

Code: Select all

Could not insert/update private message sent text.

DEBUG MODE

INSERT INTO phpbb_privmsgs_text (privmsgs_text_id, privmsgs_bbcode_uid, privmsgs_text) VALUES (3341, 'e7e02a1f2a', 'Hello Oldcqr, \n On Thu Jun 08, 2006 1:51 pm, you submitted a report about a post in topic [url=http://www.theetcc.net/main/forums/viewtopic.php?p=9169#9169]Jabberjawographicsnorkasaurus's want list[/url], made by JJawographicsnorkasaurus.\n We would like to inform you that the following actions were taken:\n [b:e7e02a1f2a]Actions:[/b:e7e02a1f2a] Post deleted [b:e7e02a1f2a]Comments:[/b:e7e02a1f2a] You are not allowed to bump a want list more than once a week.')

Line : 844
File : functions_report.php
It looks like the ' from the title of the original message is not being escaped properly (I think):
Jabberjawographicsnorkasaurus's want list

should be:
Jabberjawographicsnorkasaurus\'s want list

or possibly:
Jabberjawographicsnorkasaurus''s want list

Update 1:
I'm looking at the comments in functions_report.php right now just above that line. They say:

Code: Select all

	// we use str_replace("'", "''", $privmsg_subject) instead of str_replace("\'", "''", $privmsg_subject)
	// because we don't get input from an html form
However, the code is actually using this:

Code: Select all

VALUES ($privmsg_sent_id, '" . $bbcode_uid . "', '" . str_replace("\'", "''", $privmsg_message) . "')";
Either the comment or the code is wrong.

Update 2:
I changed the code to:

Code: Select all

VALUES ($privmsg_sent_id, '" . $bbcode_uid . "', '" . str_replace("'", "''", $privmsg_message) . "')";
The error went away, and it appears to be working. It looks like the code is wrong.


oldcqr, this is from the beta version (2.1.5) which is discussed here:
http://www.phpbb.com/phpBB/viewtopic.php?t=319049

Report Posts 1.2.3c (MODDB) - Report Posts 2.1.5 (ALPHA)
Rebuild Search 2.4.0 (MODDB)
MOD Version Checker 1.2.0 (MODDB)
Mega Mail System 0.9.8 (ALPHA)
Pagination Select List & Input Box (MODDB)
oldcqr
Registered User
Posts: 18
Joined: Sat Jan 28, 2006 9:25 pm

Post by oldcqr »

chatasos wrote: oldcqr, this is from the beta version (2.1.5) which is discussed here:
http://www.phpbb.com/phpBB/viewtopic.php?t=319049


Ok, now I'm embarrassed :oops:

I DL'ed both versions a month ago, and figured "I'll stick with the 'production' version". I then installed the beta one. Oops :?

I'll have to dig thru that thread again (I know I read the whole thing once) and see if there are any other probs I need to fix.

Thanks!
MarioKnight
Registered User
Posts: 20
Joined: Fri Sep 10, 2004 11:42 pm
Location: Oswego, NY
Contact:

Post by MarioKnight »

chatasos wrote: MarioKnight & 3dhue, this error isn't from this mod....
There is no "report.php" file included in it. :wink:


*opens mouth and inserts foot* ^^;;;;

I am very sorry for that whole post then. I've had a report post MOD installed for a few years on my board and it just started acting up like I described. I thought I got it from the database here and searched and found this thread, and since the last post in it at the time was the same error I got, I had a mindset that this was the MOD I had installed and waited for a response to that post here. How that I've seen your post that I quoted and downloaded your MOD, I see that yours is not the one I have installed. ^^;;;

Once again, I apologize for that, and will probably start to use your MOD instead of the one I have since it has more features than my current one.
Dan Bednarski ~ MarioKnight
My mods: Change forum banner
amir abbas
Registered User
Posts: 113
Joined: Fri Mar 31, 2006 2:26 pm
Contact:

Post by amir abbas »

hello

i tried to install this mod

in viewtopic.php file i serched for this part

Code: Select all

if( $userdata['session_logged_in'] )
{
i must add this part of code after that line

Code: Select all

/*******************
	** MOD: Report Posts
	*******************/
	// BEGIN : AFTER, ADD
	if ( isset($HTTP_GET_VARS['report']) || isset($HTTP_POST_VARS['report']) )
	{
		include($phpbb_root_path . 'includes/functions_report.'.$phpEx);

		// check if the post has already been reported
		if ( report_exists($post_id) )
		{
			$template->assign_vars(array(
				'META' => '<meta http-equiv="refresh" content="3;url=' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=$post_id#$post_id") . '">')
			);
			
			$message = $lang['Post_already_reported'] . '<br /><br />' . sprintf($lang['Click_return_topic'], '<a href="' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=$post_id#$post_id") . '">', '</a>');
			message_die(GENERAL_MESSAGE, $message);
		}

		$comments = ( !empty($HTTP_POST_VARS['comments']) ) ? htmlspecialchars(trim($HTTP_POST_VARS['comments'])) : '';

		if ( empty($comments) )
		{
			// show form to add comments about topic
			$page_title = $lang['Report_post'] . ' - ' . $topic_title;
			include($phpbb_root_path . 'includes/page_header.'.$phpEx);

			$template->set_filenames(array(
				'report_post' => 'report_post.tpl')
			);

			$template->assign_vars(array(
				'TOPIC_TITLE'	=> $topic_title,
				'POST_ID'		=> $post_id,
				'U_VIEW_TOPIC'	=> append_sid($phpbb_root_path . 'viewtopic.'.$phpEx.'?' . POST_TOPIC_URL . '=' . $topic_id),

				'L_REPORT_POST'	=> $lang['Report_post'],
				'L_COMMENTS'	=> $lang['Comments'],
				'L_COMMENTS_EXPLAIN'	=> $lang['Comments_explain'],

				'L_SUBMIT'		=> $lang['Submit'],

				'S_ACTION'		=> append_sid($phpbb_root_path . 'viewtopic.'.$phpEx.'?report=true&' . POST_POST_URL . '=' . $post_id))
			);

			$template->pparse('report_post');

			include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
			exit;
		}
		else
		{
			if ( !report_flood() )
			{
				message_die(GENERAL_MESSAGE, $lang['Flood_Error']);
			}
			
			// insert the report
			insert_report($post_id, $comments);

			// email the report if need to
			if ( $board_config['report_email'] )
			{
				email_report($forum_id, $post_id, $topic_title, $comments);
			}
	
			$template->assign_vars(array(
				'META' => '<meta http-equiv="refresh" content="3;url=' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=$post_id#$post_id") . '">')
			);
			$message = $lang['Post_reported'] . '<br /><br />' . sprintf($lang['Click_return_topic'], '<a href="' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=$post_id#$post_id") . '">', '</a>');
			message_die(GENERAL_MESSAGE, $message);
		}
	}
	// END : AFTER, ADD
but there is two line of this part

Code: Select all

if( $userdata['session_logged_in'] )
{
i get confused
:?
User avatar
igorw
Former Team Member
Posts: 8024
Joined: Fri Dec 16, 2005 12:23 pm
Location: {postrow.POSTER_FROM}
Name: Igor Wiedler

Post by igorw »

You have to use the first one, that you find after following all the instructions :)
Igor Wiedler | area51 | GitHub | trashbin | Formerly known as evil less than three
amir abbas
Registered User
Posts: 113
Joined: Fri Mar 31, 2006 2:26 pm
Contact:

Post by amir abbas »

thanks eviL<3 :wink:
mannyotr
Registered User
Posts: 54
Joined: Wed Dec 07, 2005 2:21 pm

Post by mannyotr »

Thank you!!!

I just installed it on 2.0.21 using ezmod on a forum with about 15-20 other mods installed. It worked like a charm! Not a single problem.

Thanks again for a great and needed mod.

Manny
JustKia
Registered User
Posts: 145
Joined: Sat Mar 19, 2005 9:30 pm
Location: Warwickshire UK
Contact:

Post by JustKia »

I've got just one little problem with this mod.
I don't actually get a list of reports.
I get the header and the drop down boxes but no list of the reported posts, unlike the screen shot shown.
*yes I did report several posts for testing purposes*
Image

the link at the bottom of the index says "2 open reports" but when I click that link I get this
Image

I have:
phpBB 2.0.21
CH 2.1.4e
mods:
ranks by template
easymod
smiley catergories
Post Reply

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