No announcement yet.

Diplaying avatars on forum main

  • Filter
  • Time
  • Show
Clear All
new posts

  • Diplaying avatars on forum main

    Dear all,

    I'm attempting to customise the main forum display (i.e. the front end of the forum, FORUMHOME template) in vB 3.7, so that the following will happen:
    • If the user is logged in, and has an avatar configured, this will be displayed.
    • If the user is logged in, but doesn't have an avatar configured, a generic 'No Avatar Yet' avatar will be displayed.
    • If the user isn't logged in, nothing is displayed.

    Essentially, what I am looking for is the necessary conditional statements to check for an avatar outside of the Memberinfo template set.

    From posts elsewhere in these forums, I gleaned the following bit of code which I've tested:

    <if condition="$timestampnow = TIMENOW">
    <img src="image.php?u=$bbuserinfo[userid]&amp;dateline=$timestampnow"
    alt="$vbphrase[avatar]" border="0" align="right" />
            <else />
            <img src="/forum/images/avatars/guestavatar.gif" alt="$vbphrase[guest] $vbphrase[avatar]" border="0">
    (I've actually put this in my footer template, so as to appear in a right-hand column.)

    I'm not sure why the recommendation was to use a timestamp in the conditional; but this works - though partially and unreliably. That is, it will accurately show the member's avatar if they have one; however the condition to show a generic avatar if they don't, doesn't work (it just shows nothing). Also, there are problems with this: if a user doesn't have an avatar configured, it shows nothing; but then if they go in and configure an avatar, it doesn't seem to recognise this, and continues to show nothing.

    So, I would be particularly grateful for clear pointers on proper conditionals for seeing whether a user has an avatar configured, and showing it on the forum home.

    Many thanks in advance.

  • #2
    vBulletin doesn't support modified code. You will need to post this over at


    • #3

      This isn't code modification we're talking about, I'm afraid. This is template customisation, which is a native vB feature - do read around a bit in this support forum to see the nature of this.

      Code modification involves editing the scripts and other systems that power the software itself.

      I'm nearly certain there will be a way to do this with template customisation that does not involve any code modification.



      • #4
        I dont think this is possible without modifying the code.


        • #5
          Thanks for the (ominous) thought. I'm still hopeful there might be a way, since this seems like a rather cursory customisation that should be easily available, in order to customise the user experience - but it may be so, Lenni!

          I hope one of the coders / vB staff can give a definitive comment, as I'd like to know whether we can craft a template customisation to do this or not.



          • #6
            This does not require a code modification, but does require template changes.

            Regardless of the nature of the customizations, all customization questions need to be asked at


            • #7
              Folks, unless something quite radical has shifted on these support forums, asking questions about how to use variables, etc., that are available in the main vB core have never been out of the remit here -- and if you search these forums, you'll see countless posts where people ask, and the vB staff reply, to queries of how to use core vB conditionals, elements, etc., to configure the system around its core provision.

              What I'm asking about here is not modification advice on style development or modification, but what the core system variables / conditionals might be that relate to the avatars. This is, so far as I've always been aware in my long use of vB, entirely a suitable topic to these main forums, since it involves a question of how to use the core software and its templating.

              Were the question, 'How can I design a custom style using this...' then yes, that would be for But that is not the question. Rather, I'm asking if there is a core variable in vB 3.7 that allows conditionals to be set in its templates relating to user avatars. This is a 'How to...?' question, which is what this area is for.

     is for changing vBulletin from its core provision. I'm asking how to use its core provision - or if it even in fact has core provision in this area.


              • #8
                vBulletin Staff will help with things like this when they have time and can. They state that it is not what this forum is for, so you are not guaranteed an answer to a customization question like yours.
                Support is what this forum is for; troubleshooting and using vBulletin features.


                • #9
                  Originally posted by Nick View Post
                  Support is what this forum is for; troubleshooting and using vBulletin features.
                  Which is precisely what we're after. Many thanks.


                  • #10
                    I don't think so

                    This is not a troubleshooting question or a question on how to use one of vBulletin's features.
                    You are customizing, which by definition, is to modify something to suit a particular task. It's not a default feature to have the avatar displayed on the forum home, so you are modifying something to make it appear.
                    Modification help ==


                    • #11
                      Not to be rude, monForum, but you've been told a few times that you can definitely get help with this at Why continue to argue it? Just post there
                      No...No...Meester vBulletin, he no work right.


                      • #12
                        Folks, this is silly. I can (and will, perhaps) ask this at; though it seems quite tiresome that such energy would be expelled in saying that, rather than trying to offer productive assistance - or just moving on to a different thread. Rudeness isn't really helpful in any context.

                        One of vB's core features is customisation. I'm asking a question of that core functionality: does it support a conditional that links to the user avatar. I'm not asking how to implement it and make customisations if it does: I'm asking whether such a variable/conditional exists. This is rather like asking whether a variable exists to show prefixes in templates; asking whether conditionals for usergroups exist; or asking if there are profile-field related conditionals (a thread to which Nick, you yourself contributed). Asking whether conditionals exist for various purposes within vB's design is not customisation, so much as it is asking whether there is certain functionality in the core.

                        If I was asking, 'Is there a setting I can use to enable the PM system?', I doubt I would have people expending such energy saying, 'Whoa, that's a customisation, go ask it on': this would rightly be understood as a query about a core function. Responses would be 'Yes, the setting is here...'.

                        I'm asking the same type of thing here: Is there a conditional variable that can be used to call on an avatar outside of the memberinfo template set.

                        I don't see the harm of asking this in the forum in which the product's designers and coders are present, who can likely provide a direct response.


                        • #13
                          You're wasting energy by continuing to argue that you're correct (which you may be, I'm not going to argue it ), instead of going to your first post, clicking the "Edit" button, copying everything you have there and then pasting it in a new thread at

                          Really, what do you have to lose by posting it there? If you get a response there...fine. If you get a response here...fine. Either way, you win!
                          No...No...Meester vBulletin, he no work right.


                          • #14
                            theres is already a mod at that does this ....


                            • #15
                              We try to help with basic html changes when we can, but its not something thats offically part of our service, see this thread:

                              Considering the complexity of this, is the correct place


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