This forum requires Javascript to be enabled for posting content
Select Forum
Formidable Plus
The Conference Plugin + addOns
Self Hosted Plugins
Formidable Plus
Top Quark Architecture
The Conference Plugin
The Conference App
My Conference Schedule
The Explorer App
poMMo Plus
New/Recently Updated Topics
Perform calculations in tables
Unable to Update – issue with entri…
How to check which cell in the tabl…
table add formidable date popup to …
How to change table column sizes
More than three columns
Add row button / trash button image…
Table display issue
Update produced errors during insta…
How to show “add row button” at fro…
Where is the documentation?
Show text above buttons on ABOUT sc…
TweetList will not load on mobile/3…
Speaker images not showing up in ap…
Just upgraded to 1.1.12, and now ap…
Display order of schedules
User
Post
11:48 am February 26, 2013
BenCrowley
Member
posts 13
If I look at the schedule for a 4 day event, with an spearate schedule for each day
the links at the top of the page seem to be alphabetically ordered instead of chronilogical.
Please can you let me know how to list the days in chronilogical order?
10:18 pm February 26, 2013
Top Quark
Barrie, ON
Member
posts 179
Hi Ben,
I responded to a similar question about this for The Explorer App in an email, and since sending it, I've thought of a more elegant way. In the functions.php file for your theme (or any customization plugin you might have going), add the following:
function my_sorter($a,$b){
if($a == "Update Day"){
return -1;
}
elseif($b == "Update Day"){
return 1;
}
elseif ($a == "Allied Professionals"){
return 1;
}
elseif($b == "Allied Professionals"){
return -1;
}
else{
return strcmp($a,$b);
}
}
add_filter('Smarty_Instance_resource_name','my_Smarty_resource_name',12,2);
function my_Smarty_resource_name($resource_name,$args){
$smarty = $args[0];
switch($resource_name){
case 'festivalapp.schedule.tpl':
case 'ifestivalapp.table.tpl':
$parm = ($resource_name == 'festivalapp.schedule.tpl' ? 'ScheduleNames' : 'Schedules');
$ScheduleNames = $smarty->get_template_vars($parm);
uasort($ScheduleNames,'my_sorter');
$smarty->assign($parm,$ScheduleNames);
break;
}
return $resource_name;
}
Basically what you're doing here is hooking into the piece of the code that displays the smarty template. If you're displaying either festivalapp.schedule.tpl (the template for the schedules page) or ifestivalapp.table.tpl (the template for the Explorer App), then you're going to resort (using the function uasort) the Schedule Names).
I think that's the best way to approach sorting schedule names by something other than alphabetical order.
Cheers
Trevor
Select Forum
Formidable Plus
The Conference Plugin + addOns
Self Hosted Plugins
Formidable Plus
Top Quark Architecture
The Conference Plugin
The Conference App
My Conference Schedule
The Explorer App
poMMo Plus
New/Recently Updated Topics
Perform calculations in tables
Unable to Update – issue with entri…
How to check which cell in the tabl…
table add formidable date popup to …
How to change table column sizes
More than three columns
Add row button / trash button image…
Table display issue
Update produced errors during insta…
How to show “add row button” at fro…
Where is the documentation?
Show text above buttons on ABOUT sc…
TweetList will not load on mobile/3…
Speaker images not showing up in ap…
Just upgraded to 1.1.12, and now ap…