MyBB-Plugins Forums
How to aquire Post Number during Inline moderation - Printable Version

+- MyBB-Plugins Forums (http://forums.mybb-plugins.com)
+-- Forum: MyBB General Discussion (http://forums.mybb-plugins.com/Forum-MyBB-General-Discussion)
+--- Forum: Coding Help (http://forums.mybb-plugins.com/Forum-Coding-Help)
+--- Thread: How to aquire Post Number during Inline moderation (/Thread-How-to-aquire-Post-Number-during-Inline-moderation)



How to aquire Post Number during Inline moderation - khurram4m - 07-14-2014

Is there any way to aquire Post Numbers (along with Post ID's) of selected posts for Inline moderation???

If I'm not wrong it has something to do with "inline_moderation.js" but my javascript skills are 0 any help please.... Huh


RE: How to aquire Post Number during Inline moderation - Diogo Parrinha - 07-14-2014

I am confused on what you want to do.


RE: How to aquire Post Number during Inline moderation - khurram4m - 07-15-2014

Ok let me explain it using image

[Image: 2wq4gw8.jpg]

In my plugin I want to generate a report which will tell the "moderator" which post numbers of a thread were affected with his action, Default Javascript is designed to collect "pid" (i.e post ID's) but I need "post numbers"
as Mybb docs states
[The post number is in relation to the thread and is not identical to the "Post ID"]




RE: How to aquire Post Number during Inline moderation - Diogo Parrinha - 07-15-2014

In the postbit hook you can use the variable which counts that IIRC.


RE: How to aquire Post Number during Inline moderation - khurram4m - 07-15-2014

(07-15-2014, 01:49 AM)Pirata Nervo Wrote: In the postbit hook you can use the variable which counts that IIRC.

I didn't actually get that can you please explain it little bit more

in "postbit_posturl" there is variable "postcounter"

in my plugin I'm using this statement to to get all POST ID's selected for inline moderation
$postlist = explode("|", $mybb->input['posts']);

Now how can I get that variable "postcounter" here ?


RE: How to aquire Post Number during Inline moderation - Diogo Parrinha - 07-15-2014

In the 'postbit' hook, inside function build_postbit (file functions_post.php) you can get that variable.


RE: How to aquire Post Number during Inline moderation - khurram4m - 07-15-2014

(07-15-2014, 03:02 AM)Pirata Nervo Wrote: In the 'postbit' hook, inside function build_postbit (file functions_post.php) you can get that variable.

but what if I want to get that variable in inc/plugin/MyPlugin.php?


RE: How to aquire Post Number during Inline moderation - Diogo Parrinha - 07-15-2014

You will need to use hooks, that's what I'm saying. I recommend you to read my PDF tutorials.