Re: [pmwiki-users] Fwd: Wikiwords

2007-01-22 Thread Hans Huijgen
My vote too. It's turned off in my site too. my 2 eurocents
-- 
Groetjes
Hans
http://www.fali.nl

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


Re: [pmwiki-users] Fwd: Wikiwords

2007-01-22 Thread Marco Ferretti
2 thumbs up 4 me. It's turned off by in all the pmwiki based apps i've made.

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


[pmwiki-users] Setting default page for new groups

2007-01-22 Thread Bob Eagan
I am trying to figure out how to set the $DefaultName as the default page
when creating a new group.  For example, if I create a group of [[Foo/]], it
currently tries to make a page named Foo/Foo instead of Foo/$DefaultName.

I'm thinking it might have something to do with the $PagePathFmt array order
but I could be wrong.

Any help on the best approach for this would be appreciated.

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.17.3/642 - Release Date: 1/20/2007
10:31 PM
 


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


Re: [pmwiki-users] Wikiwords

2007-01-22 Thread marc
Patrick R. Michaud said...
> On Sun, Jan 21, 2007 at 11:25:13PM +0100, [EMAIL PROTECTED] wrote:
> > Not having wikiwords enabled/used any more by default recalls, to my
> > unexperienced mind, a parallel theme: upper and lower cases in urls.
> > 
> > Do we have to expect Group.PageName to became group/pagename by default 
> > soon?
> 
> Not soon.  I am indeed planning for this -- see
> http://www.pmwiki.org/wiki/PmWiki/RoadMap -- but there
> are a _lot_ of things like this that impact how pages
> are being stored and indexed, and we have to have a way
> to cleanly migrate existing sites/pages to the new
> format, whatever it ends up being.

Currently, I use the following

RewriteRule ^([^/a-z].*) pmwiki/index.php?n=$1  [QSA,L]

as the final rule in .htaccess[1] in the web root. This is handy, 
because I can then access non-PmWiki folders by giving them a lower case 
first character. (I'm not suggesting that this is the best way to do it, 
but it works, which is always a good thing.)

Do you have something in mind for cases like this? (I'd rather prepare 
for it now, as I go, if possible.)

-- 
Cheers,
Marc

[1] full .htaccess something like:

  RewriteEngine on
  RewriteBase /
  RewriteCond %{HTTP_HOST} ^blah.com$ [NC]
  RewriteRule ^(.*)$ http://www.blah.com/$1 [R=301,L]
  RewriteRule ^$   pmwiki/index.php  [L]
  RewriteRule ^index\.php$ pmwiki/index.php  [L]
  RewriteRule ^([^/a-z].*) pmwiki/index.php?n=$1  [QSA,L]


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


Re: [pmwiki-users] How to custom a new "box" markup in config.php?

2007-01-22 Thread Elias Soong
marc wrote:
> Elias Soong said...
>> Hello,
>>
>> I'm using PmWiki 2.1.3. I'd like to use a box to write comment or
>> warning information. I knew it could be like this:
>>
>>   >> bgcolor=#ff border="1px
>>dotted blue"<<
>>%bgcolor=#ff% INFORMATION TITLE %%\\
>>INFORMATION CONTEXT
>>   >> <<
>> However, define a new markup in config.php may be a more convenient
>> solution. I've read http://www.pmwiki.org/wiki/PmWiki/CustomWikiStyles .
>> and added such lines at the end of config.php:
>>
>>   $WikiStyle['box']['bgcolor'] = '#ff';
>>   $WikiStyle['box']['border'] = '"1px dotted blue"';
>>
>> Nevertheless, all text between %box% and %% keep unchanged. May be I
>> made something wrong, I wrote to ask for help.
> 
> You need to use CSS attribute names. Thus:
> 
>   $WikiStyle['box']['background-color'] = '#ff';
>   $WikiStyle['box']['border'] = '1px dotted blue';
> 
>> Further more, is it possible to define a new box markup which not only
>> control text in it but also a marked title?
> 
>   >>box<<
>   %bgcolor=#ff%INFORMATION TITLE%%\\
>   INFORMATION CONTEXT
>   >><<
> 
> works. But since you need to indicate which content is the title, you'll 
> need a tag of some sort, so a new style is as good as any. You could do:
> 
>   $WikiStyle['box']['background-color'] = '#ff';
>   $WikiStyle['box']['border'] = '1px dotted blue';
>   $WikiStyle['title']['background-color'] = '#ff';
> 
> Then:
> 
>   >>box<<
>   %title%INFORMATION TITLE%%\\
>   INFORMATION CONTEXT
>   >><<
> 

Thank you, Marc! It works perfect! That's what I need.

Sincerely yours,
Elias


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


Re: [pmwiki-users] How to present a web site ...

2007-01-22 Thread marc
=?UTF-8?Q?Jan_Erik_Mostr=C3=B6?= =?UTF-8?Q?m?= said...

> Assume a public web site that should have a certain look & feel, 
> that is: no edit/history/etc links, just the standard look & 
> feel. The ability to edit would be limited to a number of people 
> and handled with the usual mechanism. But how do I make the 
> pages easily editable for these people, my first idea for how to 
> solve this would be to use two skins and change which one to use 
> depending if the user has been logged in or not (I don't know if 
> this can be done).

I used this last week (in skin.tmpl), thanks to the change in the latest 
PmWiki release:

  
  

In the case where there is no obvious place for a menu bar, then I put 
one across the top that's only visible to those with appropriate privs.. 
Something like:

  
  
  
  
  

-- 
Cheers,
Marc


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


[pmwiki-users] Author field and usernames problem

2007-01-22 Thread mcabano

Hi all.
I have installed PmWiki and customized it: in particular I use the 
AuthUser recipe to increase user privileges granularity on the different 
pages. I also use .htpasswd file in 'local' folder 
(/var/www/pmwiki/local) to store passwords.
I set all the necessary parameters in config.php for always requiring an 
author and setting the author field to the username login value.
I think my problem is in AuthUser recipe: it works perfectly for access 
(I have different pages set by "?action=attr" query) but registers site 
changes in a wrong way.

For example, if I modify a page which requires particular privileges:
1) At first Firefox asks for authentication
2) I insert my username (e.g. john.smith) and my password
3) Then I verify the cookie which is correctly set
4) On edit page author field is correctly set to john.smith only the 
firs time I edit (then It will be johnsmith)
5) I edit and save page modifications
6) In Site.AllRecentChanges page this operation is recorded correctly 
but the user logged is "johnsmith" (dot has disappeared)

Did someone solve my problem yet?
Thanx for any help you can provide.

Michele

Additional informations:

O.S. is Debian/GNU Linux (kernel 2.6.8)

Web server is Apache2

This is the result of 'dpkg -l | grep php4 command' showing Php version 
I use:

ii  php4   4.3.10-18  server-side, HTML-embedded scripting 
languag
ii  php4-cli   4.3.10-18  command-line interpreter for the php4 
script
ii  php4-common4.3.10-18  Common files for packages built from 
the php
ii  php4-gd4.3.10-18  GD module for php4
ii  php4-imap  4.3.10-18  IMAP module for php4
ii  php4-pear  4.3.10-18  PEAR - PHP Extension and Application 
Reposit
ii  php4-pgsql 4.3.10-4   PostgreSQL module for php4

Finally this is my config.php file:

http://www.pmichaud.com/wiki/Cookbook
##  for more details on the types of customizations that can be added
##  to PmWiki.

##  $WikiTitle is the name that appears in the browser's title bar.
$WikiTitle = 'apiCe Wiki';

##  I want WikiWords disabled
$LinkWikiWords = 0;

##  $ScriptUrl is your preferred URL for accessing wiki pages
##  $PubDirUrl is the URL for the pub directory.
$ScriptUrl = 'http://wiki.deis-ce.unibo.it/';
$PubDirUrl = 'http://wiki.deis-ce.unibo.it/pub';

##  If you want to use URLs of the form .../pmwiki.php/Group/PageName
##  instead of .../pmwiki.php?p=Group.PageName, try setting
##  $EnablePathInfo below.  Note that this doesn't work in all
environments,
##  it depends on your webserver and PHP configuration.  You might also
##  want to check http://www.pmwiki.org/wiki/Cookbook/CleanUrls more
##  details about this setting and other ways to create nicer-looking
urls.
# $EnablePathInfo = 1;

## $PageLogoUrl is the URL for a logo image -- you can change this
## to your own logo if you wish.
$PageLogoUrl = "$PubDirUrl/skins/deis/images/alma_mater.gif";

## If you want to have a custom skin, then set $Skin to the name
## of the directory (in pub/skins/) that contains your skin files.
## See PmWiki.Skins and Cookbook.Skins.
## THIS IS MY CUSTOM SKIN
$Skin = 'deis';

## PDF conversion
include_once('cookbook/pmwiki2pdf/pmwiki2pdf.php');

## Require an author name.
$EnablePostAuthorRequired = 1;

## You'll probably want to set an administrative password that you
## can use to get into password-protected pages.  Also, by default
## the "attr" passwords for the PmWiki and Main groups are locked, so
## an admin password is a good way to unlock those.  See PmWiki.Passwords
## and PmWiki.PasswordsAdmin.
$AuthUser['htpasswd'] = 'local/.htpasswd';

$DefaultPasswords['edit'] = 'id:*';


include_once('scripts/authuser.php');

## If no $Author is set, set it to the authenticated user name
if ($action == 'edit' && [EMAIL PROTECTED]'author']) {
  @session_start();
  if (@$_SESSION['authid']) {
[EMAIL PROTECTED]'authid'];
setcookie('author',$Author,0,'/');
  }
}

##  PmWiki comes with graphical user interface buttons for editing;
##  to enable these buttons, set $EnableGUIButtons to 1. 
# $EnableGUIButtons = 1;

##  If you want uploads enabled on your system, set $EnableUpload=1.
##  You'll also need to set a default upload password, or else set
##  passwords on individual groups and pages.  For more information
##  see PmWiki.UploadsAdmin.
$EnableUpload = 1;
$DefaultPasswords['upload'] = 'id:*';
$UploadDir = 'uploads';
$UploadExts['mm'] = 'application/mm';

##  Set $LinkWikiWords to zero if you don't want WikiWord links (i.e.,
##  all links are made using [[...]].
# $LinkWikiWords = 0;  # disable WikiWord links

##  Setting $EnableDiag turns on the ?action=diag and ?action=phpinfo
##  actions, which often helps the PmWiki authors to troubleshoot
##  various configuration and execution problems.
# $EnableDiag = 1; # enable remote diagnostics

##  By default, PmWiki doesn't allow browsers to cache pages.  Setting
##  $EnableIMSCaching=1; will re-enabl

Re: [pmwiki-users] Error message`

2007-01-22 Thread Ian Barton

> i cannot find any .flock file in the wiki.d. Is the file hidden and if 
> so how to access it?
> 
Yes it's hidden if you are using a Unix/Linux server. If you are using 
ftp see if your ftp client has a "Show hidden files" option. If you have 
shell access typing ls -a should show all hidden files.

Ian.

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


Re: [pmwiki-users] Wikiwords

2007-01-22 Thread Patrick R. Michaud
On Mon, Jan 22, 2007 at 11:02:27AM -, marc wrote:
> Patrick R. Michaud said...
> > On Sun, Jan 21, 2007 at 11:25:13PM +0100, [EMAIL PROTECTED] wrote:
> > > Not having wikiwords enabled/used any more by default recalls, to my
> > > unexperienced mind, a parallel theme: upper and lower cases in urls.
> > > 
> > > Do we have to expect Group.PageName to became group/pagename by default 
> > > soon?
> > 
> > Not soon.  I am indeed planning for this -- see
> > http://www.pmwiki.org/wiki/PmWiki/RoadMap -- but there
> > are a _lot_ of things like this that impact how pages
> > are being stored and indexed, and we have to have a way
> > to cleanly migrate existing sites/pages to the new
> > format, whatever it ends up being.
> 
> Currently, I use the following
> 
> RewriteRule ^([^/a-z].*) pmwiki/index.php?n=$1  [QSA,L]
> 
> as the final rule in .htaccess[1] in the web root. This is handy, 
> because I can then access non-PmWiki folders by giving them a lower case 
> first character. (I'm not suggesting that this is the best way to do it, 
> but it works, which is always a good thing.)
> 
> Do you have something in mind for cases like this? (I'd rather prepare 
> for it now, as I go, if possible.)

I don't have anything in mind for this situation yet.  I'm
sure we'll come up with something; I just don't yet know what
it will be.  :-)

Of course, sites will always have the option to be able
to set a policy that says that pagenames always start with an
uppercase letter.

Pm

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


Re: [pmwiki-users] setting $Author with $AuthId as prefix

2007-01-22 Thread marc
Kathryn Andersen said...
 
> This is what I've done:
> 
> include_once("$FarmD/scripts/author.php");
> include_once("$FarmD/scripts/authuser.php");
> # The author is prepended with the authId
> # To make this easier, use '-' as a separator
> # AuthId-Author
> if ($Author) {

There seems to be something funky going on in author.php. 

If you remove the include for author.php and precede the above 'if' 
with:

  $Author = $_POST['author'];

then all looks good here. However, this won't preserve the change of 
author to "userid-Kathryn" for subsequent edits. Not sure whether this 
is a requirement or not.

> if (strstr($Author, '-') != false) {
> $auth_split = explode('-', $Author, 2);
> $Author = $AuthId . '-' . $auth_split[1];
> } else if ($Author != $AuthId) {
> $Author = $AuthId . '-' . $Author;
> } else {
> $Author = $AuthId;
> }
> } else {
> $Author = $AuthId;
> }
> 
> This sort of works, as follows:
> 
> A) Initial edit: Author field is pre-filled with "userid".
> If I don't change this, then the Author is "userid".
> If I delete "userid" and type in "Kathryn", then
> - the History of the page says that the change was made by
>   "userid-Kathryn" (good)
> - the Recent Changes page says that the change was made by "Kathryn".
>   (bad)
> 
> B) Next edit: the Author field is pre-filled with "userid-Kathryn".
> If I leave it like that, then both the History of the page, and the
> Recent Changes page say that the change was made by "userid-Kathryn".
> 
> So why isn't the "userid-Kathryn" being used in the Recent Changes page
> in case A?


-- 
Cheers,
Marc


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


Re: [pmwiki-users] Author field and usernames problem

2007-01-22 Thread Patrick R. Michaud
On Mon, Jan 22, 2007 at 02:28:13PM -, [EMAIL PROTECTED] wrote:
> I set all the necessary parameters in config.php for always requiring an 
> author and setting the author field to the username login value.
> [...]
> For example, if I modify a page which requires particular privileges:
> 1) At first Firefox asks for authentication
> 2) I insert my username (e.g. john.smith) and my password
> 3) Then I verify the cookie which is correctly set
> 4) On edit page author field is correctly set to john.smith only the 
> firs time I edit (then It will be johnsmith)
> 5) I edit and save page modifications
> 6) In Site.AllRecentChanges page this operation is recorded correctly 
> but the user logged is "johnsmith" (dot has disappeared)

If you want the Author name to always exactly follow the username 
login value, then use the following sequence:

include_once('scripts/authuser.php');
if (@$AuthId) $Author = $AuthId;

See http://www.pmwiki.org/wiki/Cookbook/RequireAuthor for more details.

Pm

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


Re: [pmwiki-users] setting $Author with $AuthId as prefix

2007-01-22 Thread Patrick R. Michaud
On Mon, Jan 22, 2007 at 05:24:41PM +1100, Kathryn Andersen wrote:
> include_once("$FarmD/scripts/author.php");
> include_once("$FarmD/scripts/authuser.php");
> # The author is prepended with the authId
> # To make this easier, use '-' as a separator
> # AuthId-Author
> if ($Author) {
> if (strstr($Author, '-') != false) {
> $auth_split = explode('-', $Author, 2);
> $Author = $AuthId . '-' . $auth_split[1];
> } else if ($Author != $AuthId) {
> $Author = $AuthId . '-' . $Author;
> } else {
> $Author = $AuthId;
> }
> } else {
> $Author = $AuthId;
> }

Simpler is:

include_once("$FarmD/scripts/author.php");
include_once("$FarmD/scripts/authuser.php");
$Author = "$AuthId-" . preg_replace('/^[^-]*-/', '', $Author);

> - the Recent Changes page says that the change was made by "Kathryn".
>   (bad)
> ...
> So why isn't the "userid-Kathryn" being used in the Recent Changes page
> in case A?

The RecentChanges pages use $AuthorLink (not $Author) for
generating the attributions in each entry.  $AuthorLink is
set by author.php -- which for a first-time login is happening
before the $AuthId manipulations a bit later.

Simply be sure to also (re)set $AuthorLink when changing $Author:

include_once("$FarmD/scripts/author.php");
include_once("$FarmD/scripts/authuser.php");
$Author = "$AuthId-" . preg_replace('/^[^-]*-/', '', $Author);
$AuthorLink = "[[~$Author]]";

Pm

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


[pmwiki-users] Getting ssl to work with the http: to https: forcing script?

2007-01-22 Thread Clive Shane Hetherington

Hi People,

I am working with the auto convert from http: to https: cookbook script:

$ScriptUrl = str_replace('http:','https:',$ScriptUrl,1);
$PubDirUrl = str_replace('http:','https:',$PubDirUrl,1);
if ($_SERVER['SERVER_PORT'] != 443) {
   if ([EMAIL PROTECTED]) { header("Location: $ScriptUrl");
   } else { Redirect($pagename); }
}

However I come up with the following errors:

Warning: Wrong parameter count for str_replace() in 
/home/wholesou/public_html/wholesoulclients/farmtest/local/config.php on line 19

Warning: Wrong parameter count for str_replace() in 
/home/wholesou/public_html/wholesoulclients/farmtest/local/config.php on line 20

Warning: Cannot modify header information - headers already sent by (output 
started at 
/home/wholesou/public_html/wholesoulclients/farmtest/local/config.php:19) in 
/home/wholesou/public_html/wholesoulclients/farmtest/pmwiki.php on line 884

This is on: pmwiki-2.1.26

It enters fine with https:// without this code as soon as I do the forcing bit 
it fails.

Thanks - Clive S Hetherington

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


Re: [pmwiki-users] Author field and usernames problem

2007-01-22 Thread Michele Cabano
Patrick R. Michaud wrote:
> If you want the Author name to always exactly follow the username 
> login value, then use the following sequence:
>
> include_once('scripts/authuser.php');
> if (@$AuthId) $Author = $AuthId;
>
> See http://www.pmwiki.org/wiki/Cookbook/RequireAuthor for more details.
>
> Pm
>   

Thanks for the reply.

I modified config.php like above, but the problem still exists.
I also noticed that if I write someting containing non-alphanumeric 
characters in the author field (like 'john..smith' or 'john/smith') 
modifications are assigned in every case to 'johnsmith'

Michele

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


Re: [pmwiki-users] Getting ssl to work with the http: to https: forcing script?

2007-01-22 Thread Patrick R. Michaud
On Mon, Jan 22, 2007 at 04:58:00PM +, Clive Shane Hetherington wrote:
> 
> Hi People,
> 
> I am working with the auto convert from http: to https: cookbook script:
> 
> $ScriptUrl = str_replace('http:','https:',$ScriptUrl,1);
> $PubDirUrl = str_replace('http:','https:',$PubDirUrl,1);
> if ($_SERVER['SERVER_PORT'] != 443) {
>if ([EMAIL PROTECTED]) { header("Location: $ScriptUrl");
>} else { Redirect($pagename); }
> }
> 
> However I come up with the following errors:
> 
> Warning: Wrong parameter count for str_replace() in 
> /home/wholesou/public_html/wholesoulclients/farmtest/local/config.php on line 
> 19

Remove the "1" parameter from the call to str_replace -- i.e., use:

$ScriptUrl = str_replace('http:','https:',$ScriptUrl);
$PubDirUrl = str_replace('http:','https:',$PubDirUrl);
if ($_SERVER['SERVER_PORT'] != 443) {
   if ([EMAIL PROTECTED]) { header("Location: $ScriptUrl");
   } else { Redirect($pagename); }
}

(The fourth parameter to str_replace is available only in PHP 5 and
later.  Also, the fourth parameter doesn't limit the number of
replacements performed, but is a return-value to count how many
replacements were performed.)

Note that PmWiki version 2.2.0-beta18 and later automatically
detect https: and use it accordingly.  So, with 2.2.0 you
can do:

if ($UrlScheme != 'https:') {
  $ScriptUrl = str_replace($UrlScheme, 'https:', $ScriptUrl);
  if ([EMAIL PROTECTED]) { header("Location: $ScriptUrl"); exit; }
  Redirect($pagename);
}

Pm

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


Re: [pmwiki-users] Author field and usernames problem

2007-01-22 Thread Patrick R. Michaud
On Mon, Jan 22, 2007 at 06:06:59PM +0100, Michele Cabano wrote:
> Patrick R. Michaud wrote:
> > If you want the Author name to always exactly follow the username 
> > login value, then use the following sequence:
> >
> > include_once('scripts/authuser.php');
> > if (@$AuthId) $Author = $AuthId;
> >
> > See http://www.pmwiki.org/wiki/Cookbook/RequireAuthor for more details.
> >
> > Pm
> >   
> 
> Thanks for the reply.
> 
> I modified config.php like above, but the problem still exists.
> I also noticed that if I write someting containing non-alphanumeric 
> characters in the author field (like 'john..smith' or 'john/smith') 
> modifications are assigned in every case to 'johnsmith'

Yes -- In certain instances PmWiki automatically converts author 
names into something that can be used as a valid pagename
(by eliminating the dots and/or slashes).  But it shouldn't
do this if you're explicitly setting the $Author variable --
in that case PmWiki leaves the variable alone.

Note that the above only sets the author name when someone
has logged in with a username and password -- if a person hasn't
logged in the author names continue to work as before (i.e.,
coming from a browser cookie).  

If you just want PmWiki to allow any character in author names,
you might try setting (note the leading space):

$AuthorNameChars = " -\\xff";

Pm

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


Re: [pmwiki-users] Author field and usernames problem

2007-01-22 Thread Michele Cabano
Patrick R. Michaud wrote:

> If you just want PmWiki to allow any character in author names,
> you might try setting (note the leading space):
>
> $AuthorNameChars = " -\\xff";
>
> Pm
>   

This solve my problem once for all!
I put this in config.php beetween authuser inclusion ( include_once(...) 
) and $Author setting.

Thanks for support Patrick.

> Yes -- In certain instances PmWiki automatically converts author 
> names into something that can be used as a valid pagename
> (by eliminating the dots and/or slashes).  But it shouldn't
> do this if you're explicitly setting the $Author variable --
> in that case PmWiki leaves the variable alone.
>
>   

Well... I don't understand why but this seems possible in my instance. :)
I'm not a Php developer, but, since the cookie is correctly set, it 
seems a conversion problem. I think the problem is not in setting the 
value in the variable $Author but in writing this value automatically in 
Author field: dots and slashes are keyword in Pmwiki language, so it is 
not so strange if this characters are unusable in author names.

> Note that the above only sets the author name when someone
> has logged in with a username and password -- if a person hasn't
> logged in the author names continue to work as before (i.e.,
> coming from a browser cookie).
>   

Thanks for the specification but I found the code you wrote is very clear.

Michele

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


Re: [pmwiki-users] setting $Author with $AuthId as prefix

2007-01-22 Thread Tegan Dowling

Kathryn, when you've confirmed this works, would you consider adding it to
the site, as a recipe or as notes on the existing AuthUser page?

Also, something to check for:  In my experience of trying to use AuthUser, I
found that on a **site** with AuthUser enbled, but **pages** configured to
allow login via the non-AuthUser, native authentication, based on the
password alone (set by config.php or page attr or group attr), someone
logging in by clicking a (v2.1.26 syntax) [[{$Name}?action=login | Login]]
link, and using their miscellaneous username plus the password, would be
successfully logged in, but left hanging, looking at the Site.AuthForm,
instead of being returned to ?action=browse.  Even expert users get confused
and think their login has failed, when they're not returned to
?action=browse.

Just a heads up -- something to confirm isn't happening, or else that you
find a work-around, if it does.

Tegan

On 1/22/07, Patrick R. Michaud <[EMAIL PROTECTED]> wrote:


On Mon, Jan 22, 2007 at 05:24:41PM +1100, Kathryn Andersen wrote:
> include_once("$FarmD/scripts/author.php");
> include_once("$FarmD/scripts/authuser.php");
> # The author is prepended with the authId
> # To make this easier, use '-' as a separator
> # AuthId-Author
> if ($Author) {
> if (strstr($Author, '-') != false) {
> $auth_split = explode('-', $Author, 2);
> $Author = $AuthId . '-' . $auth_split[1];
> } else if ($Author != $AuthId) {
> $Author = $AuthId . '-' . $Author;
> } else {
> $Author = $AuthId;
> }
> } else {
> $Author = $AuthId;
> }

Simpler is:

include_once("$FarmD/scripts/author.php");
include_once("$FarmD/scripts/authuser.php");
$Author = "$AuthId-" . preg_replace('/^[^-]*-/', '', $Author);

> - the Recent Changes page says that the change was made by "Kathryn".
>   (bad)
> ...
> So why isn't the "userid-Kathryn" being used in the Recent Changes page
> in case A?

The RecentChanges pages use $AuthorLink (not $Author) for
generating the attributions in each entry.  $AuthorLink is
set by author.php -- which for a first-time login is happening
before the $AuthId manipulations a bit later.

Simply be sure to also (re)set $AuthorLink when changing $Author:

include_once("$FarmD/scripts/author.php");
include_once("$FarmD/scripts/authuser.php");
$Author = "$AuthId-" . preg_replace('/^[^-]*-/', '', $Author);
$AuthorLink = "[[~$Author]]";

Pm

___
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] Search box on PmWiki.org

2007-01-22 Thread Sandy
Something that keeps annoying me. Minor, but recurring, and the fix is 
equally minor.

When I search for a word, 9 times out of 10 I want only the groups 
PmWiki and Cookbook. CookbookV1, various profiles, Main, Site, PITS, the 
different translations just use up space before what I really want. I 
hate to think what it's like for someone just starting out. Go down the 
search page and the first title that looks right is from CookbookV1.

So, my suggestion is a second search box up in the right that is limited 
to the most "authoritative" groups only.

Sandy


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


[pmwiki-users] can't get blocklist to work

2007-01-22 Thread Paul Lewis
Hi,

I am just now attempting to use blocklisting for the first time at 
http://heniford.net/4321/index.php?n=Forms.SubmitACitation and it 
doesn't seem to be working.

Per instructions at http://www.pmichaud.com/wiki/PmWiki/Blocklist I have 
enabled

|$EnableBlocklist| 
 = 1;

in my config.php

and I have inserted the blocklist sample file located at 
http://www.pmichaud.com/pmwiki/uploads/Cookbook/sampleblocklist.txt
 
into this page http://heniford.net/4321/index.php?n=Site.Blocklist

I am only using the single blocklist page.

What am I missing?

The site is running pmwiki-2.2.0-beta15

Thanks for any help.

Paul

-- 
Paul H. Lewis
Govt. Documents Librarian
Univ. of S. Carolina - Aiken
http://library.usca.edu
http://opensource.usca.edu


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


[pmwiki-announce] pmwiki-2.2.0-beta24 released (wikiwords disabled, creole support)

2007-01-22 Thread Patrick R. Michaud
I've just released 2.2.0-beta24, now available from

http://www.pmwiki.org/pub/pmwiki/pmwiki-2.2.0-beta24.tgz
http://www.pmwiki.org/pub/pmwiki/pmwiki-2.2.0-beta24.zip
svn://pmwiki.org/pmwiki/tags/latest

The biggest change in this release is that PmWiki now is
distributed with wikiword processing disabled by default.
(The default for 2.1 had wikiword links disabled, but PmWiki
would still recognize wikiwords and perform special processing
when they occurred.  This is now disabled in 2.2.)

Wikiwords will continue to work for sites that have wikiwords
enabled via $LinkWikiWords=1; .  Sites that want to keep
the 2.1 behavior (wikiwords are processed but not linked by default)
can use the following setting:

$EnableWikiWords = 1;   # enable wikiword processing
$LinkWikiWords = 0; # turn off wikiword links

Even for sites that enable wikiwords, the markup has been
changed so that wikiwords following a '#' or '&' are no
longer treated as wikiwords (to avoid problems with color
names and character entities that have things that look like
wikiwords).  

PmWiki is now distributed with a module for Creole v0.4
standard markup (http://www.wikicreole.org/).  To enable Creole 
markup sequences, add the following line to a local customization 
file:

include_once('scripts/creole.php');

More details on Creole will be available at 
http://www.pmwiki.org/wiki/Cookbook/Creole .

PmWiki now provides links to more useful information whenever an 
"abort" situation occurs, such as being unable to access the 
.flock file or being unable to load a skin template.

The  bug in search results has been fixed.

The , , and 
directives in skin templates can now contain multiple lines
for the '...' components.

A new $EnableSkinDiag variable is introduced which checks
that skins provide required directives and provides error
messages if they do not.  (This variable is disabled by
default.)

The DisplayStopWatch() function in scripts/diag.php is now
StopWatchHTML().

The $PageExistsCache is automatically invalidated whenever
a new PageStore is created.  (Developers should not rely on
the existence of $PageExistsCache, as it may be removed in
a future release.)

The $BasicLayoutVars variable has been removed from skin
processing (it was deprecated prior to 2.0.0).


More changes (and updates to documentation) are expected
soon.  Comments and questions welcomed as always on the
mailing lists.

Thanks!

Pm

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


Re: [pmwiki-users] pmwiki-2.2.0-beta24 released (wikiwords disabled, creole support)

2007-01-22 Thread Henrik
Patrick,

What's the , , and 
> directives in skin templates can now contain multiple lines
> for the '...' components.
>
> A new $EnableSkinDiag variable is introduced which checks
> that skins provide required directives and provides error
> messages if they do not.  (This variable is disabled by
> default.)
>
> The DisplayStopWatch() function in scripts/diag.php is now
> StopWatchHTML().
>
> The $PageExistsCache is automatically invalidated whenever
> a new PageStore is created.  (Developers should not rely on
> the existence of $PageExistsCache, as it may be removed in
> a future release.)
>
> The $BasicLayoutVars variable has been removed from skin
> processing (it was deprecated prior to 2.0.0).
>
>
> More changes (and updates to documentation) are expected
> soon.  Comments and questions welcomed as always on the
> mailing lists.
>
> Thanks!
>
> Pm
>
> ___
> pmwiki-users mailing list
> pmwiki-users@pmichaud.com
> http://www.pmichaud.com/mailman/listinfo/pmwiki-users
>  
>
>   

-- 

Henrik Bechmann
www.osscommons.ca
www.bechmannsoftware.com
Webmaster, www.dufferinpark.ca


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


[pmwiki-users] IRI scheme

2007-01-22 Thread Jan Erik Moström
I was playing around to see if I could use PmWiki for a few more 
things and entered a link like this

[[x-yojimbo-item://BACC2403-FEEA-4DBD-9086-D1B6B8991D48|Testar]]

PmWiki didn't like this and skipped the link, when I look at 
 I can see what IRI 
scheme that is allowed.

I looked at the source code and found

foreach(array('http:','https:','mailto:','ftp:','news:','gopher:','nap:',
 'file:') as $m)

I get the impression that it's not possible to configure custom 
IRIs (I never knew that they had that acronym) like 'x-yojimbo-item'?

 jem

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


Re: [pmwiki-users] IRI scheme

2007-01-22 Thread Patrick R. Michaud
On Mon, Jan 22, 2007 at 11:14:06PM +0100, Jan Erik Moström wrote:
> I was playing around to see if I could use PmWiki for a few more 
> things and entered a link like this
> 
> [[x-yojimbo-item://BACC2403-FEEA-4DBD-9086-D1B6B8991D48|Testar]]
> 
> PmWiki didn't like this and skipped the link, when I look at 
>  I can see what IRI 
> scheme that is allowed.
> 
> I looked at the source code and found
> 
> foreach(array('http:','https:','mailto:','ftp:','news:','gopher:','nap:',
>  'file:') as $m)
> 
> I get the impression that it's not possible to configure custom 
> IRIs (I never knew that they had that acronym) like 'x-yojimbo-item'?

There are several ways to configure custom IRI's.  The easiest
is to use an InterMap link.  Just add the following line to
either Site.InterMap or local/localmap.txt :

x-yojimbo-item: x-yojimbo-item:$1

This says that any url that begins with "x-yojimbo-item:"
should be rendered as "x-yojimbo-item:" followed by the
path.  In other words, it's a self-reference.

Pm

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


[pmwiki-users] passwords not working

2007-01-22 Thread David Charles
Hello
i've set up a new website and i've installed the latest pmwiki etc etc but the 
passwords are not working properly!

it is at www.bedamned.co.uk

i've set an admin password and a site-wide edit password in config - but these 
work, at best, only occasionally - and most of the time any member of the 
public can edit or do whatever they like!

the strange thing is - i have another site at www.davidcharles.info which is 
set up exactly the same, but is always perfect security wise -it asks for a 
password on edit before AND after you edit so absolutely fail-safe - i don't 
understand! they are even both with the same webhost, although with slightly 
different packages

sorry i'm not very technical but if someone could give any guidance i would be 
really grateful! 

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


Re: [pmwiki-users] pmwiki-2.2.0-beta24 released (wikiwords disabled, creole support)

2007-01-22 Thread Patrick R. Michaud
On Mon, Jan 22, 2007 at 04:47:49PM -0500, Henrik wrote:
> Patrick,
> 
> What's the  except
that "page" will display the contents of read-protected pages,
whereas "wiki" honors any read permissions that are set.

Thanks!

Pm



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


Re: [pmwiki-users] passwords not working

2007-01-22 Thread Patrick R. Michaud
On Mon, Jan 22, 2007 at 10:30:06PM -, David Charles wrote:
>Hello
>i've set up a new website and i've installed the latest pmwiki etc etc but
>the passwords are not working properly!
> 
>it is at www.bedamned.co.uk
> 
>i've set an admin password and a site-wide edit password in config - but
>these work, at best, only occasionally - and most of the time any member
>of the public can edit or do whatever they like!

Are you sure?  How can you determine if the public is able to edit?

I just tried accessing the site and was unable to edit pages --
it always prompted me for a password, at least for the pages I tried.

Keep in mind that once you enter the admin password into a browser, 
you won't be prompted again for any passwords until logging out 
(via ?action=logout) or completely closing all of the browser windows.

Pm


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


[pmwiki-users] Inhibit some pages from rss feeds?

2007-01-22 Thread Russ Fink
Is there a way to inhibit certain pages from showing up on RSS feeds?  I'm 
trying to prevent things like Site.SideBar showing up, Group.SideBar, etc. 
only want the relevant content.  I'm setting this wiki up as a CMS and don't 
want to advertize its wikiness (thus inviting attacks).

Thanks,
Russ

PS: This is a personal communication from an account that has keyword-based 
spam filtering enabled.  Please preserve the original subject line when 
replying.  (Adding "Re:" is okay.)

_
Laugh, share and connect with Windows Live Messenger 
http://clk.atdmt.com/MSN/go/msnnkwme002001msn/direct/01/?href=http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=hmtagline


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


[pmwiki-users] 2 PMWiki RSS problems

2007-01-22 Thread JB
PMWiki is giving 2 problems from the RSS validator

   http://tinyurl.com/2uhtx2


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


Re: [pmwiki-users] setting $Author with $AuthId as prefix

2007-01-22 Thread Kathryn Andersen
On Mon, Jan 22, 2007 at 10:00:07AM -0600, Patrick R. Michaud wrote:
> Simply be sure to also (re)set $AuthorLink when changing $Author:
> 
> include_once("$FarmD/scripts/author.php");
> include_once("$FarmD/scripts/authuser.php");
> $Author = "$AuthId-" . preg_replace('/^[^-]*-/', '', $Author);
> $AuthorLink = "[[~$Author]]";

Works great!  Thanks!

Kathryn
-- 
 _--_|\ | Kathryn Andersen  
/  \| 
\_.--.*/| GenFicCrit mailing list 
  v | 
| Melbourne -> Victoria -> Australia -> Southern Hemisphere
Maranatha!  |   -> Earth -> Sol -> Milky Way Galaxy -> Universe

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


Re: [pmwiki-users] setting $Author with $AuthId as prefix

2007-01-22 Thread Kathryn Andersen
On Mon, Jan 22, 2007 at 12:17:19PM -0600, Tegan Dowling wrote:
> Kathryn, when you've confirmed this works, would you consider adding it to
> the site, as a recipe or as notes on the existing AuthUser page?
> 
> Also, something to check for:  In my experience of trying to use AuthUser, I
> found that on a **site** with AuthUser enbled, but **pages** configured to
> allow login via the non-AuthUser, native authentication, based on the
> password alone (set by config.php or page attr or group attr), someone
> logging in by clicking a (v2.1.26 syntax) [[{$Name}?action=login | Login]]
> link, and using their miscellaneous username plus the password, would be
> successfully logged in, but left hanging, looking at the Site.AuthForm,
> instead of being returned to ?action=browse.  Even expert users get confused
> and think their login has failed, when they're not returned to
> ?action=browse.
> 
> Just a heads up -- something to confirm isn't happening, or else that you
> find a work-around, if it does.

Well, the site is set up not to allow password-only logins, so I don't
think that will be an issue for me.
 
Kathryn Andersen
-- 
 _--_|\ | Kathryn Andersen  
/  \| 
\_.--.*/| GenFicCrit mailing list 
  v | 
| Melbourne -> Victoria -> Australia -> Southern Hemisphere
Maranatha!  |   -> Earth -> Sol -> Milky Way Galaxy -> Universe

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


Re: [pmwiki-users] Inhibit some pages from rss feeds?

2007-01-22 Thread Patrick R. Michaud
On Mon, Jan 22, 2007 at 06:47:52PM -0500, Russ Fink wrote:
> Is there a way to inhibit certain pages from showing up on RSS feeds?  I'm 
> trying to prevent things like Site.SideBar showing up, Group.SideBar, etc. 
> only want the relevant content.  I'm setting this wiki up as a CMS and don't 
> want to advertize its wikiness (thus inviting attacks).

Well, any options that are available to pagelists are also
supposed to be available for RSS feeds(*).  In other words, an
RSS feed is just a special form of pagelist.

So, you should be able to do the following:

$FeedTrailOpt['list'] = 'normal';

This does the equivalent of supplying "list=normal" to the
internal pagelist that is generated when creating the feed.
By default, list=normal excludes pages such as AllRecentChanges,
RecentChange, GroupHeader, GroupFooter, GroupAttributes, etc.

To get list=normal to also exclude pages from the Site.* and
PmWiki.* groups, one would add

$SearchPatterns['normal']['site'] = '!^(Site|PmWiki)\\.!';

Or, to create a custom list=feed option to identify things
that should be excluded by a feed, one can do something like

$FeedTrailOpt['list'] = 'feedlist';
$SearchPatterns['feedlist'] = array(
  '!\.(All)?Recent(Changes|Uploads)$!',
  '!\.Group(Print)?(Header|Footer|Attributes)$!',
  '!^(Site|PmWiki)\\.!',
  # ...etc...
  );

For more information about $SearchPatterns, see
http://www.pmwiki.org/wiki/Cookbook/SearchPatterns.

Above you'll note that I said that one "should" be able
to do this -- in writing this response I noticed a bug
in scripts/feeds.php that causes the $FeedTrailOpt settings
to be ignored.  This is now fixed in 2.2.0-beta25 (just released),
so try that.

Pm

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


Re: [pmwiki-users] setting $Author with $AuthId as prefix

2007-01-22 Thread Kathryn Andersen
On Mon, Jan 22, 2007 at 12:17:19PM -0600, Tegan Dowling wrote:
> Kathryn, when you've confirmed this works, would you consider adding it to
> the site, as a recipe or as notes on the existing AuthUser page?

Done. I've added to
http://www.pmwiki.org/wiki/PmWiki/AuthUser

(I considered adding it to Cookbook/AuthUser, but that page needs so
much cleanup I didn't want to touch it...)

Kathryn Andersen
-- 
 _--_|\ | Kathryn Andersen  
/  \| 
\_.--.*/| GenFicCrit mailing list 
  v | 
| Melbourne -> Victoria -> Australia -> Southern Hemisphere
Maranatha!  |   -> Earth -> Sol -> Milky Way Galaxy -> Universe

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


Re: [pmwiki-users] 2 PMWiki RSS problems

2007-01-22 Thread Patrick R. Michaud
On Mon, Jan 22, 2007 at 06:34:48PM -0600, JB wrote:
> PMWiki is giving 2 problems from the RSS validator
> 
>http://tinyurl.com/2uhtx2

If I read this correctly, the validator says that the
"feed is valid, but may cause problems for some users."
So, PmWiki's feed is technically correct.

The two items listed are

"An item should not include both pubDate and dc:date."

Okay, but which one should we use?  Some aggregators
look primarily for dc:date, others work only with pubDate.
PmWiki does what many RSS developers recommend, which
is to provide both.  As the validator notes, having both
isn't invalid, it's just that some feel there should be
only one date in the feed (and this bias is reflected in
the validator you chose).

Still, it's easy enough to disable locally -- simply set

$FeedFmt['rss']['item']['dc:date'] = '';

Or disable pubDate if that's your particular pleasure.

"item should contain a guid element."

Fair enough, we can add  to the feed defautl.  
I guess a reasonable guid would be the url of the page,
i.e., $PageUrl?  If so, then it can be added with

$FeedFmt['rss']['item']['guid'] = '$PageUrl';

Pm


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


Re: [pmwiki-users] Search box on PmWiki.org

2007-01-22 Thread Peter Reuterås
On 1/22/07, Sandy <[EMAIL PROTECTED]> wrote:
> Something that keeps annoying me. Minor, but recurring, and the fix is
> equally minor.
>
> When I search for a word, 9 times out of 10 I want only the groups
> PmWiki and Cookbook. CookbookV1, various profiles, Main, Site, PITS, the
> different translations just use up space before what I really want. I
> hate to think what it's like for someone just starting out. Go down the
> search page and the first title that looks right is from CookbookV1.
>
> So, my suggestion is a second search box up in the right that is limited
> to the most "authoritative" groups only.

Great idea!

/Peter

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


Re: [pmwiki-users] pmwiki-2.2.0-beta24 released (wikiwords disabled, creole support)

2007-01-22 Thread Crisp, Steve [UK]
Patrick wrote:
>
> I've just released 2.2.0-beta24
>
 
Congratulations on another fine release!  The creole support looks good too.
 
One thing I hate though ... that their 'WikiWizard' editor isn't in my 
favourite Wiki - PmWiki!  All my community would love a WYSIWYG editor.  The 
exisiting Perl based one on the cookbook didn't work that well.  WikiWizard 
seems Java based and independant of Wiki engine, although requires a servlet 
container.  This kind of restricts it usage on the Internet but perhaps not on 
Intranets.
 
I might even see if I have time to look at integrating the two for our Intranet.
 
Regards,
-Steve.
___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users