Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases

Reply
 
Thread Tools
Details »»

Version: , by mister mister is offline
Developer Last Online: May 2015 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 10-03-2001 Last Update: Never Installs: 2
 
No support by the author.

Title: Countdown To Calendar Events hack
Newest Release: 10.04.2001
Author: mister
What It Does: Counts down (to the day) to any public events in the calendar. plus any private events a user may have.
Screenshot: click here for screenshot
Download: see attached file (countdown1.zip)

Possible Future Enhancements:
  • span across page, in case of 100's of events
  • show only private events, only public events, or all
  • show countdown on actual calendar also


How To Install
1) upload countdown.php to your main forums directory
2) create two templates

countdown_bit
Quote:
<tr>
<td bgcolor="$altcolor"><a href="calendar.php?s=&action=getinfo&eventid=$even t[eventid]"><normalfont>$event[subject]</normalfont></a></td>
<td bgcolor="$altcolor" align="center"><normalfont>$event[eventdate]</normalfont></td>
<td bgcolor="$altcolor"><normalfont>$days_till</normalfont></td>
</tr>
countdown
note: all {} values have spaces in them so this forum doesnt parse them...
copy/paste from the included text file if you dont want to search for all the { blah } variables to change in this template


Quote:
{ htmldoctype }
<html>
<head><title>$bbtitle - Countdowns</title>
$headinclude
<script language="javascript" type="text/javascript">
<!--
function aimwindow(aimid) {
window.open("member.php?s=$session[sessionhash]&action=aimmessage&aim="+aimid,"_blank","toolbar=n o,location=no,menubar=no,scrollbars=no,width=175,h eight=275,resizeable=yes,status=no")
}
// -->
</script>
</head>
<body>
$header

<table cellpadding="2" cellspacing="0" border="0" width="{ contenttablewidth }" { tableinvisibleextra } align="center">
<tr>
<td width="100%"><img src="{ imagesfolder }/vb_bullet.gif" alt="" border="0" align="absmiddle">
<normalfont><b><a href="index.php?s=$session[sessionhash]">$bbtitle</a> { nav_joiner } Countdowns</b></normalfont></td>
</tr>
</table>

<br>

<table cellpadding=4 cellspacing=1 border=0 bgcolor="{ tablebordercolor }" width="90%">

<tr>
<td bgcolor="{ tableheadbgcolor }"><normalfont><b>Event</b></normalfont></td>
<td bgcolor="{ tableheadbgcolor }" align="center"><normalfont><b>Date</b></normalfont></td>
<td bgcolor="{ tableheadbgcolor }"><normalfont><b>Countdown</b></normalfont></td>
</tr>

$countdown_bits

</table>

$footer
</body>
</html>

3) create a { nav_joiner } replacement variable. (or just edit that out of the template, and put your own in there... its up to you


4) Enjoy.

Show Your Support

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

Comments
  #2  
Old 10-04-2001, 04:20 AM
YourHostSucks
Guest
 
Posts: n/a
Default

Nice, but I had to replace {nav_joiner} with >

Thanks!
Reply With Quote
  #3  
Old 10-04-2001, 04:29 AM
mister mister is offline
 
Join Date: Oct 2001
Location: Detroit, MI
Posts: 92
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

oh yea
ill put that in the instructions.

make a replacement variable { nav_joiner } .. or replace it with whatever..

thanks
Reply With Quote
  #4  
Old 10-04-2001, 04:44 AM
YourHostSucks
Guest
 
Posts: n/a
Default

Also.. Is there a reason it does not span the whole page like normal. its only spans about 80-85%?

ex: http://forums.yourhostsucks.com/countdown.php
Reply With Quote
  #5  
Old 10-04-2001, 05:20 AM
YourHostSucks
Guest
 
Posts: n/a
Default

One more thing...

You will need to edit online.php or it will look like:
Unknown Location: /countdown.php?

----------------------------------------------------------------------
Open online.php:

Around Line 200 you will see alot of "case" statements

Throw this in there somewhere:

PHP Code:
case 'countdown':
      
$userinfo[where] = "Viewing the <a href='countdown.php?s=$session[sessionhash]'>Countdown</a>";
      break; 
Then around line 500 you will see more "case" statements

Throw this in there:

PHP Code:
case 'countdown.php':
    
$userinfo[activity] = 'countdown';
    break; 
-------------------------------------------------------------------------------

(FYI)
Reply With Quote
  #6  
Old 10-04-2001, 11:53 AM
mister mister is offline
 
Join Date: Oct 2001
Location: Detroit, MI
Posts: 92
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by YourHostSucks
Also.. Is there a reason it does not span the whole page like normal. its only spans about 80-85%?

ex: http://forums.yourhostsucks.com/countdown.php
i just it up like that

edit this line:
Quote:
<table cellpadding=4 cellspacing=1 border=0 bgcolor="{ tablebordercolor }" width="90%">
and change the 90 to something whatever you want.
Reply With Quote
  #7  
Old 10-04-2001, 01:22 PM
YourHostSucks
Guest
 
Posts: n/a
Default

Much better

Thanks!...
Now I just need the board to be more than a week old, and get some events happening...
Reply With Quote
  #8  
Old 10-04-2001, 01:27 PM
Mark Hewitt Mark Hewitt is offline
 
Join Date: Oct 2001
Posts: 174
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great hack. What happens if you have like hundreds of events, will it span pages?
Reply With Quote
  #9  
Old 10-04-2001, 05:10 PM
mister mister is offline
 
Join Date: Oct 2001
Location: Detroit, MI
Posts: 92
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Mark Hewitt
Great hack. What happens if you have like hundreds of events, will it span pages?
unfortunately, not yet.
maybe ill work this into future releases .. or someone can add that in and give us the code...

i dont need it just yet, so i didnt bother putting it in, but the thought did cross my mind
...
Reply With Quote
  #10  
Old 10-04-2001, 09:35 PM
maverick1236 maverick1236 is offline
 
Join Date: Oct 2001
Location: NY
Posts: 183
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

this would be great for small boards and user birth-days

could u make it so b-days show up?
Reply With Quote
Reply

Thread Tools

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:43 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04601 seconds
  • Memory Usage 2,286KB
  • Queries Executed 23 (?)
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
  • (2)bbcode_php
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (6)postbit_onlinestatus
  • (10)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
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete