I finally updated the MF Gig Calendar with a few fixes (nasty little bugs…) and a few new features:
- I’ve improved the way the RSS feed works, giving you the option of how much content you want to include in your feed.
- I’ve also added a few more shortcode variables to customize exactly what events you want to display.
- A new Swedish translastion
- Plus a few other goodies…
Here is the current list of shortcodes – you’ll also find these on the “About” page in the plugin itself…
[mfgigcal id=event_id] – display only one specific event
[mfgigcal date=YYYY-MM-DD] – display events that are happening on a particular day
[mfgigcal range=YYYY-MM-DD:YYYY-MM-DD] – display a range of dates (START:END)
[mfgigcal days=#] – how many days of future events (including today) you want to display
[mfgigcal offset=#] – offset your list of upcoming events by a certain number of days
[mfgigcal limit=#] – limit the number of events to display
[mfgigcal title=true|false] – display the title and archive navigation – default is true
[mfgigcal rss=true|false] – display the link for the RSS feed – default is false
[mfgigcal sort=ASC|DESC] – set the order in which events are displayed – ascending (ASC) or descending (DESC) – default is ASC
Got your bug fixed in mf_gig_calendar.php about limit and offset. The right code is:
if ($limit ‘18576385629384657’) {
$sql .= ” LIMIT ” . $limit;
if ($offset) {
$sql .= ” OFFSET ” . $offset;
}
}
else if ($offset) {
$sql .= ” OFFSET ” . $offset;
}
The wrong code was:
// if ($limit && $offset) {
// $sql .= ” LIMIT ” . $offset . “,” . $limit;
// }
Cheers
Hi Chris. I’ll look into this and push an update. Thanks for catching it! -mf
Actually – you know it was even easier than that. Didn’t need the “if clause” at all since I set defaults. Silly me. This works by itself.
$sql .= ” LIMIT ” . $limit . ” OFFSET ” . $offset;
Updating the plugin now…