vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Staff can Post Hidden Posts (https://vborg.vbsupport.ru/showthread.php?t=112718)

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

Quote:

Originally Posted by kall
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.

PHP Code:

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

PHP Code:

    $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

Quote:

Originally Posted by Pyrix
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.

PHP Code:

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

PHP Code:

    $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:
PHP Code:

WHERE visible AND dateline " . $vbulletin->userinfo[lastvisit] . " 

and replace with :
PHP Code:

WHERE visible 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!

Quote:

Originally Posted by Zachery (Post 955770)
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.
Code:

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

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


Quote:

Originally Posted by Shahed (Post 1072945)
you must open product-xen_hidden_posts.xml with a plane text editor.
find:
PHP Code:

WHERE visible AND dateline " . $vbulletin->userinfo[lastvisit] . " 

and replace with :
PHP Code:

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

Quote:

Originally Posted by tspepper (Post 1204516)
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

Quote:

Originally Posted by rms-2004 (Post 1285807)
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

Quote:

Originally Posted by Pyrix (Post 1044669)
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
Quote:

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

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

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

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


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

PHP Code:

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

PHP Code:

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


And replace it with:

PHP Code:

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

Quote:

Originally Posted by Scooterpig (Post 2148295)
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 :)


All times are GMT. The time now is 05:53 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.01329 seconds
  • Memory Usage 1,872KB
  • 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
  • (6)bbcode_code_printable
  • (11)bbcode_php_printable
  • (9)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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