How can I open link in new window please

I have just added Local Time Clock to my site at https://chat.christiangays.com.

When you click on the title bar or the actual clock you are taken to their website, which is great, except that my website is then lost.

I'd like to be able to open their link in a new window. I've been playing with the local_time_clock.php file with target="_blank" but without success.

Can you help me please.
Support access is granted.
Thank you.

  • Adam Czajczyk

    Hello Mary,

    I hope you're well today and thank you for your question!

    I checked your site and the plugin. The "target=_blank" attribute works fine there for the "clock title bar" so when you click on that blue bar above the clock it does open the site in a new tab. That's fine. However, the clock itself is a Flash animation and the link is most likely "hard coded" into the flash file and this makes it a bit more difficult to change.

    Since it's hard to edit the flash file itself it could be possible to edit the calling JS but in case of that plugin both - flash animation and JS script - are loaded directly from localtimes.info site which makes it unavailable for us. Therefore there's no easy way around, unfortunately.

    Have you considered switching to other plugin of that kind or e.g. implementing your own counter of that kind? I never used such widget on any of the sites but I can see that there some solutions around, both available as plugins and as plain CSS/JS solutions that could be rather easily turned into a simple WP Widget.

    Switching to CSS/JS based solution would be also beneficial because browser developers are turning into getting rid of Flash support at all and also many users are using various ad blocking ad ons that simply hide such flash animations.

    What do you think about it?

    Best regards,
    Adam

  • Adam Czajczyk

    Hello Mary!

    The clock is showing everyone's time in their time zone. I need it to be MY timezone. Any ideas?

    I checked the plugin and luckily it's easy to "hack" it to use your site's time zone instead of user's local time. By default, the clock is initialized with the time picked with JS from user's browser so I made a small change into the plugin's file and now it's reading the "initial" time from your WordPress settings.

    I attached a zip file to this post so in order to apply it to your site please follow these steps:

    - download the .zip archive and extract it to your local drive
    - access your server via FTP
    - upload the "LiveClockDateWidget.php" file from inside extracted archive (from your local drive) to the "/wp-content/plugins/live-clock-date/" folder on your server

    After refreshing the site it should start showing your local time (taken from site settings) to everyone.

    That being said, it's not recommended to make changes to the plugin core files but I think in this case it's justified :slight_smile: The plugin is very simple and even if an update comes up it would be very easy re-apply changes (please keep my file just in case).

    I hope that helps!

    Best regards,
    Adam

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.