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)

Floris 05-03-2002 09:14 AM

I meant server-side.
I hate client-side stuff. It gives complaints, because every system if different.

Wildthinks 05-03-2002 10:43 AM

@kevinG
Hi KevinG,

looks beautiful, but don't work with European time Format?

Could you explain me, how must I write the Statement that works with European Time? I have try so many, doesn't work...

The next one, works with Opera?
I don't know exactly...

The last ist, you should replace the
Quote:

<SCRIPT?LANGUAGE="JavaScript">
with
Code:

<script type="text/javascript">
,
because I get errors in my IE5.5....

KevinG 05-03-2002 12:40 PM

Thanks for the compliments folks and thank you neo for the screenshot. :) If we apply some css to it, they can come out looking mush better.

Quote:

Originally posted by Sparkz


Not that it has anything to do with the hack but javascript IS clientside :)

Oh, and for changing the field in the DB to LONGTEXT... Why on earth would you need to be able to fit 4 GB in there? Changing it to text should be MORE than sufficient, unless you plan on having replacements bigger than 64kb, which I doubt anyone would ever need...

Not that the field itself will end up bigger by the change, (unless you actually fill it, that is) but I was just wondering why it had to be LONGTEXT and not just text...

http://www.mysql.com/doc/n/o/node_368.html

I really do not know why I used LONGTEXT. I could have used something smaller but as you said, it will not use any more than what you fill into that field. I just needed to increase that default to fit this one in. TEXT would give us more than enough for this one. Maybe we can use the LONGTEXT for [mp3=song.mp3]My Song[/mp3] - LOL


Quote:

Originally posted by Logician

Just one tiny concern in my side: You (and your members) will use the vbcode for a few messages only, however the java code in the header will be loaded with every page (not just for messages either, with even in calender or user CP pages) in your board.

Maybe it could be nice to check the message inside "showthread.php" before displayed whether vbcode exits or not and if it exits, make the neccessary parsing inside the same script again.

Ever seen a Disney site? These countdowns are wanted in their sigs :)
I just stuck it into the header so every page would have the ability to use the JS. By making it available in the header, the main code would not have to be repeated on every post that is using it. Like you said, I could have modified showthread but that would make installation of this a little bit harder and also make it just another re-mod when updates from vB come along again.
In other words, I was lazy :D

Quote:

Originally posted by Wildthinks

@kevinG
Hi KevinG,

looks beautiful, but don't work with European time Format?

Could you explain me, how must I write the Statement that works with European Time? I have try so many, doesn't work...

The next one, works with Opera?
I don't know exactly...

The last ist, you should replace the

Code:


<SCRIPT LANGUAGE="JavaScript">

with

Code:

<script type="text/javascript">
,
because I get errors in my IE5.5....

I do not get any errors with my IE5.5 here. I'll try what you suggested. Can you tell me about "European time Format"? I do not know this and would like to get it working for you. The only browser I have is IE 5.5 and IE 5.0 here so I can not test the others but would appreciate anyone that can for us.

Kevin

Mr. Slugworth 05-03-2002 05:16 PM

This is exactly what I have been waiting for. Thanks for your work! Just one problem, it isn't working for me. I followed all of the instructions, even typed the scripts in the right place, since if I copy them, it just messes everything up. They are exactly as they are shown above, but I can't get it to work. Isn't it supposed to show up along with the other vbcodes so that I can just click on it when replying or making a new post? Or, is it not supposed to show up?

Any help would be appreciated.

KevinG 05-03-2002 05:25 PM

Thanks for trying it out.

I did not change anything on whether it shows up or not (buttons or help) when posting. They are just there to use.

I'm going to your site now to try them out.

KevinG 05-03-2002 06:18 PM

After trying it out on your site, I found a small typo in your script. I then checked this with what I posted and it seems that it got changed (not sure how as I copy/pasted this from my AdminCP).
The typo is the second line of both countdown and countup function. The line that fails is
PHP Code:

y2k = new date(date); 

The lowercase d in the first date is causing your problems.

This is part of the code that goes into your Head Insert section.

Below is the correct line for both functions.

I will fix the first post here. Maybe PHP tag is doing this ???


Edit: I just tried the [ code ] tag to post the correct line and it did it again :(
Both PHP and CODE tags are making this line appear incorrect.

y2k = new Date(date);

Admins/Mods,

I'm not sure how I can fix this so the members can see the code.
Help Please.

Kevin

KevinG 05-03-2002 06:29 PM

The first post is all fixed now. I separated the date parameter in
y2k = new Date(date);
into
y2k = new Date( date );

so PHP does not change it to
y2k = new date(date);

KevinG 05-03-2002 06:50 PM

Here's a style that removes the input box look.

Change the line for the input field to;

document.writeln("<input type=text value='' size=40 name='countdown' border-style='none' style='border-bottom: 0px solid; border-left: 0px solid;border-right: 0px solid;border-top: 0px solid'>");

KevinG 05-03-2002 07:26 PM

Here another one, transparent background instead of the white box.

Change the line for the input field to;

document.writeln("<input type=text value='' size=40 name='countdown' border-style='none' style='background-color:transparent; border-bottom: 0px solid; border-left: 0px solid;border-right: 0px solid;border-top: 0px solid'>");

Ruth 05-04-2002 04:46 AM

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 :)


All times are GMT. The time now is 06:19 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.01110 seconds
  • Memory Usage 1,750KB
  • 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
  • (3)bbcode_code_printable
  • (1)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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