Rank Issue

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mmmender
    Senior Member
    • Aug 2002
    • 133
    • 3.6.x

    Rank Issue

    My question is somewhat two-fold:

    First, I want to know if there's a way to create a new rank for user's based on something they've selected from a profile field. For example, I want to have images appear in the postbit that identify them based on a few occupation categories: artist, musician, teacher, etc. I've created an image for each occupation and would like the corresponding image to appear based on their selection, but I don't know how to do this. That's my first question.

    My second, related, question is: how do I create a drop-down menu in each user's profile that they can make a selection from? All I can see in the AdminCP in the profiles section are text box options.

    Any advice on these two issues is much appreciated.

    Lee

    www.cocteautwinsforums.com
  • texasf1racer
    Member
    • Oct 2006
    • 45
    • 3.6.x

    #2
    In order to add custom images to the postbit from user selected profile fields you'll need to do a few things. I am going to assume you don't need a Phrase to appear, just the custom images that correspond to the occupation.

    1. Go to ADMINCP->USER PROFILE FIELDS->ADD NEW USER PROFILE FIELD
    • Once there click on the drop down box and select 'Single-Selection Menu' and press Continue.
    • Create a title for the new Profile Field. ie: 'Occupation'
    • Give a brief description which users will see under that profile option on their profile settings screen.
    • Move down to the Options box and enter each user selectable fields in. ie: Artist, Musician, Teacher (type them in 1 per line, so type one and press enter, type the next one and press enter, and so on..)
    • Now move down to the next option, 'Set Default' and make sure you pick None for that other wise it will pick the first option for all users!
    • The Display order only means the order in which its displayed to users in their profile settings screen.
    • Now move down to the Field Required. You can pick which you prefer for that.
    • Next make sure you have 'Field Editable by User' set to yes.
    • Lastly press Save.
    • After you've created the new profile field, make a note of the field#.


    2. Now you'll need to upload all of your custom images to your images/misc folder on the server.
    *Important! The images MUST be named the exact way you typed in each "occupation". So if you typed Artist as one of the occupations in the new profile field, then the artist image must be name Artist exactly that way for it to work. Also the images will need to be a gif file to work.




    3. Go to ADMINCP->STYLE MANAGER->EDIT TEMPLATES->POSTBIT TEMPLATES->POSTBIT

    In the postbit template look for:
    Code:
    <if condition="$post['usertitle']"><div class="smallfont">$post[usertitle]</div></if>
       <if condition="$post['rank']"><div class="smallfont">$post[rank]</div></if>

    After paste the following code.
    Code:
     
    <if condition="$post[field11]"><img src="$stylevar[imgdir_misc]/$post[field11].gif" alt="$post[field11]" /></if>
    BEFORE saving it you'll need to change the 11 in [field11] to the field# you made a note of from your custom profile field. Change all three of the [field11] above to your field# then press save!


    Lastly, open the Postbit Legacy template and repeat this step.


    That should do it! PM me if you need any help with it.
    Last edited by texasf1racer; Fri 2 Feb '07, 2:08am.

    Comment

    • texasf1racer
      Member
      • Oct 2006
      • 45
      • 3.6.x

      #3
      How'd everything work out for you in the end? Any problems? Instructions easy to follow?

      Comment

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