Announcement

Collapse
No announcement yet.

Help to create widget

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

    Help to create widget

    Hi, I'm trying to create a widget and I want to know how I can do to incorporate the action of showing username or hide name
    for example to show avatar I have this:


    Code:
     <ul class="h-clearfix">
     <li class="h-left">
    
                <vb:comment>If the widget is set to display avatars and the current viewing user wants to see avatars</vb:comment>
    <vb:if condition="$widgetConfig['displayAvatars'] AND $user['showavatars']">
      <vb:each from="members" value="inneruser">
       <vb:if condition=!isset($inneruser['perpage'])>
     <vb:each from="inneruser" value="thisuser">
     <a href="{vb:url 'profile', {vb:raw thisuser}}>" class="b-avatar x-small h-left h-margin-right-l">
     <img src="{vb:raw baseurl_corecdn}/{vb:raw thisuser.avatarpath}"></a>
    HTML Code:
                    <definition>
       <name>displayAvatars</name>
        <field>YesNo</field>
     <labelphrase>displayavatars</labelphrase>
      <defaultvalue>1</defaultvalue>
       <isusereditable>1</isusereditable>
    <isrequired>0</isrequired>
     <displayorder>1</displayorder>
      <validationtype>force_datatype</validationtype>
    <product>vbulletin</product>
    </definition>

    Thank you very much
    A cordial greeting

    #2

    Thanks, I found how to solve it
    A cordial greeting

    Comment


      #3
      Glad you figured it out.
      Helpful? Donate. Thanks!
      Fast VPS Host for vBulletin: A2 Hosting & IONOS

      Comment

      Working...
      X