Welcome to the MetaMod and Chameleon Support Forums.

Before posting, please check out the FAQs.


ejacobson
Beginner Modder
ranks
useravatar
User Info

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;


Administrator has disabled public posting
metamodguy
useravatar
User Info

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

Administrator has disabled public posting

Board Info

Board Stats:   Total Users: 3088  Total Topics: 1195  Total Polls: 7  Total Posts: 4450  Total Posts Today: 2
User Info:   Newest User :  timothy.brown2@gmail.com   Members Online: 0   Guests Online: 81
Online  There are no members online
Topic
New
Locked
Topic
New
Locked
Sticky
Active
New/Active
Sticky
Active
New/Active
New/Closed
New Sticky
Closed/Active
New/Locked
New Sticky
Locked/Active
Active/Sticky
Sticky/Locked
Sticky Active Locked
Active/Sticky
Sticky/Locked
Sticky/Active/Locked