News:

Wondering if this will always be free?  See why free is better.

Main Menu

Custom Icon Below Users Avatar

Started by legolas, June 24, 2005, 11:32:44 PM

Previous topic - Next topic

legolas

Hi guys/gals  ;D

I just completed installing SMF+Gallery+Mambo (with lots of help from xenovanis).
I am now looking to add some features to SMF. I have a car forum, and I want the users to able to select what is their car colour is (in their profile page) & then a color icon corresponding to their choice will appear below their avatar.
For an example check out this link. In that particular website, when the user selects what type of pda they have, an icon will appear below their avatar. I know they are using phpbb, but I hope it can be done in SMF. Thank you.


legolas

Hi OIDanTheManIO,
Thanks for the link, thats a good starting point. however if I wanted to add an Image, how do I go about doing that. Should have mentioned I am no pro when it comes to php  :-[

SamoanOnion

not trying to hi-jack the thread, but I am looking for something similar.

I would like for a user to be able to pick there location from a list and then have an image of a flag of where they're from show beneath they're avatars in posts.

[Unknown]


SamoanOnion

<td width="40%">
<b>Favorite Browser:</b>
</td>
<td>
<select name="options[text_favorite_browser]">
   <option>Internet Explorer</option>
   <option>Opera</option>
   <option>Mozilla Firefox</option>
</select>
</td>


[Unknown]
using this example from your earlier post for adding an option to the registration page, how would I make it so that when they pick an option it'll show an image?

[Unknown]

<img src="http://www.example.com/images/';, $message['member']['options']['text_favorite_browser'], '.gif" alt="', $message['member']['options']['text_favorite_browser'], '" />

-[Unknown]

SamoanOnion

thanx for all your help so far,

one more quick question/idea.  I was thinking about just copying the code that is used for selecting 'Gender' in the users profile and adjusting it for say a persons location then using the same code that displays it by the avatar in the posts.

that should work too shouldn't it?

if so, what files will I have to edit?

[Unknown]

That would be more complicated...

-[Unknown]

legolas

Hi,
I cant get the location to display in the location below the avatar,(it is displayed in the profile page).

I added he  code before the "blurb"in the InstantMessage.template.php does it look right??

Quote

if (isset($message['member']['options']['text_location'])) echo 'Location: ', $message['member']['options']['text_location'], '<br />';
   if (!empty($settings['show_blurb']) && $message['member']['blurb'] != '')


[Unknown]

That's for custom fields.  For location, which is actually already in the profile, use $message['member']['location'].

-[Unknown]

legolas

Hi [unknown],
Sorry about that, didn't know that loaction was already in the profile. Actually I am just practising. I am trying do something easy  :P (which obviously isn't for me) before I start with the "custom image below the avatar" project. The way things are going that's take a while. Can you pls help me?? I have always wanted this feature.

Dem0n

Read around, get to know the software more and how it all works, and you'll be making that feature yourself in notime. Pratice makes perfect. Remember, the best way to learn is from your mistakes :)

SamoanOnion

yea, I don't know coding at all, but I can read enuff to have somewhat of an idea of what is going on, I'm just so used to IPB and hack'n that code all up  :D

just gotta get used to this new one (new for me)
thanx for all the help so far

legolas

Just got it to work!! Thanks to OIDanTheManIO & [unknow]  :D

SamoanOnion

ok, need a little more help on this one, I got this code in so that they can pick a flag

</tr><tr>
<td width="40%"><b>Flag:  </b></td>
  <td>
      <select name="default_options[text_flag]">
          <option', isset($context['member']['options']['text_flag']) && $context['member']['options']['text_flag'] == "3dflagsdotcom_samoa_2fawm" ? ' selected="selected"' : '', '>Samoa</option>
          <option', isset($context['member']['options']['text_flag']) && $context['member']['options']['text_flag'] == "3dflagsdotcom_us_co_2fawm" ? ' selected="selected"' : '', '>Colorado</option>
          <option', isset($context['member']['options']['text_flag']) && $context['member']['options']['text_flag'] == "3dflagsdotcom_usa_2fawm" ? ' selected="selected"' : '', '>USA</option>
      </select>
  </td>




and I know this bit will display it when people look at your profile

</tr><tr> <td><b>Flag:  </b></td> <td>', isset($context['member']['options']['text_flag']) ? $context['member']['options']['text_flag'] : '', '</td>

how do I use this code with the code above to display the actual image of the flag when folks look at your profile instead of text

<img src="http://all4hisglory.org/forums/flags/', $message['member']['options']['text_flag'], '.gif" alt="', $message['member']['options']['text_flag'], '" />

hope that makes sense


SamoanOnion


[Unknown]

Does the code you quoted not work?

-[Unknown]

SamoanOnion

I just can't figure where to put the bottom code into the portion above it so that it will display a picture or image of a flag  instead of text.  (does that make sense)


Advertisement: