MyBB Community Forums

Full Version: Footer Time
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello, I think my request is pretty simple, but it would be amazing if you could help.

Where it says "© 2013 The Cube" I would like to add the forums time.

[Image: rsz_5dcdf4db26.png]

Forum: http://forums.thecubeserver.org/index.php
MyBB Version: 1.6.13
Theme: Sleek

This is my current code in my templates Footer.

</div>
	</div>
		</div>
			</div>
			<div class="container">
				<div class="row">
					<div class="fivecol">
						<h2>&copy; 2013 <a href="{$mybb->settings['homeurl']}">{$mybb->settings['homename']}</a></h2>					
					</div>
					
					<div class="twocol" style="text-align: center;">
					<a href="#top"><img src="{$theme['imgdir']}/arrowup.png" class="tooltip" title="Return to top" alt="" /></a>
					</div>
					
					<div class="fivecol last" style="text-align: right;">
						Community software by <a href="http://mybb.com/" target="_blank">MyBB</a>
						<h2><a href="http://www.themefreak.net/" target="_blank">Premium Theme by ThemeFreak</a></h2>	
					</div>
				</div>
					<!-- The following piece of code allows MyBB to run scheduled tasks. DO NOT REMOVE -->{$task_image}<!-- End task image code --><!-- UNREADPOSTS_JS -->
					{$auto_dst_detection}
			</div>

</div>

Thanks again, for any help you can give.
Try this

</div>
    </div>
        </div>
            </div>
            <div class="container">
                <div class="row">
                    <div class="fivecol">
                        <h2>&copy; 2013 <a href="{$mybb->settings['homeurl']}">{$mybb->settings['homename']}</a>  {$lang->welcome_current_time} </h2>                    
                    </div>
                    
                    <div class="twocol" style="text-align: center;">
                    <a href="#top"><img src="{$theme['imgdir']}/arrowup.png" class="tooltip" title="Return to top" alt="" /></a>
                    </div>
                    
                    <div class="fivecol last" style="text-align: right;">
                        Community software by <a href="http://mybb.com/" target="_blank">MyBB</a>
                        <h2><a href="http://www.themefreak.net/" target="_blank">Premium Theme by ThemeFreak</a></h2>    
                    </div>
                </div>
                    <!-- The following piece of code allows MyBB to run scheduled tasks. DO NOT REMOVE -->{$task_image}<!-- End task image code --><!-- UNREADPOSTS_JS -->
                    {$auto_dst_detection}
            </div>

</div>

All I did was add {$lang->welcome_current_time} in the line shown below to get it working for me
<h2>&copy; 2013 <a href="{$mybb->settings['homeurl']}">{$mybb->settings['homename']}</a>  {$lang->welcome_current_time} </h2>
Thank you for this, is there a way to force the time into a certain timezone? As the timezone in Admin CP and the one in my CP are both conflicting.
function my_date($format, $stamp="", $offset="", $ty=1, $adodb=false)

You would need to set the $offset parameter to be the number of hours + or - GMT. This would require a file edit of global.php. You would look for these lines:
// Set the current date and time now
$datenow = my_date($mybb->settings['dateformat'], TIME_NOW, '', false);
$timenow = my_date($mybb->settings['timeformat'], TIME_NOW);
So where would I put.

function my_date($format, $stamp="", $offset="", $ty=1, $adodb=false) 

I found the 2 lines of code you was talking about. I was just unsure where to insert the line of code above.

Thank you so much for the help btw.

And this would stay the same?

<h2>&copy; 2013 <a href="{$mybb->settings['homeurl']}">{$mybb->settings['homename']}</a>  {$lang->welcome_current_time} </h2>
Yes that would stay the same.
(2014-06-01, 12:37 PM)dragonexpert Wrote: [ -> ]Yes that would stay the same.

Thank you for the quick reply, but where does
function my_date($format, $stamp="", $offset="", $ty=1, $adodb=false) 
go?
I was just showing you the function parameters. You don't define the function anywhere.
Thank you I got it to work! Very helpful.