Moderator: Integra Moderator
"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....
"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....
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)
"HoRuZ";p="17243" wrote:
Ok fixed the install.txt <img>
Also updated the .zip so the admin panel appears in "General Admin".
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'
"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 thisError
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>
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 ;
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'
<?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); ?>
"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?
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 ;
"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
"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...
#
#-----[ 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
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 ;
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 ;
"Frost";p="17329" wrote:Are you sure it's not caching the block? Just a thought... <img>
"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...
#
#-----[ 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";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';
<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>
"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.
countdownTo=new Date(31-12-2006);countdownTo.setYear(2006);countdownTo.setMonth(12);countdownTo.setDate(02);countdownTo.setHours(00);countdownTo.setMinutes(00);countdownTo.setSeconds(0);
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.
countdownTo=new Date(01-01-2007);countdownTo.setYear(2007);countdownTo.setMonth(0);countdownTo.setDate(01);countdownTo.setHours(00);countdownTo.setMinutes(00);countdownTo.setSeconds(0);
countdownTo=new Date(01-01-2007);countdownTo.setYear(2007);countdownTo.setMonth(0);countdownTo.setDate(01);countdownTo.setHours(00);countdownTo.setMinutes(00);countdownTo.setSeconds(0);
Registered users: App360MonitorBot, Bing [Bot]