[pmwiki-users] Sub-dividing page files into sub-folders within each Group folder

Peter Bowers pbowers at pobox.com
Mon Dec 19 15:23:57 CST 2011

What if you are in GroupA.Afile and you try to read
{GroupA.Bfile$:foo} or try to (:include GroupA.Bfile:) -- your $Name1
is going to be set to A within your config.php but your PTV processor
or your include function needs to look within the B directory.  How
will a pagelist learn how to look through all the possible directories
to find the files rather than just looking in the current contents of
$Name1?  I think you're going to have to go to a lower level to solve
this problem, replacing the PageStore class (or at least extending it,
most notably adding functionality to pagefile() and perhaps ls()) with
some added functionality.

I have read of instances of pmwiki operating comfortably with many
thousands of files within a single directory.  I would take *great*
care to examine your presuppositions (i.e., that the number of files
needs to be limited to roughly 1000) with great care before spending a
lot of time trying to make this change.  Personally I would probably
change my host before making this change -- certainly if a given host
has that problem it is not something endemic to linux boxes and so a
host-change should solve the problem...  I don't pretend to know the
specifics of your situation or needs -- I'm just suggesting taking
another look before you invest too much time and effort in solving a
problem which does not exist on other systems...

If the difficulty is in deleting those spam comments, have you tried
installing a PHP-based file browser as I mentioned?  The first one
that comes up in the search is
http://encode-explorer.siineiolekala.net/ and it looks like it would
do the trick for you...


On Mon, Dec 19, 2011 at 3:36 PM, kirpi at kirpi.it <kirpi at kirpi.it> wrote:
>> One "natural" approach [...] would be to further sub-divide
>> page files into sub-folders within each group, creating and handling
>> sub-directories named by pages first letter, like in
>>   Main.HomePage -> wiki.d/Main/H/Main.HomePage
>>   Main.SomePage -> wiki.d/Main/S/Main.SomePage
>>   Site.SomePage -> wiki.d/Site/S/Site.SomePage
> It seems that setting:
>   $FmtPV['$Name1'] = '$name{0}';
>   $WikiDir = new PageStore('wiki.d/$Group/$Name1/$FullName');
>   $UploadPrefixFmt = '/$Group/$Name1';
> allows to store pages and file uploads un sub-subfolders, the way I
> previously described.
> My impression is positive, but...
> Would it be a safe move? Would there be more issues to take care of?
> Would, in other words, all work fine as usual, and would the wiki
> handle things smooth, or some problem may arise which can be foreseen,
> please?
> More in general, would such an approach make sense?
> Thank you
> Luigi
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://www.pmichaud.com/mailman/listinfo/pmwiki-users

More information about the pmwiki-users mailing list