Main Menu
collapse

Simple Portal Archived Forum

This is an Archive Forum.

The content in this forum may be out-of-date or have been superseded by newer information, and links in forum pages to other sites may not work.
This forum contains archives for future reference.

Visit our thread at Simple Machines Forum for current support.

SMF 2.1 users: EhPortal is a ported version of Simple Portal specifically designed for the SMF 2.1 branch.
Please visit web-develop.ca to download EhPortal and for its support.

User Info

Welcome Guest.
Please log in.

Who's Online

  • Dot Guests: 1212
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

Recent Posts

Adding Forums Button to Nav bar by jirapon
[August 01, 2019, 09:07:12 AM]


Re: Board Icons by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 04:03:41 PM]


MOVED: Czech translation???? by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 03:04:51 PM]


Board Icons by jirapon
[July 30, 2019, 07:28:44 AM]


Re: Thankyou Simpleportal, by ♦ Ninja ZX-10RR ♦
[July 29, 2019, 09:41:29 AM]


Blocks speak! Do you have an interest in getting more blocks - or even making your own? The Blocks Board is for you!

Countdown script

Started by MissyNL, February 27, 2011, 11:05:43 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

MissyNL

Hello,

Does anybody had a nice countdown script? I have tried several.... but all give this error:


Parse error: syntax error, unexpected '<' in /home/xxx/domains/xxx/public_html/Sources/PortalBlocks.php(3333) : eval()'d code on line 1


thanks!

Old Fossil

Have a look at Underdogs forum at www.askusaquestion.net

There may be something there.
Daily backups mean less headaches

Block Set Up

I may be no coding expert but I am willing to help where I can.

I eat Spammers for breakfast

AngelinaBelle

It sounds like a simple parse error in one of your php blocks.
You could probably post code and get some help.
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

[SiNaN]

Try putting that code in a HTML block, rather than a PHP one.
And slowly, you come to realize... It's all as it should be...

Shitbit

<script language="JavaScript">
TargetDate = "12/31/2020 5:00 AM";
BackColor = "palegreen";
ForeColor = "navy";
CountActive = true;
CountStepper = -1;
LeadingZero = true;
DisplayFormat = "%%D%% Days, %%H%% Hours, %%M%% Minutes, %%S%% Seconds.";
FinishMessage = "It is finally here!";
</script>
<script language="JavaScript" src="http://point_to_your/countdown.js"></script>



copy this into HTML Block , and change Script Source to your folder with countdown.js  (attached)

Regards

Shitbit
Regards - Shitbit -
______________________________________
German Support Board Moderator

Chen Zhen

You can put the javascript in the html block without the file.

How do you want this to show and operate?

Here is a countdown of 20 seconds with a redirect to the root page: (example)

<table border="0" style="text-align:center;margin-left:auto;margin-right:auto;">
<tr>
<td style="text-align:center;font-face: arial;">This page will redirect in </td>
<td style="text-align:center;"><form name="d">
<p><input type="text" size="2" name="d2" style="text-align:center;"></p>
</form>
</td>
<td style="text-align:center;">seconds.</td>
</tr>
</table>

<script type="text/javascript">
<!--
var milisec=0
var seconds=20
var theUrl = location.protocol + "//" + location.hostname
document.d.d2.value='0'
function display(){
if (milisec>=0){
milisec=9
seconds-=1
if (seconds == 0){
      location.href = theUrl ;}
}
else
milisec-=1
document.d.d2.value=seconds
setTimeout("display()",1000)
}
display()
//-->
</script>


You need some additional logic for https protocol

AngelinaBelle

MissyNL,
Does putting HTML and/or javascript in an HTML block fix your problem?
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?