vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Allow members to report own posts (https://vborg.vbsupport.ru/showthread.php?t=82973)

tamarian 06-11-2005 10:00 PM

Allow members to report own posts
 
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 if you have installed this mod.

eXtremeTim 06-12-2005 08:19 PM

Installed. :) Good work.

tamarian 06-12-2005 08:29 PM

Thanks. I expected the first reply to this thread to be "Who would want this?" :)

eXtremeTim 06-12-2005 09:10 PM

Nah I am using it on my scripting site already. ;)

Paul M 06-14-2005 03:01 PM

Quote:

Originally Posted by tamarian
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 06-14-2005 03:10 PM

Quote:

Originally Posted by Paul M
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 06-14-2005 03:22 PM

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 06-14-2005 04:32 PM

Good reasons I guess. :)

Zachery 06-14-2005 07:12 PM

I'd think it would just be easier to edit the template and remove the $show conditional... but thats me and all...

eXtremeTim 06-14-2005 07:32 PM

Were is the fun in that. ;) lol

tamarian 06-14-2005 07:35 PM

Quote:

Originally Posted by Zachery
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 06-14-2005 07:38 PM

The conditional to report someones post has been there since 3.0.0 and in the betas as well.

tamarian 06-14-2005 07:50 PM

Quote:

Originally Posted by Zachery
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):

https://vborg.vbsupport.ru/showthread.php?t=83034

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

Zachery 06-14-2005 07:52 PM

Not a js guru, Scott or Kier would have to respond to that, and my poking won't help that much :\

tamarian 06-14-2005 08:00 PM

Quote:

Originally Posted by Zachery
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 07-31-2005 01:01 PM

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 08-25-2005 09:55 AM

This shows up in pms now but when you click it, it gives a no permissions error.

Marco van Herwaarden 08-25-2005 11:27 AM

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 08-25-2005 11:30 AM

And, Marco, what would we need to do to fix this issue? ;)

Marco van Herwaarden 08-25-2005 11:38 AM

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:
PHP Code:

global $show;
$show['hack_postbit_type'] = $postbit_type

Then in the 'postbit_display_complete' you would put:
PHP Code:

global $show;
if (
$show['hack_postbit_type'] == 'post')
{
$show['reportlink'] = $this->registry->userinfo['userid'];


Not tested this, but something like this should work.

tamarian 08-25-2005 12:20 PM

Plugin updated with this :)

PHP Code:

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


Marco van Herwaarden 08-25-2005 12:44 PM

Just looking back at this line now, why do you put the userid in a boolean variable?

tamarian 08-25-2005 12:47 PM

Quote:

Originally Posted by MarcoH64
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 08-25-2005 12:56 PM

Then just use:
PHP Code:

$show['reportlink'] = ($this->registry->userinfo['userid'] ? true false); 


tamarian 08-25-2005 01:02 PM

Quote:

Originally Posted by MarcoH64
Then just use:
PHP Code:

$show['reportlink'] = ($this->registry->userinfo['userid'] ? true false); 


It's the same thing.

Marco van Herwaarden 08-25-2005 02:09 PM

Not really, what if some script somewhere will do a real boolean test, and you put a number in there?

tamarian 08-25-2005 07:11 PM

Quote:

Originally Posted by MarcoH64
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 08-25-2005 08:47 PM

PHP Code:

        $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 08-25-2005 08:56 PM

Quote:

Originally Posted by MarcoH64
PHP Code:

        $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.

Quote:

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


Marco van Herwaarden 08-25-2005 09:16 PM

PHP Code:

        $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 08-25-2005 09:23 PM

Quote:

Originally Posted by MarcoH64
i have the feeling it is turning into a i am right, no i am right one.

I think it started like that. :)

MJM 07-16-2006 07:06 PM

Thanks very much for this!
We're using this in conjunction with 3.54 Reported post creates new thread 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 07-17-2006 06:56 PM

Re: Member can report own post in 3.6 RC2 ... Freddie says in this post
"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


All times are GMT. The time now is 02:08 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01208 seconds
  • Memory Usage 1,821KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (8)bbcode_php_printable
  • (11)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (33)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete