Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dokuwiki
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
BRIC
dokuwiki
Commits
4f32716e
Commit
4f32716e
authored
19 years ago
by
Andreas Gohr
Browse files
Options
Downloads
Patches
Plain Diff
plugin tweaks, info plugin fixes
darcs-hash:20050803180226-7ad00-7bce1982ed6589511ce38e2e4e5e4cdf8640a0ae.gz
parent
6446f486
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
inc/pluginutils.php
+10
-7
10 additions, 7 deletions
inc/pluginutils.php
lib/plugins/info/syntax.php
+17
-16
17 additions, 16 deletions
lib/plugins/info/syntax.php
lib/plugins/syntax.php
+1
-4
1 addition, 4 deletions
lib/plugins/syntax.php
with
28 additions
and
27 deletions
inc/pluginutils.php
+
10
−
7
View file @
4f32716e
...
...
@@ -68,28 +68,31 @@ function plugin_list($type=''){
*
* @param $type string type of plugin to load
* @param $name string name of the plugin to load
* @return object
the plugin object or null on failure
* @return object
reference
the plugin object or null on failure
*/
function
&
plugin_load
(
$type
,
$name
){
//we keep all loaded plugins available in global scope for reuse
global
$DOKU_PLUGINS
;
//plugin already loaded?
if
(
$DOKU_PLUGINS
[
$type
][
$name
]
!=
null
){
return
$DOKU_PLUGINS
[
$type
][
$name
];
}
//plugin already loaded?
if
(
$DOKU_PLUGINS
[
$type
][
$name
]
!=
null
){
return
$DOKU_PLUGINS
[
$type
][
$name
];
}
//try to load the wanted plugin file
if
(
!
@
include_once
(
DOKU_PLUGIN
.
"
$name
/
$type
.php"
)){
if
(
!
include_once
(
DOKU_PLUGIN
.
"
$name
/
$type
.php"
)){
list
(
$plugin
,
$component
)
=
preg_split
(
"/_/"
,
$name
,
2
);
if
(
!
$component
||
!
@
include_once
(
DOKU_PLUGIN
.
"
$plugin
/
$type
/
$component
.php"
))
{
if
(
!
$component
||
!
include_once
(
DOKU_PLUGIN
.
"
$plugin
/
$type
/
$component
.php"
))
{
return
null
;
}
}
/* FIXME: chris: what's this for?
global $plugin_investigate_pluginorder;
if (!isset($plugin_investigate_pluginorder)) $plugin_investigate_pluginorder = array();
$plugin_investigate_pluginorder[] = $name;
*/
//construct class and instanciate
$class
=
$type
.
'_plugin_'
.
$name
;
...
...
This diff is collapsed.
Click to expand it.
lib/plugins/info/syntax.php
+
17
−
16
View file @
4f32716e
...
...
@@ -6,6 +6,7 @@
* @author Andreas Gohr <andi@splitbrain.org>
*/
if
(
!
defined
(
'DOKU_INC'
))
define
(
'DOKU_INC'
,
realpath
(
dirname
(
__FILE__
)
.
'/../../'
)
.
'/'
);
if
(
!
defined
(
'DOKU_PLUGIN'
))
define
(
'DOKU_PLUGIN'
,
DOKU_INC
.
'lib/plugins/'
);
require_once
(
DOKU_PLUGIN
.
'syntax.php'
);
...
...
@@ -23,7 +24,7 @@ class syntax_plugin_info extends DokuWiki_Syntax_Plugin {
return
array
(
'author'
=>
'Andreas Gohr'
,
'email'
=>
'andi@splitbrain.org'
,
'date'
=>
'2005-0
6-26
'
,
'date'
=>
'2005-0
8-03
'
,
'name'
=>
'Info Plugin'
,
'desc'
=>
'Displays information about various DokuWiki internals'
,
'url'
=>
'http://wiki.splitbrain.org/plugin:info'
,
...
...
@@ -106,21 +107,21 @@ class syntax_plugin_info extends DokuWiki_Syntax_Plugin {
$plugins
=
plugin_list
(
'syntax'
);
foreach
(
$plugins
as
$p
){
if
(
plugin_load
(
'syntax'
,
$p
,
$po
)){
$info
=
$po
->
getInfo
();
$renderer
->
doc
.
=
'<li>'
;
$renderer
->
externallink
(
$info
[
'url'
],
$info
[
'name'
]);
$renderer
->
doc
.
=
' '
;
$renderer
->
doc
.
=
'<i>'
.
$info
[
'date'
]
.
'</i>'
;
$renderer
->
doc
.
=
' '
;
$renderer
->
doc
.
=
$lang
[
'by'
];
$renderer
->
doc
.
=
' '
;
$renderer
->
emaillink
(
$info
[
'email'
],
$info
[
'author'
]);
$renderer
->
doc
.
=
'<br />'
;
$renderer
->
doc
.
=
htmlspecialchars
(
$info
[
'desc'
]);
$renderer
->
doc
.
=
'</li>'
;
}
$po
=&
plugin_load
(
'syntax'
,
$p
);
$info
=
$po
->
getInfo
();
$renderer
->
doc
.
=
'<li>'
;
$renderer
->
externallink
(
$info
[
'url'
],
$info
[
'name'
]);
$renderer
->
doc
.
=
' '
;
$renderer
->
doc
.
=
'<i>'
.
$info
[
'date'
]
.
'</i>'
;
$renderer
->
doc
.
=
' '
;
$renderer
->
doc
.
=
$lang
[
'by'
];
$renderer
->
doc
.
=
' '
;
$renderer
->
emaillink
(
$info
[
'email'
],
$info
[
'author'
]);
$renderer
->
doc
.
=
'<br />'
;
$renderer
->
doc
.
=
htmlspecialchars
(
$info
[
'desc'
]);
$renderer
->
doc
.
=
'</li>'
;
unset
(
$po
);
}
$renderer
->
doc
.
=
'</ul>'
;
...
...
This diff is collapsed.
Click to expand it.
lib/plugins/syntax.php
+
1
−
4
View file @
4f32716e
...
...
@@ -61,9 +61,6 @@ class DokuWiki_Syntax_Plugin extends Doku_Parser_Mode {
* for correct XHTML nesting. Should return one of the following:
*
* 'normal' - The plugin can be used inside paragraphs
* 'block' - Open paragraphs need to be closed before plugin output
* 'stack' - Special case. Plugin wraps other paragraphs.
*
...
...
@@ -140,4 +137,4 @@ class DokuWiki_Syntax_Plugin extends Doku_Parser_Mode {
}
}
//Setup VIM: ex: et ts=4 enc=utf-8 :
\ No newline at end of file
//Setup VIM: ex: et ts=4 enc=utf-8 :
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment