PDA

View Full Version : Allow members to report own posts


tamarian
12 Jun 2005, 21:28
What this plugin does:

vBulletin does not (no longer) allow a user to report their own posts. This plugin allows you to enable (or disable by deactivation) reporting own posts.

On some forums there are quite a few threads started and after a set period members want to report those threads to be moved by moderators. without it, members need to PM moderators and provide a link to the post and/or thread, which is a lot of make-work, especially when some members don't know how to provide links, so they'll PM something like "Go to that sub-forum, look in page 7, second thread from the top"!

This can alternatively be done by editing two templates (per template set), postbit and legacy psotbit. But you will need to make those edits to disable/enable this behavious. A plugin is much cleaner, and easier.

Installation: Upload the plugin xml file through your admincp plugin manager.


Please click Install (http://www.vbulletin.org/forum/vborg_miscactions.php?do=installhack&threadid=82973) if you have installed this mod.

eXtremeTim
12 Jun 2005, 22:19
Installed. :) Good work.

tamarian
12 Jun 2005, 22:29
Thanks. I expected the first reply to this thread to be "Who would want this?" :)

eXtremeTim
12 Jun 2005, 23:10
Nah I am using it on my scripting site already. ;)

Paul M
14 Jun 2005, 17:01
Thanks. I expected the first reply to this thread to be "Who would want this?" :)Who would want this ? :)

Seriously, I'm curious why anyone would report their own post(s) ?

eXtremeTim
14 Jun 2005, 17:10
Who would want this ? :)

Seriously, I'm curious why anyone would report their own post(s) ?
Like if you post it in the wrong forum.

Or if had second thoughts about your post and want it to be removed and you dont have perms to delete your own posts.

tamarian
14 Jun 2005, 17:22
vb.org has a good example as well. Say you post a beta hack, and after testing, you want to notify mods that it's no longer in beta, and needs to be moved soemwhere else. To be able to report it, saves you the time to decide which mod to PM, and cut and paste the link, etc, and a lot less clicks.

Paul M
14 Jun 2005, 18:32
Good reasons I guess. :)

Zachery
14 Jun 2005, 21:12
I'd think it would just be easier to edit the template and remove the $show conditional... but thats me and all...

eXtremeTim
14 Jun 2005, 21:32
Were is the fun in that. ;) lol

tamarian
14 Jun 2005, 21:35
I'd think it would just be easier to edit the template and remove the $show conditional... but thats me and all...
It would it be easier if you guys didn't disable it in the first place, it was working fine before 3.0.7 ;)

Zachery
14 Jun 2005, 21:38
The conditional to report someones post has been there since 3.0.0 and in the betas as well.

tamarian
14 Jun 2005, 21:50
The conditional to report someones post has been there since 3.0.0 and in the betas as well.

Zachery, while we have your attention :) could I get you to check this for me (or forward it to the WYSIWYG guru in dev):

http://www.vbulletin.org/forum/showthread.php?t=83034

It's holding up the spell checkers release, and I'm stomped.

Zachery
14 Jun 2005, 21:52
Not a js guru, Scott or Kier would have to respond to that, and my poking won't help that much :\

tamarian
14 Jun 2005, 22:00
Not a js guru, Scott or Kier would have to respond to that, and my poking won't help that much :\

These guys are "unpokable" at the moment I take it. I'll send a PM and see what happens. :)

FleaBag
31 Jul 2005, 15:01
It allowed me to report my own post with RC1, but I didn't get a notification e-mail yet. That may be my server though, so I'll wait it out and post an update.

Boofo
25 Aug 2005, 11:55
This shows up in pms now but when you click it, it gives a no permissions error.

Marco van Herwaarden
25 Aug 2005, 13:27
Ofcourse it will also show in pm's, since pm's use the same template. It will cause an error because clicking on it will call the report.php script, which expects a postid, and there is no postid in a pm

Boofo
25 Aug 2005, 13:30
And, Marco, what would we need to do to fix this issue? ;)

Marco van Herwaarden
25 Aug 2005, 13:38
I don't think you have access to the type of object that is using the postbit in 'postbit_display_complete', so you can not add a test to see if it is a post or a pm.

what you could do is create a 'postbit_factory' plugin, that save the $postbit_type. For example in postbit_factory:
global $show;
$show['hack_postbit_type'] = $postbit_type;

Then in the 'postbit_display_complete' you would put:
global $show;
if ($show['hack_postbit_type'] == 'post')
{
$show['reportlink'] = $this->registry->userinfo['userid'];
}

Not tested this, but something like this should work.

tamarian
25 Aug 2005, 14:20
Plugin updated with this :)

if (THIS_SCRIPT == 'showthread' OR THIS_SCRIPT == 'showpost') $show['reportlink'] = $this->registry->userinfo['userid'];

Marco van Herwaarden
25 Aug 2005, 14:44
Just looking back at this line now, why do you put the userid in a boolean variable?

tamarian
25 Aug 2005, 14:47
Just looking back at this line now, why do you put the userid in a boolean variable?

Not intended as userid, just a quick way for setting true or false. The intended results is saying "If this is a registered member, show the darn report button".

Marco van Herwaarden
25 Aug 2005, 14:56
Then just use:
$show['reportlink'] = ($this->registry->userinfo['userid'] ? true : false);

tamarian
25 Aug 2005, 15:02
Then just use:
$show['reportlink'] = ($this->registry->userinfo['userid'] ? true : false);

It's the same thing.

Marco van Herwaarden
25 Aug 2005, 16:09
Not really, what if some script somewhere will do a real boolean test, and you put a number in there?

tamarian
25 Aug 2005, 21:11
Not really, what if some script somewhere will do a real boolean test, and you put a number in there?

Another script won't go through it, since this explicitly runs for showthread and showpost.

BTW, this code is stock from vBulletin, prior to disabling the ability to report own post. It could be done as if/then/else or iif, or left as is.

Marco van Herwaarden
25 Aug 2005, 22:47
$show['reportlink'] = ($this->registry->userinfo['userid'] AND $this->registry->userinfo['userid'] != $this->post['userid']);
That is the stock code, which will evaluate to either true or false.

tamarian
25 Aug 2005, 22:56
$show['reportlink'] = ($this->registry->userinfo['userid'] AND $this->registry->userinfo['userid'] != $this->post['userid']);
That is the stock code, which will evaluate to either true or false.

No it's not. This is the current stock code, where you cannot report your own post.


BTW, this code is stock from vBulletin, prior to disabling the ability to report own post.

Marco van Herwaarden
25 Aug 2005, 23:16
$show['reportlink'] = ($this->registry->userinfo['userid'] AND $this->registry->userinfo['userid'] != $this->post['userid']);
That is the code from 3.5 Beta 1.

So i guess you are talking about implementing 3.0.x code into vB3.5

I think we better stop this discussion because i have the feeling it is turning into a i am right, no i am right one.

tamarian
25 Aug 2005, 23:23
i have the feeling it is turning into a i am right, no i am right one.

I think it started like that. :)

MJM
16 Jul 2006, 21:06
Thanks very much for this!
We're using this in conjunction with 3.54 Reported post creates new thread (http://www.vbulletin.org/forum/showthread.php?t=83074) in specified private forum which allows for member usergroup to view and reply to their own reported post. (and mods/admin can correspond to)

Can Post Threads - Yes
Can View Others' Threads - No
Can Reply to Own Threads - Yes

Will be trying this plugin later tonight on 3.6 RC1 using the new default
Reported post creates new thread in specified forum.

Here's to hoping it will work.

Cheers,
Mark

MJM
17 Jul 2006, 20:56
Re: Member can report own post in 3.6 RC2 ... Freddie says in this post (http://www.vbulletin.com/forum/showthread.php?p=1166730#post1166730)
"I believe it is still hidden in the postbit template so you'll just need to modify the template."

But I don't know how to do that, so we installed this plugin in our 3.6 RC2 and it seems to work fine.

Thanks!
Mark