PDA

View Full Version : Staff can Post Hidden Posts


Xenon
04-10-2006, 10:00 PM
Alright, this Modification is a port of my 3.0.0 Version here.

Short description:

This mod allows you and your moderators, to post hidden posts, which will be visible just to your staff, but not to the users, which will allow you to have comfortable conversations about an issue directly within a thread, withoput users noticing.

There is no more to say. The modification is installed here since a long time and no problems appeared, but i still consider it as a beta version, right now, until usertest have approved it as well :)

Enjoy

Deagle Man
04-11-2006, 12:52 PM
Sweet.
* Deagle Man installs.
First post :).

I'd happily help you in any way possible.



Err...it just makes the post moderated and shows a link to it under PM's in the navbar. Is that right?

DementedMindz
04-11-2006, 01:13 PM
thank you :)

ryancooper
04-11-2006, 01:18 PM
Looks good will install when i upgrade

sensimilla
04-11-2006, 01:44 PM
Thanks I will give it a try! :)

Ziki
04-11-2006, 01:51 PM
Ziki clicks install

OndaReal
04-11-2006, 02:00 PM
what does it mean "(after the textarea part)" ?

Xenon
04-11-2006, 02:22 PM
Err...it just makes the post moderated and shows a link to it under PM's in the navbar. Is that right?

yep, that's the way it works/worked all the time :)


@OnDa real: after </textarea>


I did not do much designing here, i just provided a working version, it's up to you to put the links where you want em ;)

bashy
04-11-2006, 04:03 PM
Great addition, should be standard in my eyes ;) Thanks Xenon

Just a quicky though...I take it this can only be hidden using the QR post method?

Developer
04-11-2006, 04:07 PM
What can i say?, what can i do?, just a word "Installed' :D :D

akanevsky
04-11-2006, 04:56 PM
I highly doubt that ismod() is a standard vb function. ;)

Snake
04-11-2006, 05:38 PM
Nice I was looking for this already.

Ziki
04-11-2006, 07:00 PM
Doesn't work.....

Database error in vBulletin 3.5.4:

Invalid SQL:

SELECT COUNT(postid) AS count
FROM post
LEFT JOIN deletionlog AS deletionlog ON(deletionlog.primaryid = post.postid AND type = 'post')
WHERE visible = 0 AND dateline > 1144785242
AND deletionlog.primaryid IS NULL;

MySQL Error : Table 'ZIKISET.post' doesn't exist
Error Number : 1146
Date : Tuesday, April 11th 2006 @ 03:55:32 PM
Script : http://www.zikihideout.com/forums/index.php
Referrer : http://www.zikihideout.com/forums/admincp/index.php?do=head
IP Address : 87.197.144.175
Username : ZIKI-SET
Classname : vb_database

amykhar
04-11-2006, 07:09 PM
If your post table doesn't exist, you've got bigger problems than this hack not working :D

Paul M
04-11-2006, 07:26 PM
Actually - it's a fault in the hack - Table Prefix is missing from the query in global_start hook (for both tables used). :)

mightyb
04-11-2006, 07:36 PM
Doesn't work.....

Database error in vBulletin 3.5.4:

Invalid SQL:

SELECT COUNT(postid) AS count
FROM post
LEFT JOIN deletionlog AS deletionlog ON(deletionlog.primaryid = post.postid AND type = 'post')
WHERE visible = 0 AND dateline > 1144785242
AND deletionlog.primaryid IS NULL;

MySQL Error : Table 'ZIKISET.post' doesn't exist
Error Number : 1146
Date : Tuesday, April 11th 2006 @ 03:55:32 PM
Script : http://www.zikihideout.com/forums/index.php
Referrer : http://www.zikihideout.com/forums/admincp/index.php?do=head
IP Address : 87.197.144.175
Username : ZIKI-SET
Classname : vb_database


I get the same error...

Ziki
04-12-2006, 10:21 AM
When I uninstalled the hack , everything is all right....damn

Xenon
04-12-2006, 09:54 PM
damn... ^^

redownload the file i have uploaded now, then it should work :)

@Psionic: that's why that plugin is disabled :p

Ziki
04-13-2006, 05:22 PM
That worked thank you :)

kall
04-13-2006, 08:49 PM
On Open threads, I am getting the 'Open' box. It should say Close, right?

(btw... I love you man. I was just wondering if you had ported this.)

Zachariah
04-14-2006, 12:54 AM
Thanks Boss
- This will help in support topics.

Nachtfalke
04-14-2006, 09:55 PM
Works absolutely well. Just a question: is it possible to exclude those hidden posts from the newposts? A non-staff-member will get X new posts, even when y of them are hidden.
Any help is gladly apreciated!

Scooterpig
04-15-2006, 03:32 AM
Excellent thank you indeed Xenon..:)

Xenon
04-18-2006, 01:07 PM
@Nachtfalke: hmm, what newposts do you mean?
is it a custom hack? if yes you have to add a visible = 1 into the fetching querie

Nachtfalke
04-18-2006, 04:22 PM
@Nachtfalke: hmm, what newposts do you mean?
is it a custom hack? if yes you have to add a visible = 1 into the fetching querie

Oh, excuse me for forgetting that: I meant the Newposts in the Welcome-Panel of the vbAdvanced Portal.

Xenon
04-20-2006, 07:08 PM
well, then it's that hack, which is coded incorrectly.

i'd report it to the author, tell him, that a visible = 1 is needed in the query, or hidden/deleted/moderated posts will count as well

Boofo
04-20-2006, 07:59 PM
How in the bee-bee-jammers did I miss this? ;)

Good work, sir. ;)

Boofo
04-20-2006, 09:37 PM
Does this work with the ajax feature in the Quick reply?

Boofo
04-20-2006, 09:48 PM
Stefan, can you include the code in the xml file for opening and closing the thread, too? I would rather use your code for that if you can add it. ;)

salil
04-20-2006, 10:25 PM
I well try this hack! thanx

Xenon
04-20-2006, 10:48 PM
Bob, which code do you mean?

you mean the checkbox below the qr?
that's just copy and pasted from newreply, nothing serious i did myself :)

Boofo
04-20-2006, 11:01 PM
Bob, which code do you mean?

you mean the checkbox below the qr?
that's just copy and pasted from newreply, nothing serious i did myself :)

So we don't need to have any plug-in code for the close thread to work that you have with the hide post template code?

Also, will that code work in the showthread template, too? If I do it in the qr template, it goes above the quote and sig boxes, unless I did something really worng. ;)

Xenon
04-20-2006, 11:46 PM
as long as it's within the <form> tags it will work.

it's nothing special i have added here :)

Boofo
04-21-2006, 02:49 AM
as long as it's within the <form> tags it will work.

it's nothing special i have added here :)

Will this also work with the editpost template?

Zachery
04-21-2006, 04:21 AM
I'd suggest moving the bit of code to below the regular options, as $threadinfo[open] is not avaible in the showthread_quickreply template

find in the showthread template.

<label for="qr_quickreply"><input type="checkbox" name="quickreply" value="1" id="qr_quickreply" accesskey="w" tabindex="4" />$vbphrase[quote_message_in_reply]</label>
</div>

Add after

<if condition="is_member_of($bbuserinfo, 5,6,7)"><fieldset class="fieldset" style="margin:$stylevar[formspacer]px 0px 0px 0px"><legend>Moderatory Options</legend> <div>
<label for="cb_hidepost" style="float:$stylevar[left]"><input type="checkbox" name="hidepost" value="1" id="cb_hidepost" />Hide Post?</label>
<div style="float:$stylevar[right]">
<label for="cb_openclose"><input type="checkbox" name="openclose" value="1" id="cb_openclose" /><if condition="$threadinfo['open']">Close<else />Open</if> Thread</label>$threadinfo[open]
</div>
</div></fieldset></if>

Zachery
04-21-2006, 04:23 AM
as long as it's within the <form> tags it will work.

it's nothing special i have added here :)
Seems to just flag posts as moderated.. which isn't really a desired result :p

Boofo
04-21-2006, 06:14 AM
I'd suggest moving the bit of code to below the regular options, as $threadinfo[open] is not avaible in the showthread_quickreply template

find in the showthread template.

<label for="qr_quickreply"><input type="checkbox" name="quickreply" value="1" id="qr_quickreply" accesskey="w" tabindex="4" />$vbphrase[quote_message_in_reply]</label>
</div>

Add after

<if condition="is_member_of($bbuserinfo, 5,6,7)"><fieldset class="fieldset" style="margin:$stylevar[formspacer]px 0px 0px 0px"><legend>Moderatory Options</legend> <div>
<label for="cb_hidepost" style="float:$stylevar[left]"><input type="checkbox" name="hidepost" value="1" id="cb_hidepost" />Hide Post?</label>
<div style="float:$stylevar[right]">
<label for="cb_openclose"><input type="checkbox" name="openclose" value="1" id="cb_openclose" /><if condition="$threadinfo['open']">Close<else />Open</if> Thread</label>$threadinfo[open]
</div>
</div></fieldset></if>


Thank you, sir. ;)

Can we use:

<if condition="can_moderate()">

instead of:

<if condition="is_member_of($bbuserinfo, 5,6,7)">

Which is better?

And can we get this to work in the editpost like it is?

Logikos
04-21-2006, 09:33 AM
The can_moderate() function will only allow moderators that have mod provlideges for the forum there set to.

If usera is modding foruma and is view forumb, then usera will not beable to use the hack because he is modding forumb.

can_moderate() grants the following: All Admins, All SuperMods, and All Mods in said forum. At least this is how i belive it works as I've been using that for alot of my hacks on my forums and had no complants yet lol

Boofo
04-21-2006, 10:02 AM
The can_moderate() function will only allow moderators that have mod provlideges for the forum there set to.

If usera is modding foruma and is view forumb, then usera will not beable to use the hack because he is modding forumb.

can_moderate() grants the following: All Admins, All SuperMods, and All Mods in said forum. At least this is how i belive it works as I've been using that for alot of my hacks on my forums and had no complants yet lol

Thanks for the explanation, sir. Now it makes a little more sense. As far as the template edit for the navbar for this hack, since it is on the forum home, can it use the can_moderate() function or do I need to change it from what Stefan has in the instructions?

kelangtri
04-21-2006, 10:17 AM
Sweet.
* Deagle Man installs.
First post .

I'd happily help you in any way possible.

Boofo
04-21-2006, 10:25 AM
I ran into another quirk, it seems. The line in the navbar says "View 0 New Hidden Posts" even though I have a hidden post. Is there something we need to add for that?

theArchitect
04-21-2006, 12:34 PM
Actually, I have a nav bar quirk too.

On most pages it says "View 0 New Hidden Posts" (with the 0 changing to the number of unread hidden posts)

But on the search.php?do=getnew page it displays as "View New Hidden Posts".

This is irritating as I mostly on use the get new posts link, and then have to click on the hidden posts button to see if there are any hidden posts.

Also, I am not wild about the notification that a post is hidden. It might just be my custom style, but all there is is a little pending moderation button. I am guessing that the old BIG red text of This Post Is Hidden can be done, but I will have to code the change myself?

Thoughts and especially assistance with these issues would be appreciated.

Xenon
04-21-2006, 12:38 PM
Actually, I have a nav bar quirk too.

On most pages it says "View 0 New Hidden Posts" (with the 0 changing to the number of unread hidden posts)

But on the search.php?do=getnew page it displays as "View New Hidden Posts".

cannot confirm this, it's working perfectly here

Also, I am not wild about the notification that a post is hidden. It might just be my custom style, but all there is is a little pending moderation button. I am guessing that the old BIG red text of This Post Is Hidden can be done, but I will have to code the change myself?
Yep, i just released a working version, i am not responsible for the design, you can add a big red text easily by adding a conditional to postbit template

as for the moderation queue, yeh i work on that, that's why it's still in beta :p

theArchitect
04-21-2006, 12:41 PM
Thanks for your reply.

I wil just learn to live with the quirk and will add the conditional to the post bit. :)

theArchitect
04-21-2006, 12:47 PM
Sorry, one other question. What does the Open thread tick box do?

From the code it should display as close thread (if the thread is open) and then open thread if the thread is closed. But on mine it is jammed on open thread and the bottom does nothing.

Once again, am I unique in having this quirk?

Zachery
04-21-2006, 01:20 PM
can_moderate() is more useful, however it generates a query for all non adminitrators and smods.

Stefan, it looks like the part to remove it from validation is not working 100%.

Xenon
04-21-2006, 04:16 PM
@Zak: hence why it's in beta ;)

Boofo
04-21-2006, 04:26 PM
Any hope to get it for the newreply and editpost, too? ;)

Brad, any and all ideas are most welcome on this, sir. ;)

Xenon
04-21-2006, 05:24 PM
@Bob: well on newreply, you can just add the same checkbox and it will work :)

on editpost is currently not planned, but maybe ;)

Boofo
04-21-2006, 05:38 PM
@Bob: well on newreply, you can just add the same checkbox and it will work :)

on editpost is currently not planned, but maybe ;)

Ok, great, thanks! ;)

Don't you have it on editpost here? Or if we edit a post it stays hidden, so we really don't need it, with the inline moderation? Am I close? ;)

Boofo
04-21-2006, 10:17 PM
I had a really freaky thing just happen. I added the following code in the newreply template right after $threadmanagement (near the bottom)

<if condition="is_member_of($bbuserinfo, 5,6,7)">
<fieldset class="fieldset" style="margin:$stylevar[formspacer]px 0px 0px 0px">
<legend>Moderating Options&nbsp;</legend>
<div style="padding:$stylevar[formspacer]px">
<label for="cb_hidepost" style="float:$stylevar[left]"><input type="checkbox" name="hidepost" value="1" id="cb_hidepost" />Hide Post?</label>
</div>
</fieldset>
</if>

It seemed to want to make every post hidden after a hidden post no matter if the hide post box was checked or not. I removed the code and it still did the same thing. I tried deleting the hidden posts with the inline moderation and still every post was hidden (even after deleting the code from the template). I had to delete the test thread and make a new one and now it seems to be working right. What would cause something like that to happen even without the code in the template?

theArchitect
04-22-2006, 12:37 AM
For those who are seeking the postbit tweak which gives "This post is hidden" text here it is.

<if condition="$show['moderated']">
<div>
<span class="highlight">
<strong>This post is hidden - really not visible to normal users!!!</strong>
</span>
</div>
</if>

The colour of the text is controlled by the Highlight Font css attribute in your style manager.

I have put it just above:

<div>$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon] $post[skypeicon]</div>

Same spot for either postbit or postbit_legacy.

If you don't know which template your forum is using, the answer is simple. If your member info is on the left (like here on vB.org) then you are running postbit_legacy. If your user data is above your posts then you are running the postbit template. ;)

Hope this helps. :)

Boofo
04-22-2006, 12:53 AM
For those who are seeking the postbit tweak which gives "This post is hidden" text here it is.

<if condition="$show['moderated']">
<div>
<span class="highlight">
<strong>This post is hidden - really not visible to normal users!!!</strong>
</span>
</div>
</if>

The colour of the text is controlled by the Highlight Font css attribute in your style manager.

I have put it just above:

<div>$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon] $post[skypeicon]</div>

Same spot for either postbit or postbit_legacy.

If you don't know which template your forum is using, the answer is simple. If your member info is on the left (like here on vB.org) then you are running postbit_legacy. If your user data is above your posts then you are running the postbit template. ;)

Hope this helps. :)

How about a pic so they can see what it looks like where you have it? ;)

theArchitect
04-22-2006, 12:59 AM
How about a pic so they can see what it looks like where you have it? ;)Sorry, I knew I forgot something. ;)

COBRAws
04-22-2006, 07:56 AM
Any way of not showing up as a not-moderated post? It freaks me out when I go to the admincp or my portal page and see the number of unmoderated posts.

Btw, this hack is great

lordi
04-22-2006, 11:30 AM
thanks for this effective hack..it's really amazin'

My question is:::: Does it work with the AJAX ??????????? bcoz when the user replies on the post using the Ajax reply option...It may not work coz the page is not going to be refreshed......!!!

Can u tell us if it does work with it??????????
'

Xenon
04-22-2006, 12:07 PM
@Cobra: i am working on this, as it annoys me myself :)

@lordi: there is no problem with ajax, the mod takes affect on the new posting function itself, not the newreply.php

lordi
04-22-2006, 12:59 PM
i mean when i post a hiddent one..and the user replies with the direct reply =ajax...the page then will not be refreshed though the subject to be shown...

I tried it yesterday in the Can't see attachments Hack....and i got this result

What do u say about this one?
----------------

Xenon
04-22-2006, 01:57 PM
hmm, that did never appear here on vb.org, and as the hiddenposts are using the moderation posts system, that error would occur on normal boards with moderation enabled as well, so i gues, it's another mod on your board which makes problems...

@all: i have uploaded a new version, only thing changed is the moderation que plugin is now changed and active, and should work

I hate ajax with not showing error messages....

Zachery
04-22-2006, 09:49 PM
Stefan would it not be better to store the post in another state?

0 is active 1 is moderated why not use 2? active but hidden or something? Unless I'm not understanding how this works.

theArchitect
04-22-2006, 11:37 PM
Stefan would it not be better to store the post in another state?

0 is active 1 is moderated why not use 2? active but hidden or something? Unless I'm not understanding how this works.
Yeah, that would rock. :D

Xenon
04-23-2006, 03:59 PM
@Zak: nope, as 2 would show a post as deleted

the way it is now is the easiest way to achieve the goal, and it was like this since the vb2 version by chen. If i would change that, it would ned to update all other hidden posts, also would include a lot more security checks, and therefore would make installing a lot harder...

Zachery
04-23-2006, 06:07 PM
@Zak: nope, as 2 would show a post as deleted

the way it is now is the easiest way to achieve the goal, and it was like this since the vb2 version by chen. If i would change that, it would ned to update all other hidden posts, also would include a lot more security checks, and therefore would make installing a lot harder...
What states are there now? Why not update to 4? 8? 16? ;-p

theArchitect
04-23-2006, 11:20 PM
@Zak: nope, as 2 would show a post as deleted

the way it is now is the easiest way to achieve the goal, and it was like this since the vb2 version by chen. If i would change that, it would ned to update all other hidden posts, also would include a lot more security checks, and therefore would make installing a lot harder...
As I don't have to put in the hard work to make such an idea work... Could you release an "advanced" version of this hack which does just this?

It would seriously rock. :D

dakuda
04-24-2006, 01:20 AM
I installed the hack, but it slowed the system down quite a bit. On a forum with typically 400-600 members online at most times of the day. Since it is installed here, I wonder what the difference is? Looking at the #'s onine right now, both here and jeepforum.com are similiar.

I installed it, did the templte edits, and boom, slow down. Undid the edits and uninstalled and everything was back to normal.

It works great on the other forum though, with almost no traffic. I just thought I would share the experience.

theArchitect
04-24-2006, 01:30 AM
Very strange. It would be interested to hear what might have caused this. But I am surprised it is this hack as it just uses the inbuilt vB moderation cue. Which I would not think would slow down a system.

dakuda
04-24-2006, 02:07 AM
Very strange. It would be interested to hear what might have caused this. But I am surprised it is this hack as it just uses the inbuilt vB moderation cue. Which I would not think would slow down a system.

i didn't get it either, but it is the only thing I can think of. Perhaps the can_moderate part was doing it? It's not like we arent' using that elsewhere though, so I reallyhave no clue.

lordi
04-24-2006, 04:42 AM
Xenon , when i post a hidden a one, the user must reply to see the hidden right?

Zachery
04-24-2006, 07:31 AM
can_moderate could cause some overhead, you might want to replace can_moderate with a is_member_of($bbuserinfo, x,y,z)

Boofo
04-24-2006, 08:39 AM
can_moderate could cause some overhead, you might want to replace can_moderate with a is_member_of($bbuserinfo, x,y,z)

Does it cause overhead in the php/xml files or just the templates?

Zachery
04-24-2006, 08:49 AM
Every instance of can_moderate in a template causes an additional query per non smod/admin (why the modcp link was removed).

Not sure how it handles in php files.

Boofo
04-24-2006, 10:55 AM
Every instance of can_moderate in a template causes an additional query per non smod/admin (why the modcp link was removed).

Not sure how it handles in php files.

I knew about it adding queries in template but I wasn't sure what it did in the php files.

Zachery
04-24-2006, 10:59 AM
Hmm, add it to the global_start plugin and if you have debug mode or one of those things to show info to admins it should let you know a query difference.

Xenon
04-24-2006, 11:04 AM
but the results are cached, so it's just one query at all additionally...

@lordi: nope, what you mean is the lock down hack or such a thing, this one, won't show hidden replys to any others, just becasue of new replys

@dakuda: hmm, could be an interfering hack, or a template problem itself, for example if you have made a nicer display of the "hidden" information, but missed something (like a bg image or so)

Zachery
04-25-2006, 09:50 AM
but the results are cached, so it's just one query at all additionally...

@lordi: nope, what you mean is the lock down hack or such a thing, this one, won't show hidden replys to any others, just becasue of new replys

@dakuda: hmm, could be an interfering hack, or a template problem itself, for example if you have made a nicer display of the "hidden" information, but missed something (like a bg image or so)
No, I don't believe the can_moderate query is cached at all.

Xenon
04-25-2006, 07:23 PM
yes it is, if you call it for $vbulletin-userinfo it uses the imodcache and just runs a query if that cache is not built already

maybe in 3.0 that was different

rumor2
05-02-2006, 12:40 AM
It looks like I have it working but registered users can see the check box for "hidden post" is there a way that they can't see that option.

It doesn't work if they check it but it does work if my staff does.

Rumor

Xenon
05-02-2006, 05:53 PM
did you add the correct template condition?

corn
05-04-2006, 11:50 AM
Hmzz, after installing, It was almost impossible to open the forum, Everything was very, very slow......

after removing it, everything works fine again.
Is this a known problem ??

Xenon
05-05-2006, 03:34 PM
nope.

the mod is installed here, and you can see it is working flawless and very fast

if your forum got slow, have you tried, to browse as a normal user?
was it slow for them as well?

because if it's just slow for users with permissions to hide posts, it may be a missing index on a table...

kall
05-06-2006, 03:20 AM
Xenon, why does my Quick Reply box have a checkbox marked 'Open Thread' on threads that are Open?

Xenon
05-06-2006, 01:38 PM
this is really a good question...

i have absolutelly no idea, as it shows 'close' as it should here on vb.org and the condition is correct

Scooterpig
05-07-2006, 12:36 AM
I have the same option also..??

Zachery
05-07-2006, 01:50 AM
Because xenon's instructiosn are for the wrong templates.

Scooterpig
05-07-2006, 02:27 AM
Oh, are you able to tell us then which are the correct templates that need editing please Zachery?

Zachery
05-08-2006, 07:40 PM
<a href="https://vborg.vbsupport.ru/showpost.php?p=955770&postcount=35" target="_blank">https://vborg.vbsupport.ru/showp...0&postcount=35</a>

dakuda
05-08-2006, 11:53 PM
I have tried a couple different things. ONe thing I have noticed is that just having the plugin enabled will slow the board down. If I disable the plugin, it speeds back up.

I am going to chalk this up as a quirk of some kind. :(

Xenon
05-09-2006, 04:28 PM
may i ask again: which PLUGIN?

as you can see here, the board is fast as ever, so i assume it's a missing index most likely

dakuda
05-09-2006, 09:25 PM
the hidden post plugin (product-xen_hidden_posts.xml). I have no problems with it disabled, slows down with it enabled.

EDIT: I just tried it as a non moderator user, and the forum is fast.

kall
05-09-2006, 10:12 PM
Probably due to the can_moderate thing being called for people who can moderate.

(The confusion arises when you refer to a product as a plugin.)

dakuda
05-09-2006, 10:15 PM
Probably due to the can_moderate thing being called for people who can moderate.

(The confusion arises when you refer to a product as a plugin.)

One of these days I will get the whole product/plugin thing straight in my head. I see things in the plugin section and that just sticks in my head... ANyway:

I used the code from post 35, and did not use the navbar changes at all.

So, since a missing index seems to be the suggested fix, uh, this is where I sound stupid.

Is there an easy way to fix the missing index?

Xenon
05-14-2006, 01:36 PM
well, it's a question what index is missing ;)

most likely it's on dateline or the visible field

Pyrix
08-04-2006, 10:39 PM
Anyone had any luck getting this to work with 3.6.0?

Paul M
08-04-2006, 11:20 PM
It won't work with 3.6 without a modification to one of the plugins - the deletionlog table has had a dateline column added to it in 3.6 - therefore you will get an sql error.

Pyrix
08-11-2006, 09:52 PM
Got it working ok... Only main difference is, as Paul said, one of the queries needs to be changed otherwise you get a problem with ambiguity.

$posts = $db->query_first("
SELECT COUNT(postid) AS count
FROM " . TABLE_PREFIX . "post AS post
LEFT JOIN " . TABLE_PREFIX . "deletionlog AS deletionlog ON(deletionlog.primaryid = post.postid AND type = 'post')
WHERE visible = 0 AND dateline > " . $vbulletin->userinfo[lastvisit] . "
AND deletionlog.primaryid IS NULL
");

becomes...

$posts = $db->query_first("
SELECT COUNT(postid) AS count
FROM " . TABLE_PREFIX . "post AS post
LEFT JOIN " . TABLE_PREFIX . "deletionlog AS deletionlog ON(deletionlog.primaryid = post.postid AND type = 'post')
WHERE visible = 0 AND post.dateline > " . $vbulletin->userinfo[lastvisit] . "
AND deletionlog.primaryid IS NULL
");

kall
08-28-2006, 01:42 AM
Got it working ok... Only main difference is, as Paul said, one of the queries needs to be changed otherwise you get a problem with ambiguity.

$posts = $db->query_first("
SELECT COUNT(postid) AS count
FROM " . TABLE_PREFIX . "post AS post
LEFT JOIN " . TABLE_PREFIX . "deletionlog AS deletionlog ON(deletionlog.primaryid = post.postid AND type = 'post')
WHERE visible = 0 AND dateline > " . $vbulletin->userinfo[lastvisit] . "
AND deletionlog.primaryid IS NULL
");

becomes...

$posts = $db->query_first("
SELECT COUNT(postid) AS count
FROM " . TABLE_PREFIX . "post AS post
LEFT JOIN " . TABLE_PREFIX . "deletionlog AS deletionlog ON(deletionlog.primaryid = post.postid AND type = 'post')
WHERE visible = 0 AND post.dateline > " . $vbulletin->userinfo[lastvisit] . "
AND deletionlog.primaryid IS NULL
");
Pyrix,

Those 2 code blocks are the same..

Shahed
09-11-2006, 09:23 PM
you must open product-xen_hidden_posts.xml with a plane text editor.
find:
WHERE visible = 0 AND dateline > " . $vbulletin->userinfo[lastvisit] . "
and replace with :
WHERE visible = 0 AND post.dateline > " . $vbulletin->userinfo[lastvisit] . "

Now you can Upload the new Product File and apply Template Modifications.

Enjoy it with 3.6 !

rms-2004
11-06-2006, 04:00 PM
Is there any port of "Hidden Posts advanced" with editpost (make it visible/invisible)?
How to set a color to the hidden posts to warn a staff member? Thanks.

rms-2004
02-16-2007, 04:25 PM
Anyone have the editpost part for this mod?

tspepper
03-16-2007, 12:36 AM
THANK YOU! With the changes below, I am able to have this run perfectly in 3.6!

I'd suggest moving the bit of code to below the regular options, as $threadinfo[open] is not avaible in the showthread_quickreply template

find in the showthread template.

<label for="qr_quickreply"><input type="checkbox" name="quickreply" value="1" id="qr_quickreply" accesskey="w" tabindex="4" />$vbphrase[quote_message_in_reply]</label>
</div>

Add after

<if condition="is_member_of($bbuserinfo, 5,6,7)"><fieldset class="fieldset" style="margin:$stylevar[formspacer]px 0px 0px 0px"><legend>Moderatory Options</legend> <div>
<label for="cb_hidepost" style="float:$stylevar[left]"><input type="checkbox" name="hidepost" value="1" id="cb_hidepost" />Hide Post?</label>
<div style="float:$stylevar[right]">
<label for="cb_openclose"><input type="checkbox" name="openclose" value="1" id="cb_openclose" /><if condition="$threadinfo['open']">Close<else />Open</if> Thread</label>$threadinfo[open]
</div>
</div></fieldset></if>


you must open product-xen_hidden_posts.xml with a plane text editor.
find:
WHERE visible = 0 AND dateline > " . $vbulletin->userinfo[lastvisit] . "
and replace with :
WHERE visible = 0 AND post.dateline > " . $vbulletin->userinfo[lastvisit] . "

Now you can Upload the new Product File and apply Template Modifications.

Enjoy it with 3.6 !

Shahed
03-16-2007, 07:47 AM
THANK YOU! With the changes below, I am able to have this run perfectly in 3.6!
https://vborg.vbsupport.ru/external/2007/03/14.gif

rms-2004
07-08-2007, 01:50 PM
Hello,
I will pay for the editpost modification (make it visible/invisible). Anyone can help me? PM me if you can. Thank you.

Shahed
07-08-2007, 02:08 PM
Hello,
I will pay for the editpost modification (make it visible/invisible). Anyone can help me? PM me if you can. Thank you.
what's problem?

rms-2004
07-08-2007, 02:35 PM
There is no "Make this Post Visible/Invisible" radiobutton in editpost so the users can not edit visibility of the post like in Hidden Posts advanced.txt for vB 3.0. How to add this feature?

Nilsd
03-09-2008, 09:32 AM
Anyone had any luck getting this to work with 3.6.0?
Anyone had any luck getting this to work with 3.7.0?

davidw
03-17-2008, 11:25 AM
This works in at least 3.7.0 beta 6. With a basic install, and minor modifications, it works fine. The only thing out of place is I see a notification upon posting that says
This post is a duplicate of a post that you have posted in the last five minutes. You will be redirected to that thread.

The changes I made were as in post 97 (https://vborg.vbsupport.ru/showpost.php?p=1072945&postcount=97) above and I've modified the install instructions (this works for my site, but may or may not work on yours.

edit Template showthread
FIND:
<fieldset class="fieldset" style="margin:$stylevar[formspacer]px 0px 0px 0px">
<legend>$vbphrase[options]</legend>
<div style="padding:$stylevar[formspacer]px">
<if condition="$bbuserinfo['signature']">
<div style="float:$stylevar[right]"><label for="cb_signature"><input type="checkbox" name="signature" value="1" id="cb_signature" tabindex="5" checked="checked" />$vbphrase[show_your_signature]</label></div>
</if>
<label for="qr_quickreply"><input type="checkbox" name="quickreply" value="1" id="qr_quickreply" accesskey="w" tabindex="4" />$vbphrase[quote_message_in_reply]</label>
</div>
</fieldset>

Replace with:
<fieldset class="fieldset" style="margin:$stylevar[formspacer]px 0px 0px 0px">
<legend>$vbphrase[options]</legend>
<div style="padding:$stylevar[formspacer]px">
<if condition="$bbuserinfo['signature']">
<div style="float:$stylevar[right]"><label for="cb_signature"><input type="checkbox" name="signature" value="1" id="cb_signature" tabindex="5" checked="checked" />$vbphrase[show_your_signature]</label></div>
</if>
<label for="qr_quickreply"><input type="checkbox" name="quickreply" value="1" id="qr_quickreply" accesskey="w" tabindex="4" />$vbphrase[quote_message_in_reply]</label>
</div>
<if condition="can_moderate()">
<div style="padding:$stylevar[formspacer]px">
<div style="float:$stylevar[right]"><label for="cb_openclose"><input type="checkbox" name="openclose" value="1" id="cb_openclose" /><if condition="$threadinfo['open']">Close<else />Open</if> Thread</label></div>
<label for="cb_hidepost" style="float:$stylevar[left]"><input type="checkbox" name="hidepost" value="1" id="cb_hidepost" />Hide Post?</label>
</div>
</if>
</fieldset>


edit navbar template:
find:
<if condition="$show['member']">
<td class="alt2" nowrap="nowrap">
<div class="smallfont">
<strong><phrase 1="$bbuserinfo[username]" 2="member.php?$session[sessionurl]u=$bbuserinfo[userid]">$vbphrase[welcome_x_link_y]</phrase></strong><br />
<phrase 1="$pmbox[lastvisitdate]" 2="$pmbox[lastvisittime]">$vbphrase[last_visited_x_at_y]</phrase>

<if condition="$show['notifications']">
<div><span id="notifications"><a href="usercp.php$session[sessionurl_q]">$vbphrase[your_notifications]:</a> <strong>$notifications_total</strong></span></div>
<script type="text/javascript"> vBmenu.register("notifications"); </script>
<else /><if condition="$show['pmstats']">
<div><phrase 1="$vbphrase[unread_x_nav_compiled]" 2="$vbphrase[total_x_nav_compiled]" 3="$session[sessionurl_q]">$vbphrase[private_messages_nav]</phrase></div>
</if></if>

add under


<!-- Hidden posts -->
<if condition="is_member_of($bbuserinfo, 5,6,7)">
<div class="smallfont">
<a href="search.php?$session[sessionurl]do=findhiddenposts&special=getnew">View $newhiddenposts New Hidden Posts</a>
</div>
</if>
<!-- Hidden posts -->

Boofo
03-18-2008, 12:21 AM
I get no db error with it. The error you see about being redirected to the thread is an ajax issue. You get the error when you try to submit the post more than once. If you refresh the page after submitting the post the first time you will see the post is there.

Any idea who to center the text for the postbit on the date info line?

Boofo
03-18-2008, 12:29 AM
Do you have ajax turned off then? I was using the quick reply.

Actually, the correct fix would be:

if ($post['hidepost'] AND can_moderate())
{
// remove entry of moderation queue
$vbulletin->db->query_write("
DELETE FROM " . TABLE_PREFIX . "moderation
WHERE postid = " . $post[postid] . "
");
}

davidw
03-18-2008, 12:31 AM
It is set to Enable All AJAX Features and tested using quick reply. :)

Boofo
03-18-2008, 12:36 AM
Then how it your post showing without refreshing the page? Share the fix, sir. ;)

My post above has the correct fix for your error.

davidw
03-18-2008, 12:44 AM
It automatically redirects me, as it is designed to do.
My fix works as well :)

Boofo
03-18-2008, 07:29 AM
I have the fix for the db error email that you get when you post a hidden post. Find this code (in the newpost_complete plugin):

// remove entry of moderation queue
$vbulletin->db->query_write("
DELETE FROM " . TABLE_PREFIX . "moderation
WHERE postid = $post[postid]
");


And replace it with:

// remove entry of moderation queue
$vbulletin->db->query_write("
DELETE FROM " . TABLE_PREFIX . "moderation
WHERE primaryid = " . $post[postid] . "
AND type = 'reply'
");


The code has been verified and it works. It now removes the hidden post from the moderation queue and does not send any db error emails. It wasn't working right on 3.7.0 beta 6. Thanks to Marco for the type code.

Boofo
03-21-2008, 12:46 PM
Has anyone gotten this to work with the editpost at all? It would be nice to be able to hide a post that has already been posted.

kube
04-09-2008, 12:20 AM
I made some of these changes...and it`s working in my testboard (3.6.7),
but I would like to use it for more than moderation !

It is shown as a post to moderate, but if I use the Link

....modcp/moderate.php?do=posts#posts

there is nothing.

It`s great that ist is not "really" to moderate for that what I want to do with it, but how do I get thes Symbols away ??

Konstantinos
06-28-2008, 07:51 AM
it includes post to moderate which is not good

SgtSling
03-08-2009, 07:06 PM
got it working on 3.80 .. but wow!
Needs an update!

SnowBot
11-13-2010, 06:14 AM
can we update this for 4.0.8 guys?

Scooterpig
01-13-2011, 04:03 AM
Anyone have this running fine on 3.8.6 please?

Krix
01-26-2011, 03:53 PM
Please convert this mods to VB 4.1.1 or to 4.x.x

Becouse this modyfication is a very helpfull for moderators in board.

scottn
04-10-2011, 06:27 PM
Anyone have this running fine on 3.8.6 please?

Hi.

I got it working in 3.8.6, but I had changed it so it doesn't add to the moderation queue at all, but uses a different value (than 0) for VISIBLE, and changed a few things to accommodate that.

The problem is how to disable email notifications when a mod or admin checks the Hide Post box and submits a quick reply?

If it was already mentioned here, I didn't quite get it, sorry :)