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!
      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 "|||"