Mood Bobels V2.1

Started by Chaos Dragon, September 04, 2008, 04:29:13 PM

Previous topic - Next topic

SA™

http://samods.github.io/SAChatBar/

Xbox Live: smokerthecheese 360 or xbone
My Work
Piano Movers / Delivery service
QuoteMy allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

TwitchisMental

Hey does anyone have some links to other mood images? Images like the phpbb3 mood mod has?

Chaos Dragon

I haven't seen the phpBB mood mod so I don't know and as far as a site to get images for mood icons I am not sure. I have the boobles, Mood stars, and a mod with over 100 mood smilies at this time. Will be updating this mod for 2.0RC2 as soon as I can.
"Never stop exploring new ideas, concepts and techniques, but never forget the old ones, they just may come in handy someday!"
"Don't give up! Otherwise you do not win and nothing gets accomplished!"
Einstein "Insanity is doing the same thing over and over again, and expecting different results..."
Do Not PM me for Support. They will be Ignored. Use the Threads the have been provided.

neko-ka-san

I use Livejournal Mood Themes with mine. With just a bit of filename editing, uploading and link back to the author, it's pretty easy. And they give you a wide variety of image sets to choose from.

Lamarck

Looking forward the 2.0 RC2 update,I can't make this work,specially in profile.template.php.

khamseen

Quote from: Chaos Dragon on November 25, 2009, 04:07:55 AM
I haven't seen the phpBB mood mod so I don't know and as far as a site to get images for mood icons I am not sure. I have the boobles, Mood stars, and a mod with over 100 mood smilies at this time. Will be updating this mod for 2.0RC2 as soon as I can.


Any progress with an RC2 by any chance man?
"In hope we find despair and in despair we find truth." - Myself

khamseen

I've actually got this working with RC2. I had to edit the way it entered into the profile.template.php

Where you had:
Code (Find) Select

if (!isset($context['disabled_fields']['location']) && !empty($context['member']['location']))
echo '
<dt>', $txt['location'], ':</dt>
<dd>', $context['member']['location'], '</dd>';

echo '
</dl>';


Code (Add After) Select

if(isset($context['member']['options']['bobel']) && !empty($context['member']['options']['bobel']))
{
$bobel = MoodBobel();
echo '
<dt>', $txt['mood_bobel'], ':</dt>
<dd>', $bobel[$context['member']['options']['bobel']], '</dd>';
}
echo '
</dl>';


I had to actually place it as:

Code (Find) Select

if (!isset($context['disabled_fields']['location']) && !empty($context['member']['location']))
echo '
<dt>', $txt['location'], ':</dt>
<dd>', $context['member']['location'], '</dd>';

echo '
</dl>';


Code (Replace With) Select

if (!isset($context['disabled_fields']['location']) && !empty($context['member']['location']))
echo '
<dt>', $txt['location'], ':</dt>
<dd>', $context['member']['location'], '</dd>';

if(isset($context['member']['options']['bobel']) && !empty($context['member']['options']['bobel']))
{
$bobel = MoodBobel();
echo '
<dt>', $txt['mood_bobel'], ':</dt>
<dd>', $bobel[$context['member']['options']['bobel']], '</dd>';
}
echo '
</dl>';


Otherwise when a mood was selected the summary page for profiles displayed the mood but no information about date registered, last active, IP, etc...

The problem I'm having now is I believe it's messing up the page view of "Forum Profile" tab on certain themes. I'm just not too sure why yet. The problem seems to originate with this piece of coding from profile.template.php




// Callback function for entering a birthdate!
function template_profile_birthdate()
{
global $txt, $settings, $context;



// Begin Mood Bobels

// Call the function that has all the mood info
$bobel = MoodBobel();

echo '
<script language="JavaScript" type="text/javascript">
function showmoods()
{
document.images.moods.src = document.forms.creator.bobel.options[document.forms.creator.bobel.selectedIndex].value != \'\' ? \'' . $settings['default_theme_url'] . '/images/moodbobels/\' + document.forms.creator.bobel.options[document.forms.creator.bobel.selectedIndex].value + \'.gif\' : \'' . $settings['default_theme_url'] . '/images/moodbobels/blank.gif\';
}
</script>
<tr>
<td width="40%" align="top">
<b>', $txt['mood_bobel'], ':</b>
</td>
<td>
<select name="bobel" onchange="showmoods()">
<option value=""></option>';

// Loop and show the drop down.
foreach ($bobel as $key => $name)
echo '
<option value="', $key, '" ', isset($context['member']['options']['bobel']) &&  $context['member']['options']['bobel'] == $key ? 'selected="selected"' : '', '>', $name, '</option>';

echo '
</select>
<img id="moods" src="', $settings['default_theme_url'], '/images/', isset($context['member']['options']['bobel']) && !empty($context['member']['options']['bobel']) ? 'moodbobels/' . $context['member']['options']['bobel'] . '.gif': 'blank.gif', '"  align="top" />
</td>
</tr><tr>';


Other than that, it seems to be working fine on RC2.
"In hope we find despair and in despair we find truth." - Myself

fgoc

can anyone tell me which table and field in the database the selected mood is stored in for each member?

Thanks

Paul

Chaos Dragon

It does not use the DB....It's all ran by php and javascript....
"Never stop exploring new ideas, concepts and techniques, but never forget the old ones, they just may come in handy someday!"
"Don't give up! Otherwise you do not win and nothing gets accomplished!"
Einstein "Insanity is doing the same thing over and over again, and expecting different results..."
Do Not PM me for Support. They will be Ignored. Use the Threads the have been provided.

chrishicks

Will we see an update for RC3?

hawd

hellow, im using this great mod with ultimate profile mod.  I can see a "mood" text appear on my ultimate profile summary, but can it appear not only a text, but also the icon / pic from the mood??  i think it will be more cool with that!  =D

also i noticed that if users want to change their mood, they must change it in modify forum profile section.. can it done in modify ultimate profile too?? i want the box for change mood appear in modify ultimate profile section before "About Me" box.

can someone expert in here tell me how to do this??

thanks & Respect
hawd

marianolozano

Thank you khamseen.

I´ve been working with this mood to use it as a flag tag for users until 2.0; today I´ve updated to RC3 and it´s been crazy. Fortunately I used khamseen´s directions and it´s working fine. Thanks again.

Other mods still fail with RC3, pretty urls or smftags for instance...  :-\

chinaren

It could be due to the lack of tables in RC3.  I've had a few problems trying to install other mods that use them, and basically given up.


I'm looking forward to this one for RC3, 'cos it's a fave on my board!




Quote from: khamseen on January 16, 2010, 09:26:13 PM


The problem I'm having now is I believe it's messing up the page view of "Forum Profile" tab on certain themes. I'm just not too sure why yet. The problem seems to originate with this piece of coding from profile.template.php



      
   // Callback function for entering a birthdate!
function template_profile_birthdate()
{
   global $txt, $settings, $context;

   
      
   // Begin Mood Bobels
   
      // Call the function that has all the mood info
      $bobel = MoodBobel();

      echo '
                     <script language="JavaScript" type="text/javascript">
                        function showmoods()
                        {
                           document.images.moods.src = document.forms.creator.bobel.options[document.forms.creator.bobel.selectedIndex].value != \'\' ? \'' . $settings['default_theme_url'] . '/images/moodbobels/\' + document.forms.creator.bobel.options[document.forms.creator.bobel.selectedIndex].value + \'.gif\' : \'' . $settings['default_theme_url'] . '/images/moodbobels/blank.gif\';
                        }
                     </script>
                     <tr>
                        <td width="40%" align="top">
                           <b>', $txt['mood_bobel'], ':</b>
                        </td>
                        <td>
                           <select name="bobel" onchange="showmoods()">
                              <option value=""></option>';

                     // Loop and show the drop down.
                     foreach ($bobel as $key => $name)
                        echo '
                              <option value="', $key, '" ', isset($context['member']['options']['bobel']) &&  $context['member']['options']['bobel'] == $key ? 'selected="selected"' : '', '>', $name, '</option>';

      echo '
                           </select>
                           <img id="moods" src="', $settings['default_theme_url'], '/images/', isset($context['member']['options']['bobel']) && !empty($context['member']['options']['bobel']) ? 'moodbobels/' . $context['member']['options']['bobel'] . '.gif': 'blank.gif', '"  align="top" />
                        </td>
                     </tr><tr>';


Other than that, it seems to be working fine on RC2.
The Opus Path - The Next Generation of the Written Word

~DS~

Thanks for the update.

How do you not show the 'Mood' text on topic view?

Or maybe this : "Mood: Angry"

Can it be removed?
"There is no god, and that's the simple truth. If every trace of any single religion were wiped out and nothing were passed on, it would never be created exactly that way again. There might be some other nonsense in its place, but not that exact nonsense. If all of science were wiped out, it would still be true and someone would find a way to figure it all out again."
~Penn Jillette – God, NO! – 2011

chinaren

Yay!  Thanks for the update for RC3!   It came up with an error in the Ultimate Profile php file, which I have installed, but it worked anyway!


Thanks again. 
The Opus Path - The Next Generation of the Written Word

TheListener

Quote from: chinaren on July 26, 2010, 07:05:45 PM
Yay!  Thanks for the update for RC3!   It came up with an error in the Ultimate Profile php file, which I have installed, but it worked anyway!


Thanks again.

What was the error?

TheListener

Quote from: Dismal Shadow on July 26, 2010, 03:41:43 PM
Thanks for the update.

How do you not show the 'Mood' text on topic view?

Or maybe this : "Mood: Angry"

Can it be removed?

The answer is a couple pages back.

!RFAN

getting this error at profile settings page


Fatal error: Call to undefined function MoodBobel() in /home/amigo/public_html/Sources/Load.php(2705) : eval()'d code on line 2629

chinaren

Any chance of an update for this for 2.0.1.  This is one of my fave mods.  ;D
The Opus Path - The Next Generation of the Written Word

GlitchPC

Quote from: chinaren on October 26, 2011, 07:29:19 AM
Any chance of an update for this for 2.0.1.  This is one of my fave mods.  ;D

I agree...

Would love to see this ported to SMF 2.0.1.

Advertisement: