Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#157 2010-03-28 12:39:13

amordecosmos
Plugin Author
From: London (Hometown: Vancouver)
Registered: 2004-08-03
Posts: 106
Website

Re: mem_moderation - Generic Moderation

To answer my own question – the plugin mem_admin_parse is also required to make the moderation work. Who knew?

Thank you, Manfre for a great, great set of plugins.

Offline

#158 2010-03-28 19:13:35

-rr-
Member
Registered: 2005-09-11
Posts: 73

Re: mem_moderation - Generic Moderation

Finally after reading through every post I figured out what it takes to make this work.

In Extensions/moderate looking at the images their thumbnails are not generated. Where are they supposed to go and should something else be installed to make them work? If I try to open them in a new window I get: Fatal error: Call to undefined function sanitizeForFile() in …

I have a working form that accepts uploading of JPG and GIF images, but I can’t get it to accept PDF or EPS files. It seems it only uploads to Content/Images which does not accept these. How can I make the plugin upload any file format to Content/Files? Would there be a decent way to create thumbnails too?

Last edited by -rr- (2010-03-28 20:31:52)

Offline

#159 2010-10-03 15:49:09

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

Re: mem_moderation - Generic Moderation

Trying to use a forum thread as a bug tracker doesn’t really work for various reasons.

  1. I don’t always get the email about the thread being updated.
  2. Different problems get interleaved.
  3. I’m forget about them and don’t re-read the older pages of a plugin thread looking for unfixed issues.

In an effort to fix this communication disconnect, I have moved all of my plugin code over to bitbucket, /Manfre/txp-plugins. I’ve enabled the issue tracker and wiki (for documentation). With this new channel of managing my plugins, I will continue to ignore issues reported in this plugin thread, but now it will be intentional instead of accidental.

Offline

#160 2011-04-18 22:39:02

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,270
Website GitHub

Re: mem_moderation - Generic Moderation

I know Manfre’s not watching this thread any more, but the docs on his repo haven’t materialised and I’m having a hard time with the plugin docs. Getting very lost… Perhaps someone who has had experience with this plugin (and/or mem_moderation_article) could see their way clear to point me in the right direction please.

The problem is deceptively simple: I’m updating a site that was using ancient versions of the various plugins. Upon upgrading to the latest versions of the mem_ suite I’ve trawled the threads and the docs to find the new way of doing things and have mostly succeeded. But I still have <txp:mod_submit /> and <txp:mod_delete /> in my mem_moderation_article_form’s form; both of which are deprecated.

I figure that a standard <txp:mem_form_submit /> would probably do to replace the former, but what is the equivalent tag to use for <txp:mod_delete /> under the new mem_form regime? There’s talk of ‘sentries’ and ‘action links’ and ‘exposed functions’ but I don’t get how it all gels together (I’ve never used moderation before so it’s probably a conceptual thing).

Thanks in advance for setting a thicko on the right path.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#161 2011-04-18 23:33:23

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

Re: mem_moderation - Generic Moderation

Assuming you’re working with in the scope of <txp:mem_moderation_article_form>, which is the form that the users enters the article content. The sentry is more for handling the listing of content a user has pending moderation and allows them to delete the items without opening the article form.

You’re on the right track with <txp:mem_form_submit />. It’s looks for the post to contain one of the below named fields with any value that resolves to true.

Save – mem_moderation_save
Delete – mem_moderation_delete
Update – mem_moderation_update

I haven’t turned off all of the subscriptions to all of my threads, but I do find it much easier to address issues with an issue tracker instead of a forum. ;)

Offline

#162 2011-04-19 07:46:39

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,270
Website GitHub

Re: mem_moderation - Generic Moderation

Manfre wrote:

You’re on the right track with <txp:mem_form_submit />….

Ah, brilliant, thank you very much sir. I’ll give that a whirl later. Just couldn’t figure out from the code what the values should be.

I do find it much easier to address issues with an issue tracker instead of a forum. ;)

Ain’t that the truth! But I figured this wasn’t an Issue (which I term a ‘bug’) — more a dim noob user question — so I didn’t feel justified raising a ticket for it. Thanks for the fast answer.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#163 2011-04-19 13:25:32

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

