Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
vB Recycle Bin Hack Details »»
vB Recycle Bin Hack
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: 03-09-2003 Last Update: Never Installs: 17
 
No support by the author.

IMPORTANT: ALTHOUGH I'VE TESTED IT ON A NEW INSTALL, I TAKE NO RESPONSIBILITY FOR ANY DAMAGE THIS HACK MAY DO TO YOUR FORUM! I JUST CAN'T STRESS THIS ENOUGH! ()


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


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.
-Recycle Bin forum can just be disabled for new posts, so it really acts like a sort of archive. (doesn't matter really, because the newthread & newreply images are gone in the recycle bin forum anyway)
-Admin CP options page, for easy recycle bin management.
-Restore function: users can restore their threads to the original location of the post.
-Users can place a 'deletion request', and if the admin thinks the reason is good, he/she can delete the thread (with one click ).
-Admin's can turn the Recycle Bin on and off
-Admin's can easily speicify the forum id of the forum that should be used as the Recycle Bin
-More probably


Installation:
Follow the instructions in install.txt that is included in the zip file.


Notes: I've tested this hack on a fresh install of 2.2.9, but it should also work on 2.2.x and 2.3.0, although i might not be able to give proper support for other versions than 2.2.9


Future additions-list:
-enable recycle bin on a per-forum basis (small addition, only if anyone really wants it)


Screenshots: https://vborg.vbsupport.ru/showthrea...069#post364069


Updates:
-10 march 2003: Hack is finally out of "BETA" stage and current version is 1.5
some bugs fixed and 2 new admin cp options added.
-11 march 2003: Updated hack to version 1.5.1
2 bugs fixed. zip file updated. new install doesn't need any fixes or anything.
See this post for more info & upgrade instructions (v1.5 to v1.5.1)

Show Your Support

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

Comments
  #52  
Old 04-26-2003, 02:17 PM
Andrew111888's Avatar
Andrew111888 Andrew111888 is offline
 
Join Date: Mar 2003
Posts: 208
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Anyone?
Reply With Quote
  #53  
Old 04-29-2003, 07:13 PM
mtha's Avatar
mtha mtha is offline
 
Join Date: Jul 2002
Location: US
Posts: 775
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

dont really get what you mean by "journals" or "added him to theirs ..."

have no idea. you may still have something wrong in permissions.
Reply With Quote
  #54  
Old 04-29-2003, 08:57 PM
Holidazed's Avatar
Holidazed Holidazed is offline
 
Join Date: May 2002
Location: Van Nuys, CA
Posts: 713
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

mtha, call me an idiot, but I just do not understand. Can you please give me a step by step (which file/template to edit, search for, replace with) instructions.

I just need to add the "Recycle Bin" feature to the "Admin Options" menu.
Reply With Quote
  #55  
Old 04-30-2003, 02:57 AM
mtha's Avatar
mtha mtha is offline
 
Join Date: Jul 2002
Location: US
Posts: 775
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Yesterday at 10:57 PM bitg said this in Post #53
mtha, call me an idiot, but I just do not understand. Can you please give me a step by step (which file/template to edit, search for, replace with) instructions.

I just need to add the "Recycle Bin" feature to the "Admin Options" menu.
Assume you have everything else installed , as in FlyingDutchman's instruction.

I just edit the files in /admin/recycle.php :

look for

PHP Code:
eval("standardredirect(\"".gettemplate("redirect_undorequest")."\",\"recycle.php?s=$session[sessionhash]&action=edit\");"); 
replace with

PHP Code:
// eval("standardredirect(\"".gettemplate("redirect_undorequest")."\",\"recycle.php?s=$session[sessionhash]&action=edit\");");
  
echo "<p>You have successfully undone the request for deletion of this thread. You are now taken back to the Recycle Bin Options page.</p>"

look for

PHP Code:
eval("standardredirect(\"".gettemplate("redirect_restorethread2")."\",\"recycle.php?s=$session[sessionhash]&action=edit\");"); 
replace with

PHP Code:
//  eval("standardredirect(\"".gettemplate("redirect_restorethread2")."\",\"recycle.php?s=$session[sessionhash]&action=edit\");");
  
echo "<p>You have successfully restore the thread. You are now taken back to the Recycle Bin Options page.</p>"
save upload the files, that's all.
Reply With Quote
  #56  
Old 04-30-2003, 03:06 PM
Holidazed's Avatar
Holidazed Holidazed is offline
 
Join Date: May 2002
Location: Van Nuys, CA
Posts: 713
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

mtha, should their not be a modification to the showthread.php? After all, that is the file that displays the "Admin Options" I am referring to.
Reply With Quote
  #57  
Old 04-30-2003, 06:20 PM
mtha's Avatar
mtha mtha is offline
 
Join Date: Jul 2002
Location: US
Posts: 775
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
************************************************
* Installation instructions for *
* vB Recycle Bin Hack (v1.5.1) by *
* Rick Jansen (a.k.a. FlyingDutchman) *
* © copyright 2002-2003, all rights reserved.*
* vBulletin is © Copyright 2000-2002 *
* by Jelsoft Enterprises Ltd. *
************************************************

Quote:
STEP 4:
---------------
Open: showthread.php
FIND:
---------------

if ($thread[open]) {
$replyclose="https://vborg.vbsupport.ru/vbimages/reply.gif";
} else {
$replyclose="https://vborg.vbsupport.ru/vbimages/threadclosed.gif";
}

---------------
Just UNDER that add:
---------------

// Begin vB Recycle Bin Hack (v1.5.1)
if ($Recycleforumid==$thread['forumid'] && $recycleonoff==1) {
$recyclebinnewthread="<a href=\"recycle.php?s=$session[sessionhash]&action=restore&threadid=$threadid\"><img src=\"https://vborg.vbsupport.ru/vbimages/restore.gif\" border=\"0\" alt=\"Restore the thread\"></a>";
$recyclebinnewreply="<a href=\"recycle.php?s=$session[sessionhash]&action=request&threadid=$threadid\"><img src=\"https://vborg.vbsupport.ru/vbimages/delete.gif\" border=\"0\" alt=\"Delete the thread\"></a>";
}
else {
$recyclebinnewthread="<a href=\"newthread.php?s=$session[sessionhash]&action=newthread&forumid=$forum[forumid]\"><img src=\"https://vborg.vbsupport.ru/vbimages/newthread.gif\" border=\"0\" alt=\"Post New Thread\"></a>";
$recyclebinnewreply="<a href=\"newreply.php?s=$session[sessionhash]&action=newreply&threadid=$threadid\"><img src=\"$replyclose\" border=\"0\" alt=\"Post A Reply\"></a>";
}
// End vB Recycle Bin Hack (v1.5.1)

---------------
Close: showthread.php
---------------
Quote:
STEP 9
---------------
Edit template: showthread
---------------
(DO THIS ACTION 2 TIMES!)
FIND:
---------------

<a href="newthread.php?s=$session[sessionhash]&action=newthread&forumid=$forum[forumid]"><img src="https://vborg.vbsupport.ru/vbimages/newthread.gif" border="0" alt="Post New Thread"></a>

---------------
REPLACE that with:
---------------

$recyclebinnewthread

---------------


---------------


---------------
(DO THIS ACTION 2 TIMES!)
FIND:
---------------

<a href="newreply.php?s=$session[sessionhash]&action=newreply&threadid=$threadid"><img src="$replyclose" border="0" alt="Post A Reply"></a>

---------------
REPLACE that with:
---------------

$recyclebinnewreply

---------------



Step 5 create a link in AdminCP menu, so you can check the recycle bin
Quote:
STEP 5:
---------------
Open: admin/index.php
FIND:
---------------

makenavselect("Options","<hr>");

---------------
Just ABOVE that add:
---------------

// Begin vB Recycle Bin Hack (v1.5.1)
makenavoption("Recycle Bin Options","recycle.php?action=edit");
// End vB Recycle Bin Hack (v1.5.1)

---------------
Close: admin/index.php
---------------
Reply With Quote
  #58  
Old 05-05-2003, 02:10 PM
Holidazed's Avatar
Holidazed Holidazed is offline
 
Join Date: May 2002
Location: Van Nuys, CA
Posts: 713
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Mtha, how does this help me with my problem? It does not make modification to the "Admin Options " section at all.
Reply With Quote
  #59  
Old 05-06-2003, 06:03 AM
mtha's Avatar
mtha mtha is offline
 
Join Date: Jul 2002
Location: US
Posts: 775
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Yesterday at 04:10 PM bitg said this in Post #57
Mtha, how does this help me with my problem? It does not make modification to the "Admin Options " section at all.

Sorry I got wrong what you mean. I thought you asked about the options in Admin Control Panel.

I myself didnt (havent) install this hack (actually I tried once, but didnt use it) so i forgot how it works already. Sorry about that.

I'll get back to this question, sometime later, when I have time to put add on to this hack (as of I remove delete permission for SQL user in my account).

You my want to look for this template: showthread_adminoptions

There're list of "Admin Options" in your threads.
You may want to modify that template, and posting.php somehow, to fit what you need.

good luck
Reply With Quote
  #60  
Old 05-06-2003, 12:44 PM
Reno Reno is offline
 
Join Date: May 2003
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice hack!

Now all I need to know is if this will work on vB 2.3 also.
Reply With Quote
  #61  
Old 05-07-2003, 03:19 PM
Holidazed's Avatar
Holidazed Holidazed is offline
 
Join Date: May 2002
Location: Van Nuys, CA
Posts: 713
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Reno, I have this installed on my 2.3 system and it works flawlessley.
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 02:44 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.36162 seconds
  • Memory Usage 2,328KB
  • 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
  • (4)bbcode_php
  • (6)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