News:

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

Main Menu

calendar questions please

Started by testingtimes, April 13, 2008, 02:10:01 PM

Previous topic - Next topic

testingtimes

Never used SMF before and thinking of using 2.0 Beta 3 on a new site and wonder if someone could help me with the following please.

1. Can the calendar by used as say our clubs main calendar where only the secretary could make entries and not other members and we would not want birthdays showing.

2. Could the calander be shown on a page of our normal website but say within the header and footer of our sites pages, without all the headers and footers of the forum. Something like an ' include ../calendar.php' I guess.

3. Could the next seven days events be shown on say a 'Forthcoming Events'  news box on our sites normal homepage.

If any of this can be achieved what would be involved please.

Thanks
Phil

Oldiesmann

1. Yes. You can use permissions to determine who can add events to the calendar, and the calendar settings allow you to determine where to show birthdays, holidays and upcoming events.

2. With some modifications, you probably could. Basically what you'd need to do is create custom template layers for your site header and footer (there's a topic elsewhere on this board about template layers), then do something like this:

<?php
include_once('/path/to/SSI.php');

$ssi_layers = array('site');

// Display the calendar...
include_once($sourcedir '/Calendar.php');

CalendarMain();
?>


You will probably need some code to pull in the SMF stylesheet as well - otherwise things would look weird.

3. Yes, you can use the ssi_todaysEvents function from SSI.php to display upcoming events elsewhere.
Michael Eshom
Christian Metal Fans

testingtimes

Thank you for your help.

It looks encouraging like it may work and the code you have provided is much appreciated.

Perhaps when I get started on that area I could post again here, if I am struggling after looking at the layers you mention and stylesheet.

Regards
Phil

Advertisement: