vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   New vBCode Tags: [Countdown] and [Countup] timers for users (https://vborg.vbsupport.ru/showthread.php?t=38179)

Sweet Cheeks 05-04-2002 03:45 PM

Kevin I installed the hack on my site, everyone LOVES it!! http://www.belliesandbabies.com/boar...ilies/clap.gif I was wondering if you had a site link or something we could give your credit for? Thank you! :D

KevinG 05-04-2002 04:53 PM

Quote:

Originally posted by Ruth
KevinG... very nice hack :)

i'm thinking to use this as a gradutation count down....

users can choose the year from a drop down menu during registration

then the count down appears in their profile

is this possible to hack it even more for that purpose ?

thanks :)

Thanks Ruth. We could hack it some more if you'd like but that one would get away from it's simplicy :D

We can discuss via PM here to get your version. Sound good?
(or do others want this as well?)

Quote:

Originally posted by ~*Julie*~

Kevin I installed the hack on my site, everyone LOVES it!! I was wondering if you had a site link or something we could give your credit for? Thank you!

You're welcome. I did this and then searched here to see if anyone else already did it. During the search, you name popped up so I just decided to post it. I don't need to have my credit linked from your site. Mine is a private site for family members and strangers might freak them out - LOL. Just tell them it's from the baby stork :D
If my wife is expecting again ( oh I hope not ), we'll stop by. Deal?

KuraFire 05-06-2002 09:03 AM

Kevin, nice hack, but I really suggest you turn it into a Showthread hack. As it is, being put in the head of _all_ pages on the board, it's quite a bandwidth-impact for no reason. The part for in <head> is, imo, rather huge, and loading that when it's not necessary is just diminishing your bandwidth for nothing.

showthread.php hack shouldn't be too hard...

KevinG 05-06-2002 12:44 PM

Thanks KuraFire.

I'll check that out. I would also have to modify newreply.php as well then. Also, the PM display code in private.php as these can also be used in sigs.

Thanks for the suggestion.

Sweet Cheeks 05-13-2002 05:44 PM

Congratulations on the baby coming Kevin! Thanks again for everythign!! Woohoo!

BigJohnson 05-13-2002 09:34 PM

How can we make the changes in our board so that the button that we make for it will give you the correct java script pop up to insert all the right stuff in the correct places because it isnt a simple [countdown] hey [/countdown] thing. You need to add like font color and all the type of stuff. Is there anyone here with this type of knowledge to tell us how we can do this. Thanks you so much.

BigJohnson 05-14-2002 08:36 PM

bump

KevinG 05-15-2002 03:46 PM

Maybe you can try something like this?

Add this to the vbcode.js file in your forum directory
Code:

// ************************************

function countdownup(theform,thetype) {
  // inserts countdown or countup
  maintext = prompt("Enter Top Message for " + thetype,"");
  coloredtext = prompt("Enter the color to use for the Top Message","BLUE");
  datetext = prompt("Enter Date for " + thetype,"");
  var prompttext;
  if (thetype == "countdown") {
      prompt_text = "Enter text to display when Countdown reaches zero";
  }
  else {
      prompt_text = "Enter text to display before Countup starts (future date)";
  }
  expiredtext = prompt(prompt_text,"");
  if ((datetext != null) && (datetext != "")) {
      cdcode = "";
      if ((maintext == null) || (maintext == "")) {
        if (thetype == "countdown") {
            maintext = "My Countdown";
        }
        else {
            maintext = "My Countup";
        }
      }
      if ((coloredtext == null) || (coloredtext == ""))
        coloredtext = "BLUE";
      if ((expiredtext == null) || (expiredtext == "")) {
        if (thetype == "countdown") {
            expiredtext = "Blast Off!";
        }
        else {
            expiredtext = "Waiting to Start";
        }
      }               
      theform.message.value += "["+thetype+"="+datetext+";"+expiredtext+";"+coloredtext+"]"+maintext+"[/"+thetype+"] ";
  }               
  theform.message.focus();
}

// *************************************

Then add the buttons to your vbcode_buttons template:
My template looks like this after adding them after the "quote" button. This was added after the <BR> tag which puts them on the third line of buttons.

Code:

<input type="button" class="bginput" value="countdown" title="Insert Countdown" onclick="countdownup(this.form,'countdown')" >               
<input type="button" class="bginput" value="countup" title="Insert Countdown" onclick="countdownup(this.form,'countup')" ><br>


rcooper7 05-20-2002 02:18 PM

Great looking hack will do good on my Disney Page! :) thanks!

Ryan C.

rcooper7 05-20-2002 02:23 PM

One Question, How do you Modify the database.

Can someone walk me through this? I have phpmyadmin. . .

Thanks


All times are GMT. The time now is 02:38 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.01266 seconds
  • Memory Usage 1,746KB
  • 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
  • (2)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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