Announcement

Collapse
No announcement yet.

Conditionals - currently logged in user info

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

  • Conditionals - currently logged in user info

    Hi, Just wondering how would I go about accessing information of the currently logged in user. Here is the logic I am going to use...

    <if condition="$currentuser[oneofusergroups] == 15">Awaiting E-mail Confirmation<else />Registered User</if>

    The trick, as you might have guessed, is that this needs to go into custom title field for a group. Basically, something like what Jelsoft is using on these forums to identify licensed users...

    Any ideas?
    HFT Online - Professional computer help ... with a personal touch

  • #2
    <if condition="$bbuserinfo[usergroupid] == x">something</if>
    <if condition="$bbuserinfo[usergroupid] == y">something else</if>

    etc. You can build on that.
    To alcohol! The cause of, and solution to, all of life's problems. -- Homer Simpson

    Comment


    • #3
      Originally posted by cka
      <if condition="$bbuserinfo[usergroupid] == x">something</if>
      <if condition="$bbuserinfo[usergroupid] == y">something else</if>

      etc. You can build on that.
      What if they are searching for secondary usergroups and not the primary?
      PHP Code:
      if ($bbuserinfo[usergroupid] == USERGROUPID OR strpos($bbuserinfo[membergroupids], "USERGROUPID")
      {
      code
      }
      else
      {
      other code

      Sorry, my head isnt working properly to be able to convert to conditionals (should be simple though)

      (Replace USERGROUPID with the usergroup id your searching for. dont have multiple values in there)

      Comment


      • #4
        ok that's a start. thanks.

        but can this be used in custom titles?
        HFT Online - Professional computer help ... with a personal touch

        Comment


        • #5
          Originally posted by Techguy1
          ok that's a start. thanks.

          but can this be used in custom titles?
          How do you mean in "custom titles" ?

          Comment


          • #6
            merk
            Senior Member

            Joined: Jul 2001
            Location: Canberra, Australia


            'Senior Member' or whatever else is there would be your custom title.
            HFT Online - Professional computer help ... with a personal touch

            Comment


            • #7
              Originally posted by Techguy1
              merk
              Senior Member

              Joined: Jul 2001
              Location: Canberra, Australia


              'Senior Member' or whatever else is there would be your custom title.
              Yes, i understand that, but what exactly are you looking to do with the custom title?

              You want to test if they have a user title? You want to modify it on a usergroup basis??

              Comment


              • #8
                i want moderators to be able to see a slightly different custom title than other users. i.e. Unverfied COPPA Users instead of just Registered User
                HFT Online - Professional computer help ... with a personal touch

                Comment


                • #9
                  dot dot dot ')
                  HFT Online - Professional computer help ... with a personal touch

                  Comment


                  • #10
                    Originally posted by Techguy1
                    dot dot dot ')
                    Try in postbit_userinfo
                    Code:
                    <if condition="can_moderate()">
                    <!-- user is an administrator or a (super)moderator -->
                    <if condition="$post[usergroupid] == [b]COPPA_GROUP_ID[/b]">COPPA USER</if>
                    <if condition="$post[usergroupid] == [b]3[/b]">USER IS AWAITING EMAIL CONFIRMATION</if>
                    </if>
                    Unfortunatly i dont know the coppa usergroupid because it doesnt show on my forums (ive disabled coppa because i run an australian site).

                    This would ADD another line to the postbit, not replace the current usertitle, its an easy enough fix to make it also replace, but i think having multiple lines is better.

                    can_moderate() will pull administrators, supermoderators or any moderator that has access to moderate _anywhere_. I can probably make it only show the moderator that information if the post is in a forum they moderate too, but necessary?

                    Comment


                    • #11
                      ok i get the logic. thanks a lot
                      HFT Online - Professional computer help ... with a personal touch

                      Comment

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