usergroup data

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • diades
    Senior Member
    • Jul 2002
    • 291
    • 3.5.x

    usergroup data

    Hi

    Apologies if this is already ansered somewhere but I can't find it anyway

    Is the usergroup of the user available to the new reply template? If so, how? If not, how can I make it so?

    Thanks.
    Later
    Keith

    Webxpertz Community for Webmasters & Developers
  • Marco van Herwaarden
    Senior Member
    • Nov 2004
    • 6999
    • 3.8.x

    #2
    Try with $bbuserinfo[usergroupid]
    Want to take your board beyond the standard vBulletin features?
    Visit the official Member to Member support site for vBulletin Modifications: www.vbulletin.org

    Comment

    • diades
      Senior Member
      • Jul 2002
      • 291
      • 3.5.x

      #3
      Hi Marco

      Thanks for that, it did the trick!

      As an addendum, would anyone know if it is possible to get the username of the thread starter on the newreply template (or page)?
      Later
      Keith

      Webxpertz Community for Webmasters & Developers

      Comment

      • Marco van Herwaarden
        Senior Member
        • Nov 2004
        • 6999
        • 3.8.x

        #4
        You can use the information out of the $threadinfo array. In your case:
        - $threadinfo[postusername]
        - $threadinfo[postuserid]
        Want to take your board beyond the standard vBulletin features?
        Visit the official Member to Member support site for vBulletin Modifications: www.vbulletin.org

        Comment

        • diades
          Senior Member
          • Jul 2002
          • 291
          • 3.5.x

          #5
          Hi Marco

          Again, many thanks! I have now completed my edit and have lazy-man's greeting buttons installed:
          PHP Code:
          <!-- 
          Added by KP
          23
          /05/2005
          -->
                      <
          br />    
                      <
          a href="http://www.webxpertz.net/forums/misc.php?do=bbcode" onclick="target='_blank'">bbCode Help</a>
          <if 
          condition="$bbuserinfo['usergroupid'] == 5 || $bbuserinfo['usergroupid'] == 6 || $bbuserinfo['usergroupid'] == 23">
            <
          script type="text/javascript">
            
          //<![CDATA[
             
          function addGreeting(which,oTa){
              var 
          str "";
              switch(
          which){
          //UserId = $threadinfo[postuserid]
               
          case 0str "Hi $threadinfo[postusername]\n\nWelcome to the City!:)\n\n";break;
               case 
          1str "Hi $threadinfo[postusername]\n\n";break;
              }
              if(
          oTa.value == ""oTa.value str; else oTa.value str oTa.value
             
          }
            
          //]]>
            
          </script>
                      <
          input type="button" value="New member greeting" onclick="addGreeting(0,message)" />
                      <
          input type="button" value="Greeting" onclick="addGreeting(1,message)" />
          <!-- 
          /
          Added by KP
          23
          /05/2005
          -->
          </if> 
          Later
          Keith

          Webxpertz Community for Webmasters & Developers

          Comment

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