vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=155)
-   -   Floating Valentine Hearts (https://vborg.vbsupport.ru/showthread.php?t=107521)

funinthesun 02-08-2006 10:00 PM

Floating Valentine Hearts
 
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.
Code:

<!-- 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 02-09-2006 09:01 AM

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.
Code:

<if condition="$bbuserinfo[fieldX] != 'No'">
and put this tag at the end of the code
Code:

</if>
An example will look like this:
Code:

<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 02-09-2006 09:08 AM

Cool mod and.........:runs to instal:

agiacosa 02-09-2006 10:48 AM

It would be nice to see a preview. Thanks.

Zia 02-09-2006 11:31 AM

wow valentine knocking at door.....

NO alternate it should run for valentine

Gizmo5h1t3 02-09-2006 12:11 PM

not seein em on my ladies style...
:(

croportal 02-09-2006 12:16 PM

can u post some screenshot or live preview

funinthesun 02-09-2006 12:42 PM

Quote:

Originally Posted by Gizmo5h1t3
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 02-09-2006 12:46 PM

Does this work on NETSCAPE? FF?

funinthesun 02-09-2006 01:27 PM

Quote:

Originally Posted by bchawla
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 02-09-2006 01:33 PM

Quote:

Originally Posted by croportal
can u post some screenshot or live preview

You can see a live demo [Link now removed as Valentine's is over]. ;)

Bhuwan 02-09-2006 02:13 PM

Quote:

Originally Posted by funinthesun
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 02-09-2006 02:30 PM

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 02-09-2006 02:32 PM

any demo or screenie?

funinthesun 02-09-2006 02:35 PM

Quote:

Originally Posted by The Chief
any demo or screenie?

I've already posted a link to a live demo... scroll up ;)

The Chief 02-09-2006 02:43 PM

Quote:

Originally Posted by funinthesun
I've already posted a link to a live demo... scroll up ;)

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

Kimmi 02-09-2006 02:49 PM

I dont see the hearts either on my forum

funinthesun 02-09-2006 02:52 PM

Ah, I probably should of told you that they come up from the bottom of the page ;)

Smiry Kin's 02-09-2006 02:58 PM

hmm that snow effects one works on FF

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

funinthesun 02-09-2006 02:59 PM

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 02-09-2006 03:00 PM

Nice :nervous:

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

XanTrax 02-09-2006 03:31 PM

Pretty nifty mod, but you should have it loop so the hearts dont stop after one time of raising to the top.

XanTrax 02-09-2006 03:33 PM

And also your bandwith is gonna go insanley high when people use these.

As seen in the JavaScript code...

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 02-09-2006 03:35 PM

Worked perfect clicked install.

Snake 02-09-2006 03:36 PM

Oh I like this. Thanks!

Hanif 02-09-2006 03:41 PM

NO hearts man, no hearts on Firefox. Its not a romantic browser then I guess ;)

Ta,

Han

firstrebel 02-09-2006 04:24 PM

Quote:

Originally Posted by XanTrax
And also your bandwith is gonna go insanley high when people use these.

As seen in the JavaScript code...

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 02-09-2006 04:28 PM

fix it for FF!! com on!! :)

kofoid 02-09-2006 04:42 PM

No workie for Firefox ;)

vampireus 02-09-2006 04:47 PM

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 02-09-2006 04:53 PM

Quote:

Originally Posted by firstrebel
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 02-09-2006 05:28 PM

Quote:

Originally Posted by Smiry Kin's
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 02-09-2006 06:00 PM

Quote:

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 02-09-2006 07:52 PM

Quote:

Originally Posted by blackpheonix
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 02-09-2006 08:55 PM

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 02-10-2006 03:27 AM

Quote:

Originally Posted by firstrebel
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 02-10-2006 12:01 PM

it should be like this so as not to force us to create another folder out of our forum
PHP Code:

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


installed and working fine

Hoang 02-10-2006 01:22 PM

Quote:

Originally Posted by vampireus
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 02-11-2006 05:39 PM

Live demo can be seen Here

icare 02-11-2006 06:05 PM

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...


All times are GMT. The time now is 06:12 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02566 seconds
  • Memory Usage 1,815KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (6)bbcode_code_printable
  • (1)bbcode_php_printable
  • (13)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete