Jump to:

10990 Posts in 2727 Topics by 1818 members

All other Modules

SilverStripe Forums » All other Modules » How do I change the date range for the calendar

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1 2
Go to End
Author Topic: 1467 Views
  • Roobarb
    Avatar
    Community Member
    17 Posts

    How do I change the date range for the calendar Link to this post

    Hi there,

    In the event module I have my events set-up, but most will not happen until next year now.

    I was wondering if there was a way of defaulting the 'calendar' page to show all available events? or if I caould default the search dates to the end of 2010??

    Can anyone help?

    Thanks

  • UncleCheese
    Avatar
    4085 Posts

    Re: How do I change the date range for the calendar Link to this post

    Calendar::set_param('defaultFutureMonths',12);

  • Roobarb
    Avatar
    Community Member
    17 Posts

    Re: How do I change the date range for the calendar Link to this post

    Thanks very much - but where do i put that?

    Sorry

  • UncleCheese
    Avatar
    4085 Posts

    Re: How do I change the date range for the calendar Link to this post

    In your mysite/_config.php

  • Roobarb
    Avatar
    Community Member
    17 Posts

    Re: How do I change the date range for the calendar Link to this post

    Ok - so I did that - I put it in the mysite/_config.php and my whole site has just crashed.

    Firefox is now taking me to http://dev.senseoflife.co.uk//install.php

    I've tried both ?flush=1 and dev/build?flush=1 and nothing.

    Please help what can I do.

  • UncleCheese
    Avatar
    4085 Posts

    Re: How do I change the date range for the calendar Link to this post

    If you comment it out, does the site work again?

    Usually you get redirected to install.php when SS cannot obtain your database credentials. Is all that info still in your _config.php?

  • Roobarb
    Avatar
    Community Member
    17 Posts

    Re: How do I change the date range for the calendar Link to this post

    Ok - I've balls up big style here.

    I updated the _config.php file, but didn't use the newest verison.

    This is what is in it now...

    <?php

    global $project;
    $project = 'mysite';

    global $database;
    $database = "";

    require_once("conf/ConfigureFromEnv.php");

    // This line set's the current theme. More themes can be
    // downloaded from http://www.silverstripe.com/themes/
    SSViewer::set_theme('blackcandy');

    ?>

    My site has since been set-up on a sub domain until it was ready to go live dev.myaddress.com

    Do you know how I would alter the _config file to point to the sub domain? Do I need to enter the name of the database in the _config also?

    If I then upload the config file again do I do dev/build?flush=1??

    Please tell me I've not lost everything - what a nightmare.

  • UncleCheese
    Avatar
    4085 Posts

    Re: How do I change the date range for the calendar Link to this post

    No, you certainly haven't lost everything. Your config.php file looks weird. I'm not sure what you mean by updating to the newest version.

    It should look something like this:

    global $project;
    $project = 'mysite';

    global $databaseConfig;
    $databaseConfig = array(
       "type" => "MySQLDatabase",
       "server" => "localhost",
       "username" => "user",
       "password" => "pass",
       "database" => "my_database"
    );

    and you don't need that require_once() in there.

    1467 Views
Page: 1 2
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.