Announcement

Collapse
No announcement yet.

How can I hide annoucements from guests?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How can I hide annoucements from guests?

    How can I change things so that announcements are not viewable to guests?

  • #2
    There is no built-in option to do this. It can probably be done with conditionals. Here is the online documentation for using template conditionals:

    http://www.vbulletin.com/docs/html/m...e_conditionals
    Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
    Change CKEditor Colors to Match Style (for 4.1.4 and above)

    Steve Machol Photography


    Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


    Comment


    • #3
      okay, I can do that...

      what template should I edit, and where? I tried editing announcements template, and tried wrapping the whole thing in


      <if condition="$bbuserinfo['userid'] == 0">

      </if>

      and that didnt work - thenI tried just wrapping the

      $announcebits

      and that didnt work either - do you know what template and what part I should wrap the conditional around?

      Comment


      • #4
        bump

        any other ideas for this?
        It's sort of annoying, because I have the board shut down to guest viewing, yet the announcements are still visible to guests and therefore search engine spiders..

        Comment


        • #5
          Forum Display Templates -> forumdisplay_announcement

          At the very top add
          <if condition="$bbuserinfo[userid] != 0">

          At the very bottom add
          </if>

          Comment


          • #6
            <if condition="$show[member]"> is a shorter way to do it.
            vBulletin v3.8.0's Implementation of Google Adsense Should Be Avoided At All Costs - Do Your Own Adsense Implementation

            Comment


            • #7
              Originally posted by conqsoft
              <if condition="$show[member]"> is a shorter way to do it.
              But isn't that only for registered members not admin or s-mods?

              Comment


              • #8
                That should cover anyone with an account. $show[guest] will be true if they are not registered.
                vBulletin v3.8.0's Implementation of Google Adsense Should Be Avoided At All Costs - Do Your Own Adsense Implementation

                Comment


                • #9
                  $bbuserinfo[userid] will always be avaible and is probally best used.

                  Comment


                  • #10
                    thanks

                    thank you all !! that did it

                    Comment


                    • #11
                      [strike]$bbuserinfo['userid'] will never be 0. It will either be null or 1+.

                      <if conditional="$bbuserinfo[userid]"> is an implied isset().[/strike]
                      Last edited by feldon23; Wed 1 Feb '06, 10:05am.

                      Comment


                      • #12
                        Originally posted by feldon23
                        $bbuserinfo['userid'] will never be 0. It will either be null or 1+.

                        <if conditional="$bbuserinfo[userid]"> is an implied isset().
                        Not true, if the user is not registered, $bbuserinfo[userid] is ouput to 0. Try it sometime feldon.

                        Comment


                        • #13
                          Need some more bbCodes built into vB.

                          Comment


                          • #14
                            Originally posted by harmor View Post
                            Forum Display Templates -> forumdisplay_announcement

                            At the very top add
                            <if condition="$bbuserinfo[userid] != 0">

                            At the very bottom add
                            </if>
                            I do not see forumdisplay_announcement.

                            Is this still the way to block guests from viewing announcements?

                            Thanks

                            Comment


                            • #15
                              That template is definitely in vB 3.5.x. Please start your own thread if you have further questions.
                              Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
                              Change CKEditor Colors to Match Style (for 4.1.4 and above)

                              Steve Machol Photography


                              Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


                              Comment

                              widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                              Working...
                              X