Not logged in. · Lost password · Register
Forum: General Help and Support Plugins RSS
[WORKAROUND] Discussion plugin - how to reference root namespace
leemillerau #1
User title: leemillerau
Member since Sep 2019 · 6 posts · Location: Wellington, New Zealand
Group memberships: Members
Show profile · Link to this post
Subject: [WORKAROUND] Discussion plugin - how to reference root namespace
I'm trying to configure the Discussion plugin so that discussions only appear on pages with content to be discussed and not on pages like the home page and Contact us and FAQs etc.

The easiest way would be for me to enable Discussion for all pages and then make the root namespace an exception along with Wiki and Playground.  But within the syntax given for the excluded_ns configuration option in the Discussion plugin i.e. /(playground|wiki)/,  I don't know how to define the root namespace.

So questions -

1. How do I refer to the root namespace in an expression like this?

2. If there isn't a way to refer to the root namespace, how can I move my home page into a named namespace (let's call it newnamespace) and make any other needed changes so that when I type into my browser tab it will look for bikesonplanes/data/pages/newnamespace/home.txt rather than bikesonplanes/data/pages/home.txt?

3. Or have I missed the point completely and there is some other easy way to get what I want?


Tried to define root namespace to Discussion plugin as "(:)" but it had no effect. Other options considered were to delve into the PHP and reverse the logic for the variable excluded_ns so it was really included_ns but given my limited PHP the simplest solution seemed to be this workaround -

Workaround used

1. Move all possible pages into namespaces (using Move plugin to minimise the pain for pages already in use)
2. Set up new list of excluded_ns namespaces for Discussions using Conguration Manager
3. Use Moderate Discussions (available on Admin page) to turn discussions off on the Homepage and Sidebar (these are the only 2 pages left in my root namespace). Note that to turn a discussion off there has to be a discussion comment already there so I just did a dummy comment on each page first and then turned that off.

Hope that this may be helpful to someone in the future
This post was edited on 2019-10-20, 08:33 by leemillerau.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2020-01-23, 06:18:54 (UTC +01:00)