|
#1
|
|||
|
|||
Mood
|
#2
|
||||
|
||||
yeah if you do a search on tbdev you will find the mod ..
|
#3
|
|||
|
|||
Found it but :-?? a little sh*t don't works...
I wonder if someone installed it and can make a tutorial here :) Thanks |
#4
|
|||
|
|||
seems like the thread over there got 'wrecked' when they updated their ipb forums code. it is missing a few parts.
will post working version sometime this week. =] |
#5
|
|||
|
|||
Hooh
This mod will display the user mood in userdetail and is based on zodiac mode
First you have to add this to your data base Code:
CREATE TABLE `mood` ( `id` int(10) unsigned NOT NULL auto_increment, `name` varchar(50) default NULL, `moodpic` varchar(50) default NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM ; INSERT INTO `mood` (`id`, `name`, `moodpic`) VALUES (1, 'Exited', ':w00t:'), (2, 'Happy', ':smile: '), (3, 'Cool', ':cool:'), (4, 'In love', ':wub:'), (5, 'Sick', ':sick:'), (6, 'Black Sheep', ':sheep:'), (7, 'Angry', ':wall:'), (8, 'Sad', ':''-( '); you have to add one more thing to your data base Code:
ALTER TABLE `users` ADD `mood` int(10) NOT NULL go to Code:
tr("Stylesheet", "<select name=stylesheet>\n$stylesheets\n</select>",1); Code:
$mood = "<option value=0>---Your mood ?--</option>n"; $mood_r = mysql_query("SELECT id,name FROM mood ORDER BY name") or die; while ($mood_a = mysql_fetch_array($mood_r)) $mood .= "<option value=$mood_a[id]" . ($CURUSER["mood"] == $mood_a['id'] ? " selected" : "") . ">$mood_a[name]</option>n"; print("<tr><td align=right><b>mood</b></td><td><select name=mood>\n$mood\n</select>"); go to Code:
$avatars = ($_POST["avatars"] != "" ? "yes" : "no"); Code:
$mood = 0 + $_POST["mood"]; Code:
$updateset[] = "avatars = '$avatars'"; Code:
$updateset[] = "mood = $mood"; now you must decide where you'd like to show the user mood (i have it under avatar) if you'd like to put this unde avatar go to Code:
if ($user["avatar"]) print("<tr><td class=rowhead>Avatar</td><td align=left><img width=150 src=\"" . htmlspecialchars($user["avatar"]) . "\"></td></tr>\n"); Code:
$mood_r = mysql_query("SELECT moodpic FROM mood WHERE id=$user[mood] LIMIT 1") or sqlerr(); if (mysql_num_rows($mood_r) == 1) { $mood_a = mysql_fetch_assoc($mood_r); $mood = "".format_comment($mood_a["moodpic"]).""; } if ($user["mood"] > 0) print("<tr><td class=rowhead>mood</td><td>$mood</td></tr>\n"); if you'd like to change the images with other smile you must go to your data base and modify moodipc if you don't want to show smiles and want to put other images you must modify moodipc and put your image name and extension (you must have the image in your pic dir) and you must change Code:
$mood = "".format_comment($mood_a["moodpic"]).""; Code:
$mood = "<img src=/pic/$mood_a["moodpic"] style='padding:2px'>"; THANKS TO putyn @ TBdev.net www.tbdev.net/index.php?showtopic=16915 |
Tags |
mood |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[TBDev] shoutcast radio for tbdev | Slatkis | TBDev | 14 | 3rd June 2017 09:08 |
TorrentStrike theme engine to TBdev | Kotafi | Mods & Themes | 6 | 13th May 2012 04:42 |
[TBDEV] Pets Scripts for TBDev | BacKUP | TBDev | 4 | 7th September 2011 15:36 |