Put icon into values

Ok am just going to ask this because  I can't find the answer after sifting through the tons of stuff on this forum. How do I put an icon onto the values on the profile fields. A bit like the icons on the country list? 

Quote · 6 Jul 2015

and I don't mean replacing existing icons either, i mean putting in my own for my own vlaues

Quote · 6 Jul 2015

You need to be a little more thorough in describing what you want to do.   'Values' in profile fields, to me, can mean numeric default values, where an icon would make no sense at all. 

To get proper answers, you need to ask proper questions. Don't be afraid to post screen shots to clarify your point, no matter how obvious you think your point may be.

My opinions expressed on this site, in no way represent those of Boonex or Boonex employees.
Quote · 6 Jul 2015

well excuse me Mr houstonlively sir! I do apologize I shall make my self clearer right now.

Like that ........

so when I make a multiple choice field the output has an icon. I want to make a simple mood selector and use icons ect. yes I know its kiddish but the goal is to learn how to do it for other things.

Quote · 6 Jul 2015

The flags corresponding to the country is probably not a good example of the route you should follow for what you want to do. Those flags aren't added to the predefined values list directly.  Dolphin has built in functions that generate the flag image uri according to the country code. 

To do it this way for your mood list, would require modifying source files, which may get overwritten during upgrades, and you'll have to reapply the changes after every upgrade.  If it were me doing it, I'd add the icons using the corresponding language string for the LKeys that you used in your predefined values list.

eg:

LKey: _Lethargic

String text for English language: <i class="mood lethargic"></i>


Then in your templates icons.css file

.mood.lethargic:before { content: url(../images/icons/moods/lethargic.png); }

In this example, you'd create the folder: /templates/tmpl_SomeTemplate/images/icons/moods/  and upload all your icon images there.

That's one way to do it, and how I'd do it, but I wouldn't do it with a profile field.  It would mean users would have to go and edit their profile every time they wanted to simply change their mood, and that would be a real pain in the ass. 

Maybe adding something to the status message would be less cumbersome to users.

My opinions expressed on this site, in no way represent those of Boonex or Boonex employees.
Quote · 6 Jul 2015

where would this go <i class="mood lethargic"></i> ?

Quote · 6 Jul 2015

 

where would this go <i class="mood lethargic"></i> ?

 When you build a predefined list, there is an input field named LKey (Short for Language Key) where you enter the language key for what is displayed in the selector list to the user.

If the LKey you enter is _mood_lethargic

In settings > Language Settings > Add Key

Key Name: _mood_lethargic

String text for English language: <i class="mood lethargic"></i>


My opinions expressed on this site, in no way represent those of Boonex or Boonex employees.
Quote · 6 Jul 2015

Forget everything I said... brain fade. You can't add graphic elements to an html selector. You'd have to use radio buttons

My opinions expressed on this site, in no way represent those of Boonex or Boonex employees.
Quote · 6 Jul 2015

would the category be boonex profiler or system?

Quote · 6 Jul 2015

this is my php code so far. It does put the image there in my block, but it also puts all the other images too :|

 

$profileID = getID($_GET['ID']);

$aProfile = getProfileInfo($this->oProfileGen->_iProfileID);

$sNickName = $aProfile['NickName'];

$smood  =  $aProfile['mood'];

 

$html =<<<HTML

 

<div class="boxContent" style="padding:5px; text-align: center;">

<div class="clear_both"></div>

<div class="dbContent">

<i class="mood sad"></i>

<i class="mood happy"></i>

 

<div class="dbTitle" style="

    color: #9A1A2E!important;

    font-size: 30px;

    font-family: fantasy;">This is the profile of $sNickName</div>

<div class="dbTitle" style="

    color: #9A1A2E!important;

    font-size: 30px;

    font-family: fantasy;">$sNickName feels $smood today</div>

<style type="text/css">

.mood.sad:before { content: url(http://shoomboom.com/pockets/icons/sad.jpg); }

.mood.happy:before { content: url(http://shoomboom.com/pockets/icons/happy.gif); }

</style>

 

</div>

HTML;

echo $html;

Quote · 6 Jul 2015

 

.. but it also puts all the other images too :|

 My guess would be it has something to do with this code:

<div class="dbContent">

<i class="mood sad"></i>

<i class="mood happy"></i>
My opinions expressed on this site, in no way represent those of Boonex or Boonex employees.
Quote · 6 Jul 2015

yeah but there will be 4 things to chose. happy, sad, laughing, crying. 

Quote · 6 Jul 2015

i wonder if i could do it with text symbols instead

Quote · 6 Jul 2015

I'd put more thought into this, but I'm really too busy looking for an economical way to remove rust, scale and mill marks from plasma cut ATSM A36 steel plate.

My opinions expressed on this site, in no way represent those of Boonex or Boonex employees.
Quote · 7 Jul 2015

 

I'd put more thought into this, but I'm really too busy looking for an economical way to remove rust, scale and mill marks from plasma cut ATSM A36 steel plate.

 Hydrochloric Acid maybe?

Nothing to see here
Quote · 7 Jul 2015

 

Hydrochloric Acid maybe?

 Ha ha.... Bosun and Master Bosun hijacking a thread.  Harsh chemicals are not an option. HCl won't remove mill marks.

Don't worry Voni. if the hijacking gets out of hand, I'll send myself a letter of reprimand.

My opinions expressed on this site, in no way represent those of Boonex or Boonex employees.
Quote · 7 Jul 2015
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.