You are not logged in.
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
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.
Txp Builders – finely-crafted code, design and Txp
Offline
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)
TXP Tips | @txptips | Me | @jonathanstubbs | Github
TXP Builders – finely-crafted code, design and txp @txpbuilders
Offline
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.
Txp Builders – finely-crafted code, design and Txp
Offline
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.
Txp Builders – finely-crafted code, design and Txp
Offline
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
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
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
Thanks, John:
I don’t know why but it doesn’t works to me. Perhaps it is a mysql problem, other plugins are working bad to at that website. I will try to port the website to another hosting. Don’t know what else to try.
<txp:rocks/>
Offline
I use mem_moderation_image so that user can submit image from public side, which then gets wrapped to an article.
<txp:mem_moderation_image_form>
<txp:mem_form_file name="thefile" label="Image" break="" /><br/>
<txp:mem_form_secret type="image" name="category" break="" value="images"/>
<txp:mem_form_secret name="article_title" break="" value="test"/>
<txp:mem_form_secret name="article_section" break="" value="test"/>
<txp:mem_form_secret name="article_category1" break="" value="test"/>
<txp:mem_form_submit name="mem_moderation_save" label="Upload" class="button"/>
</txp:mem_moderation_image_form>
This works great and the image wrapped to a article gets added to the que.
What I’m trying to figure out is there tags that show preview of the qued image and/or article for the user on public side? Documentation for these plugins are quite limited.
Offline