vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   A countdown clock?? (https://vborg.vbsupport.ru/showthread.php?t=80999)

gobears20 05-05-2005 01:29 AM

A countdown clock??
 
Guys I made this countdown clock for my football baord. The problem I am having is just making it show up on the football baord. It keeps showing up on all of my forums.



Any idea on what I have to do where I make it only show up in my football forum? Also, would I put this in the forum display or the phpinclude?


I just want this on one forum, which is my football forum.



See I can do this with an image. I just add this in the phpinclude_start..



if ($forumid == 8)

{

}



then I put this $name inside the forum display. I can get this stuff to work with an image. The problem with my countdown clock is that its a script and not an image. I know this can be done, I am just not sure what I have to add in my countdown script?



Thanks for any help!



Here is my info...



http://www.baylorfans.com/countdown/.../countdown.htm



Code:


<HTML>

<!--This file created 10:15 PM 4/26/2005 by Claris Home Page version 3.0-->

<HEAD>

<TITLE>countdown</TITLE>

<META NAME=GENERATOR CONTENT="Claris Home Page 3.0">

<X-CLARIS-WINDOW TOP=0 BOTTOM=601 LEFT=0 RIGHT=1268>

<X-CLARIS-TAGVIEW MODE=minimal>

</HEAD>

<BODY BGCOLOR="#FFFFFF" onload="javascript:countdown();">

<P ALIGN=right><SCRIPT LANGUAGE=""><!-- hide script

//change your event date event here.

var eventdate = new Date("September 3, 2005 18:00:00 CST");

function toSt(n)

{s=""

if(n<10) s+="0"

return s+n.toString();

}

function countdown()

{cl=document.clock;

d=new Date();

count=Math.floor((eventdate.getTime()-d.getTime())/1000);

if(count<=0)

{cl.days.value ="0";

cl.hours.value="0";

cl.mins.value="00";

cl.secs.value="00";

alert("Sic' Em Bears!"); // Message which appears when time is out

return;

}

cl.secs.value=toSt(count%60);

count=Math.floor(count/60);

cl.mins.value=toSt(count%60);

count=Math.floor(count/60);

cl.hours.value=toSt(count%24);

count=Math.floor(count/24);

cl.days.value=count;

setTimeout("countdown()",500);

}

// end script --></SCRIPT> <FORM ACTION="" METHOD=POST name=clock>

<CENTER><TABLE BORDER=0 BGCOLOR="#000000" CELLSPACING=5 CELLPADDING=0 WIDTH=444 HEIGHT=100>

    <TR>

        <TD ALIGN=center WIDTH="31%" HEIGHT=19 BGCOLOR="#006600">

            <P><FONT SIZE="-1" COLOR="#FFCC00"><B>Days</B></FONT></P>

        </TD>

        <TD ALIGN=center WIDTH="23%" HEIGHT=19 BGCOLOR="#006600">

            <P><FONT SIZE="-1" COLOR="#FFCC00"><B>Hours</B></FONT></P>

        </TD>

        <TD ALIGN=center WIDTH=56 HEIGHT=19 BGCOLOR="#006600">

            <P><FONT SIZE="-1" COLOR="#FFCC00"><B>Mins</B></FONT></P>

        </TD>

        <TD ALIGN=center WIDTH=44 HEIGHT=19 BGCOLOR="#006600">

            <P><FONT SIZE="-1" COLOR="#FFCC00"><B>Secs</B></FONT></P>

        </TD>

    </TR>

    <TR>

        <TD ALIGN=center WIDTH="31%" HEIGHT=15>

            <P><INPUT TYPE=text NAME=days VALUE="" SIZE=4></P>

        </TD>

        <TD ALIGN=center WIDTH="23%" HEIGHT=15>

            <P><INPUT TYPE=text NAME=hours VALUE="" SIZE=2></P>

        </TD>

        <TD ALIGN=center WIDTH=56 HEIGHT=15>

            <P><INPUT TYPE=text NAME=mins VALUE="" SIZE=2></P>

        </TD>

        <TD ALIGN=center WIDTH=44 HEIGHT=15>

            <P><INPUT TYPE=text NAME=secs VALUE="" SIZE=2></P>

        </TD>

    </TR>

    <TR>

        <TD COLSPAN=4 HEIGHT=49 BGCOLOR="#FFFFFF">

            <CENTER><FONT SIZE="-1" COLOR="#FFCC00"><B><IMG SRC="http://www.baylorfans.com/countdown/football/smu.gif" X-CLARIS-USEIMAGEWIDTH X-CLARIS-USEIMAGEHEIGHT ALIGN=bottom></B></FONT><FONT COLOR="#FF0000"><B>SMU

            </B></FONT><FONT COLOR="#000000"><B>vs</B></FONT><FONT COLOR="#FF0000"><B>

            </B></FONT><FONT COLOR="#006600"><B>Baylor</B></FONT><FONT SIZE="-1" COLOR="#006600"><B><IMG SRC="http://www.baylorfans.com/countdown/football/baylor.gif" X-CLARIS-USEIMAGEWIDTH X-CLARIS-USEIMAGEHEIGHT ALIGN=bottom></B></FONT>

 

            <P><FONT FACE="Arial Baltic" COLOR="#006600"><B>COUNTDOWN

            TO KICKOFF</B></FONT></P></CENTER>

        </TD>

    </TR>

</TABLE>

</CENTER>

</FORM></P>

</BODY>

</HTML>


rex_b 05-05-2005 02:06 PM

do an if conditional with $forumid == x

gobears20 05-06-2005 01:20 AM

Ok, I put this in my php_include.......

Code:

<HTML>
<!--This file created 10:15 PM  4/26/2005 by Claris Home Page version 3.0-->

if ($forumid == 8)
{
$bu_countdown = '<P ALIGN=center>
<HEAD>
  <TITLE>countdown</TITLE>
  <META NAME=GENERATOR CONTENT="Claris Home Page 3.0">
  <X-CLARIS-WINDOW TOP=0 BOTTOM=601 LEFT=0 RIGHT=1268>
  <X-CLARIS-TAGVIEW MODE=minimal>
</HEAD>
<BODY BGCOLOR="#FFFFFF" onload="javascript:countdown();">
<P ALIGN=right><SCRIPT LANGUAGE=""><!-- hide script
//change your event date event here.
var eventdate = new Date("September 3, 2005  18:00:00 CST");
function toSt(n)
{s=""
if(n<10) s+="0"
return s+n.toString();
}
function countdown()
{cl=document.clock;
d=new Date();
count=Math.floor((eventdate.getTime()-d.getTime())/1000);
if(count<=0)
{cl.days.value ="0";
cl.hours.value="0";
cl.mins.value="00";
cl.secs.value="00";
alert("Sic' Em Bears!"); // Message which appears when time is out
return;
}
cl.secs.value=toSt(count%60);
count=Math.floor(count/60);
cl.mins.value=toSt(count%60);
count=Math.floor(count/60);
cl.hours.value=toSt(count%24);
count=Math.floor(count/24);
cl.days.value=count;
setTimeout("countdown()",500);
}
// end script --></SCRIPT> <FORM ACTION="" METHOD=POST name=clock>
  <CENTER><TABLE BORDER=0 BGCOLOR="#000000" CELLSPACING=5 CELLPADDING=0 WIDTH=444 HEIGHT=100>
      <TR>
        <TD ALIGN=center WIDTH="31%" HEIGHT=19 BGCOLOR="#006600">
            <P><FONT SIZE="-1" COLOR="#FFCC00"><B>Days</B></FONT></P>
        </TD>
        <TD ALIGN=center WIDTH="23%" HEIGHT=19 BGCOLOR="#006600">
            <P><FONT SIZE="-1" COLOR="#FFCC00"><B>Hours</B></FONT></P>
        </TD>
        <TD ALIGN=center WIDTH=56 HEIGHT=19 BGCOLOR="#006600">
            <P><FONT SIZE="-1" COLOR="#FFCC00"><B>Mins</B></FONT></P>
        </TD>
        <TD ALIGN=center WIDTH=44 HEIGHT=19 BGCOLOR="#006600">
            <P><FONT SIZE="-1" COLOR="#FFCC00"><B>Secs</B></FONT></P>
        </TD>
      </TR>
      <TR>
        <TD ALIGN=center WIDTH="31%" HEIGHT=15>
            <P><INPUT TYPE=text NAME=days VALUE="" SIZE=4></P>
        </TD>
        <TD ALIGN=center WIDTH="23%" HEIGHT=15>
            <P><INPUT TYPE=text NAME=hours VALUE="" SIZE=2></P>
        </TD>
        <TD ALIGN=center WIDTH=56 HEIGHT=15>
            <P><INPUT TYPE=text NAME=mins VALUE="" SIZE=2></P>
        </TD>
        <TD ALIGN=center WIDTH=44 HEIGHT=15>
            <P><INPUT TYPE=text NAME=secs VALUE="" SIZE=2></P>
        </TD>
      </TR>
      <TR>
        <TD COLSPAN=4 HEIGHT=49 BGCOLOR="#FFFFFF">
            <CENTER><FONT SIZE="-1" COLOR="#FFCC00"><B><IMG SRC="http://www.baylorfans.com/countdown/football/smu.gif" X-CLARIS-USEIMAGEWIDTH X-CLARIS-USEIMAGEHEIGHT ALIGN=bottom></B></FONT><FONT COLOR="#FF0000"><B>SMU
            </B></FONT><FONT COLOR="#000000"><B>vs</B></FONT><FONT COLOR="#FF0000"><B>
            </B></FONT><FONT COLOR="#006600"><B>Baylor</B></FONT><FONT SIZE="-1" COLOR="#006600"><B><IMG SRC="http://www.baylorfans.com/countdown/football/baylor.gif" X-CLARIS-USEIMAGEWIDTH X-CLARIS-USEIMAGEHEIGHT ALIGN=bottom></B></FONT>
           
            <P><FONT FACE="Arial Baltic" COLOR="#006600"><B>COUNTDOWN
            TO KICKOFF</B></FONT></P></CENTER>
        </TD>
      </TR>
  </TABLE>
  </CENTER>
</FORM></P>
</BODY>
</HTML>';
}

and this...$bu_countdown in my forum display. Nothing came up. Any idea why or what I should do to correct this? I just want the clock on one forum.


All times are GMT. The time now is 07: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.01053 seconds
  • Memory Usage 1,747KB
  • 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
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete