[dokuwiki] Re: enhanced getBaseURL() patch
- From: Michael Klier <chi@xxxxxxxxxxx>
- To: dokuwiki@xxxxxxxxxxxxx
- Date: Mon, 29 May 2006 17:54:33 +0200
On Mon, May 29, 2006 at 05:53:02PM +0200, Michael Klier wrote:
> Hi,
>
> I encountered a problem with getBaseURL() (located in inc/init.php)
> while I was writing a plugin that uses ajax - DOKU_BASE pointed to the
> plugin-directory (which is normal because the ajax.php is called
> directly). Instead of setting DOKU_BASE by "hand" in the ajax.php I
> assume to modify getBaseURL() accordingly to handle this special case
> automatically. I attached a patch (patched against current darcs version
> all patches applied) - it is just another preg_replace, like the one used
> to handle scripts in lib/exe.
>
> Cheers
> Michael
Like always I hit the sent button to fast :-(. Here`s the patch. Sorry
for that...
--
Michael Klier
mail: chi@xxxxxxxxxxx
www: http://www.chimeric.de
icq: 206179334
jabber: chi@xxxxxxxxxxxxx
key: http://www.chimeric.de/chi.asc
key-id: 0x8308F551
New patches:
[enhanced getBaseURL()
'Michael Klier <chi@xxxxxxxxxxx>'**20060529154201] {
hunk ./inc/init.php 260
+ //handle script in lib/plugins dir
+ $dir = preg_replace('!lib/plugins/.*$!','',$dir);
+
}
Context:
[Use meta data in RSS feed
Andreas Gohr <andi@xxxxxxxxxxxxxx>**20060528133552]
[usability enhancements for the loginform #803
Andreas Gohr <andi@xxxxxxxxxxxxxx>**20060527185238]
[fixed short open tag problem
Andreas Gohr <andi@xxxxxxxxxxxxxx>**20060527150702]
[small improvements on JS compressor (maybe fixes #807)
Andreas Gohr <andi@xxxxxxxxxxxxxx>**20060527140157]
[be clever about extensions on upload
Andreas Gohr <andi@xxxxxxxxxxxxxx>**20060527100310
This patch makes it possible to enter filenames without an
extension in the upload as field when the uploaded file it
self has a known extension.
It also prints a warning when an extension was changed by
the user.
]
[made text in mediamanger more clear
Andreas Gohr <andi@xxxxxxxxxxxxxx>**20060526233349]
[mediamanager focus fix
Andreas Gohr <andi@xxxxxxxxxxxxxx>**20060526232000]
[fix for sitemap creation #813
Andreas Gohr <andi@xxxxxxxxxxxxxx>**20060526223358]
[update header test cases 20060526
Ben Coburn <btcoburn@xxxxxxxxxxxxx>**20060526170229
Also resolves a small p_close anomaly introduced when section edits were
given their own instruction.
]
[resolve darcs conflict 20060526
Ben Coburn <btcoburn@xxxxxxxxxxxxx>**20060526144958]
[decouple section edit from header in renderer
Ben Coburn <btcoburn@xxxxxxxxxxxxx>**20060522060004
This patch achieves a partial decoupling of the section edit buttons
from the header syntax. A new 'section_edit' instruction is added to the
instruction list. The default set of these instructions is generated from
the header handler and the _finalize function. A generic 'section_edit'
renderer is now part of the renderer.
To rewrite the section semantics, add, or remove section edit buttons the
header handler and renderer no longer need to be modified. Changes can be
dynamically made to the section edit buttons through the 'PARSER_HANDLER_DONE'
action event. An action plugin that registers this event can then modify
the calls list of the handler object before it is rendered.
In short, this patch makes it possible to change the behavior of the section
edit buttons without having to change unrelated code. This patch should be
entirely transparent to DokuWiki users and cleanly written plugins.
]
[added id to namespace headline
Andreas Gohr <andi@xxxxxxxxxxxxxx>**20060526144011
This makes the currently in the medaia manager selected namespace available
to any JavaScript files
]
[fixed an AJAX problem for the media manager
Andreas Gohr <andi@xxxxxxxxxxxxxx>**20060525175501]
[validity fix in image meta edit form
Andreas Gohr <andi@xxxxxxxxxxxxxx>**20060525173150]
[media manager validity fixes
Andreas Gohr <andi@xxxxxxxxxxxxxx>**20060525172718]
[label for root of medianamespaces
Andreas Gohr <andi@xxxxxxxxxxxxxx>**20060525160758]
[javascript to toggle editor wrapping
Andreas Gohr <andi@xxxxxxxxxxxxxx>**20060525152357
This patch adds a way to sisable and enable the automating wrapping in the
editor textarea. Disabling the wrapping is especially useful when editing
large tables.
]
[more mediamanager fixes
Andreas Gohr <andi@xxxxxxxxxxxxxx>**20060525144000
This fixes some styling issues, the cookie handling and a bug in the
JavaScript caching mechanism.
]
[media manager fixes
Andreas Gohr <andi@xxxxxxxxxxxxxx>**20060521213334]
[minor media manager tweaks
Andreas Gohr <andi@xxxxxxxxxxxxxx>**20060520172118]
[hide media details
Andreas Gohr <andi@xxxxxxxxxxxxxx>**20060520124854
This adds an option to hide the details (thumbnail, metadata) in the media
manager. The selected choice is remembered in a cookie.
]
[media manager enhancements
Andreas Gohr <andi@xxxxxxxxxxxxxx>**20060519202900
Separate scrolling for right and left side of the manager (like frames)
Show syntax example for simple copy'n'paste if no JavaScript available.
]
[link to media manager
Andreas Gohr <andi@xxxxxxxxxxxxxx>**20060519175959
This patch add a link to the media manager when no JavaScript is available.
Users can upload and browse for pictures now without the need for JavaScript
only inserting has to be done manually then.
]
[new mediamanager
Andreas Gohr <andi@xxxxxxxxxxxxxx>**20060519165023
This patch adds a completely rewritten media popup. The following noteworthy
changes were made:
- media manager uses a collapsible namespace tree
- media manager uses AJAX if available
- media manager popup can be kept open when selecting a media file
- only one template is used for the media manager :!: Template
- Editable image metadata is configured in conf/mediameta.php now
- The JS cookie mechanism was enhanced to store key/value pairs
- Language strings can be exported to JS in js.php
]
[getRevisionInfo much faster (cached)
Ben Coburn <btcoburn@xxxxxxxxxxxxx>**20060525083202
Makes getRevisionInfo much faster when loading all the revisions of a page.
This is done by efficiently parsing the 'changes.log' data and caching the
results (in memory) so that future calls to getRevisionInfo return
immediately without reloading the 'changes.log' file.
(Note: the changelog system in DokuWiki should still be rewritten so
that changes are not logged into one huge file!)
]
[makes getRevisions faster
Ben Coburn <btcoburn@xxxxxxxxxxxxx>**20060525030452
Makes inc/common.php#getRevisions a little faster.
Takes about half as much time as the preg_match.
]
[updated_localisation_sk_SK
ovegh@xxxxxxxxx**20060418090713]
[gzip_output defaults to 0 now
Andreas Gohr <andi@xxxxxxxxxxxxxx>**20060525113648]
[fixed rfc interwiki link
Andreas Gohr <andi@xxxxxxxxxxxxxx>**20060523191005]
[fix: wrong secedit when page changes
Denis Simakov <akinoame1@xxxxxxxxx>**20060522182043
Binds secedit buttons to file modification stamp ('lastmod'), so that if the
page changes in between, editing of the old revision starts.
]
[Lithuanian update
Andreas Gohr <andi@xxxxxxxxxxxxxx>**20060522181314]
[GeShi update to 1.0.7.10
Andreas Gohr <andi@xxxxxxxxxxxxxx>**20060522175437]
[russian translation update
Denis Simakov <akinoame1@xxxxxxxxx>**20060522115828]
[MySQL Bug - PHP warning if query result is empty
matthiasgrimm@xxxxxxxxxxxxxxxxxxxxx**20060522162327
If a database query has no result, the returned array is not
valid. This caused a PHP warning in the user manager if the
filter is set in a way that the result list is empty.
]
[config plugin ui update 20060520
Ben Coburn <btcoburn@xxxxxxxxxxxxx>**20060520103718
This patch hides settings that are missing config metadata and optionally
provides a list of warnings about settings that are not properly configured.
- Warnings about settings are listed if $conf['allowdebug'] is true.
- Warnings are listed by the $conf string as it appears in local.php.
- Warnings show the $meta string as it would appear in the correct
settings metadata file.
- There are 3 kinds of warnings.
- undefined
There is no $meta information defined for this setting.
- no class
The setting class specified in $meta can not be found.
This setting does have a $meta entry.
- no default
The setting is missing a default value.
The setting does have a $meta entry with a valid setting class.
- Note: Settings with metadata but other warnings are allowed to appear
in the normal config settings list.
Also...
- Templates can now define their own settings classes.
- Removed an XHTML validation error from the first patch.
- More language strings to go with the new warnings.
The warnings under the 'Undefined Settings' heading are intended to
provide developers with a list of any settings that they have forgotten to
finish preparing for the config plugin. This list should be blank for stable
releases.
]
[moved gzip compression to init.php
Andreas Gohr <andi@xxxxxxxxxxxxxx>**20060519212751]
[gzip content-encoding option
Ben Coburn <btcoburn@xxxxxxxxxxxxx>**20060516084132
- Enables gzip compression of output xhtml for browsers that support it.
For example the wiki:syntax page takes up 46.80KB raw, but only 9.88KB
gzip encoded.
- Setting is configurable through the config plugin.
]
[javascript fix to mak sumarry checking use addEvent
Andreas Gohr <andi@xxxxxxxxxxxxxx>**20060512073949]
[namespace-restricted fulltext-search part2
'Michael Klier <chi@xxxxxxxxxxx>'**20060518204647
- now its possible to restrict the fulltext-search to
multible namespaces
Examples:
searchword @ns1 @ns2 @ns3
"exact phrase" @ns1 @ns2 @ns3
]
[namespace restricted fulltext-search
'Michael Klier <chi@xxxxxxxxxxx>'**20060518161855
- The fulltext-search can now be restricted to a given
namespace seperated by an "@"
]
[avoid trolling in io_lock()
Andreas Gohr <andi@xxxxxxxxxxxxxx>**20060517165023]
[lt lang update
Andreas Gohr <andi@xxxxxxxxxxxxxx>**20060517105635]
[jpg quality option
Ben Coburn <btcoburn@xxxxxxxxxxxxx>**20060516062321
- Adds a jpg quality setting for scaled images
(Some images were getting too many jpg artifacts
at the hard-coded compression setting.)
- Creates a group for the media settings in the
config plugin.
]
[fr update
Andreas Gohr <andi@xxxxxxxxxxxxxx>**20060515190136]
[nl update
Andreas Gohr <andi@xxxxxxxxxxxxxx>**20060515185820]
[more info is gathered on metaupdate in background indexer
Andreas Gohr <andi@xxxxxxxxxxxxxx>**20060511191450
The background indexer now gathers info on contributors and modification
dates from the changelog when adding the missing meta info.
A new io_grep function was added which might be useful for other parts in
the Wiki as well.
]
[add config plugin support for plugin defined setting classes
chris@xxxxxxxxxxxxx**20060511083209]
[config plugin ui organization
Ben Coburn <btcoburn@xxxxxxxxxxxxx>**20060510065732
- organizes the configuration settings list into chunks
- provides a table of contents for the configuration chunks
- provides one chunk for each plugin with configurable settings
- provides one chunk for the active template (if it has settings)
- provides the config file setting as a tool-tip on the setting label
ex. $conf['start']
- provides for localization of useful strings
- generates a "smart" fallback name for plugins and templates
- plugin and template sections are only shown if they have settings
- current configuration list is organized into chunks
Note: There are NEW strings to translate into the non-english language files.
]
[TAG develsnap 2006-05-07
Andreas Gohr <andi@xxxxxxxxxxxxxx>**20060507173508]
Patch bundle hash:
ac5276cc207a4947926739e965a221a07a4f303d
- References:
- [dokuwiki] enhanced getBaseURL() patch
- From: Michael Klier
Other related posts:
- » [dokuwiki] enhanced getBaseURL() patch
- » [dokuwiki] Re: enhanced getBaseURL() patch
- [dokuwiki] enhanced getBaseURL() patch
- From: Michael Klier