-
AuthorPosts
-
April 15, 2014 at 12:48 pm #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 ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
April 16, 2014 at 7:55 am #531093The 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.
1 user says Thank You to Ninja Lead for this useful post
May 1, 2014 at 8:45 pm #533207Thanks 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 ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
May 6, 2014 at 8:51 am #533761AuthorPostsViewing 4 posts - 1 through 4 (of 4 total)This topic contains 4 replies, has 2 voices, and was last updated by Ninja Lead 10 years, 6 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum
Opening Hours Picture
Viewing 4 posts - 1 through 4 (of 4 total)