[BETA] Warnings and Contests MOD

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.
Eroyo
Registered User
Posts: 12
Joined: Fri Sep 08, 2006 11:31 am

[BETA] Warnings and Contests MOD

Post by Eroyo »

Warnings and Contests MOD

Version 0.1.2

Last update 09.11.2006
Added: missing SQL statement, comma fix in index.php

Description
Allows users to mark posts for moderation, from this point the post can be modded as usual but gives the option of issuing a warning. The user can see his/her warning(s) in their profile (as can mods and admins). If they think the warning has been issued unfairly it can be contested, when an admin logs in, a message on the index lists all the warnings being contested. From this point it can be overturned or upheld. This MOD is cosmetically, partly based on the new warnings system for phpBB3.

Download http://ausxphp.pe.funpic.org/mods/repor ... ntests.zip

Screenshots
http://ausxphp.pe.funpic.org/imgs/icons.gif
Report, warn and ban icons -- note these icons may not be final, if anyone can produce some better ones I'd be grateful.

http://ausxphp.pe.funpic.org/imgs/warnings2.png
A user who has been issued with 1 warning.

http://ausxphp.pe.funpic.org/imgs/report.gif
Report / warn page

http://ausxphp.pe.funpic.org/imgs/contest01.png
A users warning in their profile

http://ausxphp.pe.funpic.org/imgs/contest02.png
Contested, admin is informed

http://ausxphp.pe.funpic.org/imgs/contest03.png
What the admin sees when they get to it

There's probably more then a few things people can see that needs ironing out. If anyone has any suggestions for add-ons let me know :)
Last edited by Eroyo on Thu Nov 09, 2006 10:57 am, edited 7 times in total.
User avatar
3Di
Former Team Member
Posts: 16156
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milano 🇮🇹 Frankfurt 🇩🇪
Name: Marco
Contact:

Post by 3Di »

A kinda new Yellow Card MOD.. seems cool. Not tested though.

Greets
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
User avatar
Roks
Registered User
Posts: 119
Joined: Thu Sep 14, 2006 1:15 am

Post by Roks »

Thanks, lets try this one.
Eroyo
Registered User
Posts: 12
Joined: Fri Sep 08, 2006 11:31 am

Post by Eroyo »

Updated

Has anyone been able to test it yet?
Eroyo
Registered User
Posts: 12
Joined: Fri Sep 08, 2006 11:31 am

Post by Eroyo »

No one? :(
dcz
Registered User
Posts: 787
Joined: Sun Feb 13, 2005 5:37 am
Contact:

Post by dcz »

Very nice and very useful thanks ;)

phpBB SEO || phpBB3 SEO Premod || SEO phpBB3
GYM Sitemaps & RSS for phpBB3: GYM Sitemaps & RSS
User avatar
vrflyer
Registered User
Posts: 503
Joined: Mon Feb 17, 2003 8:27 pm

Post by vrflyer »

Me likey!

I'll do some installing & testing... :wink:
Always Under Construction !
Migomix
Registered User
Posts: 6
Joined: Fri Oct 20, 2006 5:58 am

Post by Migomix »

Thanks, Very nice mod.
RedTrinity
Registered User
Posts: 1327
Joined: Sat May 06, 2006 3:32 am

Post by RedTrinity »

Hello,

I have just tried to install this mod and am getting the following errors come up:

Index:
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in /home/theparen/public_html/forums/index.php on line 870


and

Viewtopic:
Could not obtain post/user information.

DEBUG MODE

SQL Error : 1054 Unknown column 'u.user_warnings' in 'field list'

SELECT u.username, u.user_mood_mod, u.user_points, u.user_referral, u.user_id, u.user_posts, u.user_custom_title, u.user_from, u.user_website, u.user_email, u.user_icq, u.user_aim, u.user_yim, u.user_regdate, u.user_session_time, u.user_msnm, u.user_viewemail, u.user_rank, u.user_sig, u.user_sig_bbcode_uid, u.user_avatar, u.user_avatar_type, u.user_allowavatar, u.user_allowdefaultavatar, u.user_allowsmile, u.user_warnings, u.user_trophies, u.ina_char_name, p.*, pt.post_text, pt.post_subject, pt.bbcode_uid FROM phpbb_posts p, phpbb_users u, phpbb_posts_text pt WHERE p.topic_id = 5084 AND pt.post_id = p.post_id AND u.user_id = p.poster_id ORDER BY p.post_time ASC LIMIT 0, 15

Line : 453
File : viewtopic.php


Have double checked my edits for both files but am having no luck getting them working. Would appreciate some assistance please :)

Regards,

RT.
Eroyo
Registered User
Posts: 12
Joined: Fri Sep 08, 2006 11:31 am

Post by Eroyo »

The error in viewtopic is being caused by a missing sql statement. run this to fix it
ALTER TABLE `phpbb_users` ADD `user_warnings` TINYINT( 1 ) DEFAULT '0' NOT NULL ;


For the index, fix it by:

finding this line
'U_CONTESTED_WARNINGS' => $u_contest

and changing it to this
'U_CONTESTED_WARNINGS' => $u_contest,

That should sort it out.
RedTrinity
Registered User
Posts: 1327
Joined: Sat May 06, 2006 3:32 am

Post by RedTrinity »

Thank you Eroyo for your support, both of your solutions worked perfectly :)

However have come across a couple more roadblocks if you dont mind assisting me further...

This is the error message I get when clicking on the "warn" button:
Could not obtain all warning information

DEBUG MODE

SQL Error : 1136 Column count doesn't match value count at row 1

INSERT INTO phpbb_banlist VALUES ('', 113, '','demoemailaddress@hotmail.com')

Line : 265
File : report.php


And this is the error message for the "report" button (in a random thread):
The topic does not exist

DEBUG MODE

SELECT u.username, u.user_level, u.user_id FROM phpbb_fc_connections c, phpbb_users u WHERE u.user_id = c.userid ORDER BY u.username ASC

Line : 235
File : report.php


Thanks again for your help, much appreciated :)
Eroyo
Registered User
Posts: 12
Joined: Fri Sep 08, 2006 11:31 am

Post by Eroyo »

Looking at those errors, they are point to lines where either the error message is different or there's no message to report :?

Have you added any lines to report.php?

Anyway, for the banlist error in report.php:

find this part of code (there are two of them so you'll have to this on both)
$sql = "INSERT INTO " . BANLIST_TABLE . " VALUES

and change it to this
$sql = "INSERT INTO " . BANLIST_TABLE . " (ban_id, ban_userid, ban_ip, ban_email) VALUES


I'm not too sure what's causing the second error since there's no code like that in report.php. Are you getting this error when you press report (either on viewfourm or viewtopic), just looking at a forum or when viewing a topic?
RedTrinity
Registered User
Posts: 1327
Joined: Sat May 06, 2006 3:32 am

Post by RedTrinity »

I haven't made any changes to report.php, I just uploaded it and the other files as instructed :S

The errors are each coming up when pressing the buttons under a person's avatar in a topic.

Ok I have applied the changes as instructed and the ban button is now working, the 2nd one is no longer coming up the error message it was before but this instead:
Could not obtain all warning information


But progress is being made by the look of things :D
RedTrinity
Registered User
Posts: 1327
Joined: Sat May 06, 2006 3:32 am

Post by RedTrinity »

I just noticed that I also appear to be having probs in other departments. The "warn" button is missing in viewtopic profiles, only the other 2 buttons are listed (which are both using the same gif image, not sure if this is intentional or not though).

Also I have used a test account and set a warning amount for them, however the "warnings: X" section does also not appear in any way in viewtopic either.

I have checked my edits and they appear to be ok, so I am not sure if maybe these are bugs or not? I am more than happy to provide any of my files for you to check or even if you want to sign up to our forum you are most welcome to in order to test your mod.

Cheers,

RT.
RedTrinity
Registered User
Posts: 1327
Joined: Sat May 06, 2006 3:32 am

Post by RedTrinity »

Eroyo are you still alive? :?
Post Reply

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