Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#91 2007-10-15 19:58:17

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: mem_moderation - Generic Moderation

Thanks Jakob. Perhaps Michael could tell us if we have to change anything to get this to work? I have MAMP on localhost – PHP and MySQL 5.

Offline

#92 2007-10-17 03:37:55

Manfre
Plugin Author
From: North Carolina
Registered: 2004-05-22
Posts: 588
Website

Re: mem_moderation - Generic Moderation

You must run the installation wizard for each of the plugins, starting with mem_moderation. The link in the help was broken and was missing the /textpattern/ prefix as pointed out by jakob. I uploaded new versions of each plugin so that the link is correct.

Offline

#93 2007-10-17 12:25:50

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: mem_moderation - Generic Moderation

Mmm. Thanks for the update Michael. I managed to get hold of your latest versions of the plugins, then removed txp_moderation DB table from the localhost DB. Removed all plugins, and then re-installed and activated them.

Running mem_moderation install wizard first, I get the following errors:

Warning: Table ‘site_dev.txp_moderation`, `txp_users’ doesn’t exist select txp_moderation.* from `txp_moderation``, ``txp_users` where txp_moderation.user=txp_users.name AND (DATE_SUB( NOW, INTERVAL 7 DAY ) > txp_moderation.submitted OR txp_users.privs = 1) order by txp_moderation.submitted asc limit 0,25 in /Users/jonathan/Sites/site_dev/textpattern/lib/txplib_db.php on line 84
Failed to access table. Table ‘site_dev.txp_moderation`, `txp_users’ doesn’t exist

I can confirm that txp_users does exist, and txp_moderation was setup by the install wizard. So, both tables exist in the DB.

Am I missing something here?

Edit: For clarity, here is what I have:
ign_password_protect 0.5b4
mem_admin_parse 0.2.1
mem_moderation 0.4.9
mem_moderation_article 0.4.9

Last edited by jstubbs (2007-10-17 12:47:33)

Offline

#94 2007-10-17 14:14:52

Manfre
Plugin Author
From: North Carolina
Registered: 2004-05-22
Posts: 588
Website

Re: mem_moderation - Generic Moderation

The double `` on the inner side of these tables names shows that safe_pfx has fixed the issue where Txp would not properly wrap individual table names within a query. A fixed version is posted.

Offline

#95 2007-10-17 14:29:23

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: mem_moderation - Generic Moderation

Thanks Michael. I still have some issues though. mem_moderation is now installed thanks to your update. However, I tested adding an article to the site via a “mod_article_form” tag, which worked – because the article is now present in the txp_moderation table in the DB.

However, I did not see a moderation_article tab in the Extensions, so I thought maybe I forgot to run the install wizard for that plugin. I ran the install, and see the tab, which gave me this error:

Notice: Undefined index: in /Users/jonathan/Sites/site_dev/textpattern/lib/txplib_head.php on line 220

Warning: Invalid argument supplied for foreach() in /Users/jonathan/Sites/site_dev/textpattern/lib/txplib_head.php on line 220

Now, I only see one tab in the extensions – moderate. No article is shown underneath.

??

Offline

#96 2007-10-17 17:07:09

Manfre
Plugin Author
From: North Carolina
Registered: 2004-05-22
Posts: 588
Website

Re: mem_moderation - Generic Moderation

The moderation queue is located under Extensions—>Moderation. All submitted content that is flagged as moderated will show up in that tab. The content plugins (e.g. mem_moderation_article, mem_moderation_image, etc) will generally not have tabs of their own.

At the top of the mem_moderation plugin, there are a few configuration options that will help explain a few potential “gotchas”.

bq..
// the number of days that a newly submitted item will wait
// before appearing in the moderation queue. 0 will disable
define(‘QUEUE_SUBMISSION_DELAY’, “7”);

// Specify whether users with Publisher privs will have their
// submitted content appear immediatly in the list without
// waiting for the QUEUE_SUBMISSION_DELAY
define(‘PUBLISHERS_BYPASS_QUEUE_DELAY’, true);

// By default, the ability to approve from the moderation queue
// is disabled. Set to true to enable this behavior
define(‘ALLOW_APPROVE_FROM_LIST’, false);

Offline

#97 2007-10-17 17:34:49

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: mem_moderation - Generic Moderation

Ok. I did not see before that we have to edit the plugin’s settings…

Have now changed the 3 options to “0”, “true” and “true” respectively. I still don’t see any articles in the moderate tab under extensions. I even added a new article via the mod_article_form tag to check further.

Now I have 2 articles in the txp_moderation table. I notice that the two tables “user” and “email” are blank – I use the default mod_article_form. Could this be something to do with it, or perhaps its a localhost cookie problem?

Offline

#98 2007-10-17 20:16:24

Manfre
Plugin Author
From: North Carolina
Registered: 2004-05-22
Posts: 588
Website

Re: mem_moderation - Generic Moderation

Can you link me (http://pastebin.com/) an export of your txp_moderation table?

Offline

#99 2007-10-17 20:19:20

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: mem_moderation - Generic Moderation

Sure, here you are:

http://pastebin.com/m67bb0a0a

Offline

#100 2007-10-17 20:34:49

Manfre
Plugin Author
From: North Carolina
Registered: 2004-05-22
Posts: 588
Website

Re: mem_moderation - Generic Moderation

The entries are not showing up because the user field is blank for all of them. Generally, the form is wrapped by ign_password_protect or some other plugin that will either set $txp_user or $ign_user. The user must exist if the value “PUBLISHERS_BYPASS_QUEUE_DELAY” is true. Set it to false and the items in the table will be shown in the list.

Offline

#101 2007-10-17 21:02:18

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: mem_moderation - Generic Moderation

Thanks Michael, I set “publishers_bypass_queue_delay” to “false” and I now see the 3 articles I test submitted.

I am testing this plugin to use for a classifieds style site – are there any tips/tutorials/examples available that I, and other users of this wonderful plugin, could use for development? For a non-expert PHP user?

For example, I have not much clue as to how to go about setting either txp_user or ign_user.

Offline

#102 2007-10-17 21:17:04

Manfre
Plugin Author
From: North Carolina
Registered: 2004-05-22
Posts: 588
Website

Re: mem_moderation - Generic Moderation

ign_password_protect is easy to set up. After installing, you just need to wrap the submission form with the password protect tag.

The documentation for the moderation plugins exists in this thread and in the plugin help. With that said, the documentation for this plugin is quite limited. I will gladly accept community provided tips/tutorials/examples. ;-)

Offline

#103 2007-10-17 21:50:50

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: mem_moderation - Generic Moderation

Once I delve into this thing more I am happy to come up with some examples, but I think I am some distance from being able to do this!

In my case I think MAMP does not set cookies properly – or it is not reading cookies properly. Articles get posted to the DB and the user posting the article seems to be set as custom field 1. However, logging in and staying logged in is an issue, and I think it would be easier to test this out on an actual host.

Hopefully some other users can chip in with their own experiences. This plugin is fantastic!

Offline

#104 2007-10-27 17:27:49

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: mem_moderation - Generic Moderation

I have setup a page where users who post content via a mem_moderation form are able to edit their details – login, email, password etc.

In the same page, I have this:

<txp:ign_if_logged_in>
Welcome back <txp:mem_profile var="RealName" />
<h2>Change your personal details:</h2>
<txp:mem_user_edit_form>
<txp:mem_message />
<txp:mem_realname_input />
<txp:mem_email_input />
<txp:mem_submit />
</txp:mem_user_edit_form>
Submission list:
<txp:output_form form="mod_submission_list" />
<txp:else />
<h2>You are not registered. Use the form below to register an account.</h2>
<txp:mem_self_register_form />
<h2>Or login with the form below:</h2>
<txp:ign_show_login />
</txp:ign_if_logged_in>

After posting an article, which is in the moderation queue (and not yet accepted), I do not see the article link which should be output from mod_submission_list. Shouldn’t this link be visible?

Also, is there a way to let a user edit or delete an article he/she posted after the article has been moderated, and accepted?

Last edited by jstubbs (2007-10-29 06:36:47)

Offline

#105 2007-10-27 17:33:12

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: mem_moderation - Generic Moderation

Possibly a bug – in the moderation queue – after selecting the article’s checkbox, and choosing “reject” – nothing happens. Isn’t the article supposed to be deleted? If not, there is no way to delete the article that I can see.

Offline

Board footer

Powered by FluxBB