Andreas Gohr | 1 Aug 04:00 2006

darcs changes 2006-08-01


Good Morning!

This are the darcs changes for DokuWiki committed
yesterday. Please test them and report bugs.

---------------------------------------------------------------------
Tue Aug  1 00:30:08 CEST 2006  Andreas Gohr <andi[at]splitbrain.org>
  * fix in JS compressor
  This fixes a problem with escaped backslashes in single and double quote
  strings.

Mon Jul 31 21:28:07 CEST 2006  Andreas Gohr <andi[at]splitbrain.org>
  * spellchecker CSS changes #539 #824
  This patch now assigns the needed proprietary CSS attributes for the spellchecker
  through JavaScript. This makes the CSS valid again (at least it appears to be ;-))
  I also fixed a problem with leading single spaces in IE

Mon Jul 31 20:25:14 CEST 2006  Andreas Gohr <andi[at]splitbrain.org>
  * replaced inlinestyle with class

Mon Jul 31 12:59:10 CEST 2006  chris[at]jalakai.co.uk
  * config plugin update

  - improvements in handling of default values for multi-checkbox settings (e.g. defaultactions)
  - minor style tweaks to cater for IE/Win

Mon Jul 31 19:53:31 CEST 2006  Andreas Gohr <andi[at]splitbrain.org>
  * another try at the uploadform
---------------------------------------------------------------------
(Continue reading)

Bill Jones | 1 Aug 06:10 2006
Picon

Re: Changelog rewrite

On 7/31/06, Syv Ritch <elfroggio <at> gmail.com> wrote:
> Would you consider sharing them with us?

Sure. The main two are plain shell scripts, not Perl per-se; the Perl
stuff I am hesitant to share for various reasons -- mostly because
after having looked at them I'm not sure I want to clean them up for
public use.  Suffice to say they mostly perform site management I
cannot figure out (yet) how to do in PHP -- and prolly not very clean.
 Perl can definitely be a down and dirty language.

This script I got off the Dokuwiki site itself and I run it via cron daily:

rm -fR dw/_test
find ~/dw_data/attic/ -type f -mtime +11 -exec rm -f {} \;
find ~/dw_data/pages/ -name '*.lock' -type f -mtime +1 -exec rm -f {} \;
find ~/dw_data/pages/ -depth -type d -empty -exec rmdir {} \;

This script I wrote myself and I run it via cron weekly -

#!/usr/bin/bash
echo "Content-type: text/plain" ; echo ; echo ;
echo "<pre>Getting DokuWiki..." ; echo " " ;
cd ~/public_html
wget http://dev.splitbrain.org/download/snapshots/dokuwiki-latest.tgz
tar zxvf dokuwiki-latest.tgz
echo " " ; echo " ...cleaning house... " ; echo " " ;
rm -fR dw/_test
rm -fR dw/install.php
# purge files older than 11 days from the attic
find ~/dw_data/attic/ -type f -mtime +11 -exec rm -f {} \;
(Continue reading)

Gerry Weißbach | 1 Aug 09:25 2006
Picon

Template Switching Action


Good morning.

I am currently writing an action plugin, which will give a button to
instantly change the template of the whole DokuWiki for the actual
Session. Actually it works for the template, but not for the style. The
reason is imo that calling the /lib/exe/css.php does not trigger any
event. Is that right? Could that be changed? I can imagine there will be
more things that want to trigger the css or js build up.

Best Regards,
Gerry
--

-- 
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist

Chris Smith | 1 Aug 12:38 2006
Picon

Re: Template Switching Action

Gerry Weißbach wrote:
> Good morning.
>
> I am currently writing an action plugin, which will give a button to
> instantly change the template of the whole DokuWiki for the actual
> Session. Actually it works for the template, but not for the style. The
> reason is imo that calling the /lib/exe/css.php does not trigger any
> event. Is that right? Could that be changed? I can imagine there will be
> more things that want to trigger the css or js build up.
>
> Best Regards,
> Gerry
>   
iirc, recent changes make the css & js cache name dependent on the 
current template.
--

-- 
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist

Gerry Weißbach | 1 Aug 13:07 2006
Picon

Re: Template Switching Action


Am 1.8.2006 schrieb "Chris Smith" <chris <at> jalakai.co.uk>:

>Gerry Weißbach wrote:
>> Good morning.
>>
>> I am currently writing an action plugin, which will give a button to
>> instantly change the template of the whole DokuWiki for the actual
>> Session. Actually it works for the template, but not for the style. The
>> reason is imo that calling the /lib/exe/css.php does not trigger any
>> event. Is that right? Could that be changed? I can imagine there will be
>> more things that want to trigger the css or js build up.
>>
>> Best Regards,
>> Gerry
>>
>iirc, recent changes make the css & js cache name dependent on the
>current template.

I am aware about the fakt that the css.php and js.php are generated
without using lots of other wiki functions and therefore are dependent
on the $conf settings. I also know, that if I'd i.e. implement my code
to change this $conf into the local.protected.php it would work (I did
so for the older release) but I want a solution that is independent of
changing source code. Therefore I asked for an event which could easily
be implemented into the css.php

>--
>DokuWiki mailing list - more info at
>http://wiki.splitbrain.org/wiki:mailinglist
(Continue reading)

Chris Smith | 1 Aug 14:47 2006
Picon

Re: Template Switching Action

Gerry Weißbach wrote:
> I am aware about the fakt that the css.php and js.php are generated
> without using lots of other wiki functions and therefore are dependent
> on the $conf settings. I also know, that if I'd i.e. implement my code
> to change this $conf into the local.protected.php it would work (I did
> so for the older release) but I want a solution that is independent of
> changing source code. Therefore I asked for an event which could easily
> be implemented into the css.php
>   
One of us seems to be missing the point.

Unless I have misunderstood, when you change the template, you 
necessarily call doku.php.  You're action plugin can sit in there and 
happily work its magic on the template name in local.protected.php.  
Then when css.php and js.php get called, they will look for the cached 
version of the cs & js for the new template.  If they don't find it, 
they'll generate a new one.  Because the cache name is dependent on the 
template name there is no way they will use the css/js from another 
template.

If you're underlying problem is you wish to use a "foundation template" 
which changes the "actual template", then I would leave conf['template'] 
at the "actual template" value and modify the conf['template'] setting 
within dokuwiki to ensure your "foundation template" gets to do its stuff.

Personally, I'd be against adding events into cs & js generation, they 
should have to do as little work as possible.

Cheers,

(Continue reading)

Andreas Gohr | 1 Aug 14:42 2006

Re: Template Switching Action

Chris Smith writes:

> Unless I have misunderstood, when you change the template, you 
> necessarily call doku.php.  You're action plugin can sit in there and 
> happily work its magic on the template name in local.protected.php.  

If I understood correctly he wants to change the template on a per user 
basis (stored in the session) so modifying the config files is out of scope.

To solve this the css.php would either need to accept an additional 
parameter to switch the template on the fly or we would need some plugin 
event. I don't know what I dislike more.

Andi
--

-- 
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist

Gerry Weißbach | 1 Aug 14:43 2006
Picon

Re: Template Switching Action


Am 1.8.2006 schrieb "Chris Smith" <chris <at> jalakai.co.uk>:

>Gerry Weißbach wrote:
>> I am aware about the fakt that the css.php and js.php are generated
>> without using lots of other wiki functions and therefore are dependent
>> on the $conf settings. I also know, that if I'd i.e. implement my code
>> to change this $conf into the local.protected.php it would work (I did
>> so for the older release) but I want a solution that is independent of
>> changing source code. Therefore I asked for an event which could easily
>> be implemented into the css.php
>>
>One of us seems to be missing the point.
>
>Unless I have misunderstood, when you change the template, you
>necessarily call doku.php.  You're action plugin can sit in there and
>happily work its magic on the template name in local.protected.php.
>Then when css.php and js.php get called, they will look for the cached
>version of the cs & js for the new template.  If they don't find it,
>they'll generate a new one.  Because the cache name is dependent on the
>template name there is no way they will use the css/js from another
>template.

So far, so good.

>
>If you're underlying problem is you wish to use a "foundation template"
>which changes the "actual template", then I would leave conf['template']
>at the "actual template" value and modify the conf['template'] setting
>within dokuwiki to ensure your "foundation template" gets to do its stuff.
(Continue reading)

Gerry Weißbach | 1 Aug 14:44 2006
Picon

Re: Template Switching Action


Am 1.8.2006 schrieb "Andreas Gohr" <andi <at> splitbrain.org>:

>Chris Smith writes:
>
>> Unless I have misunderstood, when you change the template, you
>> necessarily call doku.php.  You're action plugin can sit in there and
>> happily work its magic on the template name in local.protected.php.
>
>If I understood correctly he wants to change the template on a per user
>basis (stored in the session) so modifying the config files is out of scope.
>
>To solve this the css.php would either need to accept an additional
>parameter to switch the template on the fly or we would need some plugin
>event. I don't know what I dislike more.
>
>Andi

Sorry about that ... I still hope its worth a though.

Gerry
>--
>DokuWiki mailing list - more info at
>http://wiki.splitbrain.org/wiki:mailinglist
--

-- 
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist

Chris Smith | 1 Aug 17:34 2006
Picon

Re: Template Switching Action

Gerry Weißbach wrote:
> Am 1.8.2006 schrieb "Andreas Gohr" <andi <at> splitbrain.org>:
>
>   
>> Chris Smith writes:
>>
>>     
>>> Unless I have misunderstood, when you change the template, you
>>> necessarily call doku.php.  You're action plugin can sit in there and
>>> happily work its magic on the template name in local.protected.php.
>>>       
>> If I understood correctly he wants to change the template on a per user
>> basis (stored in the session) so modifying the config files is out of scope.
>>
>> To solve this the css.php would either need to accept an additional
>> parameter to switch the template on the fly or we would need some plugin
>> event. I don't know what I dislike more.
>>
>> Andi
>>     
>
>
> Sorry about that ... I still hope its worth a though.
>
> Gerry
>   
There is another solution, a little hackish, but a solution nevertheless.

The config files are all php. Add your code to set $conf['template'] 
based on the session value (starting the session if necessary) there.
(Continue reading)


Gmane