News:

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

Main Menu

Mood Bobels

Started by Lord Anubis, May 18, 2008, 01:32:26 AM

Previous topic - Next topic

Lord Anubis

#40
Do you have the mod installed?

Are you using V2.0 of the mod?

Does the mod work properly on your forum?

Did you copy and paste the entire code?  Check and make sure, I bet you only copied part of it  ;)

Did you put it into a PHP block?

I know it works, because I am using on my site, and a hand full of other sites that I work on


Kimmie

The answer to every one of those questions is yes and it still doesnt work..lol

Lord Anubis

Try this, copy the code...paste it into notepad, then recopy it from notepad and add the code to the PHP block

Lenophis

#43
I seem to have a rather odd error, but it may be of my own doing. I changed all of the images used to be a custom set (and there's 28 fewer images), and the order of the moods were changed. I'm pretty sure the syntax is right, since the forum isn't giving any errors with it. The last mod was to set it so it appears after the personal text. All of these seem to work just fine.

The error is that the first mood (Happy) isn't showing up in posts. It is selectable and set correctly in the profile, but nothing appears in the posts, then the image disappears when going back to the profile. It's re-loaded after the mood is changed around. All other moods work just fine. Did I overlook something?

--Edit--
The changes made:

The original array
function MoodBobel()
{
$bobel = array(
'Amused', 'Angry', 'Busy', 'Calm', 'Cold', 'Confused', 'Content', 'Curious',
                        'Depressed', 'Drunk', 'Embarrassed', 'Energetic', 'Envious', 'Exhausted',
                        'Flirty', 'Full', 'Grumpy', 'Happy', 'High', 'Horny', 'Hot', 'Hungry', 'Hyper',
                        'Indescribable', 'Lazy', 'Loved', 'Mischievous', 'Okay', 'Pissed', 'Relaxed', 'Relieved',
                        'Sad', 'Scared', 'Sick', 'Silly', 'Sleepy', 'Smart', 'Stressed', 'Thoughtful', 'Worried'

);
return $bobel;
}


This array
function MoodBobel()
{
$bobel = array(
'Happy', 'Awesome', 'Angry', 'Sad', 'Scared', 'BANON SMASH!!!', 'Sleepy',
                        'Embarrassed', 'Insane', 'Annoyed', 'Childish', 'omghax'

);
return $bobel;
}


Original display
<file name="$themedir/Display.template.php">
<operation>
<search position="after"><![CDATA[// Show their personal text?]]></search>


This display
<file name="$themedir/Display.template.php">
<operation>
<search position="after"><![CDATA[// Show the profile, website, email address, and personal message buttons.]]></search>


Original PM
<file name="$themedir/PersonalMessage.template.php">
<operation>
<search position="after"><![CDATA[// Show their personal text?]]></search>


This PM
<file name="$themedir/PersonalMessage.template.php">
<operation>
<search position="after"><![CDATA[// Show the profile, website, email address, and personal message buttons.]]></search>



Lord Anubis

I suspect you are using version 2...The first image should be labeled 0.gif

If you already have it labeled that, then I dunno what could be the problem...But you can delete 'Happy' from the array set in the profile.template.php and not have that mood anymore

For that particular problem though, I have never seen it...If you want PM me with an account on the forum so I can mess around with it and see what might be the cause

Lenophis

Quote from: Lord Anubis on June 08, 2008, 06:12:37 PMI suspect you are using version 2...The first image should be labeled 0.gif
Indeed, and that is the case. There's 12 images, numbered 0 - 11. There's also the blank.gif, which was never touched.

QuoteFor that particular problem though, I have never seen it...If you want PM me with an account on the forum so I can mess around with it and see what might be the cause
Originally I thought I accidently tweaked something I shouldn't have, but the code looks consistent between the two files other than the changes noted. *shrug*

Lord Anubis

Where the image is supposed to show up for "Happy" does it have a red X in Internet Explorer?

If so have you right clicked on it to see where it is supposed to go, just to ensure it isn't doing something funny?

Also, reuploading that one image might help, it might not have FTPed correctly...I have had this happen.

Your code from what I can see looks correct, I might have to mess around a bit with it...

Let me know if my suggestions help

I will be back in a bit, and will check your post when I return :)

Lenophis

Quote from: Lord Anubis on June 08, 2008, 06:34:10 PMWhere the image is supposed to show up for "Happy" does it have a red X in Internet Explorer?
No. Checking it in Firefox gives a clue though. It previews 0.gif accurately, but then when the change to the profile is made, it suddenly looks at blank.gif.

To make sure it wasn't a fluke, I uninstalled the mod, deleted the package, re-uploaded it, then re-installed it. Hmmm...

Lord Anubis

#48
Hmmm, looks like you found an error that I missed...I will have to figure this one out

I got a simple solution for yours

for this code

function MoodBobel()
{
   $bobel = array(
            'Happy', 'Awesome', 'Angry', 'Sad', 'Scared', 'BANON SMASH!!!', 'Sleepy',
                        'Embarrassed', 'Insane', 'Annoyed', 'Childish', 'omghax'

   );
   return $bobel;
}


Change it to

function MoodBobel()
{
   $bobel = array(
           ' ', 'Happy', 'Awesome', 'Angry', 'Sad', 'Scared', 'BANON SMASH!!!', 'Sleepy',
                        'Embarrassed', 'Insane', 'Annoyed', 'Childish', 'omghax'

   );
   return $bobel;
}


And rename your gifs....0.gif being a second blank.gif (keep this one too!!!) and rename them 1.gif= happy and etc

That should work, let me know :)

Lenophis

Well, there's a second blank entry in the droplist, but it works like a charm. Thanks.

Lord Anubis

your welcome, its the quickest way I could think of...I am gonna try to figure something with my mods now, thanks for finding that :)

Kimmie

Quote from: Lord Anubis on June 08, 2008, 09:56:13 AM
Try this, copy the code...paste it into notepad, then recopy it from notepad and add the code to the PHP block

Still doesnt work - image attached

Lord Anubis

Quote from: Kimmie on June 09, 2008, 11:44:08 PM
Quote from: Lord Anubis on June 08, 2008, 09:56:13 AM
Try this, copy the code...paste it into notepad, then recopy it from notepad and add the code to the PHP block

Still doesnt work - image attached

PM me at TinyAdminResources

Kimmie

Quote from: Lord Anubis on June 10, 2008, 02:23:50 AM
Quote from: Kimmie on June 09, 2008, 11:44:08 PM
Quote from: Lord Anubis on June 08, 2008, 09:56:13 AM
Try this, copy the code...paste it into notepad, then recopy it from notepad and add the code to the PHP block

Still doesnt work - image attached

PM me at TinyAdminResources

Not really sure why you cant just finish helping me here, but ok....lol.

To other members who may experience the same issue, I will post the resolution here so everyone can benefit from it.

Lord Anubis

#54
How can I help you when all you give me is it doesn't work?

That really doesn't give me much to work with, the only thing I can think of is PM me an admin account to your forum and I will see what is going on

And for some reason I cant get onto SMF when I am at work, but I can get on my site...hence why I asked ya to PM me there ;)

ruaduck

I am having a problem when taking this off my site and you go into a profile to edit Forum Profile Information.  Fatal error: Call to undefined function: moodbobel() in /home/epoetryc/public_html/uoguyz/cks/Sources/Load.php(1814) : eval()'d code on line 1416

Lord Anubis

#56
Did you have any of the files say that the uninstall failed?

If you ever encounter that when uninstalling a mod, that means that you have to manually uninstall the mod from those files.

in the /Sources/Subs.php

Find:

function MoodBobel()
{
$bobel = array(
'Amused', 'Angry', 'Busy', 'Calm', 'Cold', 'Confused', 'Content', 'Curious',
                        'Depressed', 'Drunk', 'Embarrassed', 'Energetic', 'Envious', 'Exhausted',
                        'Flirty', 'Full', 'Grumpy', 'Happy', 'High', 'Horny', 'Hot', 'Hungry', 'Hyper',
                        'Indescribable', 'Lazy', 'Loved', 'Mischievous', 'Okay', 'Pissed', 'Relaxed', 'Relieved',
                        'Sad', 'Scared', 'Sick', 'Silly', 'Sleepy', 'Smart', 'Stressed', 'Thoughtful', 'Worried'

);
return $bobel;
}


And delete all of that

OR it might be in the
./Themes/default/Profile.template.php

Seach for

</tr><tr>


<td><b>', $txt['mood_bobel'], ':</b></td>
<td>';

// Did they select a mood?
if(isset($context['member']['options']['bobel']) && !empty($context['member']['options']['bobel']))
{
$bobel = MoodBobel();
echo
$bobel[$context['member']['options']['bobel']];
}

echo '
</td>
</tr>


and delete that bit

and

Search for

// 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', '"  height="35" align="top" />
</td>
</tr><tr>';



And delete that bit

ruaduck

I am not finding that anywhere in my subs.php  and yes it showed that they all were successful when i uninstalled it.

ruaduck

Quote from: Lord Anubis on June 16, 2008, 05:48:11 PM


OR it might be in the
./Themes/default/Profile.template.php

Seach for

</tr><tr>


<td><b>', $txt['mood_bobel'], ':</b></td>
<td>';

// Did they select a mood?
if(isset($context['member']['options']['bobel']) && !empty($context['member']['options']['bobel']))
{
$bobel = MoodBobel();
echo
$bobel[$context['member']['options']['bobel']];
}

echo '
</td>
</tr>


and delete that bit

and

Search for

// 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', '"  height="35" align="top" />
</td>
</tr><tr>';



And delete that bit

This is all i fixed and it got rid of it. Thank you for your helf.

Lord Anubis


Advertisement: