Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 04-07-2009, 01:34 AM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Programming a button or link to move a thread with 1 click

After adding several subforums I need to be able to move threads very quickly... I'm looking to program a button/link that shows up for admins only in each thread (showthread.php) that would allow a 1 click solution to move a thread immediately leaving a perm redirect- no confirmation screen, no options- just do it.

I can do the <if> statements and edit the templates and such but no clue on what the code is to move the thread itself...

Anyone know off hand? This should be a 'simple' piece of code I'm sure. I'd hard code the forum ID of where it's going and figure I'd have several links or buttons at the top of the page.

"Quick Move to Forum A"
"Quick Move to Forum B"
"Quick Move to Forum C"
...
Reply With Quote
  #2  
Old 04-07-2009, 01:45 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I do this on my site (kinda). Here is the code I use. I think I changed it correctly from what I had to what you want (of course, use on your test site first!). You will have to put it where you want with the correct html around it, and don't put it inside any other form cuz that won't work.
HTML Code:
<form action="postings.php?do=domovethread&amp;t=$threadid" method="post" name="formname">
<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="$threadinfo[title]" />
<input type="hidden" name="redirect" value="none" />
<input type="hidden" name="redirecttitle" value="$threadinfo[title]" />
<input type="hidden" name="destforumid" value="xx" />
<input type="submit" class="button" value="Move Show" />
</form>
Replace xx with the forumid and each form should have a unique name (I put formname as an example in this one). You will need a form for each Quick Move button.
Reply With Quote
  #3  
Old 04-07-2009, 12:24 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks!

Will check it out.

--------------- Added [DATE]1239111722[/DATE] at [TIME]1239111722[/TIME] ---------------

Thanks again, works great...

I changed the "redirect" value from "none" to "perm" and it's leaving permanent redirects which was exactly what I needed, everything else is woking perfectly.

I added it in the SHOWTHREAD template directly below the navbar, I'll make a handful of buttons for all the popular subforums and set it up so myself and senior mods see this and can quickly organize the site as we come upon threads.
Reply With Quote
  #4  
Old 04-30-2009, 12:30 PM
PaLeRmO PaLeRmO is offline
 
Join Date: Mar 2008
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello
Post move button add
postbit template add ?
How do I add
please help
Reply With Quote
  #5  
Old 04-30-2009, 01:59 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You want to create a button to move a post? There is already the Moderation dropdown at the bottom of the thread. Just check the box next to the post button and select Move Posts from the dropdown.
Reply With Quote
  #6  
Old 05-01-2009, 10:20 PM
PaLeRmO PaLeRmO is offline
 
Join Date: Mar 2008
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

moving with a single button
very important for me
thank you
Reply With Quote
  #7  
Old 05-01-2009, 11:11 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You can't move a post with a single button in the post. Moving it requires a form and you can't have a form in a post because the posts are all in a form already (you can't have a form within a form).
Reply With Quote
Reply


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 12:41 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.03830 seconds
  • Memory Usage 2,223KB
  • Queries Executed 11 (?)
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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_html
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (7)postbit
  • (7)postbit_onlinestatus
  • (7)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete