Page 1 of 1

Countdown Block

PostPosted: Fri Apr 28, 2006 12:38 pm
Author: HoRuZ
Heyhey, First I have to say nice new forums, nice job IntegraMod.

Second I want to report the mod me and SLY LS1 made on the previous board, but I can't remember my comments on it back then.

We edited the normal phpBB Countdown Mod so it is compatible and usefull for IntegraMod.

Download it [url=http]here[/url]
If it shows any errors or glitches let me know.

Have fun and regards

H

Re: Countdown Block

PostPosted: Tue Sep 12, 2006 4:36 am
Author: doswald
hello the link is broken. please check. thanks

Re: Countdown Block

PostPosted: Wed Nov 01, 2006 9:36 am
Author: HoRuZ
Ok, had to re-create the whole block principal for the advanced countdown.
I don't know if there are still bugs in it, but you can download the files temporarly from [url=http]here[/url]

If it works correct, tell others about it,
if it has bugs and flaws, tell me <img>

PostPosted: Wed Nov 01, 2006 4:17 pm
Author: Ebony
thanks HoRuZ * can't wait countdowny to chrimbo*

will do.... have a hug honey [url=http][flash=,:27siwxrt]http://img61.imageshack.us/img61/2230/emotions12ju1.gif[/flash:27siwxrt][/url]

PostPosted: Wed Nov 01, 2006 9:03 pm
Author: doswald
hi,

i can't find the Countdown in ACP section. where can i find it?

thanks

Re: Countdown Block

PostPosted: Wed Nov 01, 2006 9:05 pm
Author: Ebony
Ok HoRuZ, got it up...... and works fine... no real problems thank you very muchly [url=http][flash=,:2twsqx1v]http://img91.imageshack.us/img91/7467/losupdatinghlfw2.gif[/flash:2twsqx1v][/url]

only minor typos...*cheeky grin.* but I guess you is keeping us on our toes... you missed a < in the template changes.
{COUNTDOWN}

</head>
{COUNTDOWN_ON}/>

giggles... but other than that one itsy tiny typo it works brilliantly [url=http][flash=,:2twsqx1v]http://img125.imageshack.us/img125/8273/losupblowkisshl7sb9.gif[/flash:2twsqx1v][/url]

thank you so much.... and if you wanna see it in action here's the link
[url=http]countdown working[/url]

PostPosted: Wed Nov 01, 2006 9:48 pm
Author: doswald
Hi Ebony,

Where did you set the countdown (in ACP)? I'm having problem I cant see it in ACP section of my IM140.

Thanks

PostPosted: Thu Nov 02, 2006 2:36 am
Author: HoRuZ
Isn't it in the 'General admin' section?

Thanks for the change Ebony, but where did you put that '<'? lol <img>

Re: Countdown Block

PostPosted: Thu Nov 02, 2006 4:22 pm
Author: Ebony
sorry sweetheart the missing *<* goes in the template... overall_header.tpl

After you found </head> and you replace the code with this

{COUNTDOWN}

</head>
[color=red]</color>

the red < is the missing one.... and thanks again



"doswald";p="17209" wrote:Hi Ebony,

Where did you set the countdown (in ACP)? I'm having problem I cant see it in ACP section of my IM140.

Thanks


neither could I it took me nearly 40mins to find it.... lol

it is hidden away in the IMportal... blocks management and is fully config from there.

Thanks again Horus it be cool....

PostPosted: Thu Nov 02, 2006 8:10 pm
Author: doswald
neither could I it took me nearly 40mins to find it.... lol

it is hidden away in the IMportal... blocks management and is fully config from there.

Thanks again Horus it be cool....


Ebony is it in the General Admin or IMPortal? Isaw the block in IM Portal yet I dont know wher to configure it to set the time and the event to use for countdown.

Please help.

Thanks

Re: Countdown Block

PostPosted: Fri Nov 03, 2006 1:53 am
Author: HoRuZ
"Ebony";p="17224" wrote:sorry sweetheart the missing *<* goes in the template... overall_header.tpl

After you found </head> and you replace the code with this

{COUNTDOWN}

</head>
[color=red]</color>

the red < is the missing one.... and thanks again



"doswald";p="17209" wrote:Hi Ebony,

Where did you set the countdown (in ACP)? I'm having problem I cant see it in ACP section of my IM140.

Thanks


neither could I it took me nearly 40mins to find it.... lol

it is hidden away in the IMportal... blocks management and is fully config from there.

Thanks again Horus it be cool....


Ok fixed the install.txt <img>
Also updated the .zip so the admin panel appears in "General Admin".

Ebony is it in the General Admin or IMPortal? Isaw the block in IM Portal yet I dont know wher to configure it to set the time and the event to use for countdown.

Please help.


If you put a copy of admin_countdown.php into your root/admin/modules directory a link will appear in the "General Admin" section in ACP. (also leave the admin_countdown.php in your root/admin directory)

PostPosted: Fri Nov 03, 2006 3:50 am
Author: doswald
If you put a copy of admin_countdown.php into your root/admin/modules directory a link will appear in the "General Admin" section in ACP. (also leave the admin_countdown.php in your root/admin directory)


there you go! thanks Horuz it's now working after I placed it in /admin/module

Thanks again!

PS> Thanks too Ebony <img>

Re: Countdown Block

PostPosted: Fri Nov 03, 2006 6:12 am
Author: doswald
Hello again friends,

I would like to know if you know how to insert the Minutes and Seconds in the said countdown field (pls refer to the attached, in red color)

[flash=,]http://i19.photobucket.com/albums/b164/doswald/PHPBB/countdown.jpg[/flash:2zlausvn]

Thanks, hope to hear again.

Regards,
Doswald

Re: Countdown Block

PostPosted: Fri Nov 03, 2006 8:09 am
Author: ayasha
"HoRuZ";p="17243" wrote:
Ok fixed the install.txt <img>
Also updated the .zip so the admin panel appears in "General Admin".



where can i get this HoRuZ? do you mind uploading it somewhere for me?

thanks in advance

cleo

Re: Countdown Block

PostPosted: Fri Nov 03, 2006 12:36 pm
Author: ayasha
ok guys, i cannot get this to work, i edited all the files, uploaded the included files, ran the db querie and i get this

Error

SQL query:

CREATE TABLE phpbb_countdown(
img_left varchar( 255 ) NOT NULL default '',
img_right varchar( 255 ) NOT NULL default '',
title varchar( 100 ) NOT NULL default '',
description varchar( 100 ) NOT NULL default '',
event_text varchar( 200 ) NOT NULL default '',
event_stop int( 11 ) NOT NULL default '',
enable_index tinyint( 1 ) default '0',
enable_portal tinyint( 1 ) default '0',
full_display tinyint( 1 ) default '1'
) TYPE = MYISAM ;

MySQL said: Documentation
#1067 - Invalid default value for 'event_stop'


and it does not create the phpbb_countdown table.

so when i go to my forum i get

General Error

Could not get countdown settings

and no template at all, help please <img>

Re: Countdown Block

PostPosted: Fri Nov 03, 2006 1:09 pm
Author: Dragonsys
"cleo";p="17251" wrote:ok guys, i cannot get this to work, i edited all the files, uploaded the included files, ran the db querie and i get this

Error

SQL query:

CREATE TABLE phpbb_countdown(
img_left varchar( 255 ) NOT NULL default '',
img_right varchar( 255 ) NOT NULL default '',
title varchar( 100 ) NOT NULL default '',
description varchar( 100 ) NOT NULL default '',
event_text varchar( 200 ) NOT NULL default '',
event_stop int( 11 ) NOT NULL default '',
enable_index tinyint( 1 ) default '0',
enable_portal tinyint( 1 ) default '0',
full_display tinyint( 1 ) default '1'
) TYPE = MYISAM ;

MySQL said: Documentation
#1067 - Invalid default value for 'event_stop'


and it does not create the phpbb_countdown table.

so when i go to my forum i get

General Error

Could not get countdown settings

and no template at all, help please <img>


The DB problem is because the field is being set to NOT NULL but you are entering a NULL default value.

PostPosted: Fri Nov 03, 2006 1:17 pm
Author: ayasha
ok, so what do i enter? i kinda understand what you are saying, but as to what to change, i have no clue.

Re: Countdown Block

PostPosted: Fri Nov 03, 2006 1:22 pm
Author: Dragonsys
You can try this...

Code: Select all
CREATE TABLE phpbb_countdown( img_left varchar( 255 ) default '', img_right varchar( 255 ) default '', title varchar( 100 ) default '', description varchar( 100 ) default '', event_text varchar( 200 ) default '', event_stop int( 11 ) default '', enable_index tinyint( 1 ) default '0', enable_portal tinyint( 1 ) default '0', full_display tinyint( 1 ) default '1' ) TYPE = MYISAM ;

PostPosted: Fri Nov 03, 2006 1:41 pm
Author: ayasha
that did not work Dragonsys <img>

PostPosted: Fri Nov 03, 2006 1:43 pm
Author: Dragonsys
"cleo";p="17257" wrote:that did not work Dragonsys <img>


same error? It worked on my site....

Re: Countdown Block

PostPosted: Fri Nov 03, 2006 1:46 pm
Author: ayasha
i got this

Error

SQL query:

CREATE TABLE phpbb_countdown(
img_left varchar( 255 ) default '',
img_right varchar( 255 ) default '',
title varchar( 100 ) default '',
description varchar( 100 ) default '',
event_text varchar( 200 ) default '',
event_stop int( 11 ) default '',
enable_index tinyint( 1 ) default '0',
enable_portal tinyint( 1 ) default '0',
full_display tinyint( 1 ) default '1'
) TYPE = MYISAM ;

MySQL said: Documentation
#1067 - Invalid default value for 'event_stop'

Re: Countdown Block

PostPosted: Fri Nov 03, 2006 1:55 pm
Author: Dragonsys
ok, strange. I just tried both SQL commands, and they both work fine for me...

are you trying to enter this via ACP phpmyadmin or straight phpmyadmin or a straight SQL call?

Re: Countdown Block

PostPosted: Fri Nov 03, 2006 1:58 pm
Author: Dragonsys
try this... copy the below code into a db_update.php file and upload it to the root of your forum. The browse to it ( http://www.graphicsplayhouse.com/psp/db_update.php )

Let me know if that works.

Code: Select all
<?php/***************************************************************************  *                               db_update.php  *                            -------------------  *  *   copyright            ]http://sourceforge.net/projects/dbgenerator[/url]  *   Website              : [url=http://freakingbooty.no-ip.com/]http://freakingbooty.no-ip.com/[/url] & [url=http://www.rapiddr3am.net]http://www.rapiddr3am.net[/url]  *  ***************************************************************************/  /***************************************************************************  *  *   This program is free software; you can redistribute it and/or modify  *   it under the terms of the GNU General Public License as published by  *   the Free Software Foundation; either version 2 of the License, or  *   (at your option) any later version.  *  ***************************************************************************/  define('IN_PHPBB', true);$phpbb_root_path = './';include($phpbb_root_path . 'extension.inc');include($phpbb_root_path . 'common.'.$phpEx);  //// Start session management//$userdata = session_pagestart($user_ip, PAGE_INDEX);init_userprefs($userdata);//// End session management//    if( !$userdata['session_logged_in'] ){     $header_location = ( @preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')) ) ? 'Refresh: 0; URL=' : 'Location: ';     header($header_location . append_sid("login.$phpEx?redirect=db_update.$phpEx", true));     exit;}  if( $userdata['user_level'] != ADMIN ){     message_die(GENERAL_MESSAGE, 'You are not authorised to access this page');}    $page_title = 'Updating the database';include($phpbb_root_path . 'includes/page_header.'.$phpEx);  echo '<table>';echo '<tr><th>Updating the database</th></tr><tr><td><span><ul>';    $sql = array();$sql[] = "CREATE TABLE " . $table_prefix . "countdown( img_left varchar( 255 ) NOT NULL default '', img_right varchar( 255 ) NOT NULL default '', title varchar( 100 ) NOT NULL default '', description varchar( 100 ) NOT NULL default '', event_text varchar( 200 ) NOT NULL default '', event_stop int( 11 ) NOT NULL default '', enable_index tinyint( 1 ) default '0', enable_portal tinyint( 1 ) default '0', full_display tinyint( 1 ) default '1' ) TYPE = MYISAM";  for( $i = 0; $i <count>sql_query ($sql[$i]) )     {         $error = $db->sql_error();           echo '<li>' . $sql[$i] . '<br> +++ <font><b>Error:</b></font> ' . $error['message'] . '</li><br>';     }     else     {         echo '<li>' . $sql[$i] . '<br> +++ <font><b>Successfull</b></font></li><br>';     }}    echo '</ul></span></td></tr><tr><td> </td></tr>';  echo '<tr><th>End</th></tr><tr><td><span>Installation is now finished. Please be sure to delete this file now.<br>If you have run into any errors, please visit the <a>phpBBSupport.co.uk</a> and ask someone for help.</span></td></tr>';echo '<tr><td><span><a>Have a nice day</a></span></td></table>';  include($phpbb_root_path . 'includes/page_tail.'.$phpEx);  ?>

PostPosted: Fri Nov 03, 2006 2:00 pm
Author: ayasha
ok, i am working in my xampp, just so you know it is not a live forum

run SQL query/queries on database in the xampp phpMyadmin.

is that what you want to know?

PostPosted: Fri Nov 03, 2006 2:04 pm
Author: Dragonsys
"cleo";p="17262" wrote:ok, i am working in my xampp, just so you know it is not a live forum

run SQL query/queries on database in the xampp phpMyadmin.

is that what you want to know?


maybe it's somethign in the xampp mySQL. I've never played with xampp before.
Try the db_update file above though.

PostPosted: Fri Nov 03, 2006 2:05 pm
Author: ayasha
ok, i am going back to the beginning, and recheck everything, will let you know what i find out if anything. <img>

PostPosted: Fri Nov 03, 2006 6:05 pm
Author: ayasha
i have tried everything i could think of, i cannot get this query to create a table <img>

Re: Countdown Block

PostPosted: Sat Nov 04, 2006 2:02 am
Author: Teelk
I can't find any instance of where an integer's default is emtpy. This leads me to believe that an integer must have a value. Although, Dragonsys seems to be getting it to work, so I may just be blowing smoke here. Every instance I've seen sets the default value to 0, so it should be safe.

Then again, it could be a MySQL5 issue.

Code: Select all
CREATE TABLE phpbb_countdown(img_left varchar( 255 ) default '',img_right varchar( 255 ) default '',title varchar( 100 ) default '',description varchar( 100 ) default '',event_text varchar( 200 ) default '',event_stop int( 11 ) default '0',enable_index tinyint( 1 ) default '0',enable_portal tinyint( 1 ) default '0',full_display tinyint( 1 ) default '1') TYPE = MYISAM ;

PostPosted: Sat Nov 04, 2006 4:50 am
Author: Ebony
Cleo honey.... I will get Methos over here he installed it fine on the realm... I don't understand it???

it installed fine on the realmy.

Re: Countdown Block

PostPosted: Sat Nov 04, 2006 4:56 am
Author: Ebony
"doswald";p="17246" wrote:Hello again friends,

I would like to know if you know how to insert the Minutes and Seconds in the said countdown field (pls refer to the attached, in red color)

[flash=,]http://i19.photobucket.com/albums/b164/doswald/PHPBB/countdown.jpg[/flash:2acerpte]

Thanks, hope to hear again.

Regards,
Doswald



don't quote me on this.. but I think that is automatically set to run by your forum clock. I haven't actually played with that bit yet I am sorry...

PostPosted: Sat Nov 04, 2006 8:28 am
Author: ayasha
ok, guys, i moved my testing forum from xampp to my server, and i was successful in creating a table for it, but now, i have gone in the acp and configured it, but it will not show. any suggestions?

Re: Countdown Block

PostPosted: Sat Nov 04, 2006 11:17 am
Author: Dragonsys
Does the block show and it's empty, or does nothing show up?

Re: Countdown Block

PostPosted: Sat Nov 04, 2006 11:20 am
Author: Dragonsys
"Ebony";p="17279" wrote:
"doswald";p="17246" wrote:Hello again friends,

I would like to know if you know how to insert the Minutes and Seconds in the said countdown field (pls refer to the attached, in red color)

[flash=,]http://i19.photobucket.com/albums/b164/doswald/PHPBB/countdown.jpg[/flash:1x5aauxi]

Thanks, hope to hear again.

Regards,
Doswald



don't quote me on this.. but I think that is automatically set to run by your forum clock. I haven't actually played with that bit yet I am sorry...


I think he wants to insert the WORDS minutes and seconds...

PostPosted: Sat Nov 04, 2006 11:24 am
Author: ayasha
nothing shows Dragonsys <img>

PostPosted: Sat Nov 04, 2006 2:47 pm
Author: HoRuZ
It could be a php or mySQL version issue as Teelk mentioned.
I have it installed as I described and it works perfectly, but I run my site on a php 4.x.x server.

For showing the words I did this:

#
#-----[ OPEN ]------------------------------------------
#
root/language/lang_english/lang_countdown.php


#
#-----[ FIND ]------------------------------------------
#
$lang['C_days'] = 'Remaining Days:';


#
#-----[ AFTER, ADD ]------------------------------------------
#
$lang['C_days'] = 'Days';
$lang['C_hours'] = 'Hours';
$lang['C_mins'] = 'Minutes';
$lang['C_secs'] = 'Seconds';


#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM


Updated the download as well

[url=http]advanced countdownblock100[/url]

PostPosted: Sat Nov 04, 2006 11:06 pm
Author: Michaelo
What are you storing in event_stop? a date/time?
Use int(11) default NULL...

I note most if not all dates are stored in a integer 11 numbers long, however if the field is a date then define NULL has the effect of type casting (or it would appear)... where the field is allowed to be empty or '0' ( this is not zero... need to remove the '' else it's a character) there can be be errors down the line for functions that manipulate the entry... It's worth a try...

Either of these will work. (php5/mysql5)
Code: Select all
 CREATE TABLE phpbb_countdown(img_left varchar( 255 ) default '',img_right varchar( 255 ) default '',title varchar( 100 ) default '',description varchar( 100 ) default '',event_text varchar( 200 ) default '',event_stop int( 11 ) default NULL,enable_index tinyint( 1 ) default '0',enable_portal tinyint( 1 ) default '0',full_display tinyint( 1 ) default '1') TYPE = MYISAM ;  

or
Code: Select all
 CREATE TABLE phpbb_countdown(img_left varchar( 255 ) default '',img_right varchar( 255 ) default '',title varchar( 100 ) default '',description varchar( 100 ) default '',event_text varchar( 200 ) default '',event_stop int( 11 ) default 0,enable_index tinyint( 1 ) default '0',enable_portal tinyint( 1 ) default '0',full_display tinyint( 1 ) default '1') TYPE = MYISAM ;  


Mike

PostPosted: Sun Nov 05, 2006 7:07 am
Author: ayasha
ok, i just don't get this, i have applied this to both my test and my live forum, the table has been created in both, but still, it does not show on either forum.

Re: Countdown Block

PostPosted: Sun Nov 05, 2006 11:17 am
Author: Frost
Are you sure it's not caching the block? Just a thought... <img>

PostPosted: Sun Nov 05, 2006 2:52 pm
Author: Tom_S
I have been tagging along with this thread and it does not work for me either. It shows the block but it is emtpy. I have "no cache" for the block. I tried dropping the table and using the sql Michaelo suggest for both and still the same. Empty block <img>

Re: Countdown Block

PostPosted: Sun Nov 05, 2006 2:56 pm
Author: ayasha
"Frost";p="17329" wrote:Are you sure it's not caching the block? Just a thought... <img>


how would i find out, and if it is, what would i do?

PostPosted: Sun Nov 05, 2006 4:55 pm
Author: ayasha
ok, i got it to work, but even though i have it to show on the index page, it is not showing there.

Re: Countdown Block

PostPosted: Sun Nov 05, 2006 6:26 pm
Author: doswald
"Dragonsys";p="17287" wrote:
"Ebony";p="17279" wrote:
"doswald";p="17246" wrote:Hello again friends,

I would like to know if you know how to insert the Minutes and Seconds in the said countdown field (pls refer to the attached, in red color)

[flash=,]http://i19.photobucket.com/albums/b164/doswald/PHPBB/countdown.jpg[/flash:1c4mkso8]

Thanks, hope to hear again.

Regards,
Doswald



don't quote me on this.. but I think that is automatically set to run by your forum clock. I haven't actually played with that bit yet I am sorry...


I think he wants to insert the WORDS minutes and seconds...



Yes Dragonsys I refer to the WORDS inserted just like "Remaining Days" and "Hours".

Hope you can lead me.

Thanks

Re: Countdown Block

PostPosted: Sun Nov 05, 2006 6:41 pm
Author: ayasha
for showing the words minutes and seconds do this

#
#-----[ OPEN ]------------------------------------------
#
root/language/lang_english/lang_countdown.php


#
#-----[ FIND ]------------------------------------------
#
$lang['C_days'] = 'Remaining Days:';


#
#-----[ AFTER, ADD ]------------------------------------------
#
$lang['C_days'] = 'Days';
$lang['C_hours'] = 'Hours';
$lang['C_mins'] = 'Minutes';
$lang['C_secs'] = 'Seconds';

Re: Countdown Block

PostPosted: Sun Nov 05, 2006 8:28 pm
Author: Kusco
Hy, everybody.
I install this mod, every tinhg goes well, .----
Except I have no time values, do you know why?

PostPosted: Sun Nov 05, 2006 9:08 pm
Author: Michaelo
I guess I better install it <img>

Re: Countdown Block

PostPosted: Mon Nov 06, 2006 12:53 am
Author: doswald
"cleo";p="17344" wrote:for showing the words minutes and seconds do this

#
#-----[ OPEN ]------------------------------------------
#
root/language/lang_english/lang_countdown.php


#
#-----[ FIND ]------------------------------------------
#
$lang['C_days'] = 'Remaining Days:';


#
#-----[ AFTER, ADD ]------------------------------------------
#
$lang['C_days'] = 'Days';
$lang['C_hours'] = 'Hours';
$lang['C_mins'] = 'Minutes';
$lang['C_secs'] = 'Seconds';


Cleo, you've got it. Thanks it works

PostPosted: Tue Nov 07, 2006 6:38 am
Author: Tom_S
I still have a blank block

PostPosted: Sat Nov 18, 2006 8:35 am
Author: krillmeed
I have got it to show no problem, but i had to add it in the block management, i saw on various sites that they had it on the left no problem, when i did that it just stretched full size throwing of all the other blocks. Have i done something wrong?

PostPosted: Sat Nov 18, 2006 11:34 am
Author: Michaelo
Just a quick suggestion... Do not select cache for this block and if anyone has a link post it here so I can have a look... Mike

PostPosted: Sat Nov 18, 2006 11:37 am
Author: krillmeed
i saw that already and did not select that, i am guessing in the admin panel i have to select left or right and put something in there, i have no idea what

PostPosted: Sat Nov 18, 2006 12:27 pm
Author: ayasha
here is a link to where i uploaded the zip of this mod for you Mike

http://graphicsplayhouse.com/userupload ... ock100.zip

PostPosted: Sun Nov 19, 2006 3:12 am
Author: krillmeed
i have yet to get this to show on the index page either on the left when it does show stretches out the who page or at the bottom center were it does not show at all except on the portal, i have clicked on that index and portal option in the ACP still not showing on the index page though

Re: Countdown Block

PostPosted: Sun Nov 19, 2006 4:30 am
Author: HoRuZ
I still have to build my site for these things :?
It could be the timezone settings, like I had when I set the board's timezone wrong.

And one small problem, I don't know how to fix, is that the pop-up is missing when the block reaches the time set. I looked over it and over it, but can't find what's wrong.

HoRuZ

PostPosted: Sun Nov 19, 2006 4:35 am
Author: krillmeed
For me it did show on the left no problem but full size so to speak, as for reaching the time set, i have yet to get that far <img>

Re: Countdown Block

PostPosted: Sun Nov 19, 2006 7:11 am
Author: krillmeed
I have managed to get it to show on the Portal as you will see here:

[web:1d6k63bx]http://www.krillmeed.com/forum/portal.php?sid=6f6ab810064f6287e841498464c305e4[/web:1d6k63bx]

would be nice if it could be like that on the index page as well, another question, does anyone know how to get the title block to stretch the full lenght and to have the countdown to important events in white and not black? i presume i have to change some values in the block tpl file which is this:

Code: Select all
<BEGIN> <form>   <tr>       <th>{TITLE}</th>   </tr>   <tr>     <td>{IMG_LEFT}</td>     <td>     {L_REMAINING} <input>     <span>{L_DAYS}      <input>{L_HOURS}      <input>{L_MINS}      <input>{L_SECS}     </span><br><span>{DESC}</span><br><span>{TEXT}</span></td>     <td>{IMG_RIGHT}</td>   </tr> </form>  <script>countdown();[color=red]Java script is not allowed in posts*[/color] <END>


Any help would be appreciated, what with thankgiving comeing up for our American members, the rest of us christmas, could be a cool mod to have <img>

PostPosted: Sun Nov 19, 2006 11:00 pm
Author: krillmeed
my fellow admin got it to look right now, does anyone know how to get it to show on the index page as well say under the shoutbox?

PostPosted: Tue Nov 21, 2006 11:20 am
Author: krillmeed
we are still working on this, what makes the shoutbox appear in the portal and the index page if we could figure that one out we could do the same with the countdown. It shows in the index now but with no time in it

Re: Countdown Block

PostPosted: Tue Nov 21, 2006 6:52 pm
Author: Teelk
The php code from the block's .php file needs to be added to index.php, while the html code from the block's .tpl file needs to be placed in the index_body.tpl of your theme.

Re: Countdown Block

PostPosted: Wed Nov 22, 2006 5:32 pm
Author: evolver
57 replies for a countdown block, whaw...

I have been watching this topic with interest, but I see you struggling with the timezones...
Very logical, if you are using PHP to read the time because PHP doesn't read the usertime, only the servertime.
So the only way to get it right for every user by PHP would be by timezonecalculation for every user...
All this is unnecessary...

Javascript is better for this situation, and I use one...
Different from PHP, javascript will use the visitors computertime instead of servertime...
No need for special formulas to make it suitable with different timezones, and it will save your server some processing too...
...and with no extra tables to add in your database...


Can't be more easy than this:
Just make a block with HTML and place this code in it:

(It's javascript, so I've placed it as a downloadable compressed textfile)

The only problem would be language, if you have more languages on your forum.

Re: Countdown Block

PostPosted: Wed Nov 22, 2006 5:54 pm
Author: evolver
For different languages, I do agree that it would be better as a predefined block...
But even then, best in combination with javascript...

Servertime with PHP and computertime with javascript, that's the idea...
Especially if it's for display only...
If it needs to be recorded in database, that could be a different story, but I don't think that's the case here...



Another alternative would be flash <img>
Just like the animated clock on IM, it also works on users computertime, not servertime.

Some examples:
http://www.jracademy.com/~jtucek/flash.html
http://www.freeflashtoys.com/countdown.html
http://www.sevenoaksart.co.uk/countdown.htm

Or if you want to create one yourself, this site explains how to:
http://www.kirupa.com/developer/mx/countdown.htm

Re: Countdown Block

PostPosted: Wed Nov 22, 2006 10:54 pm
Author: IntegraMOD
"evolver";p="17860" wrote:57 replies for a countdown block, whaw...

I have been watching this topic with interest, but I see you struggling with the timezones...
Very logical, if you are using PHP to read the time because PHP doesn't read the usertime, only the servertime.
So the only way to get it right for every user by PHP would be by timezonecalculation for every user...
All this is unnecessary...

Javascript is better for this situation, and I use one...
Different from PHP, javascript will use the visitors computertime instead of servertime...
No need for special formulas to make it suitable with different timezones, and it will save your server some processing too...
...and with no extra tables to add in your database...


Can't be more easy than this:
Just make a block with HTML and place this code in it:

(It's javascript, so I've placed it as a downloadable compressed textfile)

The only problem would be language, if you have more languages on your forum.


This is a great idea just a question though.....
In the script it has the following.
Code: Select all
countdownTo=new Date(31-12-2006);countdownTo.setYear(2006);countdownTo.setMonth(12);countdownTo.setDate(02);countdownTo.setHours(00);countdownTo.setMinutes(00);countdownTo.setSeconds(0);  

This will give us a countdown till the new year but why is the date set to "02" I have replaced it with "31" which is the date I want it to countdown to and it then shows the wrong time left.

I have done a little research and come up with the following.

Be wary of the month input for your Date definition, however, as the Date object uses month values of 0 to 11 and not 1 to 12 as you may be used to.

So if we take this into consideration and set the month to "0" for January and the date to "01" then the countdown also shows the correct time left.

So with this it would be better to use the correct date and just always remember to -1 form the month you are counting down to.

This would then give us....
Code: Select all
countdownTo=new Date(01-01-2007);countdownTo.setYear(2007);countdownTo.setMonth(0);countdownTo.setDate(01);countdownTo.setHours(00);countdownTo.setMinutes(00);countdownTo.setSeconds(0);  


Have I got this correct or am I completely off track here <img>

Re: Countdown Block

PostPosted: Thu Nov 23, 2006 3:39 am
Author: evolver
[quote=""gffb";p="17864""]This would then give us....
Code: Select all
countdownTo=new Date(01-01-2007);countdownTo.setYear(2007);countdownTo.setMonth(0);countdownTo.setDate(01);countdownTo.setHours(00);countdownTo.setMinutes(00);countdownTo.setSeconds(0);  


Have I got this correct or am I completely off track here <img>

You can compare your countdown with this:
http://www.timeanddate.com/

Re: Countdown Block

PostPosted: Thu Dec 14, 2006 2:26 pm
Author: krillmeed
This is a good mod went in of course first time, but here is a list of problems i have with it:
1: When i switch on the title bar in the blocks management for this, it pushes out so much it is totally out of line with the others.
2. i know this was for the integramod 2 template, but a lot of my templates are black backgrounds and white fonts, how do i change the countdown title to a white fonts. All the other blocks seem to do this naturally.
3: It will go on the index page but only as a header, unless you put it only on the portal which does look good as a centre block, it will not be shown at all on the index page. When i do put it on the index page as a header, it once again stretches the whole block out. Unlike the rest. I have seen this done on one site, a little tight but at least it is possible to keep all the options open to us in the same width block in a header as all the rest. Any help would be appreciated, with Christmas & New year coming up this would be a nice mod to have. <img>