Make LISE to show one upcoming event

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
horki
Forum Members
Forum Members
Posts: 45
Joined: Tue Aug 12, 2008 12:12 pm

Make LISE to show one upcoming event

Post by horki »

HI,
I implemented LISE 1.4.2. as an Event-List, and it works fine when showing all events, which were added.
Now I want to display only the (one) next event coming up. So I need the current date somehow.
I tried {LISEEventListe xf_startmonth=1} in the content area, with different numbers (=months), it works, but how can I get the current month automatically from the system, without changing the content code every month?
There are also similar parameters for day and year. Can I combine them with the month parameter?

Thanks for help!
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1975
Joined: Mon Jan 29, 2007 4:47 pm

Re: Make LISE to show one upcoming event

Post by Jo Morg »

In Smarty you can use some PHP functions in two different ways, depending on some security policies settings:

Code: Select all

LISEEventListe xf_startmonth =  date('m')}
or

Code: Select all

LISEEventListe xf_startmonth =  'm'|date}
One is using the function directly on the tag, the other is using the PHP function as a Smarty modifier, although with some functions, the order of the parameters is not very intuitive and you should consult the Smarty docs site.

Note: not all PHP functions work though, as I said, depending on security policies settings, and that applies to both cases. There is a configuration setting for CMSMS to have Smarty accept a wider range of functions at the expense of some security but that actually depends on who you give access to the admin console. If you work alone or with a trusted group of people there is not much of an issue

Other LISE parameters can be used in combination (please refer to the module help) and you can use the same PHP function with a different parameter to retrieve the day or the year.

HTH
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
Post Reply

Return to “Modules/Add-Ons”