Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • rodsdogs Friend
    #196778

    I am trying to implement a function on the site that means depending on the time of day, a different picture will be shown.

    My idea is that when the business is open, a .jpg of an open sign will be shown, when it’s closed a .jpg of a closed sign will be shown.

    Checking online, I’ve only been able to find paid extensions that will do this. Does anyone have any links to how we could code this? I think there’s probably a way to do it with coding and hosting the pictures on something like Imgur but thought this relies on another website.

    We’d only want to put it on the front page which should make it easier. Alternatively, if anyone knows a way we could put it in a module on every page we could try that as well. The URL of our dev site is http://www.mobileappsforlearning.com

    Any advice/tips/links would be greatly appreciated.

    Ninja Lead Moderator
    #531093

    The feature you mention is beyond scope of our service. It will need knowledge on PHP to implement such Opening Hours idea.

    If you wish to try with coding, hope some notes below would be of help.

    1) Convert the provided date into a timestamp.

    2) Use this along with the or w or N format (PHP’s date command) to tell you what day of the week it is.

    3) If it isn’t a “business day”, you can then increment the timestamp by a day (86400 seconds) and check again until you hit a business day.

    rodsdogs Friend
    #533207

    Thanks for the tip!

    I thought it would take some PHP coding, luckily I think this is within my skill set. I’ve found some code I think I can modify to get the functionality I need but I’ve got another problem.

    Our homepage at the moment only has two things showing in the main body of the page. The JA Slideshow Module and The Opening Times Module.

    I have also assigned an Article to it with some stock text but this isn’t showing. I can’t work out what I’m doing wrong, it says the article is published and access is set to public yet it doesn’t show up.

    I’m not sure what I’m doing wrong. Any advice?

    Ninja Lead Moderator
    #533761

    Mainbody in homepage is disabled via Home profile, you can set it displayed as in this screenshot.


    1. hide_menu
Viewing 4 posts - 1 through 4 (of 4 total)

This topic contains 4 replies, has 2 voices, and was last updated by  Ninja Lead 9 years, 11 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum