[pmwiki-users] Upgrading PmWiki to the latest version on Windows OS

1 view
Skip to first unread message

Al Louis Ripskis

unread,
Mar 23, 2012, 5:00:21 PM3/23/12
to pmwiki-users
Guys, I know this will seem very elementary, but...
PmWiki/Upgrades instructions under item 4. Copy say:
"Copy the files in pmwiki-x.y.z over the files of your existing PmWiki installation. ... if your existing PmWiki installation is in a directory called pmwiki, then one way to copy the new files over the existing ones is to enter the (UNIX) command:
cp -a pmwiki-x.y.z/. pmwiki"
But what command do you enter if you have Windows system and where exactly?
Can I use FileZilla to do this? Again, what command and where would I enter it?
Thanks a million,
Al

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

Petko Yotov

unread,
Mar 24, 2012, 10:12:20 PM3/24/12
to pmwiki-users
Al Louis Ripskis writes:
> PmWiki/Upgrades instructions under item 4. Copy say:
> "Copy the files in pmwiki-x.y.z over the files of your existing PmWiki
> installation.
...
> But what command do you enter if you have Windows system and where exactly?

Just open two folders at a time with your file manager (2 windows) and copy
the files from the new version pmwiki-x.y.z.zip folder to the same
directories on the server.

For example: copy the new pmwiki.php from the *.zip overwriting the old
pmwiki.php on the server; go to the scripts/ directories in both windows and
copy all files from the *.zip scripts/ directory to the server's scripts/
directory, overwriting them; do the same in wikilib.d/ and a couple of times
in pub/.

It is recommended to have a backup of your current working version, so if
the new version doesn't work for some reason, you can replace it back with
your old files.

You are also invited to read the release notes before upgrading - they may
contain important information for administrators who upgrade. Read all
entries between your previous version and the new one.

http://www.pmwiki.org/wiki/PmWiki/ReleaseNotes

Petko

pub...@lundgren.nu

unread,
Mar 26, 2012, 5:37:39 AM3/26/12
to pmwiki-users
I want/need to use a separate skin for some (a few) pages on my site.

I think I have found out a couple of ways to do this but none of them
"feels right".

Does anyone "know" the "right" way (AKA "best") to do this in PmWiki?

Regards
/ Thomas.

Peter Bowers

unread,
Mar 26, 2012, 6:46:01 AM3/26/12
to pub...@lundgren.nu, pmwiki-users
On Mon, Mar 26, 2012 at 11:37 AM, <pub...@lundgren.nu> wrote:
> I want/need to use a separate skin for some (a few) pages on my site.
>
> I think I have found out a couple of ways to do this but none of them
> "feels right".
>
> Does anyone "know" the "right" way (AKA "best") to do this in PmWiki?

If it's limited to 3-4 pages or groups then simply a per-page or
per-group customization file would be the preferred. If there are
more than that then it would probably be better in a simple
conditional in your config.php:

$pagename = ResolvePageName($pagename);
if (in_array($pagename, array('GroupA.PageA', 'GroupB.PageB', [...])))
$Skin = 'myskin';
else
$Skin = 'otherskin';

Be aware that ResolvePageName() implicitly calls some functions which
do caching, so this should be late in your config.php. Obviously
there are other ways to do the conditional besides in_array
(preg_match with an array of REs comes to mind if they fit patterns)
but presumably you've already got that figured out...

-Peter

Petko Yotov

unread,
Mar 26, 2012, 7:37:46 AM3/26/12
to pmwiki...@pmichaud.com
On Monday 26 March 2012 11:37:39 pub...@lundgren.nu wrote:
> I want/need to use a separate skin for some (a few) pages on my site.
> Does anyone "know" the "right" way (AKA "best") to do this in PmWiki?

If you have limited groups or pages, you can create files

pmwiki/local/Group1.php
pmwiki/local/Group2.Page1.php
pmwiki/local/Group2.Page2.php

And inside each one, place such content:

<?php
$Skin = "myotherskin";

If you want to be able to change the skins with a markup (:skin myotherskin:)
in the wiki page, add something like this in your config.php file:

Markup('skin', 'directives', '/\\(:skin\\s+([-\\w]+)\\s*:\\)/e',
"PZZ(SetSkin(\$pagename,'$1'))");

Petko

Reply all
Reply to author
Forward
0 new messages