Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.7 > vBulletin 3.7 Template Modifications

Reply
 
Thread Tools
Auto-solve report threads Details »»
Auto-solve report threads
Version: 1.00, by Lea Verou Lea Verou is offline
Developer Last Online: Jul 2012 Show Printable Version Email this Page

Category: Administrative and Maintenance Tools - Version: 3.7.3 Rating:
Released: 09-19-2008 Last Update: Never Installs: 22
Template Edits
Re-useable Code Translations  
No support by the author.

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

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 09-27-2008, 01:30 AM
Alfa1's Avatar
Alfa1 Alfa1 is offline
 
Join Date: Dec 2005
Location: Netherlands
Posts: 3,537
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Find:
PHP Code:
<if condition="$show['inlinemod']">
$spacer_close
</form>
$spacer_open
</if> 
Place the code below.
Reply With Quote
  #13  
Old 09-27-2008, 03:07 AM
Lea Verou Lea Verou is offline
 
Join Date: Jul 2005
Location: Greece
Posts: 1,856
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by transparent View Post
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.
Reply With Quote
  #14  
Old 09-27-2008, 11:30 AM
Alfa1's Avatar
Alfa1 Alfa1 is offline
 
Join Date: Dec 2005
Location: Netherlands
Posts: 3,537
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by hornstar1337 View Post
[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.
Reply With Quote
  #15  
Old 09-27-2008, 12:02 PM
Lea Verou Lea Verou is offline
 
Join Date: Jul 2005
Location: Greece
Posts: 1,856
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Alfa1 View Post
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 )
Reply With Quote
  #16  
Old 09-27-2008, 12:04 PM
Alfa1's Avatar
Alfa1 Alfa1 is offline
 
Join Date: Dec 2005
Location: Netherlands
Posts: 3,537
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Now that this process is automatic, it makes sense for me to start this process.
Reply With Quote
  #17  
Old 09-27-2008, 06:48 PM
TheInsaneManiac TheInsaneManiac is offline
 
Join Date: Feb 2008
Posts: 1,360
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 -->
Reply With Quote
  #18  
Old 09-27-2008, 07:39 PM
tavarish tavarish is offline
 
Join Date: May 2007
Posts: 34
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

any options to add the nick of the mod who solved it at the end after the thread title?
Reply With Quote
  #19  
Old 09-27-2008, 07:53 PM
Lea Verou Lea Verou is offline
 
Join Date: Jul 2005
Location: Greece
Posts: 1,856
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by TheInsaneManiac View Post
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 View Post
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]" />
Reply With Quote
  #20  
Old 09-27-2008, 08:26 PM
transparent transparent is offline
 
Join Date: Apr 2008
Posts: 74
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Michelle View Post
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 View Post
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 View Post
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!
Reply With Quote
  #21  
Old 09-27-2008, 08:50 PM
Lea Verou Lea Verou is offline
 
Join Date: Jul 2005
Location: Greece
Posts: 1,856
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by transparent View Post
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
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:31 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04538 seconds
  • Memory Usage 2,330KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (5)bbcode_html
  • (2)bbcode_php
  • (9)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete