[dokuwiki] Re: [patch] newpage question

  • From: Christopher Smith <chris@xxxxxxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Mon, 11 Oct 2010 21:42:59 +0100

On 11 Oct 2010, at 20:07, Robin Getz wrote:

> On Mon 11 Oct 2010 13:16, Robin Getz pondered:
>> Is there a way to override the text in: 
>> inc/lang/xx/newpage.txt
>> 
>> Or am I stuck editing that, and managing it separately when upgrading? 
>> 
>> From what I saw, it seemed to be hard coded in 
>> inc/parserutils.php:p_wiki_xhtml() & 
>> inc/parserutils.php:p_wiki_xhtml_summary()
>> 
> 
> Seems to do what I needed to do...
> 
> if ./conf/lang/filename.local.txt exists, use that, otherwise fall back
> to the standard dokuwiki text.
> 
> Any better suggestions?

TPL_CONTENT_DISPLAY
TPL_ACT_RENDER

or propose an event to wrap around either (or both) localeFN(), p_locale_xhtml()

I18N_FILENAME_GET ... $id, $lang
I18N_XHTML_RENDER ... $id, $lang

Or perhaps some refactoring of the code to separate the retrieval of the 
contents of the locale file and then wrapping that in an event or allowing 
replacement of the object with another using the same interface.  Refactoring 
would be quite tricky, but say if your object handled the main methods,  
$wikipageFN->exists(), $wikipageFN->read().

I reckon I18N_FILENAME_GET.

- Chris

Other related posts: