Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Beta Releases

Reply
 
Thread Tools
Recycle Bin Hack v0.1b *UNSUPPORTED* Details »»
Recycle Bin Hack v0.1b *UNSUPPORTED*
Version: 1.00, by FlyingDutchman FlyingDutchman is offline
Developer Last Online: Feb 2009 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 09-11-2002 Last Update: Never Installs: 0
Is in Beta Stage  
No support by the author.

IMPORTANT: I HAVE REMOVED THE INSTALL SCRIPT FOR NOW, BECAUSE I AM UPDATING THIS HACK WITH LOTS OF NEW ADDITIONS, PLEASE CHECK BACK IN AROUND A WEEK FOR NEW UPDATES

What does this hack do: This hack will move all threads users 'delete' to a forum, so it will act like a Recycle Bin.

Requested By:
1: https://vborg.vbsupport.ru/showthrea...threadid=36107
2: https://vborg.vbsupport.ru/showthrea...threadid=40989
3: https://vborg.vbsupport.ru/showthrea...threadid=37264

Features: -Only first post in thread will be recycled, 'normal' posts will still be fully deleted
-Anyone with delete permissions can delete/recycle a post
-Total deletion of a whole thread can only be performed by a admin (not sure about mod )
-Recycle Bin forum can just be disabled for new posts, so it really acts like a sort of archive

Installation: -Make a new forum and write down the forumid
-Add a new replacement variable '{recycleforumid}' and set it to your recycle bin's forum id.
-Use my install-file to do the modifications needed
You may need to edit your editpost template so that it doesn't say 'if this post is the first post of the thread, the whole thread will be deleted...' anymore - NOT REQUIRED for the working of this hack.

Notes: I've made this hack for vb 2.2.6, but it should work on 2.2.x too...
Can somebody please test it for vb 2.2.7 for me and tell me if it works? thanks.

Future additions-list:
-total new access mask (i.e. 'canrecycle') for more security
-restore function to restore files to their original location
-admin cp feature (restore, delete, 'restored by:' feature possibly)

Show Your Support

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

Comments
  #2  
Old 09-12-2002, 02:53 PM
NuclioN's Avatar
NuclioN NuclioN is offline
 
Join Date: Aug 2002
Posts: 955
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This works if you edit the post and delete it. But when you use de admin options in the showthreads it won't. Can you make that work as well?
Reply With Quote
  #3  
Old 09-12-2002, 04:13 PM
FlyingDutchman's Avatar
FlyingDutchman FlyingDutchman is offline
 
Join Date: Nov 2001
Location: The Netherlands
Posts: 201
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

if you are a admin, you could also just move the thread to the recycle bin forum, right?
anyway, i'll do this tonight or so when i have more time...
Reply With Quote
  #4  
Old 09-12-2002, 04:34 PM
Neo's Avatar
Neo Neo is offline
 
Join Date: Oct 2001
Location: Anywhere
Posts: 1,817
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You know there is a much simpler way of doing this. You dont even need to add a new template for it and or all the code.
Reply With Quote
  #5  
Old 09-12-2002, 04:37 PM
FlyingDutchman's Avatar
FlyingDutchman FlyingDutchman is offline
 
Join Date: Nov 2001
Location: The Netherlands
Posts: 201
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

how would you wanna do that then?

i don't see any other way atm to make it so that you fully delete a post (that is not the first post of a thread) and delete/recycle the whole thread if it is the first post
Reply With Quote
  #6  
Old 09-12-2002, 04:40 PM
Neo's Avatar
Neo Neo is offline
 
Join Date: Oct 2001
Location: Anywhere
Posts: 1,817
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You are basically moving the thread correct?
Reply With Quote
  #7  
Old 09-12-2002, 04:46 PM
FlyingDutchman's Avatar
FlyingDutchman FlyingDutchman is offline
 
Join Date: Nov 2001
Location: The Netherlands
Posts: 201
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yup, but i didn't find the code for domove usefull, it's a lot, so i ripped something out, as a new 'function'...
then you also are not able to show the recycled redirection template...

anywayz, if you choose to leave out the new stuff in postings.php you'd still need 2 editpost templates and you'll need to edit editpost.php...
not much more work to add code for redirection, right?
Reply With Quote
  #8  
Old 09-12-2002, 04:50 PM
Neo's Avatar
Neo Neo is offline
 
Join Date: Oct 2001
Location: Anywhere
Posts: 1,817
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well if you take a look in admin/functions.php and look for the function called deletethread() you can add just a small amount of code to it and it will work. All you need it make add one query and a if statement.
Reply With Quote
  #9  
Old 09-12-2002, 04:55 PM
FlyingDutchman's Avatar
FlyingDutchman FlyingDutchman is offline
 
Join Date: Nov 2001
Location: The Netherlands
Posts: 201
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hmm, yeah
you beat me, lol
anyway, I'd still see thesame editpost template right?

well, maybe my hack is just stupid but hey, it's my first
Reply With Quote
  #10  
Old 09-12-2002, 05:03 PM
Neo's Avatar
Neo Neo is offline
 
Join Date: Oct 2001
Location: Anywhere
Posts: 1,817
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No no your hack is well coded I am just helping joo out. Once thing I notice with people is that the less code the more they like it oO;;;;

As for the template if you stay the same, but you could add a admin option to have it turned on your off and then use the deletethread function like this

PHP Code:
deletethread($threadid,$use_recycle_bin,$bin_forumid,$foruminfo[countposts]); 
then
$use_recycle_bin = 1 // this means it active 0 means its not
$bin_forumid = XX // whatever forumid you want this to move to


I believe once you edit the admin/functions.php that would be the only edit in postings.php
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 05:29 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.04213 seconds
  • Memory Usage 2,289KB
  • Queries Executed 23 (?)
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)bbcode_php
  • (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
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)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