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
d66e3ddf
Commit
d66e3ddf
authored
19 years ago
by
chris
Browse files
Options
Downloads
Patches
Plain Diff
non-intrusive changes to support plugin manager
darcs-hash:20050824231545-50fdc-2d0fc2e9efba6c6d740f00c9113d07eabc3963ce.gz
parent
11e2ce22
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
conf/dokuwiki.php
+1
-0
1 addition, 0 deletions
conf/dokuwiki.php
inc/pluginutils.php
+36
-16
36 additions, 16 deletions
inc/pluginutils.php
with
37 additions
and
16 deletions
conf/dokuwiki.php
+
1
−
0
View file @
d66e3ddf
...
...
@@ -70,6 +70,7 @@ $conf['mailfrom'] = ''; //use this email when sending mails
$conf
[
'gdlib'
]
=
2
;
//the GDlib version (0, 1 or 2) 2 tries to autodetect
$conf
[
'spellchecker'
]
=
0
;
//enable Spellchecker (needs PHP >= 4.3.0 and aspell installed)
$conf
[
'subscribers'
]
=
0
;
//enable change notice subscription support
$conf
[
'pluginmanager'
]
=
0
;
//enable automated plugin management (requires plugin)
//Set target to use when creating links - leave empty for same window
$conf
[
'target'
][
'wiki'
]
=
''
;
...
...
This diff is collapsed.
Click to expand it.
inc/pluginutils.php
+
36
−
16
View file @
d66e3ddf
...
...
@@ -10,21 +10,41 @@
* prints needed HTML to include plugin CSS and JS files
*/
function
plugin_printCSSJS
(){
$plugins
=
plugin_list
();
foreach
(
$plugins
as
$p
){
$dir
=
"lib/plugins/
$p
/"
;
if
(
@
file_exists
(
DOKU_INC
.
$dir
.
'style.css'
)){
print
' <link rel="stylesheet" type="text/css" href="'
.
DOKU_BASE
.
$dir
.
'style.css" />'
.
"
\n
"
;
}
if
(
@
file_exists
(
DOKU_INC
.
$dir
.
'screen.css'
)){
print
' <link rel="stylesheet" media="screen" type="text/css" href="'
.
DOKU_BASE
.
$dir
.
'screen.css" />'
.
"
\n
"
;
}
if
(
@
file_exists
(
DOKU_INC
.
$dir
.
'print.css'
)){
print
' <link rel="stylesheet" media="print" type="text/css" href="'
.
DOKU_BASE
.
$dir
.
'print.css" />'
.
"
\n
"
;
}
if
(
@
file_exists
(
DOKU_INC
.
$dir
.
'script.js'
)){
print
' <script type="text/javascript" language="javascript" charset="utf-8" src="'
.
DOKU_BASE
.
$dir
.
'script.js"></script>'
.
"
\n
"
;
}
global
$conf
;
if
(
isset
(
$conf
[
'plugin_manager'
])
&&
$conf
[
'plugin_manager'
])
{
// individual plugin instances of the files swept into one file each
$dir
=
"lib/plugins/plugin_"
;
if
(
@
file_exists
(
DOKU_INC
.
$dir
.
'style.css'
)){
print
' <link rel="stylesheet" type="text/css" href="'
.
DOKU_BASE
.
$dir
.
'style.css" />'
.
"
\n
"
;
}
if
(
@
file_exists
(
DOKU_INC
.
$dir
.
'screen.css'
)){
print
' <link rel="stylesheet" media="screen" type="text/css" href="'
.
DOKU_BASE
.
$dir
.
'screen.css" />'
.
"
\n
"
;
}
if
(
@
file_exists
(
DOKU_INC
.
$dir
.
'print.css'
)){
print
' <link rel="stylesheet" media="print" type="text/css" href="'
.
DOKU_BASE
.
$dir
.
'print.css" />'
.
"
\n
"
;
}
if
(
@
file_exists
(
DOKU_INC
.
$dir
.
'script.js'
)){
print
' <script type="text/javascript" language="javascript" charset="utf-8" src="'
.
DOKU_BASE
.
$dir
.
'script.js"></script>'
.
"
\n
"
;
}
}
else
{
// no plugin manager so individual instances of these files for any plugin that uses them
$plugins
=
plugin_list
();
foreach
(
$plugins
as
$p
){
$dir
=
"lib/plugins/
$p
/"
;
if
(
@
file_exists
(
DOKU_INC
.
$dir
.
'style.css'
)){
print
' <link rel="stylesheet" type="text/css" href="'
.
DOKU_BASE
.
$dir
.
'style.css" />'
.
"
\n
"
;
}
if
(
@
file_exists
(
DOKU_INC
.
$dir
.
'screen.css'
)){
print
' <link rel="stylesheet" media="screen" type="text/css" href="'
.
DOKU_BASE
.
$dir
.
'screen.css" />'
.
"
\n
"
;
}
if
(
@
file_exists
(
DOKU_INC
.
$dir
.
'print.css'
)){
print
' <link rel="stylesheet" media="print" type="text/css" href="'
.
DOKU_BASE
.
$dir
.
'print.css" />'
.
"
\n
"
;
}
if
(
@
file_exists
(
DOKU_INC
.
$dir
.
'script.js'
)){
print
' <script type="text/javascript" language="javascript" charset="utf-8" src="'
.
DOKU_BASE
.
$dir
.
'script.js"></script>'
.
"
\n
"
;
}
}
}
}
...
...
@@ -39,7 +59,7 @@ function plugin_list($type=''){
$plugins
=
array
();
if
(
$dh
=
opendir
(
DOKU_PLUGIN
))
{
while
(
false
!==
(
$plugin
=
readdir
(
$dh
)))
{
if
(
$plugin
==
'.'
||
$plugin
==
'..'
)
continue
;
if
(
$plugin
==
'.'
||
$plugin
==
'..'
||
$plugin
==
'tmp'
)
continue
;
if
(
is_file
(
DOKU_PLUGIN
.
$plugin
))
continue
;
if
(
$type
==
''
||
@
file_exists
(
DOKU_PLUGIN
.
"
$plugin
/
$type
.php"
)){
...
...
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