Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#136 2008-09-11 04:50:02

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

Re: mem_moderation - Generic Moderation

Undo that last change you did. require_privs() is a txp function that dictates which users can access an event/step. I was incorrectly thinking of queue submission delay, which deals with showing items on the moderation list immediately if the content was created by a moderator.

To bypass the queue so that the item is submitted, you will need to modify the specific type plugin so that immediately after it calls submit_moderated_content it will need to call mem_moderate_approve.

For mem_moderation_article. Search for the line.

$res = submit_moderated_content('article', '', $mem_modarticle_info['note'], $mem_modarticle_info);

and add the following immediately after it.

if ($res) {
	mem_moderate_approve('article', $res);
}

There is another part of that function that deals with edits to a published article, ‘article-edit’, that would need a similar change made if your site is using the the article edit feature.

Offline

#137 2008-09-11 05:30:39

johnstephens
Plugin Author
From: Woodbridge, VA
Registered: 2008-06-01
Posts: 1,000
Website

Re: mem_moderation - Generic Moderation

Thanks again for your prompt response!

Now I have this:

$res = submit_moderated_content('article', '', $mem_modarticle_info['note'], $mem_modarticle_info);
if ($res) {
	mem_moderate_approve('article', $res);
}

And when I submit an article, I get this message from Textpattern:

Fatal error: Call to undefined function pageTop() in /Users/username/Sites/example.dev/textpattern/lib/txplib_misc.php on line 306

I checked the article list and moderation queue: in spite of the fatal error, I see that the data landed in the moderation queue just like before.

I’m very grateful for your help!

Offline

#138 2008-09-16 18:16:45

johnstephens
Plugin Author
From: Woodbridge, VA
Registered: 2008-06-01
Posts: 1,000
Website

Re: mem_moderation - Generic Moderation

I can’t figure out what’s causing the fatal error. I’ve combed through the plugin code to see if I applied your mem_moderate_approve('article', $res); to the wrong function; I see other instances of $res = submit_moderated_content that are very similar, but there’s the only one instance that matches the search query exactly; it appears in the Form submit handler function (function mem_mod_article_form_submitted()), which makes sense.

When I submit an article using the edited plugin, two things happen:

  1. I get the fatal error mentioned above, and
  2. The article content appears in the moderation queue instead of the live article list.

I’d be grateful for any suggestions or insight anyone could offer!

Offline

#139 2009-02-09 18:20:37

rathersplendid
Plugin Author
From: London
Registered: 2008-05-02
Posts: 163
Website

Re: mem_moderation - Generic Moderation

Hey John, did you find out the fix for your problem?

johnstephens wrote:

I can’t figure out what’s causing the fatal error.


Admin Themes Prometheus | Stung | <txp:coder/
My Portfolio | ɹǝpuɐz.com | @MrMartineau
<txp:coder /> – Convert your designs into Textpattern-based websites
jQuery Style | @jquerystyle

Offline

#140 2009-03-02 02:09:33

johnstephens
Plugin Author
From: Woodbridge, VA
Registered: 2008-06-01
Posts: 1,000
Website

Re: mem_moderation - Generic Moderation

rathersplendid wrote:

Hey John, did you find out the fix for your problem?

Yes— I’m using the latest version of mem_simple_form instead of mem_moderation. I’ve had a few bumps in the road, but I’m pretty happy with the results right now. Hopefully I shall get this project online soon!

Offline

#141 2009-04-15 19:30:38

lehan
Member
Registered: 2008-12-17
Posts: 24

Re: mem_moderation - Generic Moderation

Trying to set up an article submission page for a textpattern site I’m working on.

The only hiccup during installation of these plugins was the “mem_moderation_article” install wizard gave me a ‘restricted access’ message when I tried to run it. As a result, I created the “mod_article_form” form manually.

Unfortunately, while the forms appear properly, nothing happens when I attempt to submit a new article. I just get sent back to the default page on the site. Nothing appears in the moderate queue or in the submitted_article_list form output.

Thanks!

Last edited by lehan (2009-04-15 19:37:07)

Offline

#142 2009-04-15 22:23:22

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 5,188
Website GitHub

Re: mem_moderation - Generic Moderation

lehan, check in your database to see if the txp_moderation tables have been created and, if so, also to see if the submissions have indeed been made to the database? If the submissions have been made it may be that they are “waiting” in the “submission delay” loop (never understood what this was for). Check your settings at the top of the mem_moderation plugin (edit the source in the plugin pane). I remember having to experiment with the settings a bit. In a working setup I have the following settings and submissions appear in the moderation queue list immediately:

define('PUBLISHERS_BYPASS_QUEUE_DELAY', false);
define('QUEUE_SUBMISSION_DELAY', "0");

TXP Builders – finely-crafted code, design and txp

Offline

#143 2009-04-16 07:49:45

kees-b
Member
From: middelburg, nl
Registered: 2004-03-03
Posts: 235
Website

Re: mem_moderation - Generic Moderation

lehan wrote:
the “mem_moderation_article” install wizard gave me a ‘restricted access’ message when I tried to run it. As a result, I created the “mod_article_form” form manually.

Did you apply the add_privs hack?

Offline

#144 2009-04-17 18:18:20

lehan
Member
Registered: 2008-12-17
Posts: 24

Re: mem_moderation - Generic Moderation

jakob wrote:

lehan, check in your database to see if the txp_moderation tables have been created and, if so, also to see if the submissions have indeed been made to the database? If the submissions have been made it may be that they are “waiting” in the “submission delay” loop (never understood what this was for). Check your settings at the top of the mem_moderation plugin (edit the source in the plugin pane). I remember having to experiment with the settings a bit. In a working setup I have the following settings and submissions appear in the moderation queue list immediately:

The txp_moderation was created but no records are being added. The submissions are going nowhere fast it seems.

ARGH!

Last edited by lehan (2009-04-17 18:18:38)

Offline

#145 2009-04-20 16:23:24

lehan
Member
Registered: 2008-12-17
Posts: 24

Re: mem_moderation - Generic Moderation

Okay, I reinstalled the plugins, added the add_privs_hack, and everything install smoothly. However I’m getting the following error message:

Tag error: <txp:mem_profile var=“name” /> -> Textpattern Warning: tag does not exist on line 1104
textpattern/publish.php:1104 trigger_error()
textpattern/publish.php:1012 processTags()
textpattern/lib/txplib_misc.php(570) : eval()’d code:250 parse()
textpattern/publish.php:1090 mod_article_form()
textpattern/publish.php:1012 processTags()
textpattern/publish.php:496 parse()
index.php:33 textpattern()

Thanks!

Offline

#146 2009-04-20 16:28:28

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

Re: mem_moderation - Generic Moderation

lehan, the plugin mem_self_register provides the mem_profile tag.

Offline

#147 2009-04-20 16:38:50

lehan
Member
Registered: 2008-12-17
Posts: 24

Re: mem_moderation - Generic Moderation

Manfre wrote:

lehan, the plugin mem_self_register provides the mem_profile tag.

I see. I take it I don’t need to use the plugin (don’t want users self registering), but it’s presence is necessary for the other plugins to work.

Okay, so installing mem_self_register gets rid of the error, however mem_moderation_article is still not populating the database. My txp_moderation table is still empty and nothing appears in the mod_submission_list.

The lights are on, but nobody’s home.

Offline

#148 2009-04-30 22:06:13

lehan
Member
Registered: 2008-12-17
Posts: 24

Re: mem_moderation - Generic Moderation

Got it to work. Added an .htaccess file and clean urls.

The recently submitted articles list does not work, however. Almost there.

Offline

#149 2009-05-24 16:25:00

lous
Member
From: Germany
Registered: 2009-01-04
Posts: 57

Re: mem_moderation - Generic Moderation

hmm when i put <txp:mod_article_form /> in my template, then i cant see a output of it.

I got these plugin installed: mem_admin_parse, mem_form, mem_moderation, mem_moderation_article

Im just aiming, that a user can submit articles in the frontend.

Thanks guys

Offline

#150 2009-06-15 02:05:37

alannie
Member
From: Minnesota, USA
Registered: 2005-09-15
Posts: 150

Re: mem_moderation - Generic Moderation

Hi, I’m having trouble with the mem_moderation_image plugin. When I insert <txp:modimg_form /> I get this error:

Tag error: <txp:modimg_form /> ->  Warning: Missing argument 3 for category_popup()

Am I doing something wrong?

Offline

Board footer

Powered by FluxBB