PDA

View Full Version : Floating Valentine Hearts


funinthesun
09 Feb 2006, 10:49
This is the first time I've posted anything like this so go easy on me :nervous:

I added some floating hearts to my forum for Valentine's Day and thought perhaps other members might like it so here it is:

Go to Admincp -> Styles & Templates -> Edit Templates -> Header and put the following code at the very top before anything else.
<!-- Valentine Hearts by Funinthesun -->
<script type="text/javascript" src="/images/misc/hearts.js">
</script>
<!-- /Valentine Hearts by Funinthesun -->
Now download Hearts.zip and upload hearts.js to /images/misc.

Done! I hope you like it! Please click install if you do :)

funinthesun
09 Feb 2006, 11:01
Also, if you want your members to be able to turn the hearts on and off then you can do the following:

Go to AdminCP => Profile Fields => Add New Profile field => Single Select Menu

Title: View Floating Hearts?
Description: Choose yes to have little Valentine hearts floating around.
Options:
Yes
No
Set Default: Yes, but No First Blank Option
Editable By User: Yes
Display Page: Options: Other Options

Write down your field number eg. field6

Then wrap the code in these tags.

Put this tag above the code and change the X to your field number.
<if condition="$bbuserinfo[fieldX] != 'No'">and put this tag at the end of the code
</if>An example will look like this:
<if condition="$bbuserinfo[fieldX] != 'No'">
<!-- Valentine Hearts by Funinthesun -->
<script type="text/javascript" src="/images/misc/hearts.js">
</script>
<!-- /Valentine Hearts by Funinthesun -->
</if>Done! :)

DrewM
09 Feb 2006, 11:08
Cool mod and.........:runs to instal:

agiacosa
09 Feb 2006, 12:48
It would be nice to see a preview. Thanks.

Zia
09 Feb 2006, 13:31
wow valentine knocking at door.....

NO alternate it should run for valentine

Gizmo5h1t3
09 Feb 2006, 14:11
not seein em on my ladies style...
:(

croportal
09 Feb 2006, 14:16
can u post some screenshot or live preview

funinthesun
09 Feb 2006, 14:42
not seein em on my ladies style...
:(

Is your root folder in forums? If it is, change the code to /forums/images/misc/hearts.js or /forum/images/misc/hearts.js :)

Bhuwan
09 Feb 2006, 14:46
Does this work on NETSCAPE? FF?

funinthesun
09 Feb 2006, 15:27
Does this work on NETSCAPE? FF?
I've just tested it on Fireforx and no, it doesn't work but I'll try and add a piece of code that will allow it to work on Firefox. I don't know about Netscape because I don't have it installed. Perhaps another forum member using Netscape could let you know :)

funinthesun
09 Feb 2006, 15:33
can u post some screenshot or live preview
You can see a live demo [Link now removed as Valentine's is over]. ;)

Bhuwan
09 Feb 2006, 16:13
I've just tested it on Fireforx and no, it doesn't work but I'll try and add a piece of code that will allow it to work on Firefox. I don't know about Netscape because I don't have it installed. Perhaps another forum member using Netscape could let you know :)

Doesn't work on NETSCAPE either -- I wish there were auniversal one that works across all borwsers :nervous:

Reeve of shinra
09 Feb 2006, 16:30
Take a look around here or on one of those dhtml / javascript sites for the snowflake effect and just change out the image. That should work on both or at least help out in making this script compatable on each. :)

The Chief
09 Feb 2006, 16:32
any demo or screenie?

funinthesun
09 Feb 2006, 16:35
any demo or screenie?
I've already posted a link to a live demo... scroll up ;)

The Chief
09 Feb 2006, 16:43
I've already posted a link to a live demo... scroll up ;)

the hearts aren't showing up, or am I just blind?

Kimmi
09 Feb 2006, 16:49
I dont see the hearts either on my forum

funinthesun
09 Feb 2006, 16:52
Ah, I probably should of told you that they come up from the bottom of the page ;)

Smiry Kin's
09 Feb 2006, 16:58
hmm that snow effects one works on FF

maybe just edit it to scroll the images up instead of down you think?

funinthesun
09 Feb 2006, 16:59
Yeah, you can edit the hearts.js to increase/decrease the amount of hearts, speed etc. Just play around with it until it works best for you :)

vampireus
09 Feb 2006, 17:00
Nice :nervous:

Doesn't show up on Firefox, work with Opera & IE

XanTrax
09 Feb 2006, 17:31
Pretty nifty mod, but you should have it loop so the hearts dont stop after one time of raising to the top.

XanTrax
09 Feb 2006, 17:33
And also your bandwith is gonna go insanley high when people use these.

As seen in the JavaScript code...


balloon = new Array();
balloon[0] = "http://projectjj.dk/gfx/fod_heart.gif";
balloon[1] = "http://projectjj.dk/gfx/fod_heart2.gif";
var maxballoon = 1;


You may want to host them on imageshack or some other location. As more people begin to use this the higher your bandwith is going to go. At least I think so.

hawgjaw
09 Feb 2006, 17:35
Worked perfect clicked install.

Snake
09 Feb 2006, 17:36
Oh I like this. Thanks!

Hanif
09 Feb 2006, 17:41
NO hearts man, no hearts on Firefox. Its not a romantic browser then I guess ;)

Ta,

Han

firstrebel
09 Feb 2006, 18:24
And also your bandwith is gonna go insanley high when people use these.

As seen in the JavaScript code...


balloon = new Array();
balloon[0] = "http://projectjj.dk/gfx/fod_heart.gif";
balloon[1] = "http://projectjj.dk/gfx/fod_heart2.gif";
var maxballoon = 1;


You may want to host them on imageshack or some other location. As more people begin to use this the higher your bandwith is going to go. At least I think so.
But it's only for a few days...worth the sacrifice I think.

Bob

Smiry Kin's
09 Feb 2006, 18:28
fix it for FF!! com on!! :)

kofoid
09 Feb 2006, 18:42
No workie for Firefox ;)

vampireus
09 Feb 2006, 18:47
Some members complain that their CPU usage goes up to 100% because of this script, but that doesn't happen to me, at least. Any idea ???

XanTrax
09 Feb 2006, 18:53
But it's only for a few days...worth the sacrifice I think.

Bob

True. If alot of people use this though and either continue to use it for their skin, forget to take it off, or just keep it for any other reason itll kill you.

Just a suggestion mate ;). Good work again.

blackpheonix
09 Feb 2006, 19:28
hmm that snow effects one works on FF

maybe just edit it to scroll the images up instead of down you think?

i feel special thanks :p yeah it be better if you had the hearts falling down i feel even more special that the live demo is a skin i help code hehe any way graet hack for the first one ;)

firstrebel
09 Feb 2006, 20:00
balloon = new Array();
balloon[0] = "http://projectjj.dk/gfx/fod_heart.gif";
balloon[1] = "http://projectjj.dk/gfx/fod_heart2.gif";
Is there a reason why these two gifs are not in the zip and then can be uploaded to our own server and the url in the js file edited accordingly?

Bob

funinthesun
09 Feb 2006, 21:52
i feel special thanks :p yeah it be better if you had the hearts falling down i feel even more special that the live demo is a skin i help code hehe any way graet hack for the first one ;)
Thanks Blackpheonix! I should of just changed the gif in your mod then I wouldn't of had to release this. Oh well :rolleyes:

firstrebel
09 Feb 2006, 22:55
If I change var speed = 15; to any other figure the speed does not change, they just slowly climb up the page in a group. When I log out they continually fly up the page. Any ideas why?

Bob

XanTrax
10 Feb 2006, 05:27
Is there a reason why these two gifs are not in the zip and then can be uploaded to our own server and the url in the js file edited accordingly?

Bob

Well people get lazy, dont know JS or have a compiler/editor, dot know what to do, and etc. But good point :speechless: :o .

Barakat
10 Feb 2006, 14:01
it should be like this so as not to force us to create another folder out of our forum

<!-- Valentine Hearts by Funinthesun -->
<script type="text/javascript" src="./images/misc/hearts.js">
</script>
<!-- /Valentine Hearts by Funinthesun -->


installed and working fine

Hoang
10 Feb 2006, 15:22
Some members complain that their CPU usage goes up to 100% because of this script, but that doesn't happen to me, at least. Any idea ???
CPU usage goes up to 100% because of this script for me!!!

icare
11 Feb 2006, 19:39
Live demo can be seen Here (http://www.hornybollywood.com)

icare
11 Feb 2006, 20:05
Nay idea if I can change the colour of hearts? Coz it doesnt show up that good with the style and colours I am using.v

Nice hack anyways...

miner
12 Feb 2006, 04:09
You can see a live demo HERE (http://www.tenerifeforum.com/index.php?styleid=4). :)

Nice to see my valentine skin used there, LUV it...

imranbaig
13 Feb 2006, 14:40
Live demo can be seen Here (http://www.hornybollywood.com)

You web site appears to be an adult site!

Zelos
29 Aug 2006, 09:30
What part of the code do I change to make the hearts fall instead of rise?

Zelos
04 Oct 2006, 21:33
does anyone know? It wouldbe such a big help if someone who knew java could tell me how to do this...

DianaDiana
04 Jan 2008, 03:15
Would love for this to work on FF :D

mr.reza
14 Feb 2008, 07:10
how can I change SNOW script to be shown as falling HEARTS?

rekha
17 Apr 2013, 16:41
Cool Mod but no preview ? pls pls pls