Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

Version: , by (Guest)
Developer Last Online: Jan 1970 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 11-30-2000 Last Update: Never Installs: 0
 
No support by the author.

My first hack, a humble contribution in case anyone has a use for it.

Purpose: Encourage new members to post. Eventually will be used to run contests, promotions, etc.

What it does: When a member posts a new message, the main forum page will display a flying animation. For our diet forum, the "whoosh fairy" was appropriate (and cute). The user will see this animation until someone else posts to that forum.

In terms of rules: If the user is the last poster in any forum that is "on" the animation will show.
Can be easily modified to be more complex, but as a new forum, I hope it encourages participation.


Note: Can't figure why it doesn't work for Netscape. If you find the bug, please post here.

Needed files: animate.js from tutorial at:
http://www.webreference.com/js/column18/index.html

--

One php file to edit index.php

Find:

$lastposter="by $forum[lastposter]";

Add below:
Code:
            //myhack
            if ($forum[lastposter]==$bbusername and $onoff=="on"){
               $greeting=1;
            }
            //myhack
Find:

eval("echo dovars(\"".gettemplate("forumhome")."\");");

Add above it:

Code:
//myhack
  if ($greeting){
       $greeting="";
       eval("\$greeting .= \"".gettemplate("afairyon")."\";");
  } else
  { $greeting="";}
//myhack
Add a new template, I called it afairyon:

Code:
<DIV id=whoosh
style="LEFT: -100px; WIDTH: 25px; POSITION: absolute; TOP: 800px"><IMG
src="images/flying.gif" hight=80 width=95></DIV>
<SCRIPT language=JavaScript1.2>
<!--
document.write("<SCRIPT SRC='animate.js'></SCRIPT>");
onload = start;
function start() {
  anim2 = new animation("whoosh");
  anim2.slideBy(600, -900, 150, 16);}
// -->
</SCRIPT>
In the forumhome template, after $footer, add:

$greeting

That's it.

Edited: Changed $username to $bbusername

[Edited by tamarian on 12-03-2000 at 11:22 PM]

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 12-01-2000, 04:53 AM
Guest
 
Posts: n/a
Default

The reason why it doesn't work for Netscape is because it's DHTML, and a lot of DHTML is not supported by NN, btw I think it would be a better idea to have a flash animation of some sort, but I liked the hack, good job!
Reply With Quote
  #3  
Old 12-01-2000, 04:56 AM
Guest
 
Posts: n/a
Default

BTW I created an account for test purposes called guest, so people can test it with out having register:

Account infor for tests:

Username: guest
Password: guest
Reply With Quote
  #4  
Old 12-01-2000, 04:58 AM
Guest
 
Posts: n/a
Default

I just tested it, and I'm sorry man but I found it very annoying, especially on a large board!
Reply With Quote
  #5  
Old 12-01-2000, 03:33 PM
Guest
 
Posts: n/a
Default

Quote:
Originally posted by conan
BTW I created an account for test purposes called guest, so people can test it with out having register:

Account infor for tests:

Username: guest
Password: guest

Keep in mind, if you use this account, you have to delete previous recent messages by guest. If the test forum has guest as last poster and the lightbulb is "on" the animation will occur without any new post.
Reply With Quote
  #6  
Old 12-01-2000, 03:45 PM
Guest
 
Posts: n/a
Default

Quote:
Originally posted by conan
I just tested it, and I'm sorry man but I found it very annoying, especially on a large board!
Could be easily modified to show less frequently. My problem is that we're NOT a big board yet.

If the frequency is annoying, add a randomizer to the js scricp, something like:

var cur=Math.round(19*Math.random());
function start() {
if (cur>=17){

If the animation itself is annoying, find another one This particular animation is very relavent to our members, and they loved it.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:57 AM.


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.03804 seconds
  • Memory Usage 2,233KB
  • Queries Executed 19 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (5)postbit
  • (6)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete