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)

LangTuDaTinh 04-11-2003 10:40 PM

bitg, check the forum... there is another recycle bin hack with modlog together...it's working great...it' recycle bin all delete thread, post and edited post or threads....also log all activity of mods...

Holidazed 04-12-2003 12:13 AM

I saw that, I was concerned because it said it was a beta.

mtha 04-16-2003 06:22 AM

I was wondering how vB call templates in admin center

in /admin/recycle.php

PHP Code:

$templatesused "redirect_deletethread2,redirect_restorethread2,
error_invalidid,redirect_threadclosed"



when I use the recycle options in admin CP ([restore] - [delete] ...), it redirects me to a blank page. after that, if I use any other function in Admin CP, there's some strange code that I've never seen before (My board is 2.3.0):

Code:

?qA?DH??��DZR*ŵ)??
Λ ?c–蔬呈??9?J͒?Υ?V?
ԃT?? ??됞?Q??L?С???ѹ#?
q???]??P[+Idޒ?=Ⱥ Ɩ%?
x̽ޛ붱2gW-:JĶ?ʅ?s???
t*ľ\n????r?��4?
s떡懷֋?��?
Ÿ㭯0̃HTTP/1.1 200 OK Date: Wed, 16 Apr
2003 06:05:11 GMT Server: Apache X-Powered-By: PHP/4.2.2
Content-Encoding: gzip Keep-Alive: timeout=15, max=999
Connection: Keep-Alive Transfer-Encoding: chunked Content-
Type: text/html 5719 ?xځW?l>


MetroSports82 04-16-2003 06:13 PM

Quote:

04-11-03 at 08:13 PM bitg said this in Post #42
I saw that, I was concerned because it said it was a beta.
Sorry if this is OT. :) In reponse to bitg. Yeah, I too had the same concerns about that beta hack, bitg. :( Plus, I'm not sure how your board is set up, but taking a chance on that 'beta' installer script, on a heavily hacked board, is really not worth the risk. In addition, that hack had issues with post counts, and other problems. until its a.) its been fully released here, or b.) there is a .txt install file, I wouldn't take the chance. Otherwise, this is the hack you'll want to use, by FlyingDutchman. thanks FD! ;)

FlyingDutchman 04-16-2003 06:44 PM

Quote:

Today at 08:22 AM mtha said this in Post #43

Code:

?qA?DH??��DZR*ŵ)??
Λ ?c–蔬呈??9?J͒?Υ?V?
ԃT?? ??됞?Q??L?С???ѹ#?
q???]??P[+Idޒ?=Ⱥ Ɩ%?
x̽ޛ붱2gW-:JĶ?ʅ?s???
t*ľ\n????r?��4?
s떡懷֋?��?
Ÿ㭯0̃HTTP/1.1 200 OK Date: Wed, 16 Apr
2003 06:05:11 GMT Server: Apache X-Powered-By: PHP/4.2.2
Content-Encoding: gzip Keep-Alive: timeout=15, max=999
Connection: Keep-Alive Transfer-Encoding: chunked Content-
Type: text/html 5719 ?xځW?l>



well, i can tell you, that's some ++++ed up sh*t, and as far as i know, this cannot be caused by my hack i think...
did you try to remove that templatesused (as it's not needed) line and see if any effect?

mtha 04-16-2003 07:56 PM

Quote:

Today at 07:44 PM FlyingDutchman said this in Post #45
well, i can tell you, that's some ++++ed up sh*t, and as far as i know, this cannot be caused by my hack i think...
did you try to remove that templatesused (as it's not needed) line and see if any effect?


In my Admin CP, vB does not call any template, at all. All the redirect was used as the echo command

so, I remove all the "standardredirect" parts, and use echo. The problem's fixed.

here's one place that I change (do the same for other standardredirect calls):

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.</p>"


mtha 04-16-2003 08:10 PM

Quote:

03-17-03 at 04:39 PM amykhar said this in Post #26
Enhancements desired, and I am willing to help if you want.

1. I would like to be able to use the admin options to recycle threads.

2. I would like to be able to recycle posts too. Currently it only works on threads. I believe that using the code to split a thread and move it to a new forum could be used to accomplish this.

3. I need to figure out how to adjust this hack to accomodate the multiple quote hack that I have installed.

Amy

Did you have these functions added on?

1- For "Admin Option" to recycle, I think it's almost the same as what you have in the hack, which move the thread to trash

2 - Recycle posts could be complicated ... to "restore".
The process to delete would be,
- find out if the thread has more than 1 posts. (if there's only 1 post, apply the delete/recycle thread)
- split the post in that thread, destination is the Recycle Bin board.

In order to restore, you'll have to know the original board (you already have this), and "Original Thread". If the Original Thread is different from the thread that the post is being restored, then doing a merge. otherwise, moving to original forum would be enough.

Waiting for your update

Great hack, FlyingDutchman

Holidazed 04-22-2003 03:10 PM

I am still looking for an answer here. Other than installing the other hack, is there a way to add the "Recycle" option to the other "Delete Thread / Post" options such as you see in the "Admin CP" on each post?

mtha, I see what you are saying, but some instructions on how to add it to that section would be helpful.

mtha 04-22-2003 07:28 PM

Quote:

Today at 04:10 PM bitg said this in Post #48

mtha, I see what you are saying, but some instructions on how to add it to that section would be helpful.



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.</p>"

Just look for the places that use standardredirect, and replace that line with echo, just like the one above.
You, ofcourse. have to change the echo quote, with the text in each template that the standardredirect line used.

Andrew111888 04-25-2003 08:54 PM

I have the recycle bin turned on. I have journals, where users are added as moderators, but not moderators by usergroup. I have ALL of my usergroup and forum permissions set up fine, but they STILL cannot delete posts! The two mods of one of the journals can delete posts, but not threads. The mods of other journals can do it fine in his, and when I added him to theirs, that as well. WHAT could be stopping these two from recycling threads?!?!?

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.

Mijae 05-12-2003 08:12 PM

What can I do to make it so not only the first post is recycled, but the whole thread?

Stu 05-24-2003 11:56 AM

Quote:

05-12-03 at 10:12 PM v0id said this in Post #61
What can I do to make it so not only the first post is recycled, but the whole thread?
Yes this would be great.
Not sure if it is possible, but it would be great to actually move the posts or the whole thread (if the user deletes the first post) to a recycle bin forum.

Angelus 08-04-2003 07:49 PM

Its very good.
Thanks 4 this hack.

Angelus 08-30-2003 08:29 AM

hallo.

all users can restore the threads. what ist wrong?

parajsa 11-11-2003 05:51 PM

Is there a way, that on Recycle bin not only the thread but also the posts to be too, when they are deleted?

Thanks in advanced,
parajsa

P.S: Very cool hacks by the way.

parajsa 11-15-2003 01:48 PM

I installed the "Suspend Thread" hack before using this hack, and it works very good, after installing this hack, i encounter on this problem:

When i tried to modified the only first post on a thread, it is been deleted, and all it remains from the thread is the title of it, the post is disappeared. On the other hand if i proceed on "Suspending Thread" they are deleted to, without going the the "Recycle bin" forum i firstly nominate to be.

Is there any explanation, on this things, any help?

Thanks guys,
parajsa

SilverBoy 12-12-2003 10:48 AM

Can u make this change ..

When the moderator deleting thread from "admin options" posting.php, the thread goes to recycle ;)

plz do it


All times are GMT. The time now is 02:38 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.01320 seconds
  • Memory Usage 1,829KB
  • 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
  • (2)bbcode_code_printable
  • (7)bbcode_php_printable
  • (12)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (27)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