Previous Thread
Next Thread
Print Thread
Rate Thread
#275136 06/16/2004 12:04 PM
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Mod Name / Version: Hide Post 1.1

Description: This allows moderators and admins to edit a single post and "hide" it from general view. It will still appear to regular users with a note saying that the post is hidden for further review. It's a great way for moderators to hide something questionable until the admins can get to it.

Admins see the note that the post is hidden + the body of the post below it. Everyone else just sees the text that the post is hidden.

Admins/moderators can hide/unhide posts simply by clicking edit next to the post.

Once a post is hidden, the original poster cannot edit (to prevent them from changing their words before the admin can see it.)

Working Under: UBB.Threads 6.5

Mod Status: Beta

Any pre-requisites:

Author(s): JoshPet

Date: 06/16/04

Credits: Commissioned by dman of www.doording.com - Updated for 6.5 by Astaran

Files Altered: showflat.php, showthreaded.php, editpost.php, modifypost.php, editpost.tmpl, and /languages/*/generic.php

New Files: none

Database Altered: New field (B_Hidden) added to the w3t_Posts table.

Info/Instructions:

Disclaimer: Please backup every file that you intend to modify.
If the modification modifies the database, it's a good idea to backup your database before doing so.

Note: If you modify your UBB.Threads code, you may be giving up your right for "official" support from Infopop.If you need official support, you'll need to restore unmodified files.
Attachments
115339-HidePost1.1.txt (0 Bytes, 67 downloads)

Sponsored Links
Joined: Oct 2003
Posts: 23
User
User
Joined: Oct 2003
Posts: 23
Hack didn`t work under:
reply
printthread


###
### Open newreply.php
###

##
## Find this:
##


SELECT t2.U_Username,t1.B_Main,t1.B_Subject,t1.B_Body,t1.B_Approved,t2.U_Number,t1.B_Board

#
# Change to this:
#

SELECT t2.U_Username,t1.B_Main,t1.B_Subject,t1.B_Body,t1.B_Approved,t2.U_Number,t1.B_Board,t1.B_Hidden

##
## Find this:
##

list($ResUsername,$Main,$Subject,$Body,$Approved,$ParentUser,$Board) = $dbh -> fetch_array($sth);

#
# Change to this:
#

list($ResUsername,$Main,$Subject,$Body,$Approved,$ParentUser,$Board,$hidden) = $dbh -> fetch_array($sth);
// If the post is hidden, replace the body
if (($hidden) && ($user['U_Status'] == "Administrator")) {
$Body = "{$ubbt_lang['POST_HIDDEN']}<br /><br />".$Body;
} else if ($hidden) {
$Body = "{$ubbt_lang['POST_HIDDEN']}";
}


###
### Open printthread.php
###

##
## Find this:
##

SELECT t1.B_Number,t1.B_Posted,t2.U_Username,t1.B_IP,t1.B_Subject,t1.B_Body,t1.B_File,t1.B_Status,t1.B_Approved,t2.U_Picture,t1.B_Reged,t2.U_Title,t2.U_Color,t1.B_Icon,t1.B_Poll,t1.B_Parent,t2.U_Status,t1.B_Posterid,t2.U_PicWidth,t2.U_PicHeight

#
# Change to this:
#

SELECT t1.B_Number,t1.B_Posted,t2.U_Username,t1.B_IP,t1.B_Subject,t1.B_Body,t1.B_File,t1.B_Status,t1.B_Approved,t2.U_Picture,t1.B_Reged,t2.U_Title,t2.U_Color,t1.B_Icon,t1.B_Poll,t1.B_Parent,t2.U_Status,t1.B_Posterid,t2.U_PicWidth,t2.U_PicHeight,t1.B_Hidden

##
## Find this:
##

list ($Number,$Posted,$Username,$IP,$Subject,$Body,$File,$Open,$Approved,$Picture,$Reged,$Title,$Color,$Icon,$Poll,$Parent,$PostStatus,$Posterid,$picwidth,$picheight) = $dbh -> fetch_array($sth);

#
# Change to this:
#


list ($Number,$Posted,$Username,$IP,$Subject,$Body,$File,$Open,$Approved,$Picture,$Reged,$Title,$Color,$Icon,$Poll,$Parent,$PostStatus,$Posterid,$picwidth,$picheight,$hidden) = $dbh -> fetch_array($sth);

// If the post is hidden, replace the body
if (($hidden) && ($user['U_Status'] == "Administrator")) {
$Body = "{$ubbt_lang['POST_HIDDEN']}<br /><br />".$Body;
} else if ($hidden) {
$Body = "{$ubbt_lang['POST_HIDDEN']}";
}


Sorry for my english.

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Bill B
Bill B
Issaquah, WA
Posts: 87
Joined: December 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20240430)