
Forum started on Dec 22, 2004, 17.26 and in existence for 8 Years3 Days •
Forum started on Dec 22, 2004, 17.26 and in existence for 8 Years3 Days •
Code: Select all
Forum started on Dec 22, 2004, 17.26 and in existence for 8 Years and 3 Days •
RMcGirr83 wrote:mikef35 wrote:This is what is running your countdown, I am looking for a different way.Code: Select all
$(document).ready(function(){
$("#online").countdown({
date: "07 Aug 2012, 00:48:13",
leadingZero: true,
offset: -1,
yearsAndMonths: true,
htmlTemplate: "<span class='cd-online'>and in existence for</span> <strong>%y</strong> <span class=\"cd-online\">Years</span> <strong>%m</strong> <span class=\"cd-online\">Months</span> <strong>%d</strong> <span class=\"cd-online\">Days</span> <strong>%h</strong> <span class=\"cd-online\">Hours</span> <strong>%i</strong> <span class=\"cd-online\">Minutes</span> <strong>%s</strong> <span class=\"cd-online\">Seconds</span>",
direction: "up"
});
Uhmmm, yeah that isn't the code I am using.
Code: Select all
<?php
/**
* @package board start date
* @version
* @copyright (c) 2012 RMcGirr83 & 2015 Oyabun1
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*/
/**
* @ignore
*/
if (!defined('IN_PHPBB'))
{
exit;
}
/**
* board_start_date
*
* @return the start date of the board and time in years, months and days
*
*/
function board_start_date ()
{
global $config, $user;
$board_for = '';
$started = new DateTime($user->format_date($config['board_startdate']));
$today = new DateTime($user->format_date(time()));
$board_length = $started->diff($today);
$byears = $board_length->y;
$bmonths = $board_length->m;
$bdays = $board_length->d;
if ($board_length)
{
if ($byears >= 1)
{
$board_for .= $byears > 1 ? ($byears . ' ' . $user->lang['BOARD_YEARS']) : ($byears . ' ' . $user->lang['BOARD_YEAR']);
}
if ($bmonths)
{
$bsep = !empty($byears) ? $user->lang['COMMA_SEPARATOR'] : '';
$bmonths = $bmonths > 1 ? ($bsep . $bmonths . ' ' . $user->lang['BOARD_MONTHS']) : ($bsep . $bmonths . ' ' . $user->lang['BOARD_MONTH']);
$board_for .= $bmonths;
}
if ($bdays)
{
$band = !empty($bmonths) ? ' ' . $user->lang['BOARD_AND'] . ' ': '';
$bdays = $bdays > 1 ? ($band . $bdays . ' ' . $user->lang['BOARD_DAYS']) : ($band . $bdays . ' ' . $user->lang['BOARD_DAY']);
$board_for .= $bdays;
}
}
return ($board_for);
}
?>
Code: Select all
Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (joulu 22, 2004, 17.26) at position 0 (j): The timezone could not be found in the database' in /home/potku/public_html/forum/includes/functions_board_start_date.php:27 Stack trace: #0 /home/potku/public_html/forum/includes/functions_board_start_date.php(27): DateTime->__construct('joulu 22, 2004,...') #1 /home/potku/public_html/forum/includes/hooks/hook_bsd.php(42): board_start_date() #2 [internal function]: hook_bsd(Object(phpbb_hook), 'sn_im_online_li...', false, Object(mobile_template)) #3 /home/potku/public_html/forum/includes/hooks/index.php(141): call_user_func_array('hook_bsd', Array) #4 /home/potku/public_html/forum/includes/template.php(208): phpbb_hook->call_hook(Array, 'sn_im_online_li...', false, Object(mobile_template)) #5 /home/potku/public_html/forum/includes/template.php(243): template->display('sn_im_online_li...', false) #6 /home/potku/public_html/forum/socialnet/includes/socialnet.php(697): tem in /home/potku/public_html/forum/includes/functions_board_start_date.php on line 27
The timezone could not be found in the database
RMcGirr83 wrote:What version of phpBB are you running?
Return to “Modders MOD support”
Users browsing this forum: No registered users and 0 guests