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.

 

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

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

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

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

Board Info

Board Stats:
 
Total Topics:
1679
Total Polls:
6
Total Posts:
5913
Dormant:
User Info:
 
Total Users:
10778
Newest User:
negina4qx
Members Online:
0
Guests Online:
193

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