vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Mini Mods - [DBTech] Staff Only Hidden Posts v1 (vB4) (https://vborg.vbsupport.ru/showthread.php?t=276557)

Fready 01-11-2012 03:31 AM

Quote:

Originally Posted by ozzy47 (Post 2285935)
Their is no easy way for you to move the Hide This Post in either editor. But if you wish to try you can look at the file dbtech/staffonlyhidddenposts/hooks/process_templates_complete and the code that is used to insert it is on line 22

Chris

I got it to show a box and work and make the post hidden using this code;

Code:

<li><label for="cb_hidepost"><input type="checkbox" name="hidepost" value="1" id="cb_hidepost"/>Hide Post </label><li>
But the phrase Hide Post and the tick box showed to regular members too.
As i am not a coder, could either the coder of this mod or someone else please help so that it won't show to regular members.

DragonByte Tech 01-11-2012 03:45 AM

Quote:

Originally Posted by Fready (Post 2286354)
I got it to show a box and work and make the post hidden using this code;

Code:

<li><label for="cb_hidepost"><input type="checkbox" name="hidepost" value="1" id="cb_hidepost"/>Hide Post </label><li>
But the phrase Hide Post and the tick box showed to regular members too.
As i am not a coder, could either the coder of this mod or someone else please help so that it won't show to regular members.

Where did you add that bit of code?

Chris

Fready 01-11-2012 03:52 AM

ozzy47 said to look in the dbtech/staffonlyhidddenposts/hooks/process_templates_complete file, so i did, and then tried to make a code from the code in there.
That's just a code that I made.
I am not a coder, it did work fine, but it showed the tick box and the Hide Post to regular members, but the post was hidden after posting it to regular members.
So i just need to hide the tick box and the Hide Post bit.

Thanks

Fready 01-11-2012 03:55 AM

Quote:

Originally Posted by DragonByte Tech (Post 2286360)
Where did you add that bit of code?

Chris

Sorry I miss read your post.
I added it in the newreply Template after;
Code:

&nbsp;<img id="display_posticon" src="{vb:raw selectedicon.src}" alt="{vb:raw selectedicon.alt}" />
That was it is just under the Title of the Thread when you Go Advanced....

DragonByte Tech 01-11-2012 04:04 AM

Ok I see the problem, I will fix it in the next release, but in the mean time in that same file, right below:

Code:

if ($vbulletin->options['dbtech_staffonlyhiddenposts_active'])
{

ADD:
Code:

if (can_moderate())
{

Then below the last } add a additional }

Chris

DragonByte Tech 01-11-2012 04:16 AM

I see you edited you post, so change your code to this:

Code:

<vb:if condition="can_moderate()"><li><label for="cb_hidepost"><input type="checkbox" name="hidepost" value="1" id="cb_hidepost"/>Hide Post </label><li></vb:if>
Chris

Fready 01-11-2012 04:39 AM

Quote:

Originally Posted by DragonByte Tech (Post 2286376)
I see you edited you post, so change your code to this:

Code:

<vb:if condition="can_moderate()"><li><label for="cb_hidepost"><input type="checkbox" name="hidepost" value="1" id="cb_hidepost"/>Hide Post </label><li></vb:if>
Chris

Thanks Chris, that worked great.
It adds the tick box and Hide Post just under the Title
A nice easy place to tick the box.

Put that code after
Code:

&nbsp;<img id="display_posticon" src="{vb:raw selectedicon.src}" alt="{vb:raw selectedicon.alt}" />
In the newreply Template

DragonByte Tech 01-11-2012 04:42 AM

Not a problem, glad to help.

Chris

Fready 01-11-2012 05:24 AM

Chris, don't forget about this part;
Quote:

Worked apart from when clicking on the phrase "Veiw 2 hidden posts" next to my user name, it just took me to a blank white page
Thanks

Kind of a big thing as at the moment, when you post a hidden post it doesn't show up on "What's New" searching.
Maybe this is as it's a Moderated post or how you made this modification.

So without the "View hidden posts" bit working it's hard to know where they are.

DragonByte Tech 01-11-2012 10:20 PM

I know I am looking for a solution to the issue, but with some of the staff on holiday it is a bit slow going. I hope to have a solution soon though.

Chris


All times are GMT. The time now is 02:05 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.01131 seconds
  • Memory Usage 1,744KB
  • 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
  • (8)bbcode_code_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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