Announcement

Collapse
No announcement yet.

Adding permissions to static html CMS-widget?

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

  • Adding permissions to static html CMS-widget?

    Is it possible to restrict access to static html CMS-widget to a single usergroup - and how is it done?
    http://www.boggnasker.dk/vbforums/

  • #2
    Copy the vbcms_widget_static_page template and rename it to something else. Put a condition around the contents to only show it to that certain usergroup (there is an article on vbulletin.org on conditions). Then, configure the widget and enter that new template name into the Template Name part of the configuration screen.

    Please don't PM or VM me for support - I only help out in the threads.
    vBulletin Manual & vBulletin 4.0 Code Documentation (API)
    Want help modifying your vbulletin forum? Head on over to vbulletin.org
    If I post CSS and you don't know where it goes, throw it into the additional.css template.

    W3Schools <- awesome site for html/css help

    Comment


    • #3
      So I have
      Code:
      <div class="cms_widget">
          <div class="block">
              <div class="cms_widget_header">
              <h3><img src="{vb:stylevar imgdir_siteicons}/html.png" alt="" /> {vb:raw widget_title}</h3>
              </div>
              <div class="cms_widget_content widget_content">
              {vb:raw static_html}
              </div>
          </div>
      </div>
      and I have
      Code:
      <vb:if condition="is_member_of($bbuserinfo, 20)">
      But I'm not quite familiar with how to put the condition around the template..?
      http://www.boggnasker.dk/vbforums/

      Comment


      • #4
        The template would just look like this:
        HTML Code:
          <vb:if condition="is_member_of($bbuserinfo, 20)">
        <div class="cms_widget">
            <div class="block">
                <div class="cms_widget_header">
                <h3><img src="{vb:stylevar imgdir_siteicons}/html.png" alt="" /> {vb:raw widget_title}</h3>
                </div>
                <div class="cms_widget_content widget_content">
                {vb:raw static_html}
                </div>
            </div>
        </div>
        
        </vb:if>

        Please don't PM or VM me for support - I only help out in the threads.
        vBulletin Manual & vBulletin 4.0 Code Documentation (API)
        Want help modifying your vbulletin forum? Head on over to vbulletin.org
        If I post CSS and you don't know where it goes, throw it into the additional.css template.

        W3Schools &lt;- awesome site for html/css help

        Comment

        Related Topics

        Collapse

        Working...
        X