Re: mem_moderation - Generic Moderation

Stef, I think its something like this now:

<txp:mem_article_delete_sentry wraptag="div" class="success" successmsg="Your request for deletion has been submitted." failuremsg="Could not complete your request." />

Cannot double check though, traveling. Hope that sets you on the right path.

Edit: OK, I see Michael answered for you!

Last edited by jstubbs (2011-04-19 13:27:57)

Offline

#164 2011-05-21 21:19:29

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,270
Website GitHub

Re: mem_moderation - Generic Moderation

Just trying to get smd_thumbnail to integrate with mem_moderation such that, when an image is approved, all the relevant thumbnail sizes are created.

I’ve raised a callback like this:

mem_moderation_register('image', array(), '', 'smd_thumb_image_approver', '');

because I have no interest in the presenter/rejecter. My callback is triggered no problem but in order to create the thumbs I need a single piece of information: the ID of the newly-inserted image in the txp_image table. How do I get hold of it?

I’ve dumped the contents of $data to see what’s available and there’s an id listed first, but that appears to be the ID of the item in the mem_moderation queue. I also tried outputting mysql_insert_id() in the hope it still held the latest ID (yeah yeah, it’s not atomic so can’t be relied upon in a high traffic site) but I just get 0 back anyway.

Anyone any idea how I can grab the ID of the inserted image in my plugin? Can I somehow utilise the $vars (2nd argument in the callback) to pass it into my function? Thanks in advance for any pointers.

Last edited by Bloke (2011-05-21 21:20:31)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#165 2011-06-02 00:29:09

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,270
Website GitHub

Re: mem_moderation - Generic Moderation

Michael kindly modified the plugin for me so v0.7.8 now has a new callback in it, which functions the same way as the one in the core. Invoke it like this:

register_callback('your_plugin_function', 'image_uploaded', 'moderate');

The ID of the newly created image is passed in as the payload parameter after the obligatory event and step. Awesome!


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#166 2011-12-23 03:27:24

nardo
Member
From: tuvalahiti
Registered: 2004-04-22
Posts: 743

Re: mem_moderation - Generic Moderation

Has anyone got mem_moderation_image_form working with Textpattern 4.4.1?

The article submission & moderation process is working for me; also the image submission & moderation … but I can’t get the image to be wrapped in an article.

Offline

#167 2012-01-18 11:18:59

milosevic
Member
From: Madrid, Spain
Registered: 2005-09-19
Posts: 390

Re: mem_moderation - Generic Moderation

Hello:

I’m becoming crazy with this pluging! :-D

Everythink works fine except that mem_moderation_article_form never saves the author info. The new articles are posted to the moderation queue but without user info. I have no problem with other fields (custom fields, allow comments, section…etc).

I have tried a fix value (“xxx” a real user with admin level) to submit the author info avoiding possible variables problems but without no result: the user is never saved.

I’m trying this code lines, both at the sametime and only one (“user” for moderation table and “AuthorID” for textpattern table):

<txp:mem_form_hidden name="user" value="xxx" />
<txp:mem_form_hidden name="authorid" value="xxx" />

and its upper & lower case variations such:

<txp:mem_form_hidden name="User" value="xxx" />
<txp:mem_form_hidden name="AuthorId" value="xxx" />

I have installed also mem_self_register, I’m using cbe_forntauth for login and registering, but perhaps some mem_self_register code is needed, but it seems that don’t helps mem_moderation_article_form to work fine.

Any help/idea wellcome!

Last edited by milosevic (2012-01-18 11:23:46)


<txp:rocks/>

Offline

#168 2012-01-18 18:31:10

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

Re: mem_moderation - Generic Moderation

My implementation doesn’t use mem_moderation or cbe_frontauth, but the same principles might apply— here’s the relevant code:

<txp:mem_form_secret
    name="Author"
    value='<txp:ign_user_info type="name"/>'/>

Using the single quote on the value attribute lets me pull in the output of another Txp tag.

Offline

Board footer

Powered by FluxBB