Latest topics
Recent Tutorials
Who is online?
In total there are 11 users online :: 3 Registered, 0 Hidden and 8 Guests :: 1 Bot

Ace 1, DDril, Wolfuryo

[ View the whole list ]


Most users ever online was 172 on Fri 19 Feb 2016, 05:17

Need a clock

View previous topic View next topic Go down

avatar
FiB

Title :
Gender : Male
Posts : 185
Points : 1214
Reputation : 14
Location : UK
Language : Eng
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : phpBB2
Awards :
View all awards
View user profile http://www.ourbulgariaforum.com

PostFiB on Wed 08 Feb 2017, 14:29

Can anyone tell me where I can get a clock for my forum, I need it to show the local time no matter where you are in the world, ie as I am in the uk I want to see the local time for the uk but for some one on Bulgaria they would need to see their local time, so I assume it would get the time from the users Ip ?



This is what I have been using for the last 5 year but the site seems to have stopped working over the last 2 weeks


Code:
<iframe style="width: 170px; height: 170px;" src="http://onlinehtmltools.com/clocks/analog-clock/clock2/" name="iframe985426" scrolling="No" frameborder="0" align="middle"></iframe><br />
avatar
Valoish
Graphic Designer
Title :
Gender : Female
Age : 20
Posts : 3627
Points : 4653
Reputation : 350
Location : NYC
Language : English, Russian, Hebrew
Browser : Browser : Opera Forum Version : Forum Version : phpBB2
Awards :
View all awards
View user profile http://www.canvasforums.com https://twitter.com/https://twitter.com/Valoishx3

PostValoish on Wed 08 Feb 2017, 16:50

Try this one maybe? c:
http://www.clocklink.com/

--------

"I was afraid. And my own insecurity crushed him." - Youku x Boku SS
avatar
FiB

Title :
Gender : Male
Posts : 185
Points : 1214
Reputation : 14
Location : UK
Language : Eng
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : phpBB2
Awards :
View all awards
View user profile http://www.ourbulgariaforum.com

PostFiB on Thu 09 Feb 2017, 02:39

Thanks @Valoish
avatar
FiB

Title :
Gender : Male
Posts : 185
Points : 1214
Reputation : 14
Location : UK
Language : Eng
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : phpBB2
Awards :
View all awards
View user profile http://www.ourbulgariaforum.com

PostFiB on Thu 09 Feb 2017, 06:16

I've tried that and it works fine but I need one that will show the local time no matter where in the world you are as my members are all over the world.
avatar
Wolfuryo

Gender : Male
Posts : 230
Points : 1121
Reputation : 73
Language : Romanian and English
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : Other
Awards :
View all awards
View user profile

PostWolfuryo on Fri 10 Feb 2017, 12:25

Hi,

If you want it to display the time without any clock-looking form, add this javascript code to your forum:
Code:
$(function(){
setInterval(function(){
$("#time").text(Date().split(" ")[4]);
}, 1000);
}
Then add this HTML code where you want the clock to be displayed:
Code:
<div id="time"></div>

Enjoy!
avatar
SLGray
Valued Member
Title :
Owner of 2 Forums
Gender : Male
Age : 44
Posts : 2389
Points : 4602
Reputation : 282
Location : United States
Language : English
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : ModernBB
Awards :
View all awards
View user profile http://www.fmthemes.forumotion.com https://www.facebook.com/FM-Themes-655055824604957 https://twitter.com/FMThemes https://pinterest.com/FMThemes

PostSLGray on Fri 10 Feb 2017, 14:38

FIB wants a clock that will show the correct time for each member.

It will show my time (Central Timezone).
Your time (French timezone).
Another Member (Australia timezone).
avatar
Wolfuryo

Gender : Male
Posts : 230
Points : 1121
Reputation : 73
Language : Romanian and English
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : Other
Awards :
View all awards
View user profile

PostWolfuryo on Sat 11 Feb 2017, 06:12

@SLGray wrote:FIB wants a clock that will show the correct time for each member.

It will show my time (Central Timezone).
Your time (French timezone).
Another Member (Australia timezone).
My code shows the time based on the computer's internal clock, so it should work Smile
avatar
FiB

Title :
Gender : Male
Posts : 185
Points : 1214
Reputation : 14
Location : UK
Language : Eng
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : phpBB2
Awards :
View all awards
View user profile http://www.ourbulgariaforum.com

PostFiB on Mon 13 Feb 2017, 04:57

Andrei34 wrote:Hi,

If you want it to display the time without any clock-looking form, add this javascript code to your forum:
Code:
$(function(){
setInterval(function(){
$("#time").text(Date().split(" ")[4]);
}, 1000);
}
Then add this HTML code where you want the clock to be displayed:
Code:
<div id="time"></div>

Enjoy!

Thank your @Andrei34 for your advice, I have a clock on my forum at present in the portal using a widget so can you please be more specific as to what I must do? as I am not to good with this sort of thing but I can follow instructions. Thank you Wink
avatar
Wolfuryo

Gender : Male
Posts : 230
Points : 1121
Reputation : 73
Language : Romanian and English
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : Other
Awards :
View all awards
View user profile

PostWolfuryo on Tue 14 Feb 2017, 11:20

First go to the javascript code management section in your admin panel and add this code with placement an all pages:
Code:
$(function(){
setInterval(function(){
$("#time").text(Date().split(" ")[4]);
}, 1000);
}
If you want the clock to be shown in a widget, add this code to that widget:
Code:

<div id="time"></div>

Good luck! Thumb left
avatar
FiB

Title :
Gender : Male
Posts : 185
Points : 1214
Reputation : 14
Location : UK
Language : Eng
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : phpBB2
Awards :
View all awards
View user profile http://www.ourbulgariaforum.com

PostFiB on Tue 14 Feb 2017, 14:48

@Andrei34 I Followed your instructions but the clock is still only showing UK time in Bulgaria. Below is what I have in the clock widget, I also followed step (1)

Code:
<center>
    <iframe scrolling="no" clocktype="html5" style="overflow:hidden;border:0;margin:0;padding:0;width:100px;height:100px;" src="http://www.clocklink.com/html5embed.php?clock=005&timezone=GMT00&color=blue&size=100&Title=&Message=&Target=&From=2017,1,1,0,0,0&Color=blue" frameborder="no"> </iframe>
</center>
<div id="time">
</div>
avatar
Wolfuryo

Gender : Male
Posts : 230
Points : 1121
Reputation : 73
Language : Romanian and English
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : Other
Awards :
View all awards
View user profile

PostWolfuryo on Tue 14 Feb 2017, 15:39

Delete the javascript code that you added in first step, than remove all the code from the widget, adding this in it's place:
Code:
<script>$(document).ready(function(){
setInterval(function(){
$("#time").text(Date().split(" ")[4]);
}, 1000);
}</script><div id="time"></div>
avatar
FiB

Title :
Gender : Male
Posts : 185
Points : 1214
Reputation : 14
Location : UK
Language : Eng
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : phpBB2
Awards :
View all awards
View user profile http://www.ourbulgariaforum.com

PostFiB on Tue 14 Feb 2017, 17:27

@Andrei34 First of all thank you for all your help and patients Wink

This is what I now have in my Clock widget, is this correct? its the clock code and the code you created. If I remove all the clock code and only put yours in the widget then it does not show any clock. There is no difference to several members that I have asked to check the clock. here is a link to my forum portal http://www.ourbulgariaforum.com/portal

Code:
<center>
       <iframe scrolling="no" clocktype="html5" style="overflow:hidden;border:0;margin:0;padding:0;width:100px;height:100px;" src="http://www.clocklink.com/html5embed.php?clock=005&timezone=GMT00&color=blue&size=100&Title=&Message=&Target=&From=2017,1,1,0,0,0&Color=blue" frameborder="no"> </iframe>
</center><script>$(document).ready(function(){
        setInterval(function(){
        $("#time").text(Date().split(" ")[4]);
        }, 1000);
        }</script>
<div id="time">
   
</div>
avatar
Wolfuryo

Gender : Male
Posts : 230
Points : 1121
Reputation : 73
Language : Romanian and English
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : Other
Awards :
View all awards
View user profile

PostWolfuryo on Wed 15 Feb 2017, 13:33

Hello,

There are 2 problems with your code. First one is that you have to remove the old code. The code should be:
Code:
<script>$(document).ready(function(){
setInterval(function(){
$("#time").text(Date().split(" ")[4]);
}, 1000);
})</script>
<div id="time"></div>
When editing the code for the widget, make sure that Switch Editor Mode buttoon from the editor is clicked. If it's not clicked, the $ sign will be transformed into &#36.
If you don't manage to make it work, send me a pm with username and password of an admin account(it can be a simple admin account, not necessary the founder account).

Good luck!
avatar
FiB

Title :
Gender : Male
Posts : 185
Points : 1214
Reputation : 14
Location : UK
Language : Eng
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : phpBB2
Awards :
View all awards
View user profile http://www.ourbulgariaforum.com

PostFiB on Thu 16 Feb 2017, 06:36

I think I may have sorted it ? I will come back in a couple of days and let you know cheers
avatar
FiB

Title :
Gender : Male
Posts : 185
Points : 1214
Reputation : 14
Location : UK
Language : Eng
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : phpBB2
Awards :
View all awards
View user profile http://www.ourbulgariaforum.com

PostFiB on Thu 16 Feb 2017, 13:41

Just want to say a big thank you to @Andrei34 for all his help and support.

" THANKYOU "





avatar
Wolfuryo

Gender : Male
Posts : 230
Points : 1121
Reputation : 73
Language : Romanian and English
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : Other
Awards :
View all awards
View user profile

PostWolfuryo on Thu 16 Feb 2017, 14:48

@FiB wrote:
Just want to say a big thank you to @Andrei34 for all his help and support.

" THANKYOU "





Thanks you, bro! Smile

View previous topic View next topic Back to top

Create an account or log in to leave a reply

You need to be a member in order to leave a reply.

Create an account

Join our community by creating a new account. It's easy!


Create a new account

Log in

Already have an account? No problem, log in here.


Log in

 
Permissions in this forum:
You cannot reply to topics in this forum