Welcome to the MetaMod and Chameleon Support Forums.

Before posting, please check out the FAQs.


foolevil
Beginner Modder
ranks
useravatar
User Info

Daily roll, switch by hour or every 4# hour

I played around but since I found no documentation I couldnt make it work. It stuck with last rule, or didnt follow rules. Thank you.


Administrator has disabled public posting
metamodguy
useravatar
User Info

Re: Daily roll, switch by hour or every 4# hour

Hi foolevil,

Documentation:

There's a guide for MetaTemplate Pro which covers all the basics of MetaTemplate as well - http://www.metamodpro.com/metatemplate/documentation

The main difference between MT and MTP is that in MT you have to code most things in PHP.

Thankfully the PHP is relatively simple thanks to a system that's part of MT called JomGenius. This gives some much simplified ways of dealing with date & time (in your case), and much more besides.

There are examples of date/time things on the JomGenius page: http://www.metamodpro.com/jomgenius/parameters

Also, there's a page of "recipes" for date and time things. The page was written for MetaMod (which deals with modules), but almost exactly the same code works for MetaTemplate as well. At the end of each rule, instead of using "return XXX;" (where XXX is a module id), you just need to use "return true;" to make the rule succeed, or "return false;" to make the rule fail.

See here: http://www.metamodpro.com/metamod/recip … time-rules

I hope that gets you going. Please post back with examples of what you're using, and an explanation of what you want to achieve, if you want help with it.

Cheers,
Stephen


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: 3085  Total Topics: 1195  Total Polls: 7  Total Posts: 4450  Total Posts Today: 2
User Info:   Newest User :  zaraninfo1   Members Online: 0   Guests Online: 169
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