LATEST NEWS AND HIGHLIGHTS

Tabs

Fri Nov 15
12:00 PM
St. Cloud Technical CC
at TBA
National Tournament in Rochester, MN
Fri Nov 15
2:00 PM
Jefferson Community College
at Central Lakes
Fri Nov 15
There was a problem with a Velocity script
Pagescoreboard-slider-template
ErrorInvocation of method 'substring' in class java.lang.String threw exception java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at scoreboard-slider-template[line 229, column 29]
Page source:
1: #set ($id = "scoreboard-slider")
2: #if ($request.getParameter("id"))
3:   #set ($idParam = $request.getParameter("id"))
4:   #set ($id = "${id} ${idParam}")
5: #end
6: 
7: ## PICK UP OPTIONS
8: $website.include("options")
9: #set ($options = $request.getAttribute("options"))
10: 
11: #set ($hideExhibition = false)
12: #if ($options.get("schedule_hide_exhibition_events") == true)
13:   #set ($hideExhibition = true)
14: #end
15: 
16: #if ($request.getParameter("hideExhibition"))
17:   #set ($hideExhibition = $request.getParameter("hideExhibition"))
18: #end
19: 
20: #set ($linksOrder = ["RC", "BS", "RE", "GA", "AU", "VI", "LS", "DI", "TI", "PR"])
21: #set ($excludeLinksWhenEventIsFinished = ["LS", "DI", "TI", "PR"])
22: #set ($excludeLinksWhenEventIsLive = ["DI", "TI", "PR"])
23: 
24: #set ($showVsAt = true)
25: #if ($options.get("schedule_hide_vs_at") == true)
26:   #set ($showVsAt = false)
27: #end
28: 
29: #set ($includeTimeZone = false)
30: #if ($options.get("calendarIncludeTimeZone"))
31:   #set ($includeTimeZone = $options.get("calendarIncludeTimeZone").toLowerCase())
32: #end
33: 
34: #set ($showTeamLogo = false)
35: #if ($request.getParameter("showTeamLogo") == true)
36:   #set ($showTeamLogo = true)
37: #end
38: 
39: #set ($showJustOpponent = false)
40: #if ($request.getParameter("showJustOpponent") == true)
41:   #set ($showJustOpponent = true)
42: #end
43: 
44: #set ($resultFormat = "AP1")
45: #if ($options.get("schedule_result_format").equals("L, 1-2"))
46:   #set ($resultFormat = "AP2")
47: #end
48: 
49: #set ($dateFormat = "'<span>'EEE'</span> <span>'MMM'</span> <span>'dd'</span>'")
50: #if ($request.getParameter("dateFormat"))
51:   #set ($dateFormat = $request.getParameter("dateFormat"))
52: #end
53: 
54: #set ($restrictLinks = true)
55: #if ($options.get("schedule_restrict_links") == false)
56:   #set ($restrictLinks = false)
57: #end
58: 
59: #set ($linksAbbreviations = { "Preview": "PR", "Box Score": "BX", "Results": "R", "Recap": "RC", "Live stats": "LS", "Video": "V", "Audio": "A", "Photos": "PH", "Tickets": "T", "Directions": "DR" })
60: 
61: #set ($showLinkIcons = false)
62: #if ($request.getParameter("showLinkIcons") == true)
63:   #set ($showLinkIcons = true)
64: #end
65: 
66: #set ($abbreviatedLinks = false)
67: #if ($request.getParameter("abbreviatedLinks") == true)
68:   #set ($abbreviatedLinks = true)
69: #end
70: 
71: #set ($autoScroll = false)
72: #if ($request.getParameter("autoScroll") == true)
73:   #set ($autoScroll = true)
74: #end
75: 
76: #set ($showNavi = false)
77: #if ($request.getParameter("showNavi") == true)
78:   #set ($showNavi = true)
79: #end
80: 
81: #set ($autoInterval = 4000)
82: #if ($tool.math.toInteger($request.getParameter("autoInterval")) > 0)
83:   #set ($autoInterval = $tool.math.mul($request.getParameter("autoInterval", 1000)))
84: #end
85: 
86: #set ($circularScroll = false)
87: #if ($request.getParameter("circularScroll") == true)
88:   #set ($circularScroll = true)
89: #end
90: 
91: #set ($colLimit = 5)
92: #if ($tool.math.toInteger($request.getParameter("colLimit")))
93:   #set ($colLimit = $tool.math.toInteger($request.getParameter("colLimit")))
94: #end
95: 
96: #set ($showPlayPause = false)
97: #if ($request.getParameter("showPlayPause") == true)
98: 	#set ($showPlayPause = true)
99: #end
100: 
101: #set ($fullSchedulePos = "bottom")
102: #set ($fullSchedulePos = $request.getParameter("fullSchedulePos"))
103: 
104: #set ($today = $now)
105: 
106: #set ($slickSlider = false)
107: #if ($request.getParameter("slickSlider") == true)
108:   #set ($slickSlider = true)
109: #end
110: 
111: ################################ MACROS #####################################
112: #macro (printTeamLogo $team)
113:   #if ($showTeamLogo)
114:     #if ($team.teamId)
115:       <span class="team-logo"><img src="${website.teamLogo($team.teamId)}" alt="" /></span>
116:     #end
117:   #end
118: #end
119: 
120: #macro (printVa $event $count)
121:     #if ($event.teams.size() == 1)
122:         #if ($showVsAt && ($event.neutralSite.length() > 0 || !$event.home))
123:             <span class="va">at</span>
124: 		#end
125:     #else
126:         #if ($count == 2 || $count.length() == 0)
127:             #if ($event.neutralSite.length() > 0 || $event.home)
128: 				<span class="va">vs.</span>
129:             #else
130: 				<span class="va">at</span>
131:             #end
132: 		#end
133: 	#end
134: #end
135: 
136: #macro (printLinkAriaLabel $event $link $linkTypeCounter)
137: 	#set ($ariaLabel = "${event.sport} event: ${formatter.formatDate($event.date, 'MMMM d hh:mm a:')}")
138: 	#if ($event.neutralSite.length() > 0 || $event.home)
139: 		#set ($vsOrAt = "vs.")
140: 	#else
141: 		#set ($vsOrAt = "at")
142: 	#end
143: 	#if ($event.teams.size() > 1)
144: 		#set ($ariaLabel = "${ariaLabel} ${event.teams.get(0).name} ${vsOrAt} ${event.teams.get(1).name}:")
145: 	#elseif ($event.teams.size() == 1)
146: 		#set ($ariaLabel = "${ariaLabel} ${event.teams.get(0).name}:")
147: 	#end
148: 	#if ($event.neutralSite.length() > 0)
149: 		#set ($ariaLabel = "${ariaLabel} @ ${event.neutralSite}:")
150: 	#end
151: 	#set ($ariaLabel = "${ariaLabel} ${link.name}")
152: 	#if ($linkTypeCounter > 1)
153: 	    #set ($ariaLabel = "${ariaLabel} link ${linkTypeCounter}")
154: 	#end
155: 	aria-label="$ariaLabel"
156: #end
157: 
158: #macro (printEventLinks $event $useContainer $useList)
159: 	#set ($eventLinks = [])
160: 
161: 	#set ($isFinished = false)
162:     #if ($event.statusCode >= 0 || ($event.statusCode == -3 && $now.time >= ($event.date.time + (1000*60*60*24)))) ## -3 is reported for event sports
163:         #set ($isFinished = true)
164:     #end
165: 
166:     #if ($restrictLinks && ($event.inProgress || $isFinished))
167:         #foreach ($link in $event.links)
168:             #if ($event.inProgress && !$excludeLinksWhenEventIsLive.contains($link.mapType))
169:                 #set ($ignoreme = $eventLinks.add($link))
170:             #elseif ($isFinished && !$excludeLinksWhenEventIsFinished.contains($link.mapType))
171:                 #set ($ignoreme = $eventLinks.add($link))
172:             #end
173:         #end
174:     #else
175:         #set ($eventLinks = $event.links)
176: 	#end
177: 
178: 	#if ($useContainer == true)
179: 		<div #if ($eventLinks.size() > 0) class="links" #else class="links empty" #end>
180: 	#end
181: 		#if ($useList == true)<ul>#end
182: 			#set ($linksCounter = 0)
183: 			#foreach ($mapType in $linksOrder)
184: 				#set ($linkTypeCounter = 0)
185: 				#foreach ($link in $eventLinks)
186: 					#if ($mapType == $link.mapType)
187: 						#set ($linksCounter = $linksCounter + 1)
188: 						#set ($linkTypeCounter = $linkTypeCounter + 1)
189: 						#if ($linksCounter > 1)
190: 							<span class="sep"> | </span>
191: 						#end
192: 						#set ($linkText = $link.name)
193: 						#if ($abbreviatedLinks)
194: 							#foreach ($l in $linksAbbreviations.entrySet())
195: 								#if ($link.name.equalsIgnoreCase($l.key))
196: 									#set ($linkText = $l.value)
197: 								#end
198: 							#end
199: 						#end
200: 						#if ($useList == true)<li>#end
201: 							<a #printLinkAriaLabel($event, $link, $linkTypeCounter) href="$link.url" #if ($website.isExternalLink($link.url)) target="_blank" #end>
202: 							#if ($showLinkIcons)
203: 								<i class="icon gicon-${link.mapType.toLowerCase()}" title="$link.name"></i>
204: 							#end
205: 								<span class="text">$linkText</span>
206: 							</a>
207: 						#if ($useList == true)</li>#end
208: 					#end
209: 				#end
210: 			#end
211: 		#if ($useList == true)</ul>#end
212: 	#if ($useContainer == true)
213: 		</div>
214: 	#end
215: #end ## printEventLinks
216: 
217: #macro (printSport $event)
218:   #set ($feedURL = $event.feedURL)
219: 
220:   #set ($feedURL = $event.feedURL) ## in the form http://www.somedomain.com/sports/mbkb/2014-15/schedule?tmpl=sfs-template
221:   #if ($feedURL.indexOf("://") >= 0)
222:     #set ($feedURL = $feedURL.split("//").get(1)) ## remove the http:// bit from the URL
223:   #end
224:   #set ($startIndex = $feedURL.indexOf("/"))
225:   #set ($endIndex = $feedURL.length())
226:   #if ($feedURL.lastIndexOf("?") >= 0)
227:     #set ($endIndex = $feedURL.lastIndexOf("?"))
228:   #end
229:   #set ($feedURL = $feedURL.substring($startIndex, $endIndex)) ## remove the domain and tmpl parts
230: 
231:   #if ($website.exists($feedURL))
232: 	#set ($ariaLabel = "${event.sport}: schedule")
233:     #if ($feedURL.matches("/sports/.*/\d{4}-\d{2}/.*"))
234:       #set ($seasonStr = $feedURL.split("/").get(3))
235:       #set ($ariaLabel = "${event.sport}: ${seasonStr} schedule") ## aria-label would be something like Men's Basketball 2017-18 schedule
236:     #end
237: 
238:     <a href="${feedURL}" aria-label="$ariaLabel">$event.sport</a>
239:   #else
240:     <span>$event.sport</span>
241:   #end
242: #end
243: 
244: #macro (printEvent $event)
245: 
246: #set ($eventClass = "event")
247: #if ($event.inProgress)
248:   #set ($eventClass = "event in-progress")
249: #end
250: 
251: #if ($event.scheduleTeamId.length() > 0)
252:   #set ($teamSchedule = true)
253: #else
254:   #set ($teamSchedule = false)
255: #end
256: 
257: <div class="${eventClass}">
258: 
259:   <div class="date clearfix">$formatter.formatDate($event.date, $dateFormat)</div>
260: 
261:   #if ($event.sport)
262:     <div class="sport">
263: 		#printSport($event)
264:     </div>
265:   #end
266: 
267:   <div class="status clearfix">
268:   #if ($includeTimeZone)
269:     #if ($includeTimeZone.contains("local"))
270:       <span>$formatter.formatStatus($event).setTimeFormat("h:mm a z").useEventTimeZone()</span>
271:     #elseif ($includeTimeZone.contains("site"))
272:       <span>$formatter.formatStatus($event).setTimeFormat("h:mm a z")</span>
273:     #end
274:   #else
275:     <span>$formatter.formatStatus($event)</span>
276:   #end
277:   </div>
278: 
279:   #if ($showJustOpponent && $teamSchedule)
280:     <div class="opponent clearfix">
281:       #printTeamLogo($event.opponent)
282:       #printVa($event "")
283:       <span class="name">$event.opponent.name</span>
284: 
285:       #set ($APResult = "")
286:       #if ($resultFormat.equals("AP1"))
287:         #set ($APResult = $event.APResult)
288:       #elseif ($resultFormat.equals("AP2"))
289:         #set ($APResult = $event.AP2Result)
290:       #end
291: 
292:       #if (!$event.inProgress && $APResult.length() > 0)
293:         <span class="result">$APResult</span>
294:       #else
295:         #if ($event.result.toString().length() > 0)
296:             <span class="result">$event.result</span>
297:         #end
298:       #end
299:     </div>
300:   #else
301:     #foreach ($team in $event.teams)
302:   	  #set ($teamClass = "team")
303:   	  #if ($event.winner.name.length() > 0)
304:     	#if ($event.winner.name == $team.name)
305:       		#set ($teamClass = "${teamClass} winner")
306:     	#else
307:       		#set ($teamClass = "${teamClass} loser")
308:     	#end
309:   	  #end
310:   	  #if ($event.teams.size() == 2 && $teamSchedule)
311:   	  	#if ($team.teamId == $event.scheduleTeamId)
312:   	  		#set ($teamClass = "${teamClass} site-team")
313:   	  	#end
314:   	  #end
315:       <div class="$teamClass clearfix">
316:         #if ($team.result.length() > 0 && $event.teams.size() > 1) ## ideally this should check if the event is associated to a schedule with numeric results
317:           <span class="score">$team.result</span>
318:         #end
319: 
320:         #printTeamLogo($team)
321:         #printVa($event $velocityCount)
322:         <span class="name">$team.name</span>
323: 
324:         #if ($event.teams.size() == 1 && $event.result.toString().length() > 0)
325:           <span class="result">$event.result</span>
326:         #end
327:       </div>
328:     #end
329:   #end
330: 
331:   #if ($event.neutralSite.length() > 0 || $event.notes.length() > 0)
332:     <div class="neutralsite-notes">
333:       #if ($event.neutralSite.length() > 0)
334:         <span class="neutral-site">@ $event.neutralSite</span>
335:       #end
336:       #if ($event.notes.length() > 0)
337:         <span class="notes">$event.notes</span>
338:       #end
339:     </div>
340:   #end
341: 
342:   #printEventLinks($event, true, false)
343: </div>
344: #end ## printEvent
345: 
346: #macro (printEventBox $event)
347:   #set ($eventServerDate = $tool.timeZone.shift($event.date, $event.localTimeZone, $tool.timeZone.systemTimeZone))
348:   #set ($eventBoxClass = "event-box")
349:   #if ($eventServerDate.before($today))
350:     #set ($eventBoxClass = "${eventBoxClass} result")
351:   #else
352:     #set ($eventBoxClass = "${eventBoxClass} upcoming")
353:   #end
354:   #if ($event.inProgress)
355:     #set ($eventBoxClass = "${eventBoxClass} inprogress")
356:   #end
357:   #if ($event.neutralSite.length() > 0)
358:     #set ($eventBoxClass = "${eventBoxClass} neutral")
359:   #elseif ($event.home)
360:     #set ($eventBoxClass = "${eventBoxClass} home")
361:   #else
362:     #set ($eventBoxClass = "${eventBoxClass} away")
363:   #end
364:   #if ($event.teams.size() == 2)
365:     #set ($eventBoxClass = "${eventBoxClass} h2h")
366:   #else
367:     #set ($eventBoxClass = "${eventBoxClass} meet")
368:   #end
369: 
370:   ## CODE TO EXTRACT SPORT SECTION FROM $event.feedURL
371:   #set ($feedURL = $event.feedURL)
372:   #if ($feedURL.startsWith("http://"))
373:     #set ($feedURL = $feedURL.substring(7, $feedURL.length())) ## remove http://
374:   #elseif ($feedURL.startsWith("https://"))
375:     #set ($feedURL = $feedURL.substring(8, $feedURL.length())) ## remove https://
376:   #end
377:   #set ($startIndex = $feedURL.indexOf("/"))
378:   #set ($endIndex = $feedURL.length())
379:   #set ($feedURL = $feedURL.substring($startIndex, $endIndex))
380:   #set ($feedURL = $feedURL.split("/"))
381:   #if ($feedURL.size() >= 3)
382:     #set ($eventBoxClass = "${eventBoxClass} ${feedURL.get(2)}")
383:   #end
384: 
385:   <div class="${eventBoxClass}">
386:     #printEvent($event)
387:   </div>
388: #end ## printEventBox
389: 
390: #macro (printEmptyEventBox)
391: <div class="event-box empty">
392:   <div class="event">
393:     <span class="no-event">No Event</span>
394:   </div>
395: </div>
396: #end
397: 
398: ############################### END MACROS #############################################
399: 
400: #set ($events = [])
401: #set ($prevCount = 0)
402: #set ($upcomingCount = 0)
403: #set ($eventCount = 0)
404: 
405: ## filter out exhibition events and count the number of previous and upcoming events
406: #foreach ($event in $schedule.events)
407:   #if ($event.date && ($event.overall || !$hideExhibition))
408:     #set ($eventServerDate = $tool.timeZone.shift($event.date, $event.localTimeZone, $tool.timeZone.systemTimeZone))
409:     #if ($eventServerDate.before($today))
410:       #if ($events.add($event))
411:         #set ($prevCount = $prevCount + 1)
412:       #end
413:     #else
414:       #if ($events.add($event)) ## upcoming events include events for today
415:         #set ($upcomingCount = $upcomingCount + 1)
416:       #end
417:     #end
418:   #end
419: #end
420: 
421: #set ($eventCount = $events.size())
422: #if ($eventCount > 0)
423:   #set ($events = $tool.sorter.sort($events, "date")) ## sort dates chronologically
424: #end
425: 
426: ## print event boxes for slick slider
427: #if ($slickSlider)
428: 
429:     #if ($eventCount == 0)
430:       <div class="no-events">No events to show.</div>
431:     #else
432:       #foreach ($event in $events)
433:         #printEventBox($event)
434:       #end
435:     #end
436: 
437: #else
438: 
439:     #set ($slideCount = $tool.math.ceil($tool.math.div($eventCount, $colLimit))) ## total number of slides based on the available number of events
440:     #set ($emptyCount = $tool.math.sub($tool.math.mul($slideCount, $colLimit), $eventCount)) ## total number of items possible - total number of events available
441:     #set ($emptyCountStart = 0)
442:     #set ($emptyCountEnd = 0)
443: 
444:     #if ($prevCount > 0 && $upcomingCount > 0) ## when both previous and upcoming events are available, the layout should preferably show a default slide that contains both previous and upcoming events
445:       #set ($desiredPrevEventsInFocusedSlide = $colLimit / 2)
446:       #set ($availablePrevEventsInFocusedSlide = $prevCount % $colLimit)
447: 
448:       #if ($availablePrevEventsInFocusedSlide < $desiredPrevEventsInFocusedSlide)
449:         #set ($emptyCountStart = $desiredPrevEventsInFocusedSlide - $availablePrevEventsInFocusedSlide)
450:       #elseif ($availablePrevEventsInFocusedSlide > $desiredPrevEventsInFocusedSlide)
451:         #set ($emptyCountStart = ($colLimit - $availablePrevEventsInFocusedSlide) + $desiredPrevEventsInFocusedSlide)
452:       #end
453: 
454:       #if ($emptyCountStart > 0) ## re-count the number of slides
455:         #set ($slideCount = $tool.math.ceil($tool.math.div($tool.math.add($eventCount, $emptyCountStart), $colLimit)))
456:       #end
457: 
458:       #set ($emptyCountEnd = $tool.math.sub($tool.math.mul($slideCount, $colLimit), $tool.math.add($eventCount, $emptyCountStart)))
459:       #set ($focusedIndex = $tool.math.ceil($tool.math.div($tool.math.add($prevCount, $emptyCountStart), $colLimit)))
460: 
461:     #elseif ($prevCount > 0) ## only previous events are available
462:       #set ($focusedIndex = $slideCount) ## focused slide is the last slide in the list that have most recent past events
463:       #set ($emptyCountStart = $emptyCount)
464:     #elseif ($upcomingCount > 0) ## only upcoming events are available
465:       #set ($focusedIndex = 1)
466:       #set ($emptyCountEnd = $emptyCount)
467:     #end
468: 
469:     #if ($slideCount <= 1)
470:         #set ($autoScroll = false)
471:         #set ($circularScroll = false)
472:     #end
473: 
474:     <div class="${id}"  data-module="jslider" data-focus="$tool.math.sub($focusedIndex, 1)" data-auto="$autoScroll" data-interval="${autoInterval}" data-circular="$circularScroll" data-navi="${showNavi}" data-items=".slides">
475: 
476:     #if ($eventCount == 0)
477:       <div class="no-events">No events to show.</div>
478:     #else
479: 
480:     #if ($fullSchedulePos == "top")
481:         <a href="$page.url" class="full-schedule-btn">View Full Schedule</a>
482:     #end
483: 
484:     <a href="javascript:void(0)" role="button" aria-label="move to previous slide" class="prev">Previous</a>
485:     <a href="javascript:void(0)" role="button" aria-label="move to next slide" class="next">Next</a>
486:     #if ($showPlayPause)
487:     	#set ($ppClass = "pp play")
488:     	#if ($autoScroll)
489:     		#set ($ppClass = "pp pause")
490:     	#end
491:     	<a href="javascript:void(0)" role="button" class="${ppClass}">pp</a>
492:     #end
493: 
494:     <div class="slider">
495:     <div class="slides clearfix">
496: 
497:     ## #set ($slideIndex = 1)
498:     #set ($colIndex = 0)
499: 
500:     <div class="slide">
501:     <div class="slide-content clearfix">
502: 
503:     #if ($emptyCountStart > 0)
504:       #foreach ($i in [1..$emptyCountStart])
505:         #set ($colIndex = $colIndex + 1)
506:         #printEmptyEventBox
507:       #end
508:     #end
509: 
510:     #foreach ($event in $events)
511:       #set ($colIndex = $colIndex + 1)
512:       #if ($colIndex > $colLimit)
513:         ## #set ($slideIndex = $slideIndex + 1)
514:         #set ($colIndex = 1)
515:         </div></div>
516:         <div class="slide">
517:         <div class="slide-content clearfix">
518:       #end
519:       #printEventBox($event)
520:     #end
521: 
522:     #if ($emptyCountEnd > 0)
523:       #foreach ($i in [1..$emptyCountEnd])
524:         #set ($colIndex = $colIndex + 1)
525:         #printEmptyEventBox
526:       #end
527:     #end
528: 
529:     </div> ## slide-content
530:     </div> ## slide
531: 
532: 
533:     </div> ## slides
534:     </div> ## slider
535: 
536:     #if ($showNavi)
537:     	<div class="navi"></div>
538:     #end
539:     #if ($fullSchedulePos == "bottom")
540:         <a href="$page.url" class="full-schedule-btn">View Full Schedule</a>
541:     #end
542: 
543:     #end ## total events check
544:     </div> ## scoreboard-slider
545: 
546:     $wiki
547: 
548: #end ## slick parameter check
549: 
550: #if ($request.getParameter("ajax") == true)
551:   $website.decorate("")
552: #end

Fri Nov 01
Final
0 Ridgewater
3 at Rochester CTC
Region XIIIA Tournament
Fri Nov 01
Final
1 Northland CTC
3 vs. Central Lakes
@ Brainerd NJCAA DIII REGION 13B semi finals
Fri Nov 01
Final
3 St. Cloud Technical CC
1 vs. M State Fergus-Falls
@ Rochester, MN NJCAA Region XIIIA Tournament
Fri Nov 01
Final
1 Itasca CC
3 vs. Mesabi Range CTC
@ Brainerd, MN
Sat Nov 02
Final
0 St. Cloud Technical CC
3 at Rochester CTC
Rochester, MN
Sat Nov 02
Final
0 Mesabi Range CTC
3 vs. Central Lakes
@ Brainerd NJCAA Region XIIIB Championship
Sat Nov 02
There was a problem with a Velocity script
Pagescoreboard-slider-template
ErrorInvocation of method 'substring' in class java.lang.String threw exception java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at scoreboard-slider-template[line 229, column 29]
Page source:
1: #set ($id = "scoreboard-slider")
2: #if ($request.getParameter("id"))
3:   #set ($idParam = $request.getParameter("id"))
4:   #set ($id = "${id} ${idParam}")
5: #end
6: 
7: ## PICK UP OPTIONS
8: $website.include("options")
9: #set ($options = $request.getAttribute("options"))
10: 
11: #set ($hideExhibition = false)
12: #if ($options.get("schedule_hide_exhibition_events") == true)
13:   #set ($hideExhibition = true)
14: #end
15: 
16: #if ($request.getParameter("hideExhibition"))
17:   #set ($hideExhibition = $request.getParameter("hideExhibition"))
18: #end
19: 
20: #set ($linksOrder = ["RC", "BS", "RE", "GA", "AU", "VI", "LS", "DI", "TI", "PR"])
21: #set ($excludeLinksWhenEventIsFinished = ["LS", "DI", "TI", "PR"])
22: #set ($excludeLinksWhenEventIsLive = ["DI", "TI", "PR"])
23: 
24: #set ($showVsAt = true)
25: #if ($options.get("schedule_hide_vs_at") == true)
26:   #set ($showVsAt = false)
27: #end
28: 
29: #set ($includeTimeZone = false)
30: #if ($options.get("calendarIncludeTimeZone"))
31:   #set ($includeTimeZone = $options.get("calendarIncludeTimeZone").toLowerCase())
32: #end
33: 
34: #set ($showTeamLogo = false)
35: #if ($request.getParameter("showTeamLogo") == true)
36:   #set ($showTeamLogo = true)
37: #end
38: 
39: #set ($showJustOpponent = false)
40: #if ($request.getParameter("showJustOpponent") == true)
41:   #set ($showJustOpponent = true)
42: #end
43: 
44: #set ($resultFormat = "AP1")
45: #if ($options.get("schedule_result_format").equals("L, 1-2"))
46:   #set ($resultFormat = "AP2")
47: #end
48: 
49: #set ($dateFormat = "'<span>'EEE'</span> <span>'MMM'</span> <span>'dd'</span>'")
50: #if ($request.getParameter("dateFormat"))
51:   #set ($dateFormat = $request.getParameter("dateFormat"))
52: #end
53: 
54: #set ($restrictLinks = true)
55: #if ($options.get("schedule_restrict_links") == false)
56:   #set ($restrictLinks = false)
57: #end
58: 
59: #set ($linksAbbreviations = { "Preview": "PR", "Box Score": "BX", "Results": "R", "Recap": "RC", "Live stats": "LS", "Video": "V", "Audio": "A", "Photos": "PH", "Tickets": "T", "Directions": "DR" })
60: 
61: #set ($showLinkIcons = false)
62: #if ($request.getParameter("showLinkIcons") == true)
63:   #set ($showLinkIcons = true)
64: #end
65: 
66: #set ($abbreviatedLinks = false)
67: #if ($request.getParameter("abbreviatedLinks") == true)
68:   #set ($abbreviatedLinks = true)
69: #end
70: 
71: #set ($autoScroll = false)
72: #if ($request.getParameter("autoScroll") == true)
73:   #set ($autoScroll = true)
74: #end
75: 
76: #set ($showNavi = false)
77: #if ($request.getParameter("showNavi") == true)
78:   #set ($showNavi = true)
79: #end
80: 
81: #set ($autoInterval = 4000)
82: #if ($tool.math.toInteger($request.getParameter("autoInterval")) > 0)
83:   #set ($autoInterval = $tool.math.mul($request.getParameter("autoInterval", 1000)))
84: #end
85: 
86: #set ($circularScroll = false)
87: #if ($request.getParameter("circularScroll") == true)
88:   #set ($circularScroll = true)
89: #end
90: 
91: #set ($colLimit = 5)
92: #if ($tool.math.toInteger($request.getParameter("colLimit")))
93:   #set ($colLimit = $tool.math.toInteger($request.getParameter("colLimit")))
94: #end
95: 
96: #set ($showPlayPause = false)
97: #if ($request.getParameter("showPlayPause") == true)
98: 	#set ($showPlayPause = true)
99: #end
100: 
101: #set ($fullSchedulePos = "bottom")
102: #set ($fullSchedulePos = $request.getParameter("fullSchedulePos"))
103: 
104: #set ($today = $now)
105: 
106: #set ($slickSlider = false)
107: #if ($request.getParameter("slickSlider") == true)
108:   #set ($slickSlider = true)
109: #end
110: 
111: ################################ MACROS #####################################
112: #macro (printTeamLogo $team)
113:   #if ($showTeamLogo)
114:     #if ($team.teamId)
115:       <span class="team-logo"><img src="${website.teamLogo($team.teamId)}" alt="" /></span>
116:     #end
117:   #end
118: #end
119: 
120: #macro (printVa $event $count)
121:     #if ($event.teams.size() == 1)
122:         #if ($showVsAt && ($event.neutralSite.length() > 0 || !$event.home))
123:             <span class="va">at</span>
124: 		#end
125:     #else
126:         #if ($count == 2 || $count.length() == 0)
127:             #if ($event.neutralSite.length() > 0 || $event.home)
128: 				<span class="va">vs.</span>
129:             #else
130: 				<span class="va">at</span>
131:             #end
132: 		#end
133: 	#end
134: #end
135: 
136: #macro (printLinkAriaLabel $event $link $linkTypeCounter)
137: 	#set ($ariaLabel = "${event.sport} event: ${formatter.formatDate($event.date, 'MMMM d hh:mm a:')}")
138: 	#if ($event.neutralSite.length() > 0 || $event.home)
139: 		#set ($vsOrAt = "vs.")
140: 	#else
141: 		#set ($vsOrAt = "at")
142: 	#end
143: 	#if ($event.teams.size() > 1)
144: 		#set ($ariaLabel = "${ariaLabel} ${event.teams.get(0).name} ${vsOrAt} ${event.teams.get(1).name}:")
145: 	#elseif ($event.teams.size() == 1)
146: 		#set ($ariaLabel = "${ariaLabel} ${event.teams.get(0).name}:")
147: 	#end
148: 	#if ($event.neutralSite.length() > 0)
149: 		#set ($ariaLabel = "${ariaLabel} @ ${event.neutralSite}:")
150: 	#end
151: 	#set ($ariaLabel = "${ariaLabel} ${link.name}")
152: 	#if ($linkTypeCounter > 1)
153: 	    #set ($ariaLabel = "${ariaLabel} link ${linkTypeCounter}")
154: 	#end
155: 	aria-label="$ariaLabel"
156: #end
157: 
158: #macro (printEventLinks $event $useContainer $useList)
159: 	#set ($eventLinks = [])
160: 
161: 	#set ($isFinished = false)
162:     #if ($event.statusCode >= 0 || ($event.statusCode == -3 && $now.time >= ($event.date.time + (1000*60*60*24)))) ## -3 is reported for event sports
163:         #set ($isFinished = true)
164:     #end
165: 
166:     #if ($restrictLinks && ($event.inProgress || $isFinished))
167:         #foreach ($link in $event.links)
168:             #if ($event.inProgress && !$excludeLinksWhenEventIsLive.contains($link.mapType))
169:                 #set ($ignoreme = $eventLinks.add($link))
170:             #elseif ($isFinished && !$excludeLinksWhenEventIsFinished.contains($link.mapType))
171:                 #set ($ignoreme = $eventLinks.add($link))
172:             #end
173:         #end
174:     #else
175:         #set ($eventLinks = $event.links)
176: 	#end
177: 
178: 	#if ($useContainer == true)
179: 		<div #if ($eventLinks.size() > 0) class="links" #else class="links empty" #end>
180: 	#end
181: 		#if ($useList == true)<ul>#end
182: 			#set ($linksCounter = 0)
183: 			#foreach ($mapType in $linksOrder)
184: 				#set ($linkTypeCounter = 0)
185: 				#foreach ($link in $eventLinks)
186: 					#if ($mapType == $link.mapType)
187: 						#set ($linksCounter = $linksCounter + 1)
188: 						#set ($linkTypeCounter = $linkTypeCounter + 1)
189: 						#if ($linksCounter > 1)
190: 							<span class="sep"> | </span>
191: 						#end
192: 						#set ($linkText = $link.name)
193: 						#if ($abbreviatedLinks)
194: 							#foreach ($l in $linksAbbreviations.entrySet())
195: 								#if ($link.name.equalsIgnoreCase($l.key))
196: 									#set ($linkText = $l.value)
197: 								#end
198: 							#end
199: 						#end
200: 						#if ($useList == true)<li>#end
201: 							<a #printLinkAriaLabel($event, $link, $linkTypeCounter) href="$link.url" #if ($website.isExternalLink($link.url)) target="_blank" #end>
202: 							#if ($showLinkIcons)
203: 								<i class="icon gicon-${link.mapType.toLowerCase()}" title="$link.name"></i>
204: 							#end
205: 								<span class="text">$linkText</span>
206: 							</a>
207: 						#if ($useList == true)</li>#end
208: 					#end
209: 				#end
210: 			#end
211: 		#if ($useList == true)</ul>#end
212: 	#if ($useContainer == true)
213: 		</div>
214: 	#end
215: #end ## printEventLinks
216: 
217: #macro (printSport $event)
218:   #set ($feedURL = $event.feedURL)
219: 
220:   #set ($feedURL = $event.feedURL) ## in the form http://www.somedomain.com/sports/mbkb/2014-15/schedule?tmpl=sfs-template
221:   #if ($feedURL.indexOf("://") >= 0)
222:     #set ($feedURL = $feedURL.split("//").get(1)) ## remove the http:// bit from the URL
223:   #end
224:   #set ($startIndex = $feedURL.indexOf("/"))
225:   #set ($endIndex = $feedURL.length())
226:   #if ($feedURL.lastIndexOf("?") >= 0)
227:     #set ($endIndex = $feedURL.lastIndexOf("?"))
228:   #end
229:   #set ($feedURL = $feedURL.substring($startIndex, $endIndex)) ## remove the domain and tmpl parts
230: 
231:   #if ($website.exists($feedURL))
232: 	#set ($ariaLabel = "${event.sport}: schedule")
233:     #if ($feedURL.matches("/sports/.*/\d{4}-\d{2}/.*"))
234:       #set ($seasonStr = $feedURL.split("/").get(3))
235:       #set ($ariaLabel = "${event.sport}: ${seasonStr} schedule") ## aria-label would be something like Men's Basketball 2017-18 schedule
236:     #end
237: 
238:     <a href="${feedURL}" aria-label="$ariaLabel">$event.sport</a>
239:   #else
240:     <span>$event.sport</span>
241:   #end
242: #end
243: 
244: #macro (printEvent $event)
245: 
246: #set ($eventClass = "event")
247: #if ($event.inProgress)
248:   #set ($eventClass = "event in-progress")
249: #end
250: 
251: #if ($event.scheduleTeamId.length() > 0)
252:   #set ($teamSchedule = true)
253: #else
254:   #set ($teamSchedule = false)
255: #end
256: 
257: <div class="${eventClass}">
258: 
259:   <div class="date clearfix">$formatter.formatDate($event.date, $dateFormat)</div>
260: 
261:   #if ($event.sport)
262:     <div class="sport">
263: 		#printSport($event)
264:     </div>
265:   #end
266: 
267:   <div class="status clearfix">
268:   #if ($includeTimeZone)
269:     #if ($includeTimeZone.contains("local"))
270:       <span>$formatter.formatStatus($event).setTimeFormat("h:mm a z").useEventTimeZone()</span>
271:     #elseif ($includeTimeZone.contains("site"))
272:       <span>$formatter.formatStatus($event).setTimeFormat("h:mm a z")</span>
273:     #end
274:   #else
275:     <span>$formatter.formatStatus($event)</span>
276:   #end
277:   </div>
278: 
279:   #if ($showJustOpponent && $teamSchedule)
280:     <div class="opponent clearfix">
281:       #printTeamLogo($event.opponent)
282:       #printVa($event "")
283:       <span class="name">$event.opponent.name</span>
284: 
285:       #set ($APResult = "")
286:       #if ($resultFormat.equals("AP1"))
287:         #set ($APResult = $event.APResult)
288:       #elseif ($resultFormat.equals("AP2"))
289:         #set ($APResult = $event.AP2Result)
290:       #end
291: 
292:       #if (!$event.inProgress && $APResult.length() > 0)
293:         <span class="result">$APResult</span>
294:       #else
295:         #if ($event.result.toString().length() > 0)
296:             <span class="result">$event.result</span>
297:         #end
298:       #end
299:     </div>
300:   #else
301:     #foreach ($team in $event.teams)
302:   	  #set ($teamClass = "team")
303:   	  #if ($event.winner.name.length() > 0)
304:     	#if ($event.winner.name == $team.name)
305:       		#set ($teamClass = "${teamClass} winner")
306:     	#else
307:       		#set ($teamClass = "${teamClass} loser")
308:     	#end
309:   	  #end
310:   	  #if ($event.teams.size() == 2 && $teamSchedule)
311:   	  	#if ($team.teamId == $event.scheduleTeamId)
312:   	  		#set ($teamClass = "${teamClass} site-team")
313:   	  	#end
314:   	  #end
315:       <div class="$teamClass clearfix">
316:         #if ($team.result.length() > 0 && $event.teams.size() > 1) ## ideally this should check if the event is associated to a schedule with numeric results
317:           <span class="score">$team.result</span>
318:         #end
319: 
320:         #printTeamLogo($team)
321:         #printVa($event $velocityCount)
322:         <span class="name">$team.name</span>
323: 
324:         #if ($event.teams.size() == 1 && $event.result.toString().length() > 0)
325:           <span class="result">$event.result</span>
326:         #end
327:       </div>
328:     #end
329:   #end
330: 
331:   #if ($event.neutralSite.length() > 0 || $event.notes.length() > 0)
332:     <div class="neutralsite-notes">
333:       #if ($event.neutralSite.length() > 0)
334:         <span class="neutral-site">@ $event.neutralSite</span>
335:       #end
336:       #if ($event.notes.length() > 0)
337:         <span class="notes">$event.notes</span>
338:       #end
339:     </div>
340:   #end
341: 
342:   #printEventLinks($event, true, false)
343: </div>
344: #end ## printEvent
345: 
346: #macro (printEventBox $event)
347:   #set ($eventServerDate = $tool.timeZone.shift($event.date, $event.localTimeZone, $tool.timeZone.systemTimeZone))
348:   #set ($eventBoxClass = "event-box")
349:   #if ($eventServerDate.before($today))
350:     #set ($eventBoxClass = "${eventBoxClass} result")
351:   #else
352:     #set ($eventBoxClass = "${eventBoxClass} upcoming")
353:   #end
354:   #if ($event.inProgress)
355:     #set ($eventBoxClass = "${eventBoxClass} inprogress")
356:   #end
357:   #if ($event.neutralSite.length() > 0)
358:     #set ($eventBoxClass = "${eventBoxClass} neutral")
359:   #elseif ($event.home)
360:     #set ($eventBoxClass = "${eventBoxClass} home")
361:   #else
362:     #set ($eventBoxClass = "${eventBoxClass} away")
363:   #end
364:   #if ($event.teams.size() == 2)
365:     #set ($eventBoxClass = "${eventBoxClass} h2h")
366:   #else
367:     #set ($eventBoxClass = "${eventBoxClass} meet")
368:   #end
369: 
370:   ## CODE TO EXTRACT SPORT SECTION FROM $event.feedURL
371:   #set ($feedURL = $event.feedURL)
372:   #if ($feedURL.startsWith("http://"))
373:     #set ($feedURL = $feedURL.substring(7, $feedURL.length())) ## remove http://
374:   #elseif ($feedURL.startsWith("https://"))
375:     #set ($feedURL = $feedURL.substring(8, $feedURL.length())) ## remove https://
376:   #end
377:   #set ($startIndex = $feedURL.indexOf("/"))
378:   #set ($endIndex = $feedURL.length())
379:   #set ($feedURL = $feedURL.substring($startIndex, $endIndex))
380:   #set ($feedURL = $feedURL.split("/"))
381:   #if ($feedURL.size() >= 3)
382:     #set ($eventBoxClass = "${eventBoxClass} ${feedURL.get(2)}")
383:   #end
384: 
385:   <div class="${eventBoxClass}">
386:     #printEvent($event)
387:   </div>
388: #end ## printEventBox
389: 
390: #macro (printEmptyEventBox)
391: <div class="event-box empty">
392:   <div class="event">
393:     <span class="no-event">No Event</span>
394:   </div>
395: </div>
396: #end
397: 
398: ############################### END MACROS #############################################
399: 
400: #set ($events = [])
401: #set ($prevCount = 0)
402: #set ($upcomingCount = 0)
403: #set ($eventCount = 0)
404: 
405: ## filter out exhibition events and count the number of previous and upcoming events
406: #foreach ($event in $schedule.events)
407:   #if ($event.date && ($event.overall || !$hideExhibition))
408:     #set ($eventServerDate = $tool.timeZone.shift($event.date, $event.localTimeZone, $tool.timeZone.systemTimeZone))
409:     #if ($eventServerDate.before($today))
410:       #if ($events.add($event))
411:         #set ($prevCount = $prevCount + 1)
412:       #end
413:     #else
414:       #if ($events.add($event)) ## upcoming events include events for today
415:         #set ($upcomingCount = $upcomingCount + 1)
416:       #end
417:     #end
418:   #end
419: #end
420: 
421: #set ($eventCount = $events.size())
422: #if ($eventCount > 0)
423:   #set ($events = $tool.sorter.sort($events, "date")) ## sort dates chronologically
424: #end
425: 
426: ## print event boxes for slick slider
427: #if ($slickSlider)
428: 
429:     #if ($eventCount == 0)
430:       <div class="no-events">No events to show.</div>
431:     #else
432:       #foreach ($event in $events)
433:         #printEventBox($event)
434:       #end
435:     #end
436: 
437: #else
438: 
439:     #set ($slideCount = $tool.math.ceil($tool.math.div($eventCount, $colLimit))) ## total number of slides based on the available number of events
440:     #set ($emptyCount = $tool.math.sub($tool.math.mul($slideCount, $colLimit), $eventCount)) ## total number of items possible - total number of events available
441:     #set ($emptyCountStart = 0)
442:     #set ($emptyCountEnd = 0)
443: 
444:     #if ($prevCount > 0 && $upcomingCount > 0) ## when both previous and upcoming events are available, the layout should preferably show a default slide that contains both previous and upcoming events
445:       #set ($desiredPrevEventsInFocusedSlide = $colLimit / 2)
446:       #set ($availablePrevEventsInFocusedSlide = $prevCount % $colLimit)
447: 
448:       #if ($availablePrevEventsInFocusedSlide < $desiredPrevEventsInFocusedSlide)
449:         #set ($emptyCountStart = $desiredPrevEventsInFocusedSlide - $availablePrevEventsInFocusedSlide)
450:       #elseif ($availablePrevEventsInFocusedSlide > $desiredPrevEventsInFocusedSlide)
451:         #set ($emptyCountStart = ($colLimit - $availablePrevEventsInFocusedSlide) + $desiredPrevEventsInFocusedSlide)
452:       #end
453: 
454:       #if ($emptyCountStart > 0) ## re-count the number of slides
455:         #set ($slideCount = $tool.math.ceil($tool.math.div($tool.math.add($eventCount, $emptyCountStart), $colLimit)))
456:       #end
457: 
458:       #set ($emptyCountEnd = $tool.math.sub($tool.math.mul($slideCount, $colLimit), $tool.math.add($eventCount, $emptyCountStart)))
459:       #set ($focusedIndex = $tool.math.ceil($tool.math.div($tool.math.add($prevCount, $emptyCountStart), $colLimit)))
460: 
461:     #elseif ($prevCount > 0) ## only previous events are available
462:       #set ($focusedIndex = $slideCount) ## focused slide is the last slide in the list that have most recent past events
463:       #set ($emptyCountStart = $emptyCount)
464:     #elseif ($upcomingCount > 0) ## only upcoming events are available
465:       #set ($focusedIndex = 1)
466:       #set ($emptyCountEnd = $emptyCount)
467:     #end
468: 
469:     #if ($slideCount <= 1)
470:         #set ($autoScroll = false)
471:         #set ($circularScroll = false)
472:     #end
473: 
474:     <div class="${id}"  data-module="jslider" data-focus="$tool.math.sub($focusedIndex, 1)" data-auto="$autoScroll" data-interval="${autoInterval}" data-circular="$circularScroll" data-navi="${showNavi}" data-items=".slides">
475: 
476:     #if ($eventCount == 0)
477:       <div class="no-events">No events to show.</div>
478:     #else
479: 
480:     #if ($fullSchedulePos == "top")
481:         <a href="$page.url" class="full-schedule-btn">View Full Schedule</a>
482:     #end
483: 
484:     <a href="javascript:void(0)" role="button" aria-label="move to previous slide" class="prev">Previous</a>
485:     <a href="javascript:void(0)" role="button" aria-label="move to next slide" class="next">Next</a>
486:     #if ($showPlayPause)
487:     	#set ($ppClass = "pp play")
488:     	#if ($autoScroll)
489:     		#set ($ppClass = "pp pause")
490:     	#end
491:     	<a href="javascript:void(0)" role="button" class="${ppClass}">pp</a>
492:     #end
493: 
494:     <div class="slider">
495:     <div class="slides clearfix">
496: 
497:     ## #set ($slideIndex = 1)
498:     #set ($colIndex = 0)
499: 
500:     <div class="slide">
501:     <div class="slide-content clearfix">
502: 
503:     #if ($emptyCountStart > 0)
504:       #foreach ($i in [1..$emptyCountStart])
505:         #set ($colIndex = $colIndex + 1)
506:         #printEmptyEventBox
507:       #end
508:     #end
509: 
510:     #foreach ($event in $events)
511:       #set ($colIndex = $colIndex + 1)
512:       #if ($colIndex > $colLimit)
513:         ## #set ($slideIndex = $slideIndex + 1)
514:         #set ($colIndex = 1)
515:         </div></div>
516:         <div class="slide">
517:         <div class="slide-content clearfix">
518:       #end
519:       #printEventBox($event)
520:     #end
521: 
522:     #if ($emptyCountEnd > 0)
523:       #foreach ($i in [1..$emptyCountEnd])
524:         #set ($colIndex = $colIndex + 1)
525:         #printEmptyEventBox
526:       #end
527:     #end
528: 
529:     </div> ## slide-content
530:     </div> ## slide
531: 
532: 
533:     </div> ## slides
534:     </div> ## slider
535: 
536:     #if ($showNavi)
537:     	<div class="navi"></div>
538:     #end
539:     #if ($fullSchedulePos == "bottom")
540:         <a href="$page.url" class="full-schedule-btn">View Full Schedule</a>
541:     #end
542: 
543:     #end ## total events check
544:     </div> ## scoreboard-slider
545: 
546:     $wiki
547: 
548: #end ## slick parameter check
549: 
550: #if ($request.getParameter("ajax") == true)
551:   $website.decorate("")
552: #end

Standings

2019 MCAC Football Standings

East
Teams Div All
Mesabi Range CTC 5-0 7-2
Itasca CC 3-2 8-3
Rochester CTC 3-2 6-3
Central Lakes 2-3 6-5
Vermilion CC 2-3 2-6
Fond du Lac 0-5 0-9
West
Teams Div All
NDSCS 4-0 8-2
Minnesota West 2-2 6-4
Northland CTC 2-2 3-6
Dakota College 1-2 3-5
M State Fergus-Falls 0-3 1-6
Full Standings

Sponsors