Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.
- Index
- » MetaMod
- » MetaMod General Support
- » Problems with different modules per...
Problems with different modules per day (time-managed)
Problems with different modules per day (time-managed)
Hi!
I´ve an internetradio and want to show the correct picture of the current show per metamod.
Here is my example, but it doesn´t work...
if ( MM_DAY_OF_WEEK ==1 & $core_genius->inTimeSpan( "00:00 - 18:00" ))
return 117;
if ( MM_DAY_OF_WEEK ==1 & $core_genius->inTimeSpan( "18:00 - 20:00" ))
return 114;
if ( MM_DAY_OF_WEEK ==1 & $core_genius->inTimeSpan( "20:00 - 00:00" ))
return 117;
if ( MM_DAY_OF_WEEK ==2 & $core_genius->inTimeSpan( "00:00 - 18:00" ))
return 117;
if ( MM_DAY_OF_WEEK ==2 & $core_genius->inTimeSpan( "18:00 - 20:00" ))
return 113;
if ( MM_DAY_OF_WEEK ==2 & $core_genius->inTimeSpan( "20:00 - 22:00" ))
return 116;
if ( MM_DAY_OF_WEEK ==2 & $core_genius->inTimeSpan( "22:00 - 00:00" ))
return 117;
if ( MM_DAY_OF_WEEK ==3 & $core_genius->inTimeSpan( "00:00 - 20:00" ))
return 117;
if ( MM_DAY_OF_WEEK ==3 & $core_genius->inTimeSpan( "20:00 - 22:00" ))
return 111;
if ( MM_DAY_OF_WEEK ==3 & $core_genius->inTimeSpan( "22:00 - 00:00" ))
return 117;
if ( MM_DAY_OF_WEEK ==4 & $core_genius->inTimeSpan( "00:00 - 20:00" ))
return 117;
if ( MM_DAY_OF_WEEK ==4 & $core_genius->inTimeSpan( "20:00 - 22:00" ))
return 110;
if ( MM_DAY_OF_WEEK ==4 & $core_genius->inTimeSpan( "22:00 - 00:00" ))
return 117;
if ( MM_DAY_OF_WEEK ==5 & $core_genius->inTimeSpan( "00:00 - 20:00" ))
return 117;
if ( MM_DAY_OF_WEEK ==5 & $core_genius->inTimeSpan( "20:00 - 22:00" ))
return 112;
if ( MM_DAY_OF_WEEK ==5 & $core_genius->inTimeSpan( "22:00 - 00:00" ))
return 117;
if ( MM_DAY_OF_WEEK ==6)
return 117;
if ( MM_DAY_OF_WEEK ==7 & $core_genius->inTimeSpan( "00:00 - 20:00" ))
return 117;
if ( MM_DAY_OF_WEEK ==7 & $core_genius->inTimeSpan( "20:00 - 22:00" ))
return 115;
if ( MM_DAY_OF_WEEK ==7 & $core_genius->inTimeSpan( "22:00 - 00:00" ))
return 117;
I want to show an Mondays 00:00 until 18:00 the return 117
from 18:00 until 20:00 return 114 and from 20:00 until 00:00 return 117
but my example doesn´t work.
Who can help me pls, so that I can show different returns per day?
This example means of repeatly every week.
Thx
Thorsten
Re: Problems with different modules per day (time-managed)
Hi Thorsten,
when you say that this does not work, what actually happens? Is it showing no modules at all? Or modules at the wrong time of the day? There may be issues regarding the time zone setting of your server. Or there may be a basic setup error... have you set your target modules (115, 117 etc) to display on "menu items:none"? And is your MetaMod published?
Something I noticed is that you are using & instead of &&. I would recommend && as it will be much more efficient in cases like the one you are using. With &, the core_genius code will be run for every line of code. With &&, it will be run only when the day of week matches.
Hope that helps,
Stephen
- Index
- » MetaMod
- » MetaMod General Support
- » Problems with different modules per...
Board Info
- Board Stats:
- Total Topics:
- 1689
- Total Polls:
- 6
- Total Posts:
- 5942
- Posts this week:
- 2
- User Info:
- Total Users:
- 7630
- Newest User:
- welch84998
- Members Online:
- 0
- Guests Online:
- 102
- 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