Andreas Gohr | 1 Sep 04:00
Favicon
Gravatar

darcs changes 2007-09-01


Good Morning!

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

---------------------------------------------------------------------
Sat Sep  1 01:00:01 CEST 2007  Andreas Gohr <andi[at]splitbrain.org>
  tagged develsnap 2007-09-01
---------------------------------------------------------------------

Single patches can be downloaded from
http://dev.splitbrain.org/darcs/index.cgi/dokuwiki/?c=patches

Bye,
your darcs changelog mailer

--

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

Gunther Pilz | 1 Sep 18:38

Re: Add some (non-persistent) Metadata

Hello,

I found a (dirty) solution for one of my problems.

Gunther Pilz schrieb:
> Second problem is that I use the 'IO_WIKIPAGE_WRITE' event to save my
> metadata (if it has changed). But this event is only triggered when
> there have been changes to the wiki/ page text. In case that only my
> metadata has been changed, it won't be saved. Any solution, other than
> making any pseudo editing?

So here it is for those who are interested:

There is a function saveWikiText() in /inc/common.php (at line 715)
which is called after page editing.
The line

    if($text == rawWiki($id,'')) return;

finishes the function if there have been no changes made to the (page) text.

So I changed this line to

    return trigger_event('IO_WIKIPAGE_WRITE', $data, '', false);

(and added my needed data).

So my function is called at the right time.
Maybe it's possible to add some additional code in the core DW, because
I think that it would make things easier if you are using the
(Continue reading)

Gunther Pilz | 1 Sep 19:06

Re: Add some (non-persistent) Metadata

It's me once again.

I just found another interesting post in the DW User Forum.
So here is the link

	http://forum.dokuwiki.org/thread/1205

just to complete the story ;)

Cheers
Gunther
--

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

Helge Kaltenbach | 1 Sep 19:32
Picon

showing author name on every page

Hello list,

can someone tell me how I force my wiki to show the author name on every
page? Currently you can't add any pages to the wiki, if your not logged in.
Any ideas?

thanks in advance
helge
--

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

Bob McConnell | 2 Sep 00:58

Re: showing author name on every page

Helge Kaltenbach wrote:
> Hello list,
> 
> can someone tell me how I force my wiki to show the author name on every
> page? Currently you can't add any pages to the wiki, if your not logged in.
> Any ideas?
> 
> thanks in advance
> helge

I did that to our company wiki a while ago. I had to replace the 
function in the page footer that shows the last changed date and user ID 
with a function that looks up the user name and inserts it in place of 
the ID. However, that still requires the user be logged in when updating 
the page, otherwise it won't know what user ID or name to insert. In our 
case, the wiki will allow anyone to view pages, but you have to log in 
before you can edit or add pages. We tried it the other way, but it was 
not possible to map the IP addresses to users, since the DHCP server 
doesn't always give everyone the same IP and a few machines that were 
being used are shared by several users.

I can't access that wiki from home, but can post my changes when I get 
back to the office on Tuesday.

Bob McConnell
N2SPP
--

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

(Continue reading)

Helge Kaltenbach | 2 Sep 01:26
Picon

Re: showing author name on every page

Bob McConnell wrote:
> Helge Kaltenbach wrote:
>> Hello list,
>>
>> can someone tell me how I force my wiki to show the author name on every
>> page? Currently you can't add any pages to the wiki, if your not
>> logged in.
>> Any ideas?
>>
>> thanks in advance
>> helge
> 
> I did that to our company wiki a while ago. I had to replace the
> function in the page footer that shows the last changed date and user ID
> with a function that looks up the user name and inserts it in place of
> the ID. However, that still requires the user be logged in when updating
> the page, otherwise it won't know what user ID or name to insert. In our
> case, the wiki will allow anyone to view pages, but you have to log in
> before you can edit or add pages. We tried it the other way, but it was
> not possible to map the IP addresses to users, since the DHCP server
> doesn't always give everyone the same IP and a few machines that were
> being used are shared by several users.
> 
> I can't access that wiki from home, but can post my changes when I get
> back to the office on Tuesday.
> 
> Bob McConnell
> N2SPP

Sounds great, waiting till Tuesday then, thanks!
(Continue reading)

Nikolay Vladimirov | 4 Sep 02:29

how to disable edit but leave section edit?

 Greetings!

 How can I disable the editing of the whole page in a way that the partial page editing will still work?
 The only thing I can think of is to use action plugin to check for
 $_REQUEST['lines'] on 'edit' action. Is there a slimpler way?

-- 
NV
--

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

Ben Coburn | 4 Sep 06:42

Re: how to disable edit but leave section edit?


On Sep 3, 2007, at 17:29, Nikolay Vladimirov wrote:

>  Greetings!
>
>  How can I disable the editing of the whole page in a way that the  
> partial page editing will still work?
>  The only thing I can think of is to use action plugin to check for
>  $_REQUEST['lines'] on 'edit' action. Is there a slimpler way?
>

Why? I do not see how this could be useful.

Also, it looks like one could always set $_REQUEST['lines'] to '0-0'  
or '0-<some really big number>' to edit the whole page....

Regards, Ben Coburn

--

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

YC Chan | 4 Sep 09:26
Picon

Re: how to disable edit but leave section edit?

Suggestion: update your template (i.e. main.php) to remove the link option to edit the (whole) page.
Look for and comment out the call
tpl_actionlink('edit','','');
The section edit buttons would still be available to allow people to do just that.

A more definite way is to modify html_edit ...

2007/9/4, Nikolay Vladimirov <nikolay <at> vladimiroff.com>:
Greetings!

How can I disable the editing of the whole page in a way that the partial page editing will still work?
The only thing I can think of is to use action plugin to check for
$_REQUEST['lines'] on 'edit' action. Is there a slimpler way?

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

Myron Turner | 4 Sep 13:00
Picon
Favicon
Gravatar

Re: how to disable edit but leave section edit?

If you want to modify the code, it would be in template.php, by 
commenting out line 406 of the latest dist:

            if($INFO['exists']){
//              echo html_btn('edit',$ID,'e',array('do' => 'edit','rev' 
=> $REV),'post');
            }

But the safest way is to delete the edit button at the bottom of 
main.php, which in recent versions of dokuwiki is:

              <?php tpl_button('edit')?>

Doing a quick check, I seem to find that tpl_actionlink  appears in 
versions prior to this year.

Best,

Myron

YC Chan wrote:
> Suggestion: update your template (i.e. main.php) to remove the link 
> option to edit the (whole) page.
> Look for and comment out the call
> tpl_actionlink('edit','','');
> The section edit buttons would still be available to allow people to 
> do just that.
>
> A more definite way is to modify html_edit ...
>
> 2007/9/4, Nikolay Vladimirov <nikolay <at> vladimiroff.com 
> <mailto:nikolay <at> vladimiroff.com>>:
>
>     Greetings!
>
>     How can I disable the editing of the whole page in a way that the
>     partial page editing will still work?
>     The only thing I can think of is to use action plugin to check for
>     $_REQUEST['lines'] on 'edit' action. Is there a slimpler way?
>
>     --
>     NV
>     --
>     DokuWiki mailing list - more info at
>     http://wiki.splitbrain.org/wiki:mailinglist
>
>

-- 

_____________________
Myron Turner
http://www.room535.org
http://www.bstatzero.org
http://www.mturner.org/XML_PullParser/

--

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


Gmane