Smileys Mood - User Mood and Emotion for Profile Page

Nathaniel - June 28, 2009 - 01:31
Project:Smileys
Version:6.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs work
Description

This is an addition for the Smileys module that adds an ajax form to the user profile page where each user can select a word describing their current mood and a Smiley face - can be used to display user emotions or users current mood.

Extract and add to your sites/all/modules/smileys directory. So the path will be sites/all/modules/smileys/smileys_mood. Enable the module. That's it. (Unless your domain points to a subdirectory! See below.)

TODO:

  • Clean up module code a bit
  • Add support for more... Smileys list
  • Add support for subdirectory? (in external script)
  • Add to admin section + editable array for word list
  • Could use some tpl work

Potential problems: The external script has to be updated manually if your domain points to a subdirectory. Update smileys_mood/scripts/updateusermood.php - no problems if your Drupal install is in the root directory.

Code:

<?php
// Go to drupal path..
  
$drupal_path = $_SERVER['DOCUMENT_ROOT'];  // <---- change this one to fit yours i.e. $_SERVER['DOCUMENT_ROOT'].'/subfolder';
?>

AttachmentSize
smileys_mood.tar_.gz4.32 KB

#1

Nathaniel - June 28, 2009 - 01:34

Technical difficulties... Here is the file.

AttachmentSize
smileys_mood.tar_.gz 4.32 KB

#2

Gurpartap Singh - June 28, 2009 - 03:50

ooooooooohhhhhhhh you stole my idea

heheheheheh

I'm getting an error when trying to set a text or image mood:

#3

Nathaniel - July 6, 2009 - 20:43

It should work. The trick is in the $drupal_path

File:
smileys_mood/scripts/updateusermood.php

You can use:
print $drupal_path;
to test and see if it points to the drupal directory where the includes folder is located.

#4

onlykruti - July 27, 2009 - 22:38

Hello Nathaniel,
Thanks for the module...
after changing $drupal_path

File:
smileys_mood/scripts/updateusermood.php

i m getting error like (Fatal error: Cannot redeclare db_status_report() (previously declared in D:\home\networking\includes\database.mysql.inc:20))

#5

onlykruti - July 27, 2009 - 23:24

Hello,
I have modified 2 files
1. smileys_mood/scripts/updateusermood.php
2. smileys_mood/smileys_mood.module

now it is working well. you need to set path in File : smileys_mood/scripts/updateusermood.php if you are using sub-folder.
Check attached file

AttachmentSize
smileys_mood.tar_.gz 4.33 KB
 
 

Drupal is a registered trademark of Dries Buytaert.