PDA

View Full Version : vBmoods 1.0


Velocd
08-03-2002, 10:00 PM
vBmoods
Version 1.0 | by Velocd ^_^


Update - 8/5/02 - Nakkid & Firefly Quick Reply Add-On's ;)
In the updated zip are two text documents that each contain an add-on for either Nakkid's or Firefly's quick reply hack. I HIGHLY suggest you install these add-ons (that is if you have a quick reply installed) because they make things much easier and cooler.
You can view a screenshot of Nakkid's qrb here (https://vborg.vbsupport.ru/attachment.php?s=&postid=281482).


Update - 8/4/02 - Bug fix
Fixed a bug where when editing a post, if you don't specify a new mood and mood message, you will lose your last ones. Also gave instructions on adding the templates to the templates used list, to prevent excess queries. Sited by TheDutch here (https://vborg.vbsupport.ru/showthread.php?postid=280685#post280685). Refer to 8-4-02fix.txt in the zip for instructions on how to fix.


What does this hack do?

This is an interesting hack on my part. I tried to create this very hack about a month and half ago, but failed miserably wasting 7 hours of my life (a small fraction to how many hours I've really wasted doing other things ;)). Just 2 days ago I was looking on vB.org for a good mood hack, but there were only 2 and they didn't satisfy my tastes at all. So I decided to give it another shot, knowing that my PHP/MySQL experience was much more advance then it was a month ago. With about 14 hours of coding, trial & error, troubleshooting, running breaks (for my sports), I finally finished about 9pm tonight. My previous hacks are what helped me alot to create this one, even though they weren't all that good, it gave me the experience needed by trial & error to create a really good hack. And as with me I'm also very persistant in my coding and designing, not to give up so easily. A lesson alot of use could use *cough* Neo *cough* ;)

Uh, anyway, getting alittle side tracked. This hack will give your users the option to choose a mood every time they post a new reply, new thread, or edit their post. These moods are in the form of images, and can be whatever images you want. It's fully integrated into the ACP (admin control panel), and should be easy to install and use.


Features:
Moods are based are on smilies! :)
Set a message for your mood, that will show up on mouseover of your mood icon! This mood message is filtered by the censored using your vBulletin censor list. If you don't want a mood message, it's easy to code out.
Moods can be set by newreply, newthread, and edit post screens.
Add/Modify/Delete moods via the ACP (admin cp)
Deleting moods via the ACP that are being used in the forum will remove them from those posts (instead of leaving you a annoying box with a red x in it).




Could this make a good add-on for Lesane store hack?
Yes it could! ;) But I have no intention on implementing it myself, so please don't ask so in this thread.

Screenshots?
Screenshots can be found in the next few posts.

Bugs?
None that I know of, but if you find any please let me know!



-----------------------------------------

Attached is the zip, with instructions inside. The instructions for this hack took damn long to make, so please if you used this hack CLICK INSTALL :)

Suggestions and comments are always welcomed :)

Velocd
08-04-2002, 04:52 AM
New post screenshot:

Velocd
08-04-2002, 04:53 AM
Postbit screenshot:

Velocd
08-04-2002, 04:54 AM
Admincp shot:

Austin Dea
08-04-2002, 05:08 AM
Nice. ;)

* Austin Dea is feeling happy :)

Link14716
08-04-2002, 05:10 AM
Nice, I will probably install this on later :D

Neo
08-04-2002, 05:37 AM
Originally posted by Velocd

A lesson alot of use could use *cough* Neo *cough* ;)


LOL, I havent quit making hacks, just releasing them.

Joo you one of my fav hackers on VB.org you got some skillz G :cool:


*installs*

TheDutch
08-04-2002, 06:41 AM
Very nice Velo!!!
I will install it today at http://www.flashdevils.com

BTW: I replied on your post about the mail tag color change ;)

Yours,
Erwin

TheDutch
08-04-2002, 07:25 AM
Alright, i installed the hack and everything is working very smooth.
Only one thing:

Because of a 50% width in a TD the layout is not as usual anymore so do this:

In template: newposting_usermoodbit
EREASE: width="50%"

Great work VeloCD!!!!

TheDutch
08-04-2002, 07:38 AM
Hi Velocd,

One other thing, when i edit a post all my data about the mood has been reset to nothing. Could you please change that?

Thank You!

Chris M
08-04-2002, 09:13 AM
Cool...

*Installs*

Satan

Kars10
08-04-2002, 12:55 PM
Installs!! And works great.
Thank you very much VeloCD!!! :)

ULTIMATESSJ
08-04-2002, 03:16 PM
hmmm looks pretty interesting, nice work velocd

DestyNova
08-04-2002, 03:49 PM
Best mood hack :thumb up:

Velocd
08-04-2002, 08:51 PM
Originally posted by TheDutch
Hi Velocd,

One other thing, when i edit a post all my data about the mood has been reset to nothing. Could you please change that?

Thank You!

Originally posted by TheDutch
Alright, i installed the hack and everything is working very smooth.
Only one thing:

Because of a 50% width in a TD the layout is not as usual anymore so do this:

In template: newposting_usermoodbit
EREASE: width="50%"

Great work VeloCD!!!!

Updated both those problems, refer to the 8-4-02fix.txt in the zip to fix them. Also in the 8-4-02fix it will add the templates used to the TEMPLATES USED list, which I accidentally forgot to mention. Doing this saved me about 2 queries on the posting pages.

Attached is the update fix, you can also download in the original zip. ;)

TheDutch
08-05-2002, 05:40 PM
Thanx VeloCD, briljant!!!
Only one more thingy ;)

When you edit a post you see that the icon was the one you had but the icon doesnt automaticly appear next to the listbox, only when you start selecting again.

Erwin

Austin Dea
08-05-2002, 06:08 PM
Any quick way to incorporate this with the qrb? If not, don't worry about it =P.

Velocd
08-05-2002, 08:06 PM
@TheDutch: Yup I noticed this, but I'm not sure how to fix it ;)

@Austin Dea: What is qrb? ^^;;

edit:

Ohh, quick reply box :) (just figured it)

Yes actually I'm gonna integrate it today with the qrb since I've realized alot of my users totally depend on the qrb and might not use the moods because of it.

I'll release two integrations: Firefly's quick reply, and Nakkid's.

[t4e]Kicks
08-05-2002, 08:12 PM
Nice hack, but I did have one thing I had to change for the postbit template.

You say to search for:

$post[editedreason]
<p align="right"><smallfont>

All I could find was:
<p>$post[editedby]</p>
<p align="right"><smallfont>

I applied the appropriate change accordingly. Just thought I'd point that out

TheDutch
08-05-2002, 08:36 PM
Originally posted by Velocd
@TheDutch: Yup I noticed this, but I'm not sure how to fix it ;)


No Problem, i will try it tomorrow myself and when i fix it i post it here :D.

Thanx for everything Velocd!

Yours,
Erwin

Martin64
08-05-2002, 10:06 PM
Sweet one, I instantly removed my own mood hack and installed this :)

Velocd
08-05-2002, 11:20 PM
Alrighty, I just made two add-ons for Firefly's & Nakkid's quick reply hacks. It looks very nice also.

I personally am using Nakkid hack, which you can see a screenshot of it attached.

The zip has been updated, so go check it out (note: you might have to clear your cache if you can't find the files in the zip).

Austin Dea
08-06-2002, 12:14 AM
Sweet, thanks.

Velocd
08-06-2002, 01:00 AM
There is a very small bug in the quick reply I just noticed (Nakkid quick reply). If you take a look at my screenshot attached in post #22 you can see that the mood message field says "mood message..", well..if your user doesn't want a mood message and at defaults just selects a mood and hits submit, then their mouseover text will say "mood message..".

So to fix this, in newreply.php find:

$usermoodmessage = censortext($usermoodmessage);


And below it place:

if($usermoodmessage == "mood message..")
{
$usermoodmessage = '';
}


Replace the "mood message.." part with whatever text you have. If you have no text in it, then don't even use this fix. :P

TECK
08-06-2002, 01:54 AM
cute one. great job. :)

Velocd
08-06-2002, 03:42 AM
Thnx ;)

I'm sure this hack will become a hit any minute now..I can sense it... ^_^'

Martin64
08-06-2002, 08:10 PM
I've got FireFly's quick reply hack installed, and I'm looking at the instrucations for FireFly's add-on. It says to look for this in (I assume) showthread.php:

Now find:
---------------------------
forumdisplay_loggedinuser,forumdisplay_loggedinuse r
---------------------------

And replace it with:
---------------------------
newposting_usermoodbits,forumdisplay_loggedinuser, forumdisplay_loggedinuser

I can't find this in showthread.php, or isn't that where I should look? My guess would be forumdisplay.php but it doesn't say so.

Edit: Yes, I changed that info in forumdisplay.php and it works fine. :)

Velocd
08-06-2002, 09:12 PM
Martin, it wont help you to change the info in forumdisplay, because the templates are not being called there.

In showthread.php, search for this instead:

// ################################################## ############################
// ############################# SHOW THREAD ####################################
// ################################################## ############################

$templatesused = '


And replace it with:

// ################################################## ############################
// ############################# SHOW THREAD ####################################
// ################################################## ############################

$templatesused = 'newposting_usermoodbits,


That should work ;)

Martin64
08-06-2002, 10:12 PM
Thanks Velocd. Yeah, I suspected so. The hack worked with me adding it to forumdisplay.php though :p

Austin Dea
08-07-2002, 03:56 AM
The whole alt message I type in isn't showing up :-\..It only shows 50 characters...

Velocd
08-07-2002, 06:49 PM
Yes I know, the image ALT has a max of 50 characters...if somebody knows how to change this, maybe with stylesheet properties or something, let me know :D

I know for URL links you can make the ALT text very long, but I'm not sure how to do it with an image ALT..

Seifer
08-08-2002, 09:28 PM
Works great =DDD

KISS
08-08-2002, 11:20 PM
Anyone know of a way to implemete this into Fireflys Quickreply?

Austin Dea
08-09-2002, 01:44 AM
They're in the instucs. Look at the first post.

KISS
08-09-2002, 02:36 AM
Sorry musta missed the Update.

Austin Dea
08-09-2002, 03:53 AM
;D

NuclioN
08-10-2002, 04:55 PM
-- problem solved -- Now a new one? When i reply or edit the mood dissapears untill i assign a new one.

sub
08-24-2002, 01:45 AM
I seem not able to figure out why it's erroring out like this. *blink*



Database error in vBulletin 2.2.6:

Invalid SQL: UPDATE post SET pagetext='gawd this betta work',MOOD='',allowsmilie='1',showsignature='0',ic onid='0',attachmentid='0' WHERE postid=''
mysql error: Unknown column 'MOOD' in 'field list'

mysql error number: 1054

Date: Friday 23rd of August 2002 10:34:59 PM
Script: http://www.xxxxxx.com/forums/forums/newthread.php
Referer: http://www.xxxxxx.com/forums/newthread.php?action=newthread&forumid=2

eXtremeTim
08-24-2002, 03:18 AM
I will proble install this tommorrow. :)

Travis641
08-24-2002, 04:55 PM
Originally posted by sub
I seem not able to figure out why it's erroring out like this. *blink*

Did you run the Queries?

sub
08-24-2002, 05:02 PM
Originally posted by Travis641


Did you run the Queries?

Yes I did.

I?ve removed it then ran the queries once more but no good fortune. I believe perhaps... There?s some kind of a disagreement in the midst of a different hack that I've installed previously, I'm going to remove it then reinstall this hack to see what?s up. Wish me luck! :D

Larry@IOG
08-25-2002, 10:32 PM
Ok everything is installed and my mood boxes are in place only pne problem though. In the admincp when I click the Add Moods Modify Moods etc All I get is a error screen like this:

The page cannot be found
The page you are looking for might have been removed, had its name changed, or is temporarily unavailable.

--------------------------------------------------------------------------------

Please try the following:

If you typed the page address in the Address bar, make sure that it is spelled correctly.

Open the www.impulseownersgroup.com home page, and then look for links to the information you want.
Click the Back button to try another link.
Click Search to look for information on the Internet.



HTTP 404 - File not found
Internet Explorer

Any ideals?

Thanks Larry Jude

Matt87
08-26-2002, 02:57 AM
You think you could give us some smilies for it? :D

Larry@IOG
08-26-2002, 09:38 PM
Ok I have the Moods in my admin CP only problem is when a mood is selected on a new thread it will not show up at all. When someone does not selecta mood a box with a red X shos in its place.

I need some help it deprived me of sleep last night

Thanks

Larry

Velocd
08-29-2002, 11:20 PM
Sorry I'm alittle late in responding to these questions, if you've solved your problem then don't pay any attention. ;)

Originally posted by sub
I seem not able to figure out why it's erroring out like this. *blink*

Database error in vBulletin 2.2.6:

Invalid SQL: UPDATE post SET pagetext='gawd this betta work',MOOD='',allowsmilie='1',showsignature='0',ic onid='0',attachmentid='0' WHERE postid=''
mysql error: Unknown column 'MOOD' in 'field list'

mysql error number: 1054

Date: Friday 23rd of August 2002 10:34:59 PM
Script: http://www.xxxxxx.com/forums/forums/newthread.php
Referer: http://www.xxxxxx.com/forums/newthr...hread&forumid=2


It states there is an uknown column MOOD, which is correct because this hack called for no creation of the column "mood."

Be sure you follow the instructions exactly, and that these queries have been ran:

ALTER TABLE post ADD usermoodid SMALLINT (5) unsigned not null;
ALTER TABLE post ADD usermoodmessage varchar(50) not null;
ALTER TABLE post ADD usermoodpath char(100) not null;


Originally posted by Larry@IOG
Ok I have the Moods in my admin CP only problem is when a mood is selected on a new thread it will not show up at all. When someone does not selecta mood a box with a red X shos in its place.

I need some help it deprived me of sleep last night


Thanks

Larry

Uninstall the hack, and install it again following the instructions VERY carefully. That box witht the red X is showing because the mood image is not being found, which means either you have not added in moods in the admin cp, or there is a fault in your installation.

Originally posted by Matt87
You think you could give us some smilies for it? :D

I actually use a totally different set then smilies, and that is set vBulletin.org uses. They work very nicely for moods.

You will have to visit Dark Project Studios (see the footer of vB.org for link) and ask for permission by the webmaster if you can use them on your site.

Larry@IOG
08-31-2002, 04:29 AM
Any ideal why after getting this hack to workit crashed Macs?

Larry

Velocd
08-31-2002, 06:11 AM
The answer to that is easy: It's a mac. :p

Just kidding actually. That's alittle vague when you're saying "crashed macs", because this hack shouldn't cause any problems to your system. If you are experiencing problems, it may be in your browser depending on which browser you use.

If your system is glitching up, then 99% it's not because of this hack ^_^

Bison
09-04-2002, 01:44 AM
This is the one I need! The other one has a bug in it that deletes the thread setting the mood after editing the thread!

Nice Work BRO!!!!!!

Areku
09-16-2002, 11:17 AM
Ne1 tried this on vB 2.2.0?

Is it supposed to work anyway?

Velocd
09-16-2002, 06:42 PM
Why in the world are you on vB 2.2.0?
It might, but you might as well upgrade for your benefit anyway.

Buddha
09-18-2002, 03:09 PM
*clicks installed*

excellent hack velocd.
i put it under the location and # of posts in my postbit (under the av) and it looks great. thanks a lot buddy.
easy to follow instructions too!

havefun
09-20-2002, 07:11 PM
really cool hack! :classic:

i've just installed it.


only one prob:

you wrote in the 'nakkids's quickreplyon' this:

Now find:
---------------------------
forumdisplay_loggedinuser,forumdisplay_loggedinuse r
---------------------------

And replace it with:
---------------------------
newposting_usermoodbits,forumdisplay_loggedinuser, forumdisplay_loggedinuser
---------------------------

but it doesn't show up in my showthread.php!?
what can, should i do?
may be this, but i don't have Chen's one:
post# 28 (https://vborg.vbsupport.ru/showthread.php?postid=281849#post281849)

thanks 4 your time,
havefun

otacon
09-22-2002, 05:08 PM
is there a way that i can make it be used with the vbjournal hack ??
even if it doesetn i will still install it :)

groovesalad
09-23-2002, 11:32 PM
Help. I've installed Firefly's Quick reply, but none of the following are even in that hack.

I can't find this:
eval("\$replybox = \"".gettemplate('showthread_replybox')."\";");

nor:
forumdisplay_loggedinuser,forumdisplay_loggedinuse r

did I miss something? I went back to Firefly's quick reply hack and those lines aren't even in his hack.

groovesalad
09-24-2002, 12:11 AM
.

groovesalad
09-24-2002, 07:57 PM
could someone please tell me where I should put this:

///////// vBmood by Velocd /////////

$moodsmilies = $DB_site->query("SELECT iconid, title, iconpath FROM mood");

while ($moodsmilie = $DB_site->fetch_array($moodsmilies)) {
$moodsmiliepath = $moodsmilie['iconpath'];
$moodsmiliename = $moodsmilie['title'];
$moodsmilieid = $moodsmilie['iconid'];

eval("\$usermoodbits .= \"".gettemplate("newposting_usermoodbits")."\";");

}
///////// vBmood by Velocd /////////

I don't have this line that is says to place above:
eval("\$replybox = \"".gettemplate('showthread_replybox')."\";");

Also, it says to put some lines of code in the showthread_replybox template. I don't have a template called that. Is there anyone out there that was able to install this correctly?

eckels2
09-26-2002, 11:26 PM
Ok... Installed everything to a "T" on 2.2.7...

Yet I don't see anything, in make new thread, make new reply, or edit post... to do anything having to do with moods... I know where it should be on the page, yet there's nothing there.

Any idea?

spittingangels
09-27-2002, 04:43 AM
ok, i installed this on 2.2.7 and it works great.

now, one thing i think would make this hack even better would be a starter set of smilies for the different moods. i know we can add our own and that's great but for those without alot of smilies already, then i think having an introductory set of 10 smiles for some fairly common moods would be good.

Brad
09-27-2002, 06:18 AM
groovesalad, please remove the info for showthread.php from your post, this is a agenst the TOS.

groovesalad
09-28-2002, 12:52 AM
Well? Is anyone able to help with my question??

isman
09-30-2002, 06:58 PM
Ok, I followed your directions to the letter and I'm also getting the SQL error when trying a new post.
Database error in vBulletin 2.2.7:

Invalid SQL: INSERT INTO post (postid,threadid,title,username,userid,dateline,at tachmentid,pagetext,MOOD,allowsmilie,showsignature ,ipaddress,iconid,visible,usermoodid,usermoodpath, usermoodmessage) VALUES (NULL,'3024','Testing Mood Hack','Mr. Snuffaluffagus','25','1033415622','0','What does this look like?','','1','0','134.215.235.175','0','1','5','i mages/moods/smile.gif','')
mysql error: Unknown column 'MOOD' in 'field list'

mysql error number: 1054

Date: Monday 30th of September 2002 03:53:42 PM
Script: http://www.aparentsheart.com/bbtest/bbtest/newthread.php
Referer: http://www.aparentsheart.com/bbtest/newthread.phpAny suggestions?

I verified the tables were created and modified correctly.

isman
10-01-2002, 02:38 AM
Sorry, had some remnants of a previous mood hack in there.

*slinks over to hit the install button*

Pancreas Paul
10-07-2002, 03:06 PM
umm, were is the mood icons? I dont have them. Help.

Velocd
10-08-2002, 12:26 AM
There are none provided, you have to go through the incredible journey of finding them yourself :p

A good set to use is Dark Project Studios smilies for your moods, but you have to ask him permission first. Just click on the link in vBulletin.org footer.

yzztik
10-09-2002, 06:28 PM
Could we just use some our current smilies? If I change the code to point to images/smilies instead of images/mood then I can use those, right? But my questions is, where it says "add modd" is that like the "add smilie" that even though there may be tons in the folder, you can still decide which to use, right? Because if that is the case I will just use some of my current smilies and not go hunting for more :)

Sinzar
10-09-2002, 10:37 PM
Database error in vBulletin 2.2.7:

Invalid SQL: INSERT INTO post (postid,threadid,title,username,userid,dateline,at tachmentid,pagetext,allowsmili e,showsignature,ipaddress,iconid,visible,usermoodi d,usermoodpath,usermoodmessage
) VALUES (NULL,'267','','Matrix','1','1034206747','0','test ing','1','1',''24.103.236.179' ,'0','1','1','images/moods/cry2.gif',''
)
mysql error: You have an error in your SQL syntax near '24.103.236.179','0','1','1','images/moods/cry2.gif',''
)' at line 2

mysql error number: 1064

what do I do?

Joe Page
10-17-2002, 08:32 PM
I'm using vB 2.2.8 and the last edit isn't there, please help (I'm referring to the postbit edit, the code which you have to edit is not there)

Dynamic One
11-10-2002, 06:29 PM
Thanks m8. Nice job. Can sure use it :).

teenfront
11-11-2002, 03:19 PM
great hack is it possible to make it so that although custom mood text is not entered the text from the drop down appears alongside the smilie?

cheers,
n

Crazy Pete
12-09-2002, 06:49 PM
I get parse errors on the very first step installing this on v 2.2.9. You have:

//highlight words for search engine

And add above:

/////////__vBmood by Velocd__/////////



if($post[usermoodid]){

eval("\$postmood = \"".gettemplate("postbit_mood")."\";");_}



/////////__vBmood by Velocd__/////////

I do that, and get a parse error on line 315, which happens to be eval("\$postmood = \"".gettemplate("postbit_mood")."\";");_}. Not sure what to do now, so I had to uninstall it. Looks really nice, though. :(

Crazy Pete
12-11-2002, 03:41 AM
Nevermind, got it. :) Had to take out the _ before the }, not sure how that got in there.

Crazy Pete
12-11-2002, 04:10 AM
Nope, thought I had it, but I'm constantly getting parse errors in each file from the line if_($usermood)_{, but I don't know why since I added the queries in the first step. What's going on?

Velocd
12-13-2002, 02:16 AM
Make sure those underscores "_" aren't existent there, such as:

if_($usermood)_{,


As those will give you parse errors. ;)

saint_seiya
01-27-2003, 01:54 AM
I am having trouble adding the moods smileys. Can you tell me whats wrong?

(when i add them i just get a red x in the admin area as smiley...)

I made sure mood.php is CHMOD to 777 and the images folder (moods) is too.

What may the problem be?
:disappointed:

subu1
02-06-2003, 09:41 PM
ups a great Hack, but i have one problem, i can do my mood only for Thread Start. If i will ask for the thread with a mood, i don't see the the mood.

Sorry my bad oxford english.

greetz subu

S1R1US
02-10-2003, 12:55 AM
does this work with 2.2.9?

Alien
03-03-2003, 04:30 PM
Is this confirmed working with 2.3.0 anyone? :)

Velocd
03-05-2003, 03:37 AM
I have this running on 2.3.0 and everything works just peachy. ;)

Xyphen
03-06-2003, 11:24 PM
It would be nice if a different set of mood icons were included but can't complain because you can always replace them with your own set, nice hack btw, will install it.

insanctus
03-07-2003, 05:13 AM
I like this one. Seems to work perfect so far.

~ Clicks install.

Anjie
06-09-2003, 05:40 AM
The mood itself doesn't show up--not from a new thread and not from a reply, it simply just isn't there... Any ideas?

Splitfyre
06-22-2003, 04:40 AM
Where are some mood icons I can utilize?

Velocd
06-22-2003, 06:09 PM
I've mentioned it before in this thread, but if you want a good set of mood icons, use what vBulletin.org uses for smiley icons, which can be found at this site:

http://www.darkproject.com

Splitfyre
06-22-2003, 08:40 PM
nice icons

Splitfyre
06-23-2003, 05:39 PM
The hack does not seem to want to post the actual mood.

HELP!

Splitfyre
06-24-2003, 06:06 PM
Can someone please post the uninstall instructions, in particular what statements do I run in myPHPAdmin to remove what this hack has installed? Please and thanks! :)

Splitfyre
06-25-2003, 09:21 PM
ne1?

Red Blaze
10-15-2003, 06:47 PM
Installed and works great! On to the journal mood add-on. ^^;

aquariumpros
10-21-2003, 07:33 AM
Having a little problem.

In the POSTBIT template...I don't have:
$post[editedreason]
<p align="right"><smallfont>



Also...in the FireFly add-on... I don't have:
forumdisplay_loggedinuser,forumdisplay_loggedinuse r


Everything else has been done, and the mood pull-down and mood message are showing (when replying) - but no moods are showing on the forums pages.

Can anyone help?

**vB version 2.2.9**

Thanks in advance,