Re: [pmwiki-users] Farms: per-wiki config

2008-05-10 Thread Hans
Friday, May 9, 2008, 10:28:15 AM, Peter Flynn wrote:

 Is it possible for skins and other per-wiki configs to be managed (ie 
 changed) by each wiki's individual admin via a passworded web interface?

In generally PmWiki needs to be customised via settings in config.php
or other local config files. It has no general admin interface via a
webpage. Especially addition of add-on modules (recipes) need to be
done via config file settings. This is done this way for security
reasons and to allow maximum flexibility.

But meanwhile many things can be done via admin wiki pages.

You mention skins: Generally a skin is set in a config file.
But you could customise your farmconfig.php to allow setting of skins
from wiki pages.

Install http://www.pmwiki.org/wiki/Cookbook/AllGroupHeader in
farmconfig.php. This gives each wiki a page for site-wide markup
inclusions (Site.AllGroupHeader). Perhaps change the new
$GroupHederFmt definition to:

$GroupHeaderFmt =
  '(:include $SiteAdminGroup.AllGroupHeader:)(:nl:)'
  .'(:include $Group.GroupHeader:)(:nl:)';

This makes SiteAdmin.AllGroupHeader the page for wiki-wide markup
inclusions, which is more secure (protected by default).

Add a custom markup to set a skin to farmconfig.php, and restrict use
of it to SiteAdmin.AllGroupHeader:

$pagename = ResolvePageName($pagename);
if ($pagename=='SiteAdmin.AllGroupHeader') {
  Markup('skin', 'fulltext',
'/\\(:skin\\s+([-\\w]+)\\s*:\\)/e',
PZZ(SetSkin(\$pagename,'$1')));
}

Now you should be able to set a wiki's skin to for example
'TestSkin' with adding
(:skin TestSkin:) to SiteAdmin.AllGroupHeader

Note I have not tested this concept with farmconfig.php!

Another useful addition may be the farm-wide installation of
stylepage.php. See http://www.pmwiki.org/wiki/Cookbook/CSSInWikiPages
Then the wiki styling can be modified via a wiki page.

Another possibility is to control config settings via page text
variables (PTVs):
For instance create a page SiteAdmin.SiteConfig and add to this wiki
page PTVs which will determine configuration settings via associated
conditional code in config.php (or farmwide in farmconfig.php).

Example:

add to the configuration file

switch(PageTextVar('SiteAdmin.SiteConfig', 'Skin')) {
case 'gemini': $Skin = 'gemini'; break;
case 'triad' : $Skin = 'triad'; break;
default : $Skin = 'pmwiki';
}

(make sure you add 'break;' at the end of each 'case' line, otherwise
the 'switch' procedure carries on with the next line!)

and in SiteAdmin.SiteConfig

Skin: triad

or as hidden PTV:

(:Skin: triad:)

It is a lot safer to specify all the options explicitly, rather
than setting
   $Skin = PageTextVar('SiteAdmin.SiteConfig','Skin');

You can expand this concept to control other config settings and even
include recipe scripts.

Again note I have not tested this with farmconfig.php!


  ~Hans


___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] Farms: per-wiki config

2008-05-10 Thread Henrik Bechmann
I provide wiki farm administrators an ftp account (localized to their 
individual directory trees), and encourage them to use FileZilla to 
transfer files (there's also an option to link to a desktop text 
editor), or for more extensive changes they can use Notepad++ which has 
direct read/save through FTP. (both products are free).

Hope this helps.

Best,

- Henrik

Peter Flynn wrote:
 I'm just setting up a farm, and it's looking good. Each wiki will be a 
 separate topic, with a separate owner/admin.

 Is it possible for skins and other per-wiki configs to be managed (ie 
 changed) by each wiki's individual admin via a passworded web interface?

 Right now the only way I can see to do it is to provide them all with a 
 system account and have them log in with ssh and use vi/emacs to edit 
 their local config file.

 I suspect I'm missing something here, but I can't see what.

 ///Peter

 ___
 pmwiki-users mailing list
 pmwiki-users@pmichaud.com
 http://www.pmichaud.com/mailman/listinfo/pmwiki-users

   

-- 

Henrik Bechmann
bechmann.ca
Webmaster, celos.ca webhosting services


___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] Farms

2007-09-07 Thread Sandy
Mark Trumpold wrote:
 Hi All
 
 If I make a farmconfig I place that in the wiki 1 That will be the home
 wiki. I leave the local config there right?
 
 Thanks
 
 M
 

The config file in the home directory is for the home (first) wiki. You 
will need a separate config file for each of the fields (assuming you 
want to change anything from the farmconfig file, like the field's name 
or skin).

Each field directory is very similar to the main one, but it doesn't 
have all the source code and some of the pointers in the config files 
have to point all the way back to the original directory. You'll also 
have a different .htaccess file if you're using clean URLs.

Sandy


___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] Farms

2007-09-02 Thread Mark Trumpold
Hi All

I am getting this error

Parse error: syntax error, unexpected '/' in /home/.../.../Test/index.php on
line 1

I U\L a new clean fresh copy of pmwiki into a Test Directory.

I made a index. Php file that is as follows

?php include(/home/.../.../Test/index.php);?

I don't know why I am having sooo much trouble with this. It shouldn't be
this difficult

Best Mark


On 22/8/07 5:53 PM, Mike Shanley [EMAIL PROTECTED] wrote:

 
 
 Mark Trumpold wrote:
 Hi All
 
 I have tried reading the instructions on farms and I still seem to be having
 trouble. Could someone help, please ...
 
 I have a wiki (Wiki 1) running that I am very happy with.
 
 I want to make my other existing and new wikis to use the Wiki 1 get all the
 same scripts, recipes, guiedit buttons, passwords and so on.
 
 I understand about he wrapper script pointing to wiki 1 that needs to
 replace the pmwiki.php and that works (I think) but setting up the config
 etc I cant make it work or make sense of the documentation
 
 Thanks
 
 Mark
   
 
 Mark,
 
 There are a few things you need to do to get that farm working and your
 scripts transfered.
 
 1. Copy your local/config.php into local/farmconfig.php
 2. In farmconfig.php, replace all include_once('cookbook/whatever.php');
 with include_once($FarmD/cookbook/whatever.php);
 
 These two steps will make it so that all of your farms have identical
 settings to your main wiki. Next, you've got to create
 FarmFolder/local/config.php for all of your farms to change the title,
 script url, pub dir, skin, etc etc according to the Farm wiki pages. If
 you follow on all of the Farm wiki pages, you shouldn't have any problems.



___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] Farms

2007-09-02 Thread Mark Trumpold
Hi All

If I make a farmconfig I place that in the wiki 1 That will be the home
wiki. I leave the local config there right?

Thanks

M


On 22/8/07 5:53 PM, Mike Shanley [EMAIL PROTECTED] wrote:

 
 
 Mark Trumpold wrote:
 Hi All
 
 I have tried reading the instructions on farms and I still seem to be having
 trouble. Could someone help, please ...
 
 I have a wiki (Wiki 1) running that I am very happy with.
 
 I want to make my other existing and new wikis to use the Wiki 1 get all the
 same scripts, recipes, guiedit buttons, passwords and so on.
 
 I understand about he wrapper script pointing to wiki 1 that needs to
 replace the pmwiki.php and that works (I think) but setting up the config
 etc I cant make it work or make sense of the documentation
 
 Thanks
 
 Mark
   
 
 Mark,
 
 There are a few things you need to do to get that farm working and your
 scripts transfered.
 
 1. Copy your local/config.php into local/farmconfig.php
 2. In farmconfig.php, replace all include_once('cookbook/whatever.php');
 with include_once($FarmD/cookbook/whatever.php);
 
 These two steps will make it so that all of your farms have identical
 settings to your main wiki. Next, you've got to create
 FarmFolder/local/config.php for all of your farms to change the title,
 script url, pub dir, skin, etc etc according to the Farm wiki pages. If
 you follow on all of the Farm wiki pages, you shouldn't have any problems.



___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] Farms

2007-04-12 Thread Mark Trumpold
So would I no have a pmwiki.php file in my other wikis but only in the
wikifarm engine?


On 12/4/07 1:29 PM, DaveG [EMAIL PROTECTED] wrote:

 
 
 
 On Thu, 12 Apr 2007 10:54:49 +0200, Mark Trumpold [EMAIL PROTECTED]
 wrote:
 Hi again
 
 After a little more reading I still have questions;-)
 Do I install a new 'empty' or 'dummy' pmwiki that all the existing wikis get
 there scripts etc etc? The way I look at it it would make upgrading easy
 and safer (less risk to the existing Data. So if something were to go wrong
 with the dummy wiki the others would be still ok.
 That's the approach Ben Wilson documents on the FarmSetupByExample page. I
 didn't take that approach yet simply because I already set things up another
 way, but when I get some time I will likely switch. Logically having the
 PmWiki engine separate from all farm data (local, wiki.d) makes more sense,
 and is less prone to errors when upgrading.
 
 If I do that will it affect the wiki.d directory that has all my valuable
 pages? I read somewhere that it will make a new wiki.d for any wiki new to
 a farm. I don't mean new wiki but existing wiki joining the farm.
 In this type of setup you simply move the wiki.d to another directory.
 Essentially the wiki.d in the PmWiki engine directory will not be used.
 
 Whilst experimenting, simply make a backup copy of wiki.d. That way if
 something does get overwritten, you can simply copy it back.
 
 
  ~ ~ Dave
 



___
pmwiki-users mailing list
[EMAIL PROTECTED]
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] Farms

2007-04-12 Thread Ben Wilson
Not index.html, as much as index.php. I advocate the index.php
because many web servers expect to map to an index.* when given a
clean URL (e.g. http://www.example.org to
http://example.org/index.html).

Now that I have a web server of my own, I put PmWiki in
/usr/local/pmwiki and then:
  ln -sf /usr/local/pmwiki/pmwiki.php index.php

I also have /usr/local/share/pmwiki/(pub/cookbook) for that other
stuff. I symlink /pub to each field (I've not gotten past having to
have it in each field), but I have a farmconfig.php that maps $FarmC
to /usr/local/share/pmwiki/cookbook/; then
include_once($FarmC/recipe.php);.

FWIW, I am running about a dozen totally distinct sites using PmWiki
in a farm configuration as lighted described above. My documentation
of how I do it is a bit obfuscated, as Pm has admonished me in the
past. So, if my approach is confusion it's not your fault. :-)

Ben

On 4/12/07, DaveG [EMAIL PROTECTED] wrote:

 Correct. You would have an index.html that pointed to the pmwiki.php. Ben 
 suggests pointing to the pmwiki.php using a synonym, which will make it easy 
 to simply switch the synonym when upgrading/downgrading PmWiki versions.

 On Thu, 12 Apr 2007 14:35:45 +0200, Mark Trumpold [EMAIL PROTECTED] wrote:
  So would I no have a pmwiki.php file in my other wikis but only in the
  wikifarm engine?
 
 
  On 12/4/07 1:29 PM, DaveG [EMAIL PROTECTED] wrote:
 
 
 
 
  On Thu, 12 Apr 2007 10:54:49 +0200, Mark Trumpold
  [EMAIL PROTECTED]
  wrote:
  Hi again
 
  After a little more reading I still have questions;-)
  Do I install a new 'empty' or 'dummy' pmwiki that all the existing
  wikis get
  there scripts etc etc? The way I look at it it would make upgrading
  easy
  and safer (less risk to the existing Data. So if something were to go
  wrong
  with the dummy wiki the others would be still ok.
  That's the approach Ben Wilson documents on the FarmSetupByExample page.
  I
  didn't take that approach yet simply because I already set things up
  another
  way, but when I get some time I will likely switch. Logically having the
  PmWiki engine separate from all farm data (local, wiki.d) makes more
  sense,
  and is less prone to errors when upgrading.
 
  If I do that will it affect the wiki.d directory that has all my
  valuable
  pages? I read somewhere that it will make a new wiki.d for any wiki new
  to
  a farm. I don't mean new wiki but existing wiki joining the farm.
  In this type of setup you simply move the wiki.d to another directory.
  Essentially the wiki.d in the PmWiki engine directory will not be used.
 
  Whilst experimenting, simply make a backup copy of wiki.d. That way if
  something does get overwritten, you can simply copy it back.
 
 
   ~ ~ Dave
 


 ___
 pmwiki-users mailing list
 [EMAIL PROTECTED]
 http://www.pmichaud.com/mailman/listinfo/pmwiki-users



-- 
Ben Wilson
Words are the only thing which will last forever Churchill

___
pmwiki-users mailing list
[EMAIL PROTECTED]
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] Farms

2007-04-11 Thread DaveG

I just went through this. Setting up a farm is very easy. Understanding the 
details behind various configuration options takes a while. The most useful 
info for me was http://pmwiki.com/wiki/Cookbook/WikiFarmAlternative.

 ~ ~ Dave

On Wed, 11 Apr 2007 14:52:43 +0200, Mark Trumpold [EMAIL PROTECTED] wrote:
 Hi all
 
 Just a quick question.
 
 I am running a bunch of wikis under my domain on one server and I am
 getting
 tired of making a change to one and the the rest.
 
 I understand farms help with this.
 
 Just wanted to know how easy is it really
 What should I look out for
 Any tips for a successful implementation
 
 Thanks
 
 Mark
 
 
 
 ___
 pmwiki-users mailing list
 pmwiki-users@pmichaud.com
 http://www.pmichaud.com/mailman/listinfo/pmwiki-users


___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] Farms

2007-04-11 Thread Mark Trumpold
Ah I was wondering why you sent me there LOL


On 11/4/07 2:58 PM, DaveG [EMAIL PROTECTED] wrote:

 
 Sorry, I meant to use this link:
 http://pmwiki.com/wiki/Cookbook/FarmSetupByExample. The other link is more
 useful *after* doing the SetupByExample link, as it provide a long term
 maintainable solution, but makes things a little more complex to understand.
 
 On Wed, 11 Apr 2007 14:52:43 +0200, Mark Trumpold [EMAIL PROTECTED]
 wrote:
 Hi all
 
 Just a quick question.
 
 I am running a bunch of wikis under my domain on one server and I am
 getting
 tired of making a change to one and the the rest.
 
 I understand farms help with this.
 
 Just wanted to know how easy is it really
 What should I look out for
 Any tips for a successful implementation
 
 Thanks
 
 Mark
 
 
 
 ___
 pmwiki-users mailing list
 pmwiki-users@pmichaud.com
 http://www.pmichaud.com/mailman/listinfo/pmwiki-users
 
 
 ___
 pmwiki-users mailing list
 pmwiki-users@pmichaud.com
 http://www.pmichaud.com/mailman/listinfo/pmwiki-users



___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] Farms question (open_basedir restriction)

2007-02-12 Thread Patrick R. Michaud
On Thu, Feb 08, 2007 at 06:33:15PM +0100, Tom Lederer wrote:
 
 Am 08.02.2007 um 16:54 schrieb Patrick R. Michaud:
 
 On Thu, Feb 08, 2007 at 02:46:15AM +0100, Tom Lederer wrote:
 Hi,
 
 after following the instructions on http://www.pmwiki.org/wiki/ 
 PmWiki/WikiFarms, i have put a file in the new directory for 
 the new field:
 
  ?php include('../../../httpdocs/pmwiki/pmwiki.php');
 
 
 Here is the error message, that IMHO just looks the same just with  
 absolute paths:
 
 [client xx.xx.xx.xx] PHP Warning: %v%v() [a href='function.% 
 v'function.%v/a]: open_basedir restriction in effect. File(/srv/ 
 www/vhosts/celok.de/httpdocs/pmwiki/pmwiki.php) is not within the  
 allowed path(s): (/srv/www/vhosts/celok.de/subdomains/rpg/httpdocs:/ 
 tmp) in /srv/www/vhosts/celok.de/subdomains/rpg/httpdocs/index.php  
 on line 1

Taking the warning at face value, it's saying that the pmwiki
software isn't in the path given by PHP's open_basedir configuration
variable.  In particular, open_basedir seems to be set to

   /srv/www/vhosts/celok.de/subdomains/rpg/httpdocs:/tmp

which means that PHP will only include files that appear in
the /srv/www/vhosts/celok.de/subdomains/rpg/httpdocs or /tmp directories.
Since /srv/www/vhosts/celok.de/httpdocs isn't a subdirectory of either
of those, PHP is denying the include.

I'd say to try changing the include_once() line to a path that
is in the basedir, or see if you can get the open_basedir restriction
changed or removed.

Pm

___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] Farms question (open_basedir restriction)

2007-02-12 Thread Tom Lederer

Am 12.02.2007 um 19:57 schrieb Patrick R. Michaud:

[[SNIP]]

 Taking the warning at face value, it's saying that the pmwiki
 software isn't in the path given by PHP's open_basedir configuration
 variable.  In particular, open_basedir seems to be set to

/srv/www/vhosts/celok.de/subdomains/rpg/httpdocs:/tmp

 which means that PHP will only include files that appear in
 the /srv/www/vhosts/celok.de/subdomains/rpg/httpdocs or /tmp  
 directories.
 Since /srv/www/vhosts/celok.de/httpdocs isn't a subdirectory of either
 of those, PHP is denying the include.

 I'd say to try changing the include_once() line to a path that
 is in the basedir, or see if you can get the open_basedir restriction
 changed or removed.

 Pm

Well ok, that clears it up. And it means that i can not use farms to  
set up subdomains. Sad, but there is nothing to be done about it.

Thanks.
Tom

___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] Farms question (open_basedir restriction)

2007-02-10 Thread Tom Lederer
Uhm... just a ping. Anyone got an idea?

Best Regards,
Tom

Am 08.02.2007 um 18:33 schrieb Tom Lederer:


 Am 08.02.2007 um 16:54 schrieb Patrick R. Michaud:

 On Thu, Feb 08, 2007 at 02:46:15AM +0100, Tom Lederer wrote:
 Hi,

 after following the instructions on http://www.pmwiki.org/wiki/
 PmWiki/
 WikiFarms, i have put a file in the new directory for the new field:

  ?php include('../../../httpdocs/pmwiki/pmwiki.php');

 Which is the correct path (also tried absolute path with same
 effect).

 In order for wikifarms to work properly one has to use the
 absolute path.  I know you've already tried it with the absolute
 path and gotten a similar result, but could you provide the
 error message/warnings that come back when you use an absolute
 path instead of a relative one?  That would help a lot.

 Pm

 Sure, whatever helps, though in http://www.pmwiki.org/wiki/PmWiki/
 WikiFarms under the heading Creating an additional wiki in your
 farm it says absolute OR relative (just in case that really is  
 wrong).

 Here is the error message, that IMHO just looks the same just with
 absolute paths:

 [client xx.xx.xx.xx] PHP Warning: %v%v() [a href='function.%
 v'function.%v/a]: open_basedir restriction in effect. File(/srv/
 www/vhosts/celok.de/httpdocs/pmwiki/pmwiki.php) is not within the
 allowed path(s): (/srv/www/vhosts/celok.de/subdomains/rpg/httpdocs:/
 tmp) in /srv/www/vhosts/celok.de/subdomains/rpg/httpdocs/index.php
 on line 1

 [client xx.xx.xx.xx] PHP Warning: %v%v() [a href='function.%
 v'function.%v/a]: failed to open stream: Operation not permitted
 in /srv/www/vhosts/celok.de/subdomains/rpg/httpdocs/index.php on
 line 1

 [client xx.xx.xx.xx] PHP Warning: %v%v() [a href='function.%
 v'function.%v/a]: Failed opening '/srv/www/vhosts/celok.de/
 httpdocs/pmwiki/pmwiki.php' for inclusion (include_path='.:/usr/
 share/php5') in /srv/www/vhosts/celok.de/subdomains/rpg/httpdocs/
 index.php on line 1

 Remark: the %v%v() [a href='function.%v'function.%v/a]: part
 was in the other messages as well, i just didn't believe it to be
 important. Also the IPs are always shown (here replaced by xx)

 Best Regards,
 Tom

 ___
 pmwiki-users mailing list
 pmwiki-users@pmichaud.com
 http://www.pmichaud.com/mailman/listinfo/pmwiki-users


___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] Farms question (open_basedir restriction)

2007-02-08 Thread Patrick R. Michaud
On Thu, Feb 08, 2007 at 02:46:15AM +0100, Tom Lederer wrote:
 Hi,
 
 after following the instructions on http://www.pmwiki.org/wiki/PmWiki/ 
 WikiFarms, i have put a file in the new directory for the new field:
 
   ?php include('../../../httpdocs/pmwiki/pmwiki.php');
 
 Which is the correct path (also tried absolute path with same  
 effect). 

In order for wikifarms to work properly one has to use the
absolute path.  I know you've already tried it with the absolute
path and gotten a similar result, but could you provide the
error message/warnings that come back when you use an absolute
path instead of a relative one?  That would help a lot.

Pm

___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users