Welcome to the MetaMod and Chameleon Support Forums.

Before posting, please check out the FAQs.

helpme

 

Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.

 

visibility of different modules at different times

visibility of different modules at different times

Hi M2G,

I've downloaded MetaMod and eager to get my teeth into it. I know very little PHP, but then I knew very little CSS when I started.

I'm working on a website that requires some of the modules to be shown during specified time periods throughout the week,as follows:

Monday, 21:00 to Tuesday, 06:00
Tuesday, 21:00 to Wednesday, 00:00
Thursday, 21:00 to Friday, 00:00
Saturday, 16:00 to 21:00
Sunday, 13:00 to 17:00

Can MetaMod do this?

Many thanks. I look forward to your reply.

Edited By: essiele
14-Sep-12 03:30:22

essiele
Beginner Modder
ranks
useravatar
Offline
1 Posts
Administrator has disabled public posting

Re: visibility of different modules at different times

Hi Essiele,

I just helped someone else with a similar setup... but yours is easier!

Here's a good way to do it:

if ($core_genius->inTimeSpan("mon 21:00 - tue 06:00)) return AAA;
if ($core_genius->inTimeSpan("tue 21:00 - wed 00:00)) return BBB;
if ($core_genius->inTimeSpan("thu 21:00 - fri 00:00)) return CCC;
if ($core_genius->inTimeSpan("sat 16:00 - sat 21:00)) return DDD;
if ($core_genius->inTimeSpan("sun 13:00 - sun 17:00)) return EEE;

Replace AAA-EEE with the module IDs of the modules that you want to display in each of those time periods.
Don't forget to read the Quick Start guide, epecially the part about disabling the "target" modules so they don't display until/unless the MetaMod includes them.

http://www.metamodpro.com/metamod/quick-start

Best regards,
Stephen

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

metamodguy
useravatar
Offline
3314 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1691
Total Polls:
6
Total Posts:
5912
Total Posts Today:
6
User Info:
 
Total Users:
11527
Newest User:
david9684
Members Online:
3
Guests Online:
151


Forum Legend:

 Topic
 New
 Locked
 Sticky
 Active
 New/Active
 New/Locked
 New Sticky
 Locked/Active
 Active/Sticky
 Sticky/Locked
 Sticky/Active/Locked