News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Changing Calendar default view

Started by twotonetwo, May 28, 2010, 10:13:56 AM

Previous topic - Next topic

twotonetwo

The option in the calendar to view by day instead of month is brilliant, especially for fixed width forums that have alot of daily events in their calendar. My question is: is there any code i can change that would make the "day view" the default when members click on the calendar  instead of having to press the ">>" button next to the week to view by day (pics below for better explanation).

So this is the current view that members see when they visit the calendar, but by clicking the ">>"  they can go to the day view.



Can i make the layout below the default when people visit the calendar?



thx  ;)

smf 2.0RC3
TP beta1.5

SMF 2.0 RC3  |  Tiny Portal 1.0 Beta 5.1

Yahmez

#1
In ./sources/calendar.php
look for:
// Is this a week view?
$context['view_week'] = isset($_GET['viewweek']);


and change to:
// Is this a week view?
$context['view_week'] = 'viewweek';


Although I don't know if you can switch back to the month view at that point though.

Scratch that.... it does not work like you want. Looks like some added functionality is called for.

Advertisement: