News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Bear / Mood Tags

Started by Gobo, October 07, 2006, 09:23:12 AM

Previous topic - Next topic

Gobo

Link to Mod
Rate this Mod

This mod will add a new feild to your profile edit screen where your users can select 1 out of 45 mood bears. These bears are displayed on your post profile as a picture and on your profile only as text. Preview Below.


To see this mod in action visit My page - it is active on all themes.

A small preview of some of the bear moods can be seen below - in all there are 45



Mood Bears are provided by:

Gobo

#1
Updated for 1.1
File added to download section

Manual modification instructions - for custom themes

Golden rule #1 Always make backup of your file before modifying.

Find in Profile.template.php (this file is located in your theme folder)

<td><a href="', $context['member']['website']['url'], '" target="_blank">', $context['member']['website']['title'], '</a></td>


Add after that code:


', !empty($context['member']['options']['bear_tab']) ? '</tr><tr>
<td><b>Mood: </b></td>
<td>' . $context['member']['options']['bear_tab'] . '</td>' : '', '


Then in Profile.template.php find:

<td><input type="text" name="websiteUrl" size="50" value="', $context['member']['website']['url'], '" /></td>]]></search>


Add after it this:


</tr><tr>
<td><b>Mood: </b></td>
<td><select name="default_options[bear_tab]">
<option', @$context['member']['options']['bear_tab'] == 'angelic' ? ' selected="selected"' : '', '>angelic</option>
<option', @$context['member']['options']['bear_tab'] == 'angry' ? ' selected="selected"' : '', '>angry</option>
<option', @$context['member']['options']['bear_tab'] == 'anxious' ? ' selected="selected"' : '', '>anxious</option>
<option', @$context['member']['options']['bear_tab'] == 'artistic' ? ' selected="selected"' : '', '>artistic</option>
<option', @$context['member']['options']['bear_tab'] == 'athletic' ? ' selected="selected"' : '', '>athletic</option>
<option', @$context['member']['options']['bear_tab'] == 'atpeace' ? ' selected="selected"' : '', '>atpeace</option>
<option', @$context['member']['options']['bear_tab'] == 'blue' ? ' selected="selected"' : '', '>blue</option>
<option', @$context['member']['options']['bear_tab'] == 'bubbly' ? ' selected="selected"' : '', '>bubbly</option>
<option', @$context['member']['options']['bear_tab'] == 'chatty' ? ' selected="selected"' : '', '>chatty</option>
<option', @$context['member']['options']['bear_tab'] == 'cold' ? ' selected="selected"' : '', '>cold</option>
<option', @$context['member']['options']['bear_tab'] == 'contemplative' ? ' selected="selected"' : '', '>contemplative</option>
<option', @$context['member']['options']['bear_tab'] == 'cool' ? ' selected="selected"' : '', '>cool</option>
<option', @$context['member']['options']['bear_tab'] == 'crafty' ? ' selected="selected"' : '', '>crafty</option>
<option', @$context['member']['options']['bear_tab'] == 'creative' ? ' selected="selected"' : '', '>creative</option>
<option', @$context['member']['options']['bear_tab'] == 'devilish' ? ' selected="selected"' : '', '>devilish</option>
<option', @$context['member']['options']['bear_tab'] == 'domestic' ? ' selected="selected"' : '', '>domestic</option>
<option', @$context['member']['options']['bear_tab'] == 'embarrassed' ? ' selected="selected"' : '', '>embarrassed</option>
<option', @$context['member']['options']['bear_tab'] == 'festive' ? ' selected="selected"' : '', '>festive</option>
<option', @$context['member']['options']['bear_tab'] == 'ghostly' ? ' selected="selected"' : '', '>ghostly</option>
<option', @$context['member']['options']['bear_tab'] == 'gloomy' ? ' selected="selected"' : '', '>gloomy</option>
<option', @$context['member']['options']['bear_tab'] == 'happy' ? ' selected="selected"' : '', '>happy</option>
<option', @$context['member']['options']['bear_tab'] == 'intelligent' ? ' selected="selected"' : '', '>intelligent</option>
<option', @$context['member']['options']['bear_tab'] == 'hot' ? ' selected="selected"' : '', '>hot</option>
<option', @$context['member']['options']['bear_tab'] == 'hungry' ? ' selected="selected"' : '', '>hungry</option>
<option', @$context['member']['options']['bear_tab'] == 'lazy' ? ' selected="selected"' : '', '>lazy</option>
<option', @$context['member']['options']['bear_tab'] == 'lovable' ? ' selected="selected"' : '', '>lovable</option>
<option', @$context['member']['options']['bear_tab'] == 'lucky' ? ' selected="selected"' : '', '>lucky</option>
<option', @$context['member']['options']['bear_tab'] == 'mechanical' ? ' selected="selected"' : '', '>mechanical</option>
<option', @$context['member']['options']['bear_tab'] == 'musical' ? ' selected="selected"' : '', '>musical</option>
<option', @$context['member']['options']['bear_tab'] == 'nutty' ? ' selected="selected"' : '', '>nutty</option>
<option', @$context['member']['options']['bear_tab'] == 'overworked' ? ' selected="selected"' : '', '>overworked</option>
<option', @$context['member']['options']['bear_tab'] == 'patriotic' ? ' selected="selected"' : '', '>patriotic</option>
<option', @$context['member']['options']['bear_tab'] == 'prayerful' ? ' selected="selected"' : '', '>prayerful</option>
<option', @$context['member']['options']['bear_tab'] == 'pretty' ? ' selected="selected"' : '', '>pretty</option>
<option', @$context['member']['options']['bear_tab'] == 'puzzled' ? ' selected="selected"' : '', '>puzzled</option>
<option', @$context['member']['options']['bear_tab'] == 'sad' ? ' selected="selected"' : '', '>sad</option>
<option', @$context['member']['options']['bear_tab'] == 'shy' ? ' selected="selected"' : '', '>shy</option>
<option', @$context['member']['options']['bear_tab'] == 'sick' ? ' selected="selected"' : '', '>sick</option>
<option', @$context['member']['options']['bear_tab'] == 'sleepy' ? ' selected="selected"' : '', '>sleepy</option>
<option', @$context['member']['options']['bear_tab'] == 'springy' ? ' selected="selected"' : '', '>springy</option>
<option', @$context['member']['options']['bear_tab'] == 'stubborn' ? ' selected="selected"' : '', '>stubborn</option>
<option', @$context['member']['options']['bear_tab'] == 'surprised' ? ' selected="selected"' : '', '>surprised</option>
<option', @$context['member']['options']['bear_tab'] == 'thankful' ? ' selected="selected"' : '', '>thankful</option>
<option', @$context['member']['options']['bear_tab'] == 'wideawake' ? ' selected="selected"' : '', '>wideawake</option>
<option', @$context['member']['options']['bear_tab'] == 'worried' ? ' selected="selected"' : '', '>worried</option>
</select></td>



now in Display.template.php file find this:

// Show the member's gender icon?


Add BEFORE it:


if (empty($message['member']['options']['bear_tab'])) {
    $message['member']['options']['bear_tab']='angelic';
}
echo '
   <b>Mood:</b> <br><img src="', $settings['images_url'], '/', $message['member']['options']['bear_tab'], '.gif" /> <br />';


Thats all - upload the files to ur theme folder - replace existing files. and u are set to go.

Vinspire

akulion is coming out with more mods now .... this mod is so cute. would try it out later  :D

Vinspire

akulion, can you update this mod to a version that i can set membergroups permission ?

Gobo

that would take me a long time to do since thats very much beyond my skills for now
as i mentioned this is a very very simple mod really


Vinspire

Quote from: akulion on October 09, 2006, 06:50:30 PM
that would take me a long time to do since thats very much beyond my skills for now
as i mentioned this is a very very simple mod really

Hmmm .... Then can try to get some pro modder to work on this features ? I thought permission feature is under manage.permission.php ?  :P

sipko

Great and fun mod. Thanks for developing it. My forum members love it.

xcrazyxfrogx

I cant see Images at near of Avtaar not even in profile all i can see is Mood Angelic but no bear images in profile only text is there !!!!! :( what is cause can u tell me what to add in Display.Template or any other thing????????


Money... my obsession... Wealth... my addiction... Fear... my weapon... Crazy people... don't you understand... from the smokes of fear... who I am?

Vinspire

Quote from: xcrazyxfrogx on October 10, 2006, 05:54:15 AM
I cant see Images at near of Avtaar not even in profile all i can see is Mood Angelic but no bear images in profile only text is there !!!!! :( what is cause can u tell me what to add in Display.Template or any other thing????????

Are you using a custom theme ?

If so, I think you need to manually add in the bear gif to ur custom theme folder :)

Gobo

Quote from: xcrazyxfrogx on October 10, 2006, 05:54:15 AM
I cant see Images at near of Avtaar not even in profile all i can see is Mood Angelic but no bear images in profile only text is there !!!!! :( what is cause can u tell me what to add in Display.Template or any other thing????????

ive added the manual modification instructions to my 2nd post (above) - u can follow them for custom themes.

If you have a lot of trouble - just attatch your display.template.php and profile.template.php files here and ill mod the up for you :)


Quote from: Vinspire on October 09, 2006, 06:52:31 PM
Hmmm .... Then can try to get some pro modder to work on this features ? I thought permission feature is under manage.permission.php ?  :P
I'll have to check into that sometime, for now havent a clue about those things lol

xcrazyxfrogx

#10
i did that but Bear images is not in Profile still all i see is  :(

Mood: atpeace

and Entried u posted here is same in profile template so i didnt edit it  :-\

but in posts now i can see Bear i edited Display Template after Gender icon  ;D thanx but profile is still a problem  ::)


Money... my obsession... Wealth... my addiction... Fear... my weapon... Crazy people... don't you understand... from the smokes of fear... who I am?

Tony Reid

Nice mod.

I have always wondered why Mood mods are done in profiles.

Would it not be better done at time of posting? that way members know exactly what your mood was like when posting the message. It might help them interpret your response/post better too.

Tony Reid

Vinspire

Quote from: akulion on October 10, 2006, 10:00:20 AM
Quote from: Vinspire on October 09, 2006, 06:52:31 PM
Hmmm .... Then can try to get some pro modder to work on this features ? I thought permission feature is under manage.permission.php ?  :P
I'll have to check into that sometime, for now havent a clue about those things lol

It would be a great way to lure my members to post more if there is a permission feature for this mods :P

Gobo

Quote from: Tony on October 10, 2006, 06:37:30 PM
Nice mod.
I have always wondered why Mood mods are done in profiles.
Would it not be better done at time of posting? that way members know exactly what your mood was like when posting the message. It might help them interpret your response/post better too.

yup i agree - but unfortunately for me - this is the only type of mod i know how to make lol

but feel free to modify if you or anyone likes to try and make the kind u mentioned

it would be a great mod

xcrazyxfrogx

Quote from: akulion on October 11, 2006, 10:21:17 AM
Quote from: Tony on October 10, 2006, 06:37:30 PM
Nice mod.
I have always wondered why Mood mods are done in profiles.
Would it not be better done at time of posting? that way members know exactly what your mood was like when posting the message. It might help them interpret your response/post better too.

yup i agree - but unfortunately for me - this is the only type of mod i know how to make lol

but feel free to modify if you or anyone likes to try and make the kind u mentioned

it would be a great mod

I agree with Tony :)


Money... my obsession... Wealth... my addiction... Fear... my weapon... Crazy people... don't you understand... from the smokes of fear... who I am?

Gobo


mark7144

#16
For those interested, here are a couple of code changes I made so that by default everyone doesn't have a mood and also users can decide not to have a mood after setting one previously.

1. Themes/default/images/
Upload the attached image with the rest of the mood bears. It's just a 1x1 pixel image.

2. Display.template.php
Replace previous code with:
if (empty($message['member']['options']['bear_tab'])) {
    $message['member']['options']['bear_tab']='nomood';
}
echo '
   <b>Mood:</b> <br><img src="', $settings['default_images_url'], '/', $message['member']['options']['bear_tab'], '.gif" /> <br />';


3.Profile.template.php
Add this straight after <select name="default_options[bear_tab]">
<option', @$context['member']['options']['bear_tab'] == 'nomood' ? ' selected="selected"' : '', '>no mood</option>

Hope that helps some of you.

Thanks for the great mod!

Suby

I can only see the bear mod in my default theme. I have 7 other themes, and don't have display and profile template in them. It's only located in default theme directory.

Any ideas?

Gobo

Yes the custom themes are not modified by mod installations so they have to be modified manually.

Follow this post it gives the full details of how to include the bear mood tabs into default themes:
http://www.simplemachines.org/community/index.php?topic=118621.msg757658#msg757658

mark7144

Is the 'overworked' spelling mistake on the bear been fixed yet?


Advertisement: