Today in history idea

5 posts by 3 authors in: Forums > CMS Builder
Last Post: June 20, 2016   (RSS)

By Damon - June 10, 2016

Hi Jesus,

There will be some custom coding to create a widget that randomly shows events from today in history.

Here is the rough overview of what is needed:

  1. Table of historic events in CMS Builder. For the date format you will need the month, day and year. The year isn't going to be as important as you will only be checking for matching month and day.
  2. Get the current date month and day using PHP. Add those into variables you can pass into a where query.
  3. Use a where query in your load records code to only return records that have a date (month and day) that match today (month and day).
  4. Randomize the results: 
    'orderBy' => 'RAND()',
  5. Limit the random results to returning just one record:
    'limit' => '1',

How does this sounds?

Cheers,
Damon Edis - interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

By Jesus - June 10, 2016

Like a great idea, will start working on this. Will let you know how it goes

Thanks!

By Toledoh - June 16, 2016

Hey Jesus.

It may be worth reviewing http://www.interactivetools.com/forum/forum-posts.php?Opening-Hours-80581 as I think it could help you.

Cheers,

Tim (toledoh.com.au)

By Jesus - June 20, 2016

Thank you pal, will give this a try!

Jesus