The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Possible to hand code a link to move a thread to another specific forum?
Is it possible to create a link that admins/mods can click that will perform the action of moving a thread to a different (specified within the link code) forum, instead of having to use Thread Tools > Move > choose forum
We move threads a lot and if we could code it so that whenever you are viewing a thread in X forum there's a link to move the thread to Y forum, that'd save us a lot of time. I'm comfortable with the 'if the thread is in X forum' code that would display the link in the right place but no idea what the code would be (if it is actually possible) to have the the next step skipped and go direct to the thread being moved to Y forum. Thanks for any pointers anyone can give. I have searched for things like 'hand code thread move' but not found any solutions. |
#2
|
|||
|
|||
I think you can do it with a form. It would be something like:
Code:
<form method="post" action="inlinemod.php?do=domovethread&threadids=TID"> <input type="hidden" name="destforumid" value="FID"> <input type="hidden" name="threadids" value="TID"> <input type="hidden" name="do" value="domovethreads"> </form> You also need to add an input type="submit" or else use some js to submit the form. You can probably make it a link if you want but I'm not really an html person so I don't know how to do it off he top of my head. |
2 благодарности(ей) от: | ||
blind-eddie, ozzy47 |
#3
|
||||
|
||||
Where would this link be on your board?
|
#4
|
|||
|
|||
Sorry, should have given more info.
Ideally somewhere on the individual thread, so in the SHOWTHREAD template. --------------- Added [DATE]1406134322[/DATE] at [TIME]1406134322[/TIME] --------------- Quote:
|
#5
|
|||
|
|||
There's a mistake in the above. Well, at least one mistake, I didn't test it. But I think the do and threadids input fields need to be in the form and not in the action (or in addition to being in the action). In the template for the inline mod menu, they're in both the action and the form, but it looks like the code uses 'p' when it cleans the input.
I fixed the above code. |
#6
|
|||
|
|||
Tried the code, thank you I got this error:
Quote:
PHP Code:
EDIT: Added security token code copied over from the threadadmin_movethread template as follows: PHP Code:
Quote:
|
#7
|
|||
|
|||
That's my fault again - the name of the input field should be threadids (with an s). Again, I've fixed my code in the original post.
|
#8
|
|||
|
|||
Great, it works. Thanks so much
For anyone else interested this is the final code (obviously alter the forumid to your needs) PHP Code:
Edited to add: Another little update, the method above will leave a permanant redirect. I didn't want any redirect so I added an input to handle that: PHP Code:
|
3 благодарности(ей) от: | ||
blind-eddie, omardealo, z3r0 |
#9
|
|||
|
|||
I've found this is conflicting with the inline moderation tools.
Usually when you click the checkbox on a post it highlights it (makes it yellow) then you scroll down to the bottom of the page and the dropdown menu shows you how many posts you've selected, and you can move/delete/merge/etc. With these buttons added the posts don't get highlighted and it says 0 in the dropdown menu, even if some checkboxes are selected. I will keep testing and hopefully find a fix but thought I'd post here in case anyone had any suggestions? Thanks! |
#10
|
||||
|
||||
You cannot put a <form> within another <form> which is, I am guessing, the problem you are having.
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|