vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=229)
-   -   Administrative and Maintenance Tools - Auto-solve report threads (https://vborg.vbsupport.ru/showthread.php?t=191408)

Lea Verou 09-19-2008 10:00 PM

Auto-solve report threads
 
In our forum we have a category for reports and when a report is "solved" we move them into "Reported Archive" and put a [solved] in front of their title.
We used to do this manually, until today that I thought of a way to make the process automatic, and it only requires a template edit!

I'm releasing this for any forum that has a similar moderation regime.

In your SHOWTHREAD template add somewhere (not inside a form though) the following code:
HTML Code:

<if condition="can_moderate() AND $forumid==$vboptions['rpforumid']">
<form method="post" action="postings.php?do=domovethread&t=$threadid">
    <input type="hidden" name="s" value="$session[sessionhash]" />
    <input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
    <input type="hidden" name="t" value="$threadid" />
    <input type="hidden" name="do" value="domovethread" />
    <input type="hidden" name="title" value="[solved] $threadinfo[title]" />
    <input type="hidden" name="destforumid" value="88" />
    <input type="hidden" name="redirect" value="none" />
    <input type="submit" value="Solve report">
</form>
</if>

in that code, subsitute 88 to the actual forumid of your reported archive.

FAQ


I get an "Invalid Action Specified" or "You did not select any posts" error.
https://vborg.vbsupport.ru/showpost....8&postcount=11
I get a no permission error
https://vborg.vbsupport.ru/showpost....50&postcount=9
How do I get the moderator's name to show in the moved thread's title as well?
https://vborg.vbsupport.ru/showpost....2&postcount=18

Forum Lover 09-20-2008 02:44 PM

SO, you mean, while we remove to "reported archive" then title will show "solved". right?

Lea Verou 09-20-2008 03:26 PM

I am saying that when the button that will appear is clicked, it moves the thread to the Reported Archive and puts '[solved]' in front of its title.

Simple as that.

Hornstar 09-23-2008 10:06 PM

amazing how something as simple as this will save you time :) thanks for sharing.

TheInsaneManiac 09-24-2008 01:34 AM

You could also make it so if a thread is old, or spam, you could send it to your trash forums instantly:

<if condition="can_moderate()">
<form method="post" action="postings.php?do=domovethread&t=$threadid">
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
<input type="hidden" name="t" value="$threadid" />
<input type="hidden" name="do" value="domovethread" />
<input type="hidden" name="title" value="[trash] $threadinfo[title]" />
<input type="hidden" name="destforumid" value="88" />
<input type="hidden" name="redirect" value="none" />
<input type="submit" value="Trash Thread">
</form>
</if>

FreshFroot 09-24-2008 11:49 PM

great work guys!

Hornstar 09-26-2008 12:17 AM

I got the error: Invalid Action Specified
What do you think I have done wrong? I change the section 88 to my section 443 was there anything else I had to change?

This is the url it is sending me to: forums/inlinemod.php?threadid=115069&p=
Does that help?

Question
1: Where is the best place to position it? in your opinion. under what code?

Thanks.

Edit: Solved.
You must have this code down near the bottom of the showthread or it wont work for some reason.

Lea Verou 09-26-2008 12:26 AM

Quote:

Originally Posted by hornstar1337 (Post 1630503)
I got the error: Invalid Action Specified
What do you think I have done wrong? I change the section 88 to my section 443 was there anything else I had to change?

This is the url it is sending me to: forums/inlinemod.php?threadid=115069&p=
Does that help?

Question
1: Where is the best place to position it? in your opinion. under what code?

Thanks.

My first guess is that you put the code inside the inlinemod form, and it tries to send the inlinemod form instead.

I have no idea where the best place to position it in the default vB templates is, as mine are wildly customized. I know for sure though that it shouldn't be inside an existing form.

@TheInsaneManiac: Cool idea ;)

Hornstar 09-26-2008 02:16 AM

[S]One of my mods gets this: (Edit: all mods get it, only I dont)
, you do not have permission to access this page. This could be due to one of several reasons:
  1. Your user account may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
  2. If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.
I logged in on his name, went to the report, but then when i clicked on the report solved button, it gave me that message as well.

His primary usergroup is the mod usergroup, any reason why it is not giving him permission to do it?[/S]

Edit: solved, some mods didnt have moderator permission in that forum.

transparent 09-26-2008 08:42 PM

I added the code and am not getting any errors which is good and I specified the forum {reports completed} as required but I'm not sure what exactly is suppose to happen now...

I created a test report and my report button isn't "appearing as clicked" or anything of the sorts so once the report comes in what do we do with it?

Based on what I read above it sounds as though the report button should show as it has been clicked and then you click it again and it moves the report to your completed forum adding Solved to the title. Is that correct or am I misunderstanding?

Thank you!

Alfa1 09-27-2008 01:30 AM

Find:
PHP Code:

<if condition="$show['inlinemod']">
$spacer_close
</form>
$spacer_open
</if> 

Place the code below.

Lea Verou 09-27-2008 03:07 AM

Quote:

Originally Posted by transparent (Post 1631200)
I added the code and am not getting any errors which is good and I specified the forum {reports completed} as required but I'm not sure what exactly is suppose to happen now...

I created a test report and my report button isn't "appearing as clicked" or anything of the sorts so once the report comes in what do we do with it?

Based on what I read above it sounds as though the report button should show as it has been clicked and then you click it again and it moves the report to your completed forum adding Solved to the title. Is that correct or am I misunderstanding?

Thank you!

The hack ADDS a button, it doesn't manipulate an existing one.

You understood what the hack does, but you didn't understand how it does it. :)

Alfa1 09-27-2008 11:30 AM

Quote:

Originally Posted by hornstar1337 (Post 1630550)
[s]One of my mods gets this: (Edit: all mods get it, only I dont)
, you do not have permission to access this page. This could be due to one of several reasons:
  1. Your user account may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
  2. If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.
I logged in on his name, went to the report, but then when i clicked on the report solved button, it gave me that message as well.

His primary usergroup is the mod usergroup, any reason why it is not giving him permission to do it?[/s]

Edit: solved, some mods didnt have moderator permission in that forum.

I gather this means that all moderators need to become moderators of the post report forum.

Lea Verou 09-27-2008 12:02 PM

Quote:

Originally Posted by Alfa1 (Post 1631545)
I gather this means that all moderators need to become moderators of the post report forum.

Or at the very least, they should have permission to move threads.

This hack doesn't do anything that couldn't be done before, it just speeds up a process, which can be useful if your mods have to do this process often (my mods were soooo glad about it :p)

Alfa1 09-27-2008 12:04 PM

Now that this process is automatic, it makes sense for me to start this process.

TheInsaneManiac 09-27-2008 06:48 PM

I seem to have a small problem. I want to add this code in next to my large reply button at the top of the post. Only it says I have not chosen a post. I even added an image for it:

<!-- report -->
<if condition="can_moderate() AND $forumid==$vboptions['rpforumid']">
<form method="post" action="postings.php?do=domovethread&t=$threadid">
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
<input type="hidden" name="t" value="$threadid" />
<input type="hidden" name="do" value="domovethread" />
<input type="hidden" name="title" value="[solved] $threadinfo[title]" />
<input type="hidden" name="destforumid" value="225" />
<input type="hidden" name="redirect" value="none" />
<input type="image" value="Solve report" src="$stylevar[imgdir_button]/solve.gif" width="105" height="21" border="0" alt="Solve report" name="image">
</form>
</if>
<!-- /report -->

tavarish 09-27-2008 07:39 PM

any options to add the nick of the mod who solved it at the end after the thread title?

Lea Verou 09-27-2008 07:53 PM

Quote:

Originally Posted by TheInsaneManiac (Post 1631797)
I seem to have a small problem. I want to add this code in next to my large reply button at the top of the post. Only it says I have not chosen a post. I even added an image for it:

<!-- report -->
<if condition="can_moderate() AND $forumid==$vboptions['rpforumid']">
<form method="post" action="postings.php?do=domovethread&t=$threadid">
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
<input type="hidden" name="t" value="$threadid" />
<input type="hidden" name="do" value="domovethread" />
<input type="hidden" name="title" value="[solved] $threadinfo[title]" />
<input type="hidden" name="destforumid" value="225" />
<input type="hidden" name="redirect" value="none" />
<input type="image" value="Solve report" src="$stylevar[imgdir_button]/solve.gif" width="105" height="21" border="0" alt="Solve report" name="image">
</form>
</if>
<!-- /report -->

It says you have not chosen a post because you put the code inside the inlinemod form. I said in the first post that it shouldn't be inside an existing form.

Quote:

Originally Posted by tavarish (Post 1631821)
any options to add the nick of the mod who solved it at the end after the thread title?

Sure, just change this:
HTML Code:

<input type="hidden" name="title" value="[solved] $threadinfo[title]" />
with this:
HTML Code:

<input type="hidden" name="title" value="[solved by $bbuserinfo[username]] $threadinfo[title]" />

transparent 09-27-2008 08:26 PM

Quote:

Originally Posted by Michelle (Post 1631390)
The hack ADDS a button, it doesn't manipulate an existing one.

You understood what the hack does, but you didn't understand how it does it. :)

Thank you for the explanation. This is a very valuable hack and will save my mods ALOT of time! Thank you!!

Quote:

Originally Posted by Alfa1 (Post 1631348)
Find:
PHP Code:

<if condition="$show['inlinemod']">
$spacer_close
</form>
$spacer_open
</if> 

Place the code below.

That worked perfect...That and the additional code edit below should be added to the 1st post. It will make it easier for users to get it working ; )

Quote:

Originally Posted by Michelle (Post 1631832)
Sure, just change this:
HTML Code:

<input type="hidden" name="title" value="[solved] $threadinfo[title]" />
with this:
HTML Code:

<input type="hidden" name="title" value="[solved by $bbuserinfo[username]] $threadinfo[title]" />

This is a great idea and addition too. Working great on my board!

Lea Verou 09-27-2008 08:50 PM

Quote:

Originally Posted by transparent (Post 1631852)
Thank you for the explanation. This is a very valuable hack and will save my mods ALOT of time! Thank you!!



That worked perfect...That and the additional code edit below should be added to the 1st post. It will make it easier for users to get it working ; )



This is a great idea and addition too. Working great on my board!

FAQ added ;)

tavarish 09-27-2008 09:39 PM

Thanks for the quick reply :)
Implemented and working 100%
Thanks a bunch!

Lea Verou 09-27-2008 09:50 PM

Quote:

Originally Posted by tavarish (Post 1631885)
Thanks for the quick reply :)
Implemented and working 100%
Thanks a bunch!

You forgot to click "Mark as installed" ;)

tavarish 09-27-2008 10:01 PM

Done ;) Javascript blocker stopped it before :)

Dingo14 09-27-2008 11:21 PM

when i push the button i get this message about wanting to merge post any ideas

vBulletin Tip #42: Not much would be accomplished by merging this item with itself.

Got it sorted thanks

Ok after I sorted the problem had no mod tools could not even delete a post with mod tools at bottom of thread the thread would not highlight either when adding a tick in box

Alfa1 09-28-2008 01:11 AM

You did not place it in the right spot. Please read my previous post.

Does anyone have an idea how to get post report titles(before they are solved) to include the name of the forum, the report is about?

Dingo14 09-28-2008 01:36 AM

Quote:

Originally Posted by Alfa1 (Post 1631348)
Find:
PHP Code:

<if condition="$show['inlinemod']">
$spacer_close
</form>
$spacer_open
</if> 

Place the code below.

i added the code below this but mine reads like this

Quote:

<if condition="$show['inlinemod']">
$spacer_close
<form action="inlinemod.php?threadid=$threadinfo[threadid]&amp;p=$postid" method="post" id="inlinemodform">
$spacer_open
</if>
i tried changing the code to yours as well

Alfa1 09-28-2008 02:27 AM

What version of vbulletin are you using?

Dingo14 09-28-2008 02:43 AM

v3.72 I have a friend who has v3.7.3 and he has the same code as mine in showthread template

this is friends template v3.7.3
Quote:

<if condition="$show['inlinemod']">
$spacer_close
<form action="inlinemod.php?threadid=$threadinfo[threadid]&amp;p=$postid" method="post" id="inlinemodform">
$spacer_open
</if>

Lea Verou 09-28-2008 03:05 PM

Quote:

Originally Posted by Dingo14 (Post 1631963)
i added the code below this but mine reads like this



i tried changing the code to yours as well

Try looking below that code.

Quote:

Originally Posted by Alfa1 (Post 1631955)
You did not place it in the right spot. Please read my previous post.

Does anyone have an idea how to get post report titles(before they are solved) to include the name of the forum, the report is about?

Go to the phrase that gets used for the report title and play around with the variables there.

Quote:

Originally Posted by Dingo14 (Post 1631911)
Ok after I sorted the problem had no mod tools could not even delete a post with mod tools at bottom of thread the thread would not highlight either when adding a tick in box

I don't understand what the problem is. Please elaborate.

Dingo14 09-28-2008 07:29 PM

ok when you want to delete a post you need to add a tick then the post normally highlight this never happened and when i went to use the mod tools at the bottom of thread they did not work took the code out and everything worked fine so not sure what it is

the main thread tools at top worked fine

This is a great mod when I had it working before this other happened hope this can be sorted

Lea Verou 09-29-2008 01:03 AM

You probably put the code inside the inlinemod form.

badheeu 09-29-2008 06:05 AM

Im getting blank page, when i press solve button.

http://www.kma.mv/forum/inlinemod.php?threadid=4025&p=

Can somebody tell me how to fix it. it is really useful

Best Regards
kma.mv

Dingo14 09-29-2008 10:29 AM

fixed the problem and thanks for a great and useful mod

Scandal 09-29-2008 06:23 PM

any way to lock the thread too?

-philos

Lea Verou 09-29-2008 07:30 PM

Quote:

Originally Posted by philos2 (Post 1633267)
any way to lock the thread too?



-philos

The only way I can think is to add another button.
I don't think its possible to do all at once with this approach.

TheInsaneManiac 09-29-2008 07:34 PM

Quote:

Originally Posted by Michelle (Post 1631832)
It says you have not chosen a post because you put the code inside the inlinemod form. I said in the first post that it shouldn't be inside an existing form.



Sure, just change this:
HTML Code:

<input type="hidden" name="title" value="[solved] $threadinfo[title]" />
with this:
HTML Code:

<input type="hidden" name="title" value="[solved by $bbuserinfo[username]] $threadinfo[title]" />

I know I stuck it in a form lol, I just didn't know how else to put it in there besides that form.

Lea Verou 09-29-2008 07:45 PM

Quote:

Originally Posted by TheInsaneManiac (Post 1633334)
I know I stuck it in a form lol, I just didn't know how else to put it in there besides that form. Thanks though :D.

Why do you care about how something that only your mods will see, in only one forum, will look?
Personally even though I care a lot about my site's looks, I don't give a damn about how moderator-only functions look, I just stick them in the first place that makes sense :p

transparent 09-29-2008 11:41 PM

I have a feature request...

Would it be possible to make it so that after you click the "Solve Report" and it moves the report to the completed section that it can take you back to your original location (ie...reported posts) instead of leaving you in the completed forum?

This hack is perfect for working several reports but if you login and see alot of reports you have the option to either work them one by one and then group move them (not use the hack) or use the "Solve Report" on each one which you then have to step your way back to the reports section again.

Having it drop you back to original location would maintain the awesome features of the hack (moving it, solving it, and showing who solved it) and let you do it in a timely fashion with alot of reports :)

TheInsaneManiac 10-03-2008 07:30 PM

Quote:

Originally Posted by Michelle (Post 1631832)
It says you have not chosen a post because you put the code inside the inlinemod form. I said in the first post that it shouldn't be inside an existing form.

So is there anyway to do it inside a form? I just want a regular button like new post, ect.

wickedstangs 10-04-2008 01:32 PM

Quote:

Originally Posted by Alfa1 (Post 1631348)
Find:
PHP Code:

<if condition="$show['inlinemod']">
$spacer_close
</form>
$spacer_open
</if> 

Place the code below.

I placed the code under the above.. And I don't see anything no icon nothing don't really get error's or anything... How do I use the solve?

Code:

<if condition="can_moderate() AND $forumid==$vboptions['rpforumid']">
<form method="post" action="postings.php?do=domovethread&t=$threadid">
    <input type="hidden" name="s" value="$session[sessionhash]" />
    <input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
    <input type="hidden" name="t" value="$threadid" />
    <input type="hidden" name="do" value="domovethread" />
    <input type="hidden" name="title" value="[solved] $threadinfo[title]" />
    <input type="hidden" name="destforumid" value="88" />
    <input type="hidden" name="redirect" value="none" />
    <input type="submit" value="Solve report">
</form>
</if>



All times are GMT. The time now is 05:49 PM.

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.01452 seconds
  • Memory Usage 1,878KB
  • 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
  • (1)bbcode_code_printable
  • (7)bbcode_html_printable
  • (4)bbcode_php_printable
  • (22)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete