mediawiki-extensions / mw-calendar

Automatically exported from code.google.com/p/mw-calendar
0 stars 2 forks source link

Namespace usage examples #120

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I set up my wiki to use the namespace "Calendars."  I made a template and
when in the Calendars:CalendarName page, I can view the calendar, but I
can't embed the calendar in the main wiki, which is what I originally
wanted to do.

I've tried setting up two calendars:

1:  
 made page Template:Calendar.
 put in this code:
 <calendar name="Calendar" editdefault usetemplates />
 after saving it shows:
 Invalid Namespace - This calendar extension must be created in the
following namespace: Calendars

 made page Calendars:Calendar
 put in this code:
 {{Calendar}}
 after saving, it shows a calendar

 I want to see this calendar from the main page, so I put in this code on
the main page:
 {{Calendar}}
 after saving, it shows Invalid namespace

2: The second approach does not use a calendar template page
 made page: Calendars:Test
 put in code:
 <calendar name="Test" editdefault usetemplates />
 after saving, it shows a calendar

 I want to see this calendar from the main page, so I put in this code:
 {{Calendars:Test}}
 after saving, it shows Invalid namespace

 I also tried this code in the main page:
 <calendar name="Test2" subscribe="Calendars:Test" />
 after saving, it shows the same invalid namespace error

In all cases when attempting to show the calendar from outside the
namespace, it shows an invalid namespace error.  I put the namespace in as
suggested in the installation instructions to keep the calendar events out
of the all pages view.  I think it may be a LocalSettings.php file setting.
 Here are the lines I added:

define("NS_CALENDARS", 100);
define("NS_CALENDARS_TALK", 101);

require_once("$IP/extensions/Calendar/Calendar.php");

$wgExtraNamespaces[NS_CALENDARS] = "Calendars";
$wgExtraNamespaces[NS_CALENDARS_TALK] = "Calendars";
$wgNamespacesWithSubpages[NS_CALENDARS] = true;

$wgNamespaceProtection[NS_CALENDARS] = array( 'editCalendars' );
$wgNamespacesWithSubpages[NS_CALENDARS] = true;            
$wgGroupPermissions['user']['editCalendars'] = true;      
$wgCalendarForceNamespace='Calendars';

It appears that the calendar extension is installed correctly  The problem
must be either my embedding code or the local settings entries.  My wiki
experience is somewhat limited, so I appreciate any suggested reading or
examples.  Thanks for the help.

Original issue reported on code.google.com by Rob.Owi...@gmail.com on 22 Jan 2010 at 7:14

GoogleCodeExporter commented 8 years ago
Calendars:MyCalendar
<calendar name="Team Calendar"editdefault usetemplates />

MAIN PAGE
<calender name="main" fullsubscribe="Calendars:MyCalendar/Team Calendar" />

fullsubscribe calendars ignore the namespace check as all events get routed to 
the
subscribe calendar.

Eric

Original comment by kenyu73 on 22 Jan 2010 at 7:30

GoogleCodeExporter commented 8 years ago
Adding this code:

<calender name="main" fullsubscribe="Calendars:Calendar/Calendar" />

shows up with that line as text in the main page.  It doesn't get parsed and
fullsubscribe is underlined as a misspelled word. 

Original comment by Rob.Owi...@gmail.com on 22 Jan 2010 at 9:45

GoogleCodeExporter commented 8 years ago
I spelled calendar wrong

<calendar name="main" fullsubscribe="Calendars:Calendar/Calendar" />

Original comment by kenyu73 on 22 Jan 2010 at 9:55

GoogleCodeExporter commented 8 years ago
Sorry for the poor proof.  I found it too... thanks

Original comment by Rob.Owi...@gmail.com on 22 Jan 2010 at 9:59