Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: allever on October 27, 2005, 01:20:58 PM

Title: mMood 1.0
Post by: allever on October 27, 2005, 01:20:58 PM
Link to Mod (http://mods.simplemachines.org/index.php?mod=214)

Unlike my other mood mod, this one will let your members set their mood when they post.

Please let me know of any problems, ideas.

Thanks!

Enjoy!
Allever
Title: Re: mMood 1.0
Post by: JayBachatero on October 28, 2005, 03:10:40 PM
NIce work on the mod.  I was thinking it would look better if you add this after the body of the posts not before or place it were the avatar is at.  that area.
Title: Re: mMood 1.0
Post by: allever on October 29, 2005, 11:04:48 PM
Quote from: JayBachatero on October 28, 2005, 03:10:40 PM
NIce work on the mod.  I was thinking it would look better if you add this after the body of the posts not before or place it were the avatar is at.  that area.
Thanks! :)

You can put it after the body by switching

<div class="post">', $postermood, $message['body'], '</div>

to
<div class="post">', $message['body'],  $postermood,  '</div>

in /default/Display.template.php

:)
Title: Re: mMood 1.0
Post by: JayBachatero on October 29, 2005, 11:06:53 PM
Quote from: allever on October 29, 2005, 11:04:48 PM
Quote from: JayBachatero on October 28, 2005, 03:10:40 PM
NIce work on the mod.  I was thinking it would look better if you add this after the body of the posts not before or place it were the avatar is at.  that area.
Thanks! :)

You can put it after the body by switching

<div class="post">', $postermood, $message['body'], '</div>

to
<div class="post">', $message['body'],  $postermood,  '</div>

in /default/Display.template.php

:)

Iight.  Im going to do this.  I might move it to the avatar area. people might confuse it as being part of the post itself.
Title: Re: mMood 1.0
Post by: DemonicInfluence on October 30, 2005, 10:19:03 AM
Err.. I get this error when posting normally...

8: Undefined variable: form_postermood
File: /home/u1/libo/html/Sources/Post.php
Line: 917


and this when using quick reply.
8: Undefined index: postermood
File: /home/u1/libo/html/Sources/Post.php
Line: 1316


How do u fix this?
Title: Re: mMood 1.0
Post by: ArkServer on October 30, 2005, 03:14:14 PM
I was wondering, how can you add more moods? and anyway to add a smiley with it?


i got it installed here: http://arkserver.servehttp.com/forum/index.php?topic=960.0
great mod :)
Title: Re: mMood 1.0
Post by: DemonicInfluence on October 30, 2005, 06:20:59 PM
Quote from: ArkServer on October 30, 2005, 03:14:14 PM
I was wondering, how can you add more moods? and anyway to add a smiley with it?


i got it installed here: http://arkserver.servehttp.com/forum/index.php?topic=960.0
great mod :)

Edit in the modifications.english.php file for more moods..
Title: Re: mMood 1.0
Post by: allever on October 30, 2005, 09:54:09 PM
Quote from: Libo on October 30, 2005, 10:19:03 AM
Err.. I get this error when posting normally...

8: Undefined variable: form_postermood
File: /home/u1/libo/html/Sources/Post.php
Line: 917


and this when using quick reply.
8: Undefined index: postermood
File: /home/u1/libo/html/Sources/Post.php
Line: 1316


How do u fix this?

Thanks libo! I will have this fix on the next release.  Dunno when that will be... Right now, I am working on a referral/invite mod, using a vanilla smf 1.1rc1
Title: Re: mMood 1.0
Post by: JayBachatero on October 30, 2005, 10:11:05 PM
what is a vanilla smf 1.1 rc1?
Title: Re: mMood 1.0
Post by: DemonicInfluence on November 02, 2005, 07:27:32 AM
Unmodified smf 1.1. Rc1
Title: Re: mMood 1.0
Post by: AzaToth on November 03, 2005, 05:03:19 PM
you should do modification of classic theme also if you are modifying files in template that classic have altered (Display, Post etc...)
Title: Re: mMood 1.0
Post by: Elegant John on November 17, 2005, 11:55:53 PM
Okay, Stupid question, but it is from one of my members! what does this mod do? I have it installed but see none of the moods selected displayed in the posts? D'oh?

On the postive side, it is a clean nice mod.
Title: Re: mMood 1.0
Post by: JayBachatero on November 18, 2005, 12:30:25 AM
Quote from: Elegant John on November 17, 2005, 11:55:53 PM
Okay, Stupid question, but it is from one of my members! what does this mod do? I have it installed but see none of the moods selected displayed in the posts? D'oh?

On the postive side, it is a clean nice mod.

Do you use another theme that is not the default theme?  if so take a look at this
How to make mods work with themes? (http://www.simplemachines.org/community/index.php?topic=34526.0)
Title: Re: mMood 1.0
Post by: jerm on November 18, 2005, 01:43:59 PM
Quote from: allever on October 30, 2005, 09:54:09 PM
Quote from: Libo on October 30, 2005, 10:19:03 AM
Err.. I get this error when posting normally...

8: Undefined variable: form_postermood
File: /home/u1/libo/html/Sources/Post.php
Line: 917


and this when using quick reply.
8: Undefined index: postermood
File: /home/u1/libo/html/Sources/Post.php
Line: 1316


How do u fix this?

Thanks libo! I will have this fix on the next release.  Dunno when that will be... Right now, I am working on a referral/invite mod, using a vanilla smf 1.1rc1
any idea on when you will get around to fixing it?
Title: Re: mMood 1.0
Post by: Gobo on November 25, 2005, 10:16:51 PM
hi
i am using Amber design by Bloc theme
and the moods dont show up.

Is this expected or am I doing something wrong?

PS: I got no error messages and everything installed just fine
Title: Re: mMood 1.0
Post by: JayBachatero on November 25, 2005, 10:26:02 PM
How to make mods work with themes? (http://www.simplemachines.org/community/index.php?topic=34526.0)
Title: Re: mMood 1.0
Post by: Gobo on November 25, 2005, 10:42:00 PM
thanks ill check it out now

ps: love the penguin avatar, its awesome
Title: Re: mMood 1.0
Post by: JayBachatero on November 25, 2005, 10:53:17 PM
You're welcome.
Got it from crystalxp.net. 
Title: Re: mMood 1.0
Post by: Rasyr on December 04, 2005, 04:28:29 PM
I have a question

You have two mood mods, one allows the mood to be changed in the profile. However, this only shows the current mood, meaning that the mood is not stored with the posts themselves. So if a person changes his mood, it changes on all posts that he has made.

Does this one work the same way, or does it store the mood with the actual post, so that different posts from the same user can have different moods?


Nevermind. I installed it and tried it out.  :D
Title: Re: mMood 1.0
Post by: jerm on December 04, 2005, 09:41:25 PM
Quote from: Libo on October 30, 2005, 10:19:03 AM
Err.. I get this error when posting normally...

8: Undefined variable: form_postermood
File: /home/u1/libo/html/Sources/Post.php
Line: 917


and this when using quick reply.
8: Undefined index: postermood
File: /home/u1/libo/html/Sources/Post.php
Line: 1316


How do u fix this?

any word yet on when this will be fixed.. its filling up my log file like crazy lol
Title: Re: mMood 1.0
Post by: Rasyr on December 05, 2005, 05:12:12 AM
Quote from: Libo on October 30, 2005, 06:20:59 PM
Quote from: ArkServer on October 30, 2005, 03:14:14 PM
I was wondering, how can you add more moods? and anyway to add a smiley with it?


i got it installed here: http://arkserver.servehttp.com/forum/index.php?topic=960.0
great mod :)

Edit in the modifications.english.php file for more moods..
I tried this, and tried to add the code for smileys, but when it displayed them, they came out as plain text, not as a smiley.


Also, just had a thought. The errors being reported showing up in the error log (I am getting the same errors), could be why the smileys won't work properly.

Title: Re: mMood 1.0
Post by: Rasyr on December 05, 2005, 09:57:20 PM
Quote from: electrohome88 on December 04, 2005, 09:41:25 PM
Quote from: Libo on October 30, 2005, 10:19:03 AM
Err.. I get this error when posting normally...

8: Undefined variable: form_postermood
File: /home/u1/libo/html/Sources/Post.php
Line: 917


and this when using quick reply.
8: Undefined index: postermood
File: /home/u1/libo/html/Sources/Post.php
Line: 1316


How do u fix this?

any word yet on when this will be fixed.. its filling up my log file like crazy lol
Yes, please. I just deleted 9,747 error messages just from the last 24 hours alone. A fix for this would be very nice.  :D
Title: Re: mMood 1.0
Post by: Nitro on December 06, 2005, 12:10:48 AM
Quotefrom Rasyr : Yes, please. I just deleted 9,747 error messages just from the last 24 hours alone. A fix for this would be very nice.

i know! it gets really bad with these errors!! i am still waiting for an answer to this, also, how is it going with the invite you are creating allever? i have one but it's under joomla and it works great!

let me know about this one you are making, and don't forget about the fix
Title: Re: mMood 1.0
Post by: Rasyr on December 07, 2005, 04:01:37 PM
Just had to delete 26,000+ pages of errors and within a few short minutes I had 46 more pages of errors....

However, I think that I figured out what one of the problems was/is.


In Display.template.php find the following (somewhere around line 880):

<b>Mood:</b>&nbsp;<select name="postermood" id="postermood">&nbsp;&nbsp;';
foreach ( $context['moods'] as $mood )
echo '<option value="', $mood, '"', $mood == $context['postermood'] ? ' selected="selected"' : '', '>', $mood, '</option>';
echo '</select>';

and change $context['postermood'] to $message['postermood']

This will remove a lot of the errors (which come just from somebody looking at messages with Moods listed). At least it did for me. :D

The other errors have something to do with the following two lines at approximately line  410 and  line 922 from sources/post.php

Line 410
$form_postermood = htmlspecialchars(stripslashes($_REQUEST['postermood']), ENT_QUOTES);

Line 922
$context['postermood'] = addcslashes($form_postermood, '"');


The error from line 410 says that $form_postermood has an undefined index, and the second error, line 922 says that form_postermood is undefined.

I have figured out that when you do a preview, it generate errors from both of the above lines as indicated. But if posting directly from the post form (the New Topic or New Reply post form pages), without doing preview (or being sent back due to new messages on the topic you were relpying to), then it only generate the line 922 error.

I have no idea what is causing these errors nor how to fix it, but some help would be very appreciated.
Title: Re: mMood 1.0
Post by: Rasyr on December 10, 2005, 07:22:07 AM
Does anybody have any ideas on how to fix the above errors?

Title: Re: mMood 1.0
Post by: allever on December 10, 2005, 05:24:55 PM
Sorry guys.  I have been busy and haven't had any time to work on this.  I will try to put some time aside and upload a bugfix.
Title: Re: mMood 1.0
Post by: Rasyr on December 10, 2005, 08:02:23 PM
I'd settle for just a few quick notes on how to fix it myself.

As you can see from my above post, while I may not know php, I can figure out some things (like I did for the one error). Just a few hints/tips and I am willing to try and get it fixed myself.

:D
Title: Re: mMood 1.0
Post by: ArkServer on December 13, 2005, 09:42:02 PM
8: Undefined variable: form_postermood
File: D:\apache\htdocs\forum\Sources\Post.php
Line: 938

and

Database Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM smf_messages AS m
LEFT JOIN smf_members AS mem ON (mem.I
File: D:\apache\htdocs\forum\Sources\Post.php
Line: 2024

when trying to post msg
Title: Re: mMood 1.0
Post by: hehedude on December 29, 2005, 10:02:15 AM
how do u install this mod?  :(
Title: Re: mMood 1.0
Post by: DemonicInfluence on December 29, 2005, 01:13:53 PM
go to admin -> package manager. Then click download. Then click browse and find the mMood1.0mod and upload. Then it wil say install. Press the button to install. :D
Title: Re: mMood 1.0
Post by: SeaOfSin on January 19, 2006, 04:09:27 AM
Will this mod be updated for 1.1rc2?
Title: Re: mMood 1.0
Post by: Scooby on April 12, 2006, 05:21:35 PM
I changed as rasyr said context to message.
I added form_postermood to the following line in post.php

global $sc, $board_info, $context, $settings, $sourcedir, $options;

so it reads

global $sc, $board_info, $context, $settings, $sourcedir, $options, form_postermood;

seems to have cured the other errors.
I am using 1.1 RC2
Title: Re: mMood 1.0
Post by: geezmo on June 12, 2006, 12:39:52 PM
Anyone who can update this mod and create a downloadable package for 1.1RC2?
Title: Re: mMood 1.0
Post by: samames on March 18, 2007, 11:27:39 AM
hey i would love to use this mod but it hasnt been upgraded
Title: Re: mMood 1.0
Post by: asdas2 on September 21, 2007, 02:23:49 PM
can anyone plzzz upgrade this to smf1.1.3
Title: Re: mMood 1.0
Post by: falguni1 on December 23, 2007, 04:56:10 AM
upgrade.
Title: Re: mMood 1.0
Post by: Marcus Forsberg on April 20, 2008, 07:06:18 AM
Could u post a screenshot of hove it looks while being used?