vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Hiding text in a post from non logged in user (https://vborg.vbsupport.ru/showthread.php?t=159280)

shiznatix 10-02-2007 09:08 AM

Hiding text in a post from non logged in user
 
I want to have a post that is viewable by guests and everything but I want only 1 line of text to only be displayed to users that are logged in to the forums and if they are not logged in have it say something like 'you must be logged in to see this'

Basically I have a password that I want to give to only the users of our forums and not the whole world but I want the world to know the password exists and that they have to register to view it.

Is there a mod out there that would give me a special tag or something simmilar?

armatik 10-03-2007 01:15 AM

Go to postbit template, and find:

HTML Code:

                <!-- message -->
                <div id="post_message_$post[postid]">$post[message]</div>
                <!-- / message -->

And wrap it like so:

HTML Code:

<if condition="!$bbuserinfo['userid']">
                <!-- message -->
                <div id="post_message_$post[postid]">$post[message]</div>
                <!-- / message -->
<else />
    You gotsa register to view posts lolosaur.
</if>

And that's it.

YLP1 02-03-2008 04:21 PM

Will this work to only allow guests or non logged in members to view the first post and to view all subsequent posts, the guest or member must be logged in?


All times are GMT. The time now is 12:44 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.01003 seconds
  • Memory Usage 1,711KB
  • 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
  • (2)bbcode_html_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete