Log in

View Full Version : Nuke posts (BETA)


The Keeper
03-29-2002, 10:00 PM
This hack now comes with an installer for use with vbHacker
https://vborg.vbsupport.ru/showthread.php?s=&threadid=36888
check that thread.

The final release of this hack is in that thread.

Recluse
03-30-2002, 06:34 AM
ive got 2.2.2 installed. ill give it a shot later on and let you know

Dade
03-30-2002, 06:45 AM
This as an awesome hack! I'll use it when I get more troublesome members :)

Nemesis77
03-30-2002, 08:10 AM
WOuld it be possible to get the instructions in a text file?

CeleronXL
03-30-2002, 01:18 PM
Ok, I've transfered it all into a text file. The Keeper can download it and edit it if he so desires. :)

The Keeper
03-30-2002, 08:32 PM
Yeah when I actually release it, it will be in a php file that runs the queries itself and all.
But has anyone tried to install it? And were you successfull?

Overgrow
03-30-2002, 09:19 PM
I'm looking over it and I think you have a mistake at the top

>>ALTER TABLE thread ADD COLUMN nuked smallint(6) not null;

should be altering the post table, since you later call

>>UPDATE post SET nuked ='$nuker'

The Keeper
03-31-2002, 08:31 AM
you're correct. Thanks. It should be 'post'.

CeleronXL
03-31-2002, 02:55 PM
I fixed the .txt file with the appropriate changes.

heretic
03-31-2002, 03:51 PM
I just installed it, first off

it needs to be "javascript" (without the space) or else it won't load right.

second it isn't working- the window pops up then closes right away, and nothing is done

The Keeper
03-31-2002, 11:26 PM
it needs to be "javascript" (without the space) or else it won't load right


There is no space in javascript. The [ PHP ] tags on this forum put the space in. :(


second it isn't working- the window pops up then closes right away, and nothing is done


Did you try reloading the page to see if the post was nuked?

The Keeper
04-01-2002, 12:35 AM
There also seems to be a problem where this forum is interpreting {tags} as part of it's own style, and changing the url and color codes to the style of this forum.
So I'll definitly be releasing this in a downloadable html file or something.

As long as I'm confident it is working.

heretic
04-01-2002, 12:52 AM
dude, my members get the access denied page, but for mods and admins all it does is have a window quickly pop up then close, and nothign else. even if you refresh.

The Keeper
04-01-2002, 01:12 AM
Could you please run this query?

SELECT * FROM post WHERE nuked != 0

If the nuke link works properly, that will return a list of all the posts that you've used the nuke link on, and the problem lies in the display of the post. If it doesn't, then the nuke link is the problem.

heretic
04-01-2002, 01:22 AM
not getting anything from the query

heretic
04-01-2002, 01:27 AM
course, right now I don't think I'm getting anything- I'm using the command line of it for the 1st time (phpmyadmin's not working right these days)

heretic
04-01-2002, 01:37 AM
the info is in the database (I had forgotten the ";")

so it has to be the link

The Keeper
04-01-2002, 01:38 AM
the info is in the database?

you mean, it DID pull up the posts your had 'nuked'?

The Keeper
04-01-2002, 01:41 AM
I think I know what the problem is.

heretic
04-01-2002, 01:44 AM
mysql> show columns from post
-> ;
+---------------+----------------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+---------------+----------------------+------+-----+---------+----------------+
| postid | int(10) unsigned | | PRI | NULL | auto_increment |
| threadid | int(10) unsigned | | MUL | 0 | |
| username | varchar(50) | | | | |
| userid | int(10) unsigned | | MUL | 0 | |
| title | varchar(100) | | | | |
| dateline | int(10) unsigned | | | 0 | |
| attachmentid | smallint(5) unsigned | | | 0 | |
| pagetext | mediumtext | | | | |
| allowsmilie | smallint(6) | | | 0 | |
| showsignature | smallint(6) | | | 0 | |
| ipaddress | varchar(16) | | | | |
| iconid | smallint(5) unsigned | | MUL | 0 | |
| visible | smallint(6) | | | 0 | |
| edituserid | int(10) unsigned | | | 0 | |
| editdate | int(10) unsigned | | | 0 | |
| editreason | varchar(200) | | | | |
| topic | int(2) | | | 0 | |
| nuked | smallint(6) | | | 0 | |
+---------------+----------------------+------+-----+---------+----------------+
18 rows in set (0.00 sec)

heretic
04-01-2002, 01:46 AM
and the info is in nuked, it's a lot to pull up though (I tried it several times in different forums :))

The Keeper
04-01-2002, 01:57 AM
I forgot this step:

EDIT admin/FUNCTIONS.PHP

find:


if (!$ignore[$post[userid]]) {
eval("\$retval = \"".gettemplate("postbit")."\";");
} else {
eval("\$retval = \"".gettemplate("postbit_ignore")."\";");
}
return $retval;


and replace it with


if ($post[nuked]==1) {
eval("\$retval = \"".gettemplate("postnuked")."\";");
} else if ($ignore[$post[userid]]) {
eval("\$retval = \"".gettemplate("postbit_ignore")."\";");
} else {
eval("\$retval = \"".gettemplate("postbit")."\";");
}
return $retval;


I will update teh main post.

The Keeper
04-01-2002, 02:10 AM
I'm pretty sure that it should work then. Also make sure it stays nuked on the new reply page.

You will notice the colors and table widths may not match your forum.... you will need to fix the templates, beacause when I posted them here they change to match this forum.

The attatched file contains more generic templates that will look better on your forum.

heretic
04-01-2002, 08:27 PM
that was it!

man, this is a great hack, considering that our forum never deletes stuff.

my many thanks... works perfectly now on 2.2.4

:thumbsup:

The Keeper
04-01-2002, 11:32 PM
thanks for your help in getting this documentation complete.
I will now make an installer.

Okiewan
04-02-2002, 12:24 AM
Thanks for the hack... very useful!

The Keeper
04-02-2002, 12:38 AM
Just wanted to test out the vbhacker installer for my hack. I only have one forum/database so I need someone else to take a crack at installing it.



This hack enables moderators to "nuke" posts. Which means the post will be disabled, and hidden from view on the thread. The post will be replaced with the word *NUKED*. Moderators will still be able to view the original post through a link. Moderators may restore the nuked post back to it's original.

In a thread, if a moderator clicks the asterisk of a post, a window should flicker up.
Next time you view the thread (or if you reload it) the post should not display, but the word *NUKED* should be there.
If you hit 'reply', the preview of the posts below the reply box should also have *NUKED* instead of the actual post.


If a moderator clicks the asterisk on a nuked post, a window should popup showing what the original post was, with vb codes disabled. And the option to restore the thread - which if clicked should un-nuke the post.

If a regular member, or guest ever clicks the asterisk he should be faced with a permission denied page.




You need vbHacker (https://vborg.vbsupport.ru/showthread.php?s=&threadid=36378&perpage=15&display=&pagenumber=1) to install this.
Just upload the attatched data file to the /admin directory and run vbHacker to install it.

Let me know of any problems.

Dade
04-02-2002, 02:43 AM
Had to do some manual file edits.. but other then that, works great :)

The Keeper
04-02-2002, 06:02 AM
This hack now comes with an installer for use with vbHacker
https://vborg.vbsupport.ru/showthread.php?s=&threadid=36888
check that thread.

The final release of this hack is in that thread.