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.

 

Switch between Live and Archive broadcasts - time controlled

Switch between Live and Archive broadcasts - time controlled

I don't fully understand this tool yet. All I need is the time controls. I have a module position to show videos, a live broadcast from ustream and an archived video from vimeo. I need to have the live broadcast module (61) show on sunday's between 9:15am - 12:45pm and have the archive module (60) shown when the live broadcast is over.

I have tried a recipe (if ( MM_TIME <= 91500 && MM_TIME > 124500 && MM_DAY_OF_WEEK == 0 ) return 60;) and placed the two module ids in the quick id include field. Both modules show up at the same time. Also had the modules either disabled or enabled. Plus other random settings. Nothing seemed to work like I need it too but know it is possible. Anyone have the knowledge to make this work?

jameswagoner
Beginner Modder
ranks
useravatar
Offline
3 Posts
Administrator has disabled public posting

Re: Switch between Live and Archive broadcasts - time controlled

Hi James,

date and time rules are notoriously difficult to get the logic right - you're not alone!

I'd do it this way:

if ( MM_TIME >= 91500 and MM_TIME <= 124500 and MM_DAY_OF_WEEK == 0) return 61;
else return 60;

Then DON'T put any modules into the Quick Module ID Include box. Just let the PHP do its magic.
- and, keep modules 60 and 61 disabled, but in MetaMod (which has to be enabled) set the Auto-enable Included Modules to All Included Modules.

That should work :-)

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
3328 Posts
User info in posts
Administrator has disabled public posting

Re: Switch between Live and Archive broadcasts - time controlled

I did try the else return 60; but i didn't have the all modules selected and had 60,61 in the quick id. I will try your suggestion and report back. Thanks for the quick response

jameswagoner
Beginner Modder
ranks
useravatar
Offline
3 Posts
Administrator has disabled public posting

Re: Switch between Live and Archive broadcasts - time controlled

Success! well in an odd way. I had to reverse the ids in the statement. so it looks backwards, but displays correctly on the page. And I did confirm my module ID numbers too. Oh well. Thanks again.

jameswagoner
Beginner Modder
ranks
useravatar
Offline
3 Posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1679
Total Polls:
6
Total Posts:
5933
Posts this week:
3
User Info:
 
Total Users:
4397
Newest User:
tull687318
Members Online:
0
Guests Online:
153

Online: 
There are no members online

Forum Legend:

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