Mood version 0.9
created by Jim Lehmann a.k.a. Ravenswood
email: ravenswd@gmail.com
website: www.scriptmonkeys.us

For other Phorum modules and templates, as well as a variety of other PHP scripts,
visit http://www.scriptmonkeys.us

This is an add-on module for the Phorum software.
For further information on Phorum, visit http://www.phorum.org/

===================================================================================================================


General Information:
--------------------

When active, this module adds a "current mood" graphic next to the user's name in messages. This module comes with 30 
mood graphics included.


To Install:
-----------

1. Upload the folder mood to the mods directory on your server. Make sure to keep the directory structure intact.
2. From the Phorum Admin panel, go to "modules" page.
3. Activate module Mood. Remember to click "Submit" at the bottom of the screen.
4. You need to edit three template files. Follow the directions below.


Editing the templates:
----------------------

1. From the directory templates/(your template), download "read.tpl", "read_hybrid.tpl", and "read_threads.tpl".
2. Edit the files. In read.tpl and read_hybrid.tpl, look for this section:

    <td width="100%">
        <div class="message-author icon-user">
            {IF MESSAGES->URL->PROFILE}<a href="{MESSAGES->URL->PROFILE}">{/IF}{MESSAGES->author}{IF MESSAGES->URL->PROFILE}</a>{/IF}
            {IF MESSAGES->URL->PM}<small>[ <a href="{MESSAGES->URL->PM}">{LANG->PrivateReply}</a> ]</small>{/IF}
        </div>
        <small>
        <strong><a href="{MESSAGES->URL->READ}">{MESSAGES->subject}</a> {IF MESSAGES->new}<span class="new-flag">{MESSAGES->new}</span>{/IF}</strong><br />
        {MESSAGES->datestamp}
        </small>
    </td>

Add this text right before the </td>:

        {! hack for mod Mood }
        {IF MESSAGES->user->mod_mood}<br /><small>Current mood:</small> <img src="{MESSAGES->user->mod_mood}" />{/IF}

In other words, the final result should look like this:

    <td width="100%">
        <div class="message-author icon-user">
            {IF MESSAGES->URL->PROFILE}<a href="{MESSAGES->URL->PROFILE}">{/IF}{MESSAGES->author}{IF MESSAGES->URL->PROFILE}</a>{/IF}
            {IF MESSAGES->URL->PM}<small>[ <a href="{MESSAGES->URL->PM}">{LANG->PrivateReply}</a> ]</small>{/IF}
        </div>
        <small>
        <strong><a href="{MESSAGES->URL->READ}">{MESSAGES->subject}</a> {IF MESSAGES->new}<span class="new-flag">{MESSAGES->new}</span>{/IF}</strong><br />
        {MESSAGES->datestamp}
        </small>
        {! hack for mod Mood }
        {IF MESSAGES->user->mod_mood}<br /><small>Current mood:</small> <img src="{MESSAGES->user->mod_mood}" />{/IF}
    </td>

Make sure to add this to both files. Some templates may have support for this module already built-in, in which case these lines
will already be there. Check the readme file of the template before installing these hacks, as it should say whether the code is
already included in the template.

3. Now edit the file read_threads.tpl. Look for this section:

    <td width="100%">
        <div class="message-author icon-user">
            {IF MESSAGE->URL->PROFILE}<a href="{MESSAGE->URL->PROFILE}">{/IF}{MESSAGE->author}{IF MESSAGE->URL->PROFILE}</a>{/IF}
            {IF MESSAGE->URL->PM}<small>[ <a href="{MESSAGE->URL->PM}">{LANG->PrivateReply}</a> ]</small>{/IF}
        </div>
        <small>{MESSAGE->datestamp}</small>
    </td>

Add this text right before the </td>:

        {! hack for mod Mood }
        {IF MESSAGE->user->mod_mood}<br /><small>Current mood:</small> <img src="{MESSAGE->user->mod_mood}" />{/IF}

The final result should look like this:

    <td width="100%">
        <div class="message-author icon-user">
            {IF MESSAGE->URL->PROFILE}<a href="{MESSAGE->URL->PROFILE}">{/IF}{MESSAGE->author}{IF MESSAGE->URL->PROFILE}</a>{/IF}
            {IF MESSAGE->URL->PM}<small>[ <a href="{MESSAGE->URL->PM}">{LANG->PrivateReply}</a> ]</small>{/IF}
        </div>
        <small>{MESSAGE->datestamp}</small>
        {! hack for mod Mood }
        {IF MESSAGE->user->mod_mood}<br /><small>Current mood:</small> <img src="{MESSAGE->user->mod_mood}" />{/IF}
    </td>

4. Save the files and upload them back to their original location.


Quick Notes:
------------

There is no settings screen. A future enhancement will include a settings screen on which the admin can add, remove, or edit moods.


Acknowledgements:
-----------------

Major portions of this module were modified from the "User Avatar" module by Thomas Seifert and Maurice Makaay.


Files:
------

mood/
   info.txt
   install.php
   mood.php
   README
   templates/emerald/cc_mood_menu_item.tpl
   templates/emerald/cc_mood_panel.tpl
   images/Amazed_.gif
   images/Angry_.gif
   images/Bored_.gif
   images/Busy_.gif
   images/Cold_.gif
   images/Content_.gif
   images/Cool_.gif
   images/Cranky_.gif
   images/Depressed_.gif
   images/Excited_.gif
   images/Fine_.gif
   images/Grateful_.gif
   images/Grumpy_.gif
   images/Happy_.gif
   images/Hot_.gif
   images/Inspired_.gif
   images/Irked_.gif
   images/Jubilant_.gif
   images/Lonely_.gif
   images/Loved_.gif
   images/Mood0_.gif
   images/Nerdy_.gif
   images/Nervous_.gif
   images/Sad_.gif
   images/Sick_.gif
   images/Silly_.gif
   images/Sleepy_.gif
   images/Stressed_.gif
   images/Weird_.gif
   images/Worried_.gif
   images/Yuck_.gif

