Announcement

Collapse
No announcement yet.

Hide QUOTE BB Code for unregister user

Collapse
X
Collapse
First Prev Next Last
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Hide QUOTE BB Code for unregister user

    Hi sir, how can i hide QUOTE BB Code for unregister user (like your forum).

    Thanks

    Foto:
    Click image for larger version

Name:	Captura de pantalla 2018-03-06 a las 19.11.27.png
Views:	473
Size:	48.2 KB
ID:	9615



    #2
    It requires editing the bbcode_quote template. I haven't released it officially yet because I don't like or recommend the solution as it may cause template merge conflicts every time you upgrade. But basically the code looks something like this:
    Code:
    <vb:if condition="is_member_of($user, array(1, 3, 4)">
        You are not allowed to view this
    <vb:else />
        (display content here)
    </vb:if>
    where 1, 3, 4 are the IDs of the usergroups you want to restrict the content to.
    Helpful? Donate. Thanks!
    Buy me a coffeePayPal QR Code
    Fast VPS Host for vBulletin:
    A2 Hosting & IONOS

    Comment


      #3
      Thanks for quick replay man!

      here is my templete code where i enter your code thanks again!

      Code:
      <div class="bbcode_container">
          <div class="bbcode_quote">
              <div class="quote_container">
                  <div class="bbcode_quote_container b-icon b-icon__ldquo-l--gray"></div>
                  <vb:if condition="$show['username']">
                      <div class="bbcode_postedby">
                          {vb:rawphrase originally_posted_by_x, {vb:raw username}}
                          <vb:if condition="!empty($postid)">
                              {vb:rawdata post, node, getQuoteFullContent, {vb:raw postid}}
                              <vb:if condition="!empty($post) AND empty($post['errors'])">
                                  {vb:set post, {vb:raw post[$postid]}}
                                  <vb:comment>If we were using an old id or the nodeid with prefix, we want to switch to nodeid</vb:comment>
                                  {vb:set postid, {vb:raw post.nodeid}}
                                  <vb:if condition="$post['contenttypeclass'] == 'PrivateMessage'">
                                      {vb:set messageInfo.action, 'view'}
                                      {vb:set messageInfo.messageid, {vb:raw post.starter}}
                                      {vb:set messageInfo.innerPost, {vb:raw postid}}
                                      {vb:set qs.folderid, {vb:raw $_GET.folderid}}
                                      <a href="{vb:url 'privatemessage', {vb:raw messageInfo}, {vb:raw qs}}" rel="nofollow" title="{vb:rawphrase view_post}" class="b-icon b-icon__double-arrow-right--blue animate-scroll">{vb:rawphrase view_post}</a>
                                  <vb:else />
                                      {vb:set starterPost.nodeid, {vb:raw post.starter}}
                                      {vb:set starterPost.innerPost, {vb:raw postid}}
                                      <vb:if condition="$_GET['view'] == 'stream'">
                                          {vb:set qs.view, 'stream'}
                                      </vb:if>
                                      <vb:if condition="$starterPost">
                                          <a href="{vb:url {vb:raw post.starterroute}, {vb:raw starterPost}, {vb:raw qs}}" rel="nofollow" title="{vb:rawphrase view_post}" class="b-icon b-icon__double-arrow-right--blue animate-scroll">{vb:rawphrase view_post}</a>
                                      </vb:if>
                                  </vb:if>
                              </vb:if>
                          </vb:if>
                      </div>
                      <div class="message">{vb:raw message}</div>
                  <vb:else />
                      {vb:raw message}
                  </vb:if>
              </div>
          </div>
      </div>

      Comment


        #4
        There is any away for make a own BBcode for do this? i need to hide a download link for unregister users.

        [OWNBB]Download Link[/OWNBBL] (this only see login user)

        Comment


          #5
          The easiest way to do that is to hide the link via CSS. Advanced users may be able to figure out how to unhide the link but for regular users I think it would be enough.
          Helpful? Donate. Thanks!
          Buy me a coffeePayPal QR Code
          Fast VPS Host for vBulletin:
          A2 Hosting & IONOS

          Comment

          Users Viewing This Page

          Collapse

          There is 1 user viewing this forum topic.

          • Guest Guest

          Latest Posts

          Collapse

          Working...
          X
          Searching...Please wait.
          An unexpected error was returned: 'Your submission could not be processed because you have logged in since the previous page was loaded.

          Please push the back button and reload the previous window.'
          An unexpected error was returned: 'Your submission could not be processed because the token has expired.

          Please push the back button and reload the previous window.'
          An internal error has occurred and the module cannot be displayed.
          There are no results that meet this criteria.
          Search Result for "|||"