Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

All other Modules /

Discuss all other Modules here.

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

How do I change the date range for the calendar


Go to End


9 Posts   2978 Views

Avatar
Roobarb

Community Member, 17 Posts

16 September 2009 at 3:46am

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

Avatar
UncleCheese

Forum Moderator, 4102 Posts

16 September 2009 at 3:51am

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

Avatar
Roobarb

Community Member, 17 Posts

16 September 2009 at 4:25am

Thanks very much - but where do i put that?

Sorry

Avatar
UncleCheese

Forum Moderator, 4102 Posts

16 September 2009 at 5:37am

In your mysite/_config.php

Avatar
Roobarb

Community Member, 17 Posts

16 September 2009 at 6:07am

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.

Avatar
UncleCheese

Forum Moderator, 4102 Posts

16 September 2009 at 7:41am

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?

Avatar
Roobarb

Community Member, 17 Posts

16 September 2009 at 7:57am

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.

Avatar
UncleCheese

Forum Moderator, 4102 Posts

16 September 2009 at 8:26am

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.

Go to Top