Welcome, Guest. Please Login or Register.
November 27, 2024, 06:42:26 PM
Home Help Search Log in Register
News: If you are still using YaBB SE, please consider upgrading to SMF as soon as possible.

YaBB SE Community  |  Development  |  Completed mods  |  [beta 1.5.4] Post Moderation « previous next »
Pages: [1] Reply Ignore Print
Author Topic: [beta 1.5.4] Post Moderation  (Read 3334 times)
Grudge
Global Moderator
Full Member
*****
Posts: 178


Damn llama's don't like me :(

[beta 1.5.4] Post Moderation
« on: July 31, 2003, 04:19:02 PM »
Reply with quote

This is the first beta version of my post moderation mod. This will allow the admin to select users whose posts they wish to moderate. When a user is moderated all posts they make will not appear right away on the messageindex etc. Instead the admin can view their posts in the post moderation manager, and decide whether to approve or reject their post.

Important: This mod is currently INCOMPATIBLE with the visual warnings mod. This is because it is going to be added to the visual warning mod but I want to ensure there are no serious bugs in it first - users of the visual warning mod will need to wait a few days for the compatible version...

Screenshot here:
www.p0stwh0res.com/bins/mod/pm/ss.jpg

Download here:
www.p0stwh0res.com/bins/mod/pm/pm.zip

More information is in the boardmod file including installation instructions.

Enjoy.

Sorry - I don't have time to support my old mods on YABB SE as I'm tied up in SMF development. This has been supassed by the Advanced Visual Warning MOD
« Last Edit: February 24, 2004, 04:25:40 PM by Grudge » Logged
[Unknown]
Global Moderator
YaBB God
*****
Posts: 7830


ICQ - 179721867unknownbrackets@hotmail.com WWW
Re:[beta 1.5.4] Post Moderation
« Reply #1 on: July 31, 2003, 04:57:57 PM »
Reply with quote

Is the moderation interface pages to allow for large forums?

/* Original module by Aaron O'Neil - [email protected]                    */
/*****************************************************************************/
(did you copy the header from Calendar.php, or is that you?)

Besides that and some spagetthi in the code it looks great.  I've been surprised at how many mods have been coming for you.

-[Unknown]
Logged
Grudge
Global Moderator
Full Member
*****
Posts: 178


Damn llama's don't like me :(

Re:[beta 1.5.4] Post Moderation
« Reply #2 on: July 31, 2003, 06:07:54 PM »
Reply with quote

hehe - whoops

Yea - that code was from calendar.php... I was using as the basis for a personal mod and seem to keep leaving the header in on all my other code!! :doh:

I shall remove that next time I change the mod :D

Also - the moderation page *isn't* in pages yet. I shall put that on the todo list as I guess it could get pretty lengthy if you have 200 moderated users posting 10 posts a day  :o

EDIT - I added pages to it now. It's by default 40 posts per page although this is easily edited by changing $display in the manager() function in postmoderation.php. Zip file updated :)
« Last Edit: July 31, 2003, 06:44:39 PM by Grudge » Logged
1979Z28
Sr. Member
****
Posts: 324


WWW
Re:[beta 1.5.4] Post Moderation
« Reply #3 on: July 31, 2003, 07:48:07 PM »
Reply with quote

Sounds like a cool mod :D I'll have to download this and give it a try a little later.

Keep up the good work!
Logged
Traveller
Noobie
*
Posts: 3


I'm a llama!

Re:[beta 1.5.4] Post Moderation
« Reply #4 on: July 31, 2003, 10:34:39 PM »
Reply with quote

Haven't been able to check it out yet. Question though.. Is there a way to set all users to be moderated by default, including new users?

Given the nature of the forum I am running (using ubbthreads today, but have fallen in love with YaBBSE so I am looking to change =) ) I need to be able to have every and all postings (apart from Moderators and Administrators) moderated, and as such I wouldn't enjoy it if one could just create a new user to be able to cirumvent the moderation just because I haven't activated moderation for that user. =)

If this feature is included, you just gave me the final reason to change, and I will be forever grateful. =)

Best

/Traveller
Logged
Jack.R.Abbit
Mod Team
YaBB God
*****
Posts: 553


RACE FOR SPENT!

Re:[beta 1.5.4] Post Moderation
« Reply #5 on: July 31, 2003, 10:47:45 PM »
Reply with quote

I have not checked this mod out but assuming there is some database setting that all "moderated" members have, it should not be too doficult to force this setting upon creation of new accounts.


I have one question for clarification.  In the mod file it says after the admin has accepted the post it is added to the thread as if they had done it.  Does the moderated post carry the timestamp of when it was first made, or when it was accepted by the admin?

-Jack
« Last Edit: July 31, 2003, 10:51:25 PM by Jack.R.Abbit » Logged

<--------  Mods by Jack  -------->
Package Server: http://www.modsbydesign.com/mods.by.jack/yabbse/ (now serving)


|----------------------------------------------|
|                                              |
|          DON'T PM ME FOR SUPPORT!             |
|                                              |
|----------------------------------------------|
puntingzone
Noobie
*
Posts: 19


WWW
Re:[beta 1.5.4] Post Moderation
« Reply #6 on: July 31, 2003, 11:00:39 PM »
Reply with quote

Hey grudge thanks a lot just what I was after, Installed fine,  pre mods fine, deletes the pre modded post fine but when I tick approve and accept I get the error

QuoteYou have an error in your SQL syntax near ' '', '', '', , '1059689956', , '', '')' at line 2
File: /home/httpd/vhosts/puntingzone.com/httpdocs/forum/Sources/PostModeration.php
Line: 178

Line 178 of PostModeration.php reads as
Quote}
            else if($row['ID_TOPIC']==0 || $row['ID_TOPIC']==-1){ //new topic
               mysql_query("INSERT INTO {$db_prefix}messages (ID_MEMBER, subject, posterName, posterEmail, posterTime, posterIP, smiliesEnabled, body, icon)
         Line178 is   VALUES ($row[ID_MEMBER], '$row[subject]', '$row[posterName]', '$row[posterEmail]', $row[posterTime], '$time', $row[smiliesEnabled], '$row[body]', '$row[icon]')") or database_error(__FILE__, __LINE__);

I have no idea of php, but a process of elimination I have found that I can get rid of the SQL syntax error by adding ' & ; in a few places but then I get another error saying
QuoteColumn count doesn't match value count at row 1
File: /home/httpd/vhosts/puntingzone.com/httpdocs/forum/Sources/PostModeration.php
Line: 178

Any ideas much appreciated

I changed/added to line 178

QuoteVALUES ($row[ID_MEMBER]', '$row[subject]', '$row[posterName]', '$row[posterEmail]', $row[posterTime]', '$row[smiliesEnabled]', '$row[body]', '$row[icon]');") or database_error(__FILE__, __LINE__);

Logged

When I'm right I'm right, but when I'm wrong, I really goof up
Jack.R.Abbit
Mod Team
YaBB God
*****
Posts: 553


RACE FOR SPENT!

Re:[beta 1.5.4] Post Moderation
« Reply #7 on: July 31, 2003, 11:11:04 PM »
Reply with quote

according to your error message,  $row[posterTime] is empty and since it is not wrapped in single quotes the SQL statement is malformed.  The same problem with  $row[smiliesEnabled].  And actually it appears as if all teh $row values are emtpy so I think your problem might be further upstream but I really don't ahve any knowledge of exactly how this mod works.  But I see why you get the error you get.  Hopefully Grudge can help you further.

-Jack
Logged

<--------  Mods by Jack  -------->
Package Server: http://www.modsbydesign.com/mods.by.jack/yabbse/ (now serving)


|----------------------------------------------|
|                                              |
|          DON'T PM ME FOR SUPPORT!             |
|                                              |
|----------------------------------------------|
FaSan
Jr. Member
**
Posts: 67


Re:[beta 1.5.4] Post Moderation
« Reply #8 on: August 01, 2003, 10:22:52 AM »
Reply with quote

It would be more interesting if instead of the users, the categories or the forum for entire were moderated.


FaSan
Logged
Grudge
Global Moderator
Full Member
*****
Posts: 178


Damn llama's don't like me :(

Re:[beta 1.5.4] Post Moderation
« Reply #9 on: August 01, 2003, 04:11:28 PM »
Reply with quote

Firstly, Traveller. It would be VERY easy to make all users moderated by default. It is a simple case of loading up phpmyadmin, browsing to the yabbse_members key and changing the default value for the column WARNINGS from -1 to 2.

Whenever anyone new joined they would immediatly be moderated. To change the members already on the board you just open phpmyadmin and run an sql statement to update all current members - If you end up needing this pm me and I'll write it out.

Jack.R.Abbit, As far as the time stamp goes on posts it currently sets the time stamp to the time when it is accepted by the admin. This is so the post appears at the end of the thread and does not get lost. If you wish I can update the mod to make it an option to have either time stamp  of approval or time of posting?

FaSan, Though not a bad idea would be a pretty huge change for this mod so it ain't gonna happen anytime soon ;)

puntingzone - OK. Looking at the error message it seems that some of the information from the post isn't being entered in when the post gets stored in the moderated stage (ie when the user posts the message)

First off, the code you changed had some ' symbols missing - check where you put the ' symbols to and you will realise that some $row members don't have the symbols both sides of them. Doing this may stop the sql error but will not solve the problem as some stuff is clearly missing.

I need you to do a few things. Firstly list any mods you have installed that may affect posting in any way (not ones which mod display/admins but ones that mod actual post stuff.

Secondly, confirm that you are not testing this by putting a admin/global mod as "moderated". This may cause the error if I was inconsistant with my coding.

Thirdly, can you test this by both starting a new topic as moderated AND replying to an existing topic as moderated. Try to approve them both seperatly and tell me if the error occurs both times.

Forthly, fire up phpmyadmin. Go to the yabbse_postmoderated table and browse through the rows of posts awaiting approval. I need to know whether all the columns have data in or whether columns such as posterEmail etc are blank

Finally, just confirm that you these posts are not coming from a guest? I hadn't tested this mod with guest posting enabled and although I wouldn't expect a problem maybe there is one :)

Hope you can pull something out of this if you have a few minutes to try the above :D
« Last Edit: August 01, 2003, 04:36:48 PM by Grudge » Logged
puntingzone
Noobie
*
Posts: 19


WWW
Re:[beta 1.5.4] Post Moderation
« Reply #10 on: August 02, 2003, 12:17:01 AM »
Reply with quote

Hi Grudge

1) Tested on a clean test board, No other mods installed other than application mod http://www.yabbse.org/community/index.php?thread=13988

2) No not testing on a mod or admin, testing on a regular member ( testaccount )

3) tested both, new thread & reply to a thread.

4) phpmy admin states that all rows are complete with data.

id, id_topic, id_board, id_member, subject, postername, poster email, postertime, posterip, smilies enabled, body, icon, id_poll.

5) No I dont have guest posting  function working.

Again I installed the PostModeration.php, the one from your zip file and recieved the error message
QuoteYou have an error in your SQL syntax near ' '', '', '', , '1059783406', , '', '')' at line 2
File: /home/httpd/vhosts/puntingzone.com/httpdocs/chanel/Sources/PostModeration.php
Line: 178
.

Again when I changed some stuff in there I get
QuoteColumn count doesn't match value count at row 1
File: /home/httpd/vhosts/puntingzone.com/httpdocs/chanel/Sources/PostModeration.php
Line: 178

So I think the prob is in the postmoderation.php file



« Last Edit: August 02, 2003, 12:18:17 AM by puntingzone » Logged

When I'm right I'm right, but when I'm wrong, I really goof up
Jack.R.Abbit
Mod Team
YaBB God
*****
Posts: 553


RACE FOR SPENT!

Re:[beta 1.5.4] Post Moderation
« Reply #11 on: August 02, 2003, 03:50:04 AM »
Reply with quote

Quote from: Grudge on August 01, 2003, 04:11:28 PMJack.R.Abbit, As far as the time stamp goes on posts it currently sets the time stamp to the time when it is accepted by the admin. This is so the post appears at the end of the thread and does not get lost. If you wish I can update the mod to make it an option to have either time stamp  of approval or time of posting?
Nope.. you did it the right way in my opinion.. I just wanted to know if you had done it that way.  It makes more sense to insert it at the end as to not break up the flow of the thread.
Logged

<--------  Mods by Jack  -------->
Package Server: http://www.modsbydesign.com/mods.by.jack/yabbse/ (now serving)


|----------------------------------------------|
|                                              |
|          DON'T PM ME FOR SUPPORT!             |
|                                              |
|----------------------------------------------|
Grudge
Global Moderator
Full Member
*****
Posts: 178


Damn llama's don't like me :(

Re:[beta 1.5.4] Post Moderation
« Reply #12 on: August 02, 2003, 10:25:05 AM »
Reply with quote

puntingzone, OK. I reinstalled a new board from scratch and DID get that error.

I looked through postmoderation.php in the zip archive and was frankly shocked. I don't know what happened to the code but it was ridiculously broke. By which I mean it was using $id before it was assigned and hence not retreiving any info from the database

Anyway - I have fixed the file in the zip file. All you need to do is upload the new version of postmoderation.php from the zip file. I recommend anyone who downloaded this to do the same just in case. From now on I think I'm gonna use ultraedit to make mods as I think notepad is making me cry :D

As always - report any bugs back please - I hate having mods that don't work :(
Logged
puntingzone
Noobie
*
Posts: 19


WWW
Re:[beta 1.5.4] Post Moderation
« Reply #13 on: August 02, 2003, 12:05:17 PM »
Reply with quote

Yeah baby, grudge your a star, works like a charm now.

Thank you for your hard work
Logged

When I'm right I'm right, but when I'm wrong, I really goof up
Dennis_B
Noobie
*
Posts: 18


Its only impossible... Untill its not...

WWW
Re:[beta 1.5.4] Post Moderation
« Reply #14 on: August 11, 2003, 10:43:27 PM »
Reply with quote

A really GREAT Mod, I really was looking for something like this, however, I have found 1 flaw.

When someone who is under moderation has posted a message which is approved, he can edit his post afterwards and even upload a picture (which is not possible by posting a new message when under moderation)

I really hope this can be fixed..

Thanks!


Edit:

After reading http://www.yabbse.org/community/index.php?thread=25250/30  reply 37 I modified modifymessages.php

if ($username == 'Guest')
     fatal_error($txt[223]);
  if ($currentboard == '')
     fatal_error($txt[1]);


add after
$request = mysql_query("
        SELECT WARNING
        FROM {$db_prefix}members
        WHERE memberName='$username'") or database_error(__FILE__, __LINE__);

     list($level) = mysql_fetch_array($request);
  if($level>1)
     fatal_error($txt[90]);


And the "problem" is "fixed"
« Last Edit: August 12, 2003, 08:47:32 AM by Dennis_B » Logged
Pages: [1] Reply Ignore Print 
YaBB SE Community  |  Development  |  Completed mods  |  [beta 1.5.4] Post Moderation « previous - next »
 


Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
SMF 2.1.4 © 2023, Simple Machines
Valid XHTML 1.0! Valid CSS

Page created in 0.017 seconds with 21 queries.