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.

 

Recipe Trouble.....

Recipe Trouble.....

What I am trying to get is:

user group "wholesale" has access Monday 6am till 3pm and Wednesday 6am till 3pm

______________

if (
$user->usertype == "wholesale" &&
(
(MM_HOUR >= 6 && MM_HOUR <= 15 && MM_DAY_OF_WEEK == 0) or

(MM_HOUR >= 6 && MM_HOUR <= 15 && MM_DAY_OF_WEEK == 3)
)
)

return 58;

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

Re: Recipe Trouble.....

Almost right - except the day 0 is Sunday, not Monday. Try this:

Code:

if ( 

  $user->usertype == "wholesale" &&
  (
    (MM_HOUR >= 6 && MM_HOUR <= 15 && MM_DAY_OF_WEEK == 1) or
    (MM_HOUR >= 6 && MM_HOUR <= 15 && MM_DAY_OF_WEEK == 3)
  )
)
return 58;

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

Board Info

Board Stats:
 
Total Topics:
1666
Total Polls:
6
Total Posts:
5909
Dormant:
User Info:
 
Total Users:
10095
Newest User:
johnson58
Members Online:
0
Guests Online:
91

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