Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Namespace usage examples #120

Open
GoogleCodeExporter opened this issue Feb 3, 2016 · 4 comments
Open

Namespace usage examples #120

GoogleCodeExporter opened this issue Feb 3, 2016 · 4 comments

Comments

@GoogleCodeExporter
Copy link

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
Copy link
Author

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

  • Changed state: Review

@GoogleCodeExporter
Copy link
Author

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
Copy link
Author

I spelled calendar wrong

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

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

@GoogleCodeExporter
Copy link
Author

Sorry for the poor proof.  I found it too... thanks

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant