View Full Version : One click move thread?
Hi there,
On the forum I manage, we have what we call a 'Breached Content' forum. Instead of deleting inappropriate content, it is moved there. This helps reduce forum clutter caused by 'deleted' messages.
Anyway, I was wondering whether it'd be possible to either create a button, or add an option to the thread tools menu, to move a thread straight to 'Breached Content'?
This, combined with the postbit banning mod, could reduce the time before advertising messages get removed, and could reduce the impact of what I call a 'goatse attack'.
I'm sure this wouldn't be a complicated mod to do, so could anybody out there help?
Thanks in advance,
Gav
AlokSharma
03-13-2012, 09:28 AM
This is quite a old thread. Anyway, I found a work around at https://www.vbulletin.com/forum/showthread.php/30374-One-click-move
Lynne
03-13-2012, 10:53 PM
I've also posted the code for this here before, so a search would probably come across the code.
AlokSharma
03-14-2012, 03:10 AM
Can you please post a link.
Thanks in advance.
BirdOPrey5
03-16-2012, 01:19 PM
Actually I remember Lynne helped me with this back in the day...
https://vborg.vbsupport.ru/showthread.php?t=210513]
They still work. :up:
AlokSharma
03-16-2012, 01:27 PM
Hey Buddy,
Thanks a lot.
AlokSharma
03-19-2012, 03:01 AM
Unfortunately, that code did not work. So I had to modify it as below:
<vb:if condition="$bbuserinfo['usergroupid'] == 6">
<vb:if condition="$threadinfo['forumid'] == '19'">
<form action="postings.php?do=domovethread&t={vb:raw thread.threadid}" method="post" name="resolved" style="display:inline;">
<input type="hidden" name="s" value="{vb:raw session.sessionhash}" />
<input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" />
<input type="hidden" name="t" value="{vb:raw thread.threadid}" />
<input type="hidden" name="do" value="domovethread" />
<input type="hidden" name="title" value="{vb:raw thread.threadtitle}" />
<input type="hidden" name="redirect" value="none" />
<input type="hidden" name="redirecttitle" value="{vb:raw thread.threadtitle}" />
<input type="hidden" name="destforumid" value="31" />
<input type="submit" class="button" value="Resolved" />
</form>
<vb:elseif condition="$threadinfo['forumid'] == '32'" />
<form action="postings.php?do=domovethread&t={vb:raw thread.threadid}" method="post" name="resolved" style="display:inline;">
<input type="hidden" name="s" value="{vb:raw session.sessionhash}" />
<input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" />
<input type="hidden" name="t" value="{vb:raw thread.threadid}" />
<input type="hidden" name="do" value="domovethread" />
<input type="hidden" name="title" value="{vb:raw thread.threadtitle}" />
<input type="hidden" name="redirect" value="none" />
<input type="hidden" name="redirecttitle" value="{vb:raw thread.threadtitle}" />
<input type="hidden" name="destforumid" value="28" />
<input type="submit" class="button" value="Resolved" />
</form>
</vb:if>
</vb:if>
But the problem is that the following condition is not executing at all:
<vb:if condition="$threadinfo['forumid'] == '19'">
Any help will be highly appreciated.
P.S. I tried the above condition with & without the apostrophe.
BirdOPrey5
03-19-2012, 03:06 AM
If it's a number you should never use quotes when testing ==
so
<vb:if condition="$threadinfo['forumid'] == 19">
And yes that was VB3 code so it looks like you updated it to VB4 correctly.
Then it depends what template you are using the code in. I believe $threadinfo was for showthread... what template are you putting the code in?
AlokSharma
03-19-2012, 03:22 AM
Actually, that condition is not working even without the quotes, so that's why I used the quotes. Anyway, I will remove the quotes.
I am putting that condition in the threadbit template. Since there are two main forums each with open & close sub-forums, I am using a condition so that the thread is moved to its respective sub-forum.
BirdOPrey5
03-19-2012, 12:07 PM
Look in the threadbit template then for what the "thread" variable is called. It may be just $thread. I see in your code you use {vb:raw thread.xxx} so that would mean the variable is $thread not $threadinfo... (threadinfo would be {vb:raw threadinfo.xxx})
AlokSharma
03-19-2012, 12:56 PM
Ok, so it will be like this:
<vb:if condition="$thread.forumid == 19">
or may be:
<vb:if condition="{vb:raw thread.forumid} == 19">
Boofo
03-19-2012, 12:59 PM
<vb:if condition="$thread['forumid'] == 19">
AlokSharma
03-20-2012, 12:05 PM
Thanks, that worked out.
BTW, if I want to put this one click move code in the showthread page just next to the title, then which template I have to edit.
BirdOPrey5
03-20-2012, 12:41 PM
then edit the showthread template and use $threadinfo like in the original code.
AlokSharma
03-22-2012, 11:31 AM
I checked that template but couldn't find the where the thread heading is displayed at the top in the form of navigation tree.
E.g. Home Icon > Forum > Tech Support > Thread Title
I wish to display the one click move button over here.
BirdOPrey5
03-22-2012, 11:44 AM
That is in the navbar template... actually each on of those "Forum" / "Tech Support" etc... is a separate call to a "breadcrumb" template.
However I don't know if $thread is going to be available in the navbar since the navbar is built early on.
AlokSharma
03-22-2012, 01:01 PM
Thanks a lot. I added the code next to the Thread: <Title>.
Here is the code:
<vb:if condition="$threadinfo['forumid'] == <source_forum_id>">
<form action="postings.php?do=domovethread&t={vb:raw thread.threadid}" method="post" name="resolved" style="display:inline;">
<input type="hidden" name="s" value="{vb:raw session.sessionhash}" />
<input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" />
<input type="hidden" name="t" value="{vb:raw thread.threadid}" />
<input type="hidden" name="do" value="domovethread" />
<input type="hidden" name="title" value="{vb:raw threadinfo.title}" />
<input type="hidden" name="redirect" value="none" />
<input type="hidden" name="redirecttitle" value="{vb:raw threadinfo.title}" />
<input type="hidden" name="destforumid" value="<target_forum_id>" />
<input type="submit" class="button" value="Mark as Resolved" />
</form>
<vb:elseif condition="$threadinfo['forumid'] == <source_forum_id>" />
<form action="postings.php?do=domovethread&t={vb:raw thread.threadid}" method="post" name="resolved" style="display:inline;">
<input type="hidden" name="s" value="{vb:raw session.sessionhash}" />
<input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" />
<input type="hidden" name="t" value="{vb:raw thread.threadid}" />
<input type="hidden" name="do" value="domovethread" />
<input type="hidden" name="title" value="{vb:raw threadinfo.title}" />
<input type="hidden" name="redirect" value="none" />
<input type="hidden" name="redirecttitle" value="{vb:raw threadinfo.title}" />
<input type="hidden" name="destforumid" value="<target_forum_id>" />
<input type="submit" class="button" value="Mark as Resolved" />
</form>
</vb:if>
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.