Re: [pmwiki-users] underscores in file names ?
Hi, FWIW when I added underscore in wiki page names to the Pacific Bulb Society wiki, this is the code I added to the config file. Two chunks were needed. One at the start, one further down. ## Allow underscore in page name DJP 2012-03-01 ## must appear before any page name functions called $PageNameChars='-[:alnum:]_\\x80-\\xfe'; function AsSpacedUS($text) { return AsSpacedUTF8(str_replace('_',' ',$text)); } function MakePageNameUS($basepage, $str) { global $MakePageNameFunction; $page=$str; if($MakePageNameFunction) { $MakePageNameFunction=''; $page=MakePageName($basepage,$str); if(!PageExists($page)) { $page2=MakePageName($basepage,str_replace(' ','_',$str)); if(PageExists($page2)) $page=$page2; } $MakePageNameFunction = 'MakePageNameUS'; } return($page); } $AsSpacedFunction = 'AsSpacedUS'; // has to be set up after UTF8 below $MakePageNameFunction = 'MakePageNameUS'; // second chunk ## Enable UTF-8 (Unicode) support # * it is better to leave it alone after instalation # * must come before any pagename resolution include_once($FarmD.'/scripts/xlpage-utf-8.php'); $AsSpacedFunction = 'AsSpacedUS'; // underscore names set up above -- David Pilling email: da...@pilling.demon.co.uk web: http://www.davidpilling.net ___ pmwiki-users mailing list pmwiki-users@pmichaud.com http://www.pmichaud.com/mailman/listinfo/pmwiki-users
Re: [pmwiki-users] underscores in file names ?
Hi John, I can't help with the file name thing, but a word of warning: Never, ever, change pmwiki.php or any of the core files. There are many ways to change the way the program works. Pm put in all sorts of hooks, so it's rare that you'd have to edit the core files. It's a bit more work at first, to put all your customization in the designated folders (usually config.php or a recipe or a group-specific config file), but it's worth it. Updates are a breeze, since none of your custom code is in the files that get updated. Just read the update notes for the occassional twist, copy the new core files over the old, maybe edit config.php to activate/inactivate a new feature, and done. Also, for now stick to the recipes that are recommended by the power users, or are actively maintained. Most of the recipes are solid, but encountering one of the abandoned ones while learning isn't fun. Best of luck. I don't get to use pmwiki much these days, but every time I do, it's a breath of fresh air. Sandy On 1/23/2013 5:12 PM, John Foley wrote: Hi, I just picked up pmwiki a few days ago to see if it might fit my needs for a wiki engine to edit some web-based documentation (that's already in place). One of the things that the existing system has in place is a bunch of docs (and a navigation system) that uses underscores in the file names. Pmwiki does not seem to like this, however - it keeps removing the underscores. I did some poking around in the pmwiki.php script and thought I found where this was happening, but have not been able to change its behavior. Can anyone tell me if there's a way around this, and if so, what it might be ? Thanks, John On 1/23/2013 5:12 PM, John Foley wrote: Hi, I just picked up pmwiki a few days ago to see if it might fit my needs for a wiki engine to edit some web-based documentation (that's already in place). One of the things that the existing system has in place is a bunch of docs (and a navigation system) that uses underscores in the file names. Pmwiki does not seem to like this, however - it keeps removing the underscores. I did some poking around in the pmwiki.php script and thought I found where this was happening, but have not been able to change its behavior. Can anyone tell me if there's a way around this, and if so, what it might be ? Thanks, John ___ pmwiki-users mailing list pmwiki-users@pmichaud.com http://www.pmichaud.com/mailman/listinfo/pmwiki-users
[pmwiki-users] underscores in file names ?
Hi, I just picked up pmwiki a few days ago to see if it might fit my needs for a wiki engine to edit some web-based documentation (that's already in place). One of the things that the existing system has in place is a bunch of docs (and a navigation system) that uses underscores in the file names. Pmwiki does not seem to like this, however - it keeps removing the underscores. I did some poking around in the pmwiki.php script and thought I found where this was happening, but have not been able to change its behavior. Can anyone tell me if there's a way around this, and if so, what it might be ? Thanks, John ___ pmwiki-users mailing list pmwiki-users@pmichaud.com http://www.pmichaud.com/mailman/listinfo/pmwiki-users
Re: [pmwiki-users] underscores in file names ?
Hello John, two pages of interest I guess : http://www.pmwiki.org/wiki/Cookbook/ISO8859MakePageNamePatterns http://www.pmwiki.org/wiki/Cookbook/AlternateNamingScheme should be usefull as well to look in doc and mailing list where the $MakePageNamePatterns variable is discussed. http://www.pmwiki.org/wiki/PmWiki/LinkVariables#MakePageNamePatterns Altering the native scheme may (will) break the links to the documentation (pits:00819). It is commonly adviced to use config rather than altering the pmwiki scrip itself. Gilles. 2013/1/23 John Foley john.fo...@motorola.com Hi, I just picked up pmwiki a few days ago to see if it might fit my needs for a wiki engine to edit some web-based documentation (that's already in place). One of the things that the existing system has in place is a bunch of docs (and a navigation system) that uses underscores in the file names. Pmwiki does not seem to like this, however - it keeps removing the underscores. I did some poking around in the pmwiki.php script and thought I found where this was happening, but have not been able to change its behavior. Can anyone tell me if there's a way around this, and if so, what it might be ? Thanks, John __**_ pmwiki-users mailing list pmwiki-users@pmichaud.com http://www.pmichaud.com/**mailman/listinfo/pmwiki-usershttp://www.pmichaud.com/mailman/listinfo/pmwiki-users -- --- | A | de la langue française | B | http://www.languefrancaise.net/ | C | languefranca...@gmail.com --- ___ pmwiki-users mailing list pmwiki-users@pmichaud.com http://www.pmichaud.com/mailman/listinfo/pmwiki-users
Re: [pmwiki-users] underscores in file names ?
John Foley writes: One of the things that the existing system has in place is a bunch of docs (and a navigation system) that uses underscores in the file names. Pmwiki does not seem to like this, however - it keeps removing the underscores. The default installation doesn't remove the underscore character '_' from the names of uploaded files. If you haven't set the variables $UploadNameChars or $MakeUploadNamePatterns, it may be some recipe that does something unusual. Petko ___ pmwiki-users mailing list pmwiki-users@pmichaud.com http://www.pmichaud.com/mailman/listinfo/pmwiki-users