I will guide you through whole process and give necessary codes.
1. First of all you need to get mood graphics. Thanks to hot girl Shelley we can get it for free
http://www.vbimageworks.com/miscellaneous/1125-mood-manager-icons.html (I'm not allowed to re-distribute those files myself).
Download files from here:
http://www.vldcrowd.com/media/uploads/file_1hd1ctcu93feju6rmvvphnvam9ve.zip
2. Unpack archive to /templates/yourtemplate/media/moods/ floder.
3. Go to your CP and create new profile field group with label 'mood' and whatever name. Set Load in account profile: Yes, Load in public profile: Yes and Load in account separately: Yes (!!!).
4. Create field inside that group with label 'mymood', type dropdown and populate this field with filenames (without .gif). Use mood distribution readme, moods are listed there. You'll need about half an hour for this :)
Set rights similar to group.
Thanks to this mod I found out what it does mean Load in account separately It means you never see it in regular Edit profile, but if you add additional parameter: group label to url you'll get for editing content of that group! Group and it's fields has to have Load in account separately set to Yes.
Thus now you can edit this group using this link: yoursite.com/account/profile/mood/
5. Add this to the top of member_sections_card.tpl:
<dt style="padding-top: 10px">My Mood:</dt>
<dd>
<!-- IF active_module == "account_home" -->
<a href="{virtual_path}account/profile/mood/" title="Click to edit"><img alt="Edit" border="0" src="{virtual_tpl_path}{session.template}/media/moods/<!-- IF profile_field_mymood_value -->{profile_field_mymood_value}<!-- ELSE -->Edit<!-- ENDIF -->.gif" /></a>
<!-- ELSE -->
<div style="background: url('{top.virtual_tpl_path}{session.template}/media/moods/<!-- IF profile_field_mymood_value -->{profile_field_mymood_value}<!-- ELSE -->Question<!-- ENDIF -->.gif') no-repeat; width:93px; height:30px;"> </div>
<!-- ENDIF -->
</dd>
That is basic functionality. Next time I'll teach you how to add dynamically uploading graphics for comfortable mood selection. Part 2.







Comments
rexi
change this:
<!-- IF active_module == "account_home" -->
<a href="{virtual_path}account/profile/mood/"
to this:
<!-- IF active_module == "account_home" -->
<a href="{virtual_path}index.php?m=account_profile"
then go to control panel and put as DDNY said, mood in general group, then set:
Load in account separately NO
Load in member lists YES
Load in account profile YES
Load in public profile YES
voila, works!
thanks DDNY!
rexi
rexi
thanks for help :)
DDNY
rexi
DDNY
I had the same issue and found a solution that will at least work on my site. I added My Mood as a field under the General Group. In order to avoid the Question It mood being displayed in search results I set Load in Member Lists to 'Yes'. This solved the issue for me. Not sure if it will help you but something to at least try.
DDNY
rexi
Moods are displayed under profiles (mine and others) but in search results i can see only questioning icon.
what .tpl is for this responsable?
rexi
for v2.6
use member_profile_or.tpl
to show it under others profile :)
Pages
1 2 3Log in to leave a comment