Chris G | 1 Jul 2011 12:19

Re: Is there any way to pass information from one instance of doku.php to another - i.e. for an action?

On Thu, Jun 30, 2011 at 06:39:57PM +0200, Michael Hamann wrote:
[snip]

> > One could simply write to a file (I have resorted to this approach
> > previously) and read it at the called end but it feels as if there
> > should be a better way to do it - or at least a built in way of some
> > sort, like sort of 'super globals'.
> 
> The PHP way for storing information during requests is the session.  The
> session is however shared between all requests in a window/browser
> session, i.e. you don't know that the information in the session is
> really from the page the user comes from (and not from the page the user
> has just opened in a new tab) but that's a problem you also get when you
> write your own files.
> 
Thank you, I think sessions will provide me with what I need. Another
area of PHP I need to dig into!  :-)

-- 
Chris Green
--

-- 
DokuWiki mailing list - more info at
http://www.dokuwiki.org/mailinglist

Chris G | 1 Jul 2011 12:24

Re: Is there a simple way to get search to work from the current namespace down?

On Thu, Jun 30, 2011 at 08:37:29PM +0200, Gerrit wrote:
> Op 30-06-11 12:56, Chris G schreef:
> >On Thu, Jun 30, 2011 at 12:47:22PM +0200, Christian Jung wrote:
> >>Am 30.06.2011, 12:18 Uhr, schrieb Chris G<cl <at> isbd.net>:
> >>
> >>>Can anyone point me to where the plugin searchbox is code.  I've looked
> >>>very hard through all the code at
> >>>https://github.com/splitbrain/dokuwiki-plugin-pluginrepo
> >>>but I can't see anywhere there that it creates the search box.
> >>https://github.com/splitbrain/dokuwiki-plugin-pluginrepo/blob/master/syntax/table.php#L115
> >>
> >Brilliant, thank you, now I need to work out how the Javascript does its
> >clever business!
> >
> 
> I have added on similar way a search for namespace 'vormingsbank' ,
> either it's hardcoded:
> http://trac.knorrie.org/csrdelft.nl/changeset/2270/trunk/wiki/lib/plugins/searchform
> 
Are the changes there all that's needed?  I.e. does that work without
changing the Javascript?

If that's all that's needed then I can modify my copy of the searchform
plugin to do what I want.

> I like to redo it, so setting the right namespace in the syntax will
> be possible. But i am now too busy. When i do, i will create also a
> fork on github.
> 
That's what I aim to do.
(Continue reading)

Chris G | 1 Jul 2011 12:59

Re: Is there a simple way to get search to work from the current namespace down?

On Fri, Jul 01, 2011 at 11:24:45AM +0100, Chris G wrote:
> On Thu, Jun 30, 2011 at 08:37:29PM +0200, Gerrit wrote:
> > Op 30-06-11 12:56, Chris G schreef:
> > >On Thu, Jun 30, 2011 at 12:47:22PM +0200, Christian Jung wrote:
> > >>Am 30.06.2011, 12:18 Uhr, schrieb Chris G<cl <at> isbd.net>:
> > >>
> > >>>Can anyone point me to where the plugin searchbox is code.  I've looked
> > >>>very hard through all the code at
> > >>>https://github.com/splitbrain/dokuwiki-plugin-pluginrepo
> > >>>but I can't see anywhere there that it creates the search box.
> > >>https://github.com/splitbrain/dokuwiki-plugin-pluginrepo/blob/master/syntax/table.php#L115
> > >>
> > >Brilliant, thank you, now I need to work out how the Javascript does its
> > >clever business!
> > >
> > 
> > I have added on similar way a search for namespace 'vormingsbank' ,
> > either it's hardcoded:
> > http://trac.knorrie.org/csrdelft.nl/changeset/2270/trunk/wiki/lib/plugins/searchform
> > 
> Are the changes there all that's needed?  I.e. does that work without
> changing the Javascript?
> 
> If that's all that's needed then I can modify my copy of the searchform
> plugin to do what I want.
> 
> 
> > I like to redo it, so setting the right namespace in the syntax will
> > be possible. But i am now too busy. When i do, i will create also a
> > fork on github.
(Continue reading)

Gerrit | 1 Jul 2011 13:14
Picon

Re: Is there a simple way to get search to work from the current namespace down?

Op 01-07-11 12:24, Chris G schreef:
> On Thu, Jun 30, 2011 at 08:37:29PM +0200, Gerrit wrote:
>> ...
>> I have added on similar way a search for namespace 'vormingsbank' ,
>> either it's hardcoded:
>> http://trac.knorrie.org/csrdelft.nl/changeset/2270/trunk/wiki/lib/plugins/searchform
>>
> Are the changes there all that's needed?  I.e. does that work without
> changing the Javascript?
See script.js above the diff. (in the list of the yellow and green squares)
(this is based on code of the pluginrepo plugin. )

I changed also some of the css. Either this needs a review of a more 
experienced programmer, because the vector template has also many css 
lines for the searchform that are different from the default.. so i have 
no overview what is relevant.

Gerrit
--

-- 
DokuWiki mailing list - more info at
http://www.dokuwiki.org/mailinglist

Eivind Morland | 1 Jul 2011 13:38
Picon

Re: Is there a simple way to get search to work from the current namespace down?


On 01 Jul 2011, at 16:29, Chris G wrote:

> On Fri, Jul 01, 2011 at 11:24:45AM +0100, Chris G wrote:
>> On Thu, Jun 30, 2011 at 08:37:29PM +0200, Gerrit wrote:
>>> Op 30-06-11 12:56, Chris G schreef:
>>>> On Thu, Jun 30, 2011 at 12:47:22PM +0200, Christian Jung wrote:
>>>>> Am 30.06.2011, 12:18 Uhr, schrieb Chris G<cl <at> isbd.net>:
>>>>> 
>>>>>> Can anyone point me to where the plugin searchbox is code.  I've looked
>>>>>> very hard through all the code at
>>>>>> https://github.com/splitbrain/dokuwiki-plugin-pluginrepo
>>>>>> but I can't see anywhere there that it creates the search box.
>>>>> https://github.com/splitbrain/dokuwiki-plugin-pluginrepo/blob/master/syntax/table.php#L115
>>>>> 
>>>> Brilliant, thank you, now I need to work out how the Javascript does its
>>>> clever business!
>>>> 
>>> 
>>> I have added on similar way a search for namespace 'vormingsbank' ,
>>> either it's hardcoded:
>>> http://trac.knorrie.org/csrdelft.nl/changeset/2270/trunk/wiki/lib/plugins/searchform
>>> 
>> Are the changes there all that's needed?  I.e. does that work without
>> changing the Javascript?
>> 
>> If that's all that's needed then I can modify my copy of the searchform
>> plugin to do what I want.
>> 
>> 
(Continue reading)

DokuWiki Devel Tools | 1 Jul 2011 15:00

This week's new issues 2011-07-01


Hello,

during the last week, the following bugs and feature requests where
opened at the DokuWiki bug tracker:

FS#2281  xml-rpc error  [Bug Report]
         http://bugs.dokuwiki.org/?do=details&task_id=2281

FS#2283  A page with whitespaces only should be treated as deleted  [Bug Report]
         http://bugs.dokuwiki.org/?do=details&task_id=2283

Please help to resolve them by reviewing, adding comments and sending
patches.

Thanks for your help,
your bug mailer

--

-- 
DokuWiki mailing list - more info at
http://www.dokuwiki.org/mailinglist

Chris G | 1 Jul 2011 17:15

Re: Is there a simple way to get search to work from the current namespace down?

On Fri, Jul 01, 2011 at 05:08:51PM +0530, Eivind Morland wrote:
> 
> On 01 Jul 2011, at 16:29, Chris G wrote:
> 
> >>> I like to redo it, so setting the right namespace in the syntax will
> >>> be possible. But i am now too busy. When i do, i will create also a
> >>> fork on github.
> >>> 
> >> That's what I aim to do.
> >> 
> > ... and I have it all working now!  Thanks very much for the pointer,
> > I'm not very familiar with Javascript and hadn't realised how easy it
> > was to add the extra script.js file that's needed for this to work. 
> > Once I had done that it was all very easy, trivial in fact.
> 
> I for one would be interested if you have a modified version of the searchform plugin that searches only the
current namespace. :)
> 
I have attached the two things you need, they both go into
<your dokuwiki root>/lib/plugins/searchform.

The syntax.php replaces the existing syntax.php (a few lines are
changed) and there's an additional file script.js.

--

-- 
Chris Green
Attachment (syntax.php): application/x-httpd-php, 2831 bytes
Attachment (script.js): application/javascript, 1794 bytes
Chris G | 1 Jul 2011 21:21

Does DokuWiki check the IP of clients?

As per the subject, does DokuWiki check the IP of clients and refuse to
serve a page if the client IP changes?  If so is there any way to
prevent it doing this?

-- 
Chris Green
--

-- 
DokuWiki mailing list - more info at
http://www.dokuwiki.org/mailinglist

Michael Hamann | 1 Jul 2011 22:42
Picon
Gravatar

Re: Does DokuWiki check the IP of clients?

Hi,

Excerpts from Chris G's message of 2011-07-01 21:21:27 +0200:
> As per the subject, does DokuWiki check the IP of clients and refuse to
> serve a page if the client IP changes?  If so is there any way to
> prevent it doing this?

DokuWiki locks pages when somebody edits them in order to prevent
conflicts. The lock is based upon the login of the user or the IP
address when the user isn't logged in. It should be possible to disable
the lock with an action plugin using ACTION_ACT_PREPROCESS (change
locked into edit/preview/recover in the after handler, depending on what
you've got in the before handler), but then your users will only notice
that somebody else is editing a page when they try to save which might
be quite frustrating. There exists an experimental 3waymerge-branch [1]
that tries to automatically merge the changes in that case and allows
the user to manually merge the changes if the merge fails.

Michael

[1] https://github.com/splitbrain/dokuwiki/tree/3waymerge
--

-- 
DokuWiki mailing list - more info at
http://www.dokuwiki.org/mailinglist

Chris G | 2 Jul 2011 00:05

Re: Does DokuWiki check the IP of clients?

On Fri, Jul 01, 2011 at 10:42:23PM +0200, Michael Hamann wrote:
> Hi,
> 
> Excerpts from Chris G's message of 2011-07-01 21:21:27 +0200:
> > As per the subject, does DokuWiki check the IP of clients and refuse to
> > serve a page if the client IP changes?  If so is there any way to
> > prevent it doing this?
> 
> DokuWiki locks pages when somebody edits them in order to prevent
> conflicts. The lock is based upon the login of the user or the IP
> address when the user isn't logged in. It should be possible to disable
> the lock with an action plugin using ACTION_ACT_PREPROCESS (change
> locked into edit/preview/recover in the after handler, depending on what
> you've got in the before handler), but then your users will only notice
> that somebody else is editing a page when they try to save which might
> be quite frustrating. There exists an experimental 3waymerge-branch [1]
> that tries to automatically merge the changes in that case and allows
> the user to manually merge the changes if the merge fails.
> 
I'm logged in to Dokuwiki but I'm doing no editing.

I have two ADSL connections and my router balances their use so
connections 'from' my web browser (i.e. with web browser running on my
machine here as a client of DokuWik) will come at random from two
different IP addresses.

What I'm seeing when viewing DokuWiki pages is random hangs where the
server simply doesn't respond to the request.  This is happening *only*
with DokuWiki, hence my question.

(Continue reading)


Gmane