vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   vB Recycle Bin Hack (https://vborg.vbsupport.ru/showthread.php?t=49904)

Andrew111888 04-26-2003 02:17 PM

Anyone?

mtha 04-29-2003 07:13 PM

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

have no idea. you may still have something wrong in permissions.

Holidazed 04-29-2003 08:57 PM

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.

mtha 04-30-2003 02:57 AM

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.

Holidazed 04-30-2003 03:06 PM

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.

mtha 04-30-2003 06:20 PM

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
---------------


Holidazed 05-05-2003 02:10 PM

Mtha, how does this help me with my problem? It does not make modification to the "Admin Options " section at all.

mtha 05-06-2003 06:03 AM

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

Reno 05-06-2003 12:44 PM

Nice hack!

Now all I need to know is if this will work on vB 2.3 also.

Holidazed 05-07-2003 03:19 PM

Reno, I have this installed on my 2.3 system and it works flawlessley.


All times are GMT. The time now is 02:18 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.01244 seconds
  • Memory Usage 1,759KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_php_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete