Compare commits

...

190 Commits

Author SHA1 Message Date
Simon DELAGE 150dfde68b Fixing #27 2016-12-01 08:16:27 +01:00
Simon DELAGE 5991468d4d Merge pull request #26 from dokuwiki-translate/lang_update_74
Translation update (fa)
2016-08-28 10:30:53 +02:00
Sam01 b310df265d translation update 2016-08-26 17:00:29 +02:00
Simon DELAGE ec82424f25 Date update (PR#25) + fixing typos 2016-05-17 11:02:24 +02:00
Simon DELAGE fffefb761b Merge pull request #25 from e-picas/use-defined-acl-configfile
Fix ACL file location
2016-05-17 10:47:33 +02:00
picas 314e093c93 fix usage of raw ACL configuration file 2016-05-14 14:07:52 +02:00
Simon DELAGE aaf074d18f Wikilink1 class is back
Removing it 4 days ago was a mistake
2016-04-23 13:40:56 +02:00
Simon DELAGE e4afcaaf93 Fixed languages settings files 2016-04-19 03:19:44 +02:00
Simon DELAGE 894861edfc Fixed previous default classes change 2016-04-19 03:14:17 +02:00
Simon DELAGE ffd8194762 Removed .interwiki link default class 2016-04-19 01:39:13 +02:00
Simon DELAGE f88ba74523 Prevent page creation when showing image details 2016-02-20 09:25:48 +01:00
Simon DELAGE 6acd201e84 Merge pull request #23 from dokuwiki-translate/lang_update_50
Translation update (de)
2016-02-10 23:39:59 +01:00
Dana 4e9b0a5e81 translation update 2016-02-10 15:35:05 +01:00
Simon DELAGE b4c049327c Added new test before redirection 2016-02-09 02:30:36 +01:00
Simon DELAGE e2abf31c39 Merge pull request #22 from dokuwiki-translate/lang_update_32
Translation update (ja)
2016-02-08 23:48:56 +01:00
Hideaki SAWADA 8255a1fa67 translation update 2016-02-08 10:25:35 +01:00
Simon DELAGE b57871c6a9 Update plugin date 2016-02-05 15:32:19 +01:00
Simon DELAGE c2943ffc77 Merge pull request #20 from splitbrain-forks/php7-signature
Adjust method signatures to match parent (events registration)
2016-02-05 15:20:29 +01:00
Andreas Gohr 396676288e Adjust method signatures to match parent 2016-02-03 12:52:06 +01:00
Simon DELAGE 008bbc2fd0 Update README.md 2016-01-01 14:22:34 +01:00
Simon DELAGE 1ab588c66c Merge pull request #19 from dokuwiki-translate/lang_update_102
Translation update (ko)
2015-12-16 08:50:53 +01:00
Erial 0a8d1eb37e translation update 2015-12-15 06:50:33 +01:00
Simon DELAGE ceda371f52 Added groups settings/check
Page(s) creation will only occure if corresponding settings are blank or
if connected user's group(s) match at least one set group
2015-11-26 12:28:00 +01:00
Simon DELAGE 6817a7d378 Date update 2015-11-23 00:17:40 +01:00
Simon DELAGE 1d4d79c461 Fixed a typo (using same var twice in a test) 2015-11-22 21:56:45 +01:00
Simon DELAGE 76ec613777 Making sure Public NS doesn't conflict with Private one 2015-11-22 10:47:44 +01:00
Simon DELAGE cb5f4827d7 'plugin.info.txt' date update 2015-11-22 09:03:13 +01:00
Simon DELAGE f1f64e3456 Added Public Namespace instead of page possibility 2015-11-22 09:01:29 +01:00
Simon DELAGE 1bcf1a2af4 Switched templates' strings like (//@TA...NS@//) to ''//@TA...NS@//''
To avoid a conflict with EmojiOne plugin's syntax
2015-11-22 08:58:04 +01:00
Simon DELAGE bebd766062 Minor improvements
Changed ACL system message to info type, fixed and simplified helper's
'getPublicID()'
2015-11-22 08:43:40 +01:00
Simon DELAGE 268e9a6f9d Fixed minor typo
Extra space in 'loggedinas' string when using Fontawesome
2015-10-04 13:04:51 +02:00
Simon DELAGE 50aa60436f Added private namespace skeleton feature 2015-10-04 11:21:48 +02:00
Simon DELAGE 3d8f6fbf30 Fixed issue #16
'DOKUWIKI_STARTED' event is never triggered on image details page. Added
'DETAIL_STARTED' event hook to initialize plugin.
2015-10-03 16:40:29 +02:00
Simon DELAGE 7058c20dcf Merge pull request #15 from dokuwiki-translate/lang_update_881
Translation update (ja)
2015-08-23 20:32:48 +02:00
Hideaki SAWADA 2298b25153 translation update 2015-08-23 19:35:05 +02:00
Simon DELAGE e50d12a083 Merge pull request #14 from dokuwiki-translate/lang_update_878
Translation update (ja)
2015-08-23 11:13:40 +02:00
Hideaki SAWADA ac7f76d1dd translation update 2015-08-23 10:10:33 +02:00
Simon DELAGE 56c7a885a1 Merge pull request #13 from dokuwiki-translate/lang_update_863
Translation update (de)
2015-08-22 20:11:25 +02:00
Padhie 5d1097a1de translation update 2015-08-22 10:55:47 +02:00
Simon DELAGE 4ca9086206 Date change 2015-08-20 02:11:20 +02:00
Simon DELAGE a2043af0ca Added function to get pages ID's and string
Return samples:
Array (
[private] => Array (
[id] => user:admin:start
[string] => Espace Privé
)
[public] => Array (
[id] => user:admin
[string] => Page Publique
)
)

Array (
[public] => Array (
[id] => user:admin
[string] => Page Publique
)
)
2015-08-20 02:10:37 +02:00
Simon DELAGE 9b4bfd546d Added an option to disable redirection 2015-08-20 00:35:29 +02:00
Simon DELAGE 798861e9bc Merge pull request #12 from dokuwiki-translate/lang_update_806
Translation update (ja)
2015-08-05 11:00:35 +02:00
Hideaki SAWADA 8794ff3d84 translation update 2015-08-05 02:00:31 +02:00
Simon DELAGE e3368abf3e Added a missing space 2015-07-17 22:51:31 +02:00
Simon DELAGE a9c6ce408b Added Fontawesome links on event 2015-07-10 21:53:41 +02:00
Simon DELAGE 09f56866c8 Minor typo in french settings.php 2015-07-10 01:51:14 +02:00
Simon DELAGE 69cfd16af0 Updated userlink_classes setting description 2015-07-10 01:18:13 +02:00
Simon DELAGE 1be48ccb43 Update plugin.info.txt 2015-06-27 16:30:12 +02:00
Simon DELAGE 0e53545242 Workaround for issue #10
ACL function shouldn't do anything when user is not authentified (was
previously triggering ACL update message)
2015-06-27 16:28:03 +02:00
Simon DELAGE 27c15b5d5c Date update 2015-06-22 18:52:19 +02:00
Simon DELAGE 22602c27b0 Added page ID's to event user links 2015-06-22 18:46:43 +02:00
Simon DELAGE 5599cac7f5 Update action.php
Removed enwanted 'break'
2015-06-20 18:36:20 +02:00
Simon DELAGE d9a64b6b0b Update README.md 2015-06-20 18:33:09 +02:00
Simon DELAGE fc51f65cdd Attempt to avoid any risk of infinite loop 2015-06-20 18:31:11 +02:00
Simon DELAGE 338db481a4 Update README.md
Match official page title
2015-06-19 09:49:28 +02:00
Simon DELAGE ca512439bb Added event to replace user interwiki link
Issue #11
2015-06-19 02:33:37 +02:00
Simon DELAGE f97060f118 Changed redirections to hopefully fix infinite loop 2015-06-18 09:14:39 +02:00
Simon DELAGE a8323791cf New option to choose action on page creation 2015-06-13 02:05:52 +02:00
Simon DELAGE e47db0748b Wrong date format :) 2015-06-05 00:10:34 +02:00
Simon DELAGE aa8d83c944 Fix about [savedir] option (pointed by BMolitor)
Destination folder was previously based on DOKU_CONF instead of
[savedir] option. This wasn't blocking anything but was incorrect. Also
added a lang string and changed text of [tempates_path] option.
2015-06-05 00:03:49 +02:00
Simon DELAGE 21ba3adfda Left a debuging message 2015-05-12 14:00:25 +02:00
Simon DELAGE bbbe4cb9ef Stupid syntax error correction
This was a non blocking bug just preventing a success/error message from
being shown and throwing an error.
2015-05-12 13:54:59 +02:00
Simon DELAGE 0fef945468 Added more comments to helper code 2015-03-26 08:37:54 +01:00
Simon DELAGE ba8739a2b5 Added German translation (B.Molitor contribution) 2015-03-25 22:50:05 +01:00
Simon DELAGE 4a101dedff Added getAnyPublicLink() 2015-02-23 03:01:03 +01:00
Simon DELAGE 1e30b8bfc0 Fixed a bug in folder creation(s)
Bug prevented plugin to create required base folders for templates,
users' namespaces or public pages (was tested at early dev stage but
forgot te test it again later)
2015-02-11 12:55:04 +01:00
Simon DELAGE 18f4b5eae8 Corrected a typo in english settings.php 2015-02-07 17:43:32 +01:00
Simon DELAGE d66ddee3c0 Forgot plugin.info.txt :) 2015-02-05 15:03:22 +01:00
Simon DELAGE 5dc591bf74 Fixed helper's getComplexLoggedInAs()
Should now correctly default to standard login string when neither page
exists
2015-02-02 09:57:09 +01:00
Simon DELAGE 7410099319 Major changes to ACL function
Only writing to ACL file when needed instead of rewriting every rules
each time and cleaning duplicate lines
2015-02-01 15:56:10 +01:00
Simon DELAGE 7fb70b83e2 Changed ACL file write process for DW function
Replaced file_put_contents with io_saveFile
2015-01-20 00:56:39 +01:00
Simon DELAGE 6bec5cbf2e Updated plugin.info.txt 2015-01-11 13:37:09 +01:00
Simon DELAGE 896f344cea Added a test on useacl option before any ACL action 2015-01-11 13:26:26 +01:00
Simon DELAGE 59e3545e3f Merge pull request #9 from geekitude/debug-(2014-12-18-version)
Debug (2014 12 18 version)
2014-12-20 08:39:01 +01:00
Simon DELAGE c03d701781 Update README.md 2014-12-20 08:38:11 +01:00
Simon DELAGE a096fd5563 Just a little warning added 2014-12-20 07:43:20 +01:00
Simon DELAGE 5a615a99a1 Fixing bug on Public pages ACL 2014-12-18 01:40:21 +01:00
Simon DELAGE 2e38729a9f Added an option to disable automated ACL 2014-12-06 18:08:11 +01:00
Simon DELAGE 8c3c622475 Replaced file_exists calls with is_file 2014-10-26 09:21:51 +01:00
Simon DELAGE 507d3850d1 Fixed wrong comment in lang files
And corrected mixed up comments on previous commit
2014-10-23 23:29:52 +02:00
Simon DELAGE d63fffeb93 Revert "Added namespaced topbar"
This reverts commit 549b2cda47.
2014-10-23 23:26:29 +02:00
Simon DELAGE 549b2cda47 Added namespaced topbar 2014-10-23 23:19:06 +02:00
Simon DELAGE eaa9b93772 Removed a typo
Same type as previous commit in getPrivateLink() and getPublicLink
2014-10-19 10:31:31 +02:00
Simon DELAGE 050575241d Removed a typo
":" wasn't needed in getComplexLoggedInAs()
2014-10-10 19:22:31 +02:00
Simon DELAGE 273933839f Made correction based on user problem
A user had a strange problem: plugin would not create the template and
there was some kind of infinite loop on login but he found a simple fix
that doesn't seem to have any side effect
2014-10-10 18:20:26 +02:00
Simon DELAGE ec14ae2f79 Corrected a major bug with farm setup
Duplicate lines in ACL file were not cleaned up, eventually leading to
it's corruption
2014-09-30 23:27:21 +02:00
Simon DELAGE 4e3b0577d8 Templates were not read from correct place
Because of preceding commit
2014-09-28 16:23:17 +02:00
Simon DELAGE 82148c514d Corrected templates destination in farm setup
If templates' destination was in data/pages, they where created in
farmer's folder instead of animal's
2014-09-27 14:31:56 +02:00
Simon DELAGE bc9a2a89c6 Fixed redirection when logging in through cookie
A timestamp is store in init() when a user is logged in. If user's
private namespace start page exists within 2 seconds he will be
redirected to it unless he requires any page other than wiki start page.
2014-09-21 19:17:21 +02:00
Simon DELAGE 9f5120bc1b Updated plugin.info.txt 2014-09-21 00:10:28 +02:00
Simon DELAGE 57d32f0e2c Merge pull request #5 from sawachan/master
Japanese language files added
2014-09-20 21:04:35 +02:00
Hideaki SAWADA 9a30421905 Create userhomepage_public.default 2014-09-20 19:52:05 +09:00
Hideaki SAWADA 9e54f110fe Create userhomepage_private.default 2014-09-20 19:50:30 +09:00
Hideaki SAWADA 1e33c875d4 Create settings.php 2014-09-20 19:48:30 +09:00
Hideaki SAWADA e470c482b9 Create lang.php 2014-09-20 19:45:15 +09:00
Simon DELAGE 242ee4b4eb Improved getComplexLoggedInAs()
Now shows both links if both private namespace and public page exist or
defaults back to a simple link to the one that exist or standard string
if none exist
2014-09-19 18:29:51 +02:00
Simon DELAGE e21925e236 Made new complex link as standalone function
Instead of a new parameter in getPrivateLink
2014-09-19 01:06:01 +02:00
Simon DELAGE 5baeced13a Added 'complex loggedinas' link
Logged is as: <name as link to private ns> (<user as link to public
page>)
2014-09-19 00:49:18 +02:00
Simon DELAGE 0f8621669e Updated plugin.info.txt
After correcting the previous
2014-09-14 19:42:51 +02:00
Simon DELAGE f376cf5f10 Bug correction
When path to old template is emptied in settings
2014-09-14 19:37:37 +02:00
Simon DELAGE 75d25e5295 Added a replacement pattern
For private namespace start page
2014-09-13 12:16:35 +02:00
Simon DELAGE 97c4bcd0e3 Forgot to translate some settings in french :$ 2014-09-13 10:01:03 +02:00
Simon DELAGE 02b233ebdf Shorter text for a few settings
Details will be in official page
2014-09-13 09:47:14 +02:00
Simon DELAGE d14071b783 Update README.md 2014-09-13 03:29:37 +02:00
Simon DELAGE 8ed6ad9e5d Updated date, READY TO PUBLISH! 2014-09-13 02:21:45 +02:00
Simon DELAGE f7aa65f4c4 Many ACL changes + republishing 2014-09-13 02:13:16 +02:00
Simon DELAGE 2b5fa08ca9 Added option to set ACL on templates 2014-09-12 09:40:51 +02:00
Simon DELAGE bd68596c7c Added folder creation to copyFile() 2014-09-12 08:43:45 +02:00
Simon DELAGE f838dc5c08 Commit bug? 2014-09-11 22:50:42 +02:00
geekitude c23cd310c4 And again :) 2014-09-11 18:42:08 +02:00
geekitude daa6251786 Shortened many settings texts 2014-09-11 18:40:36 +02:00
geekitude 3cd1232b70 Changed 'add a picture' to a limitation 2014-09-11 18:30:58 +02:00
geekitude 3a1a6e11cb Improved ACL (including if both ns=user) 2014-09-11 18:26:01 +02:00
Simon DELAGE fe97eba0b8 Shorter templatepath option text 2014-09-11 09:02:47 +02:00
Simon DELAGE bf3e6d6227 Changed copy messages 2014-09-11 08:49:17 +02:00
Simon DELAGE 507847e3b4 Simplified system messages 2014-09-11 08:33:39 +02:00
Simon DELAGE 6e1ec0a8fa Corrected and improved localization
Reintroduced localization for privatenamespace and publicpage (used in
helper) and localized system messages (templates copy and pages
creations)
2014-09-10 23:22:19 +02:00
Simon DELAGE f96bac6443 Better msg() at better time
User must be logged in, not full path shown, changed event launching
init() to get messages right after saving related otpions
2014-09-10 21:43:16 +02:00
Simon DELAGE fcd9d37c9a Wrong msg() for public page 2014-09-10 17:47:18 +02:00
Simon DELAGE a1f5a381b5 Added msg() to private ns and public page creation 2014-09-10 17:45:25 +02:00
Simon DELAGE fb6429a121 Removed some useless localizaton
$lang must be loaded later
2014-09-10 17:42:00 +02:00
Simon DELAGE 48695e1d93 Syntax typo on function call :$ 2014-09-10 17:21:12 +02:00
Simon DELAGE 88f5d81264 Trying new process on templates copy with msg() 2014-09-10 17:09:50 +02:00
Simon DELAGE b812bfb273 Settings text minor changes 2014-09-10 08:35:41 +02:00
Simon DELAGE cb44864ade Typo correction 2014-09-10 08:15:54 +02:00
Simon DELAGE 7608b0e18d Corrected path to source templates
And changed all files to mode Unix (LF) end of lines
2014-09-09 23:47:30 +02:00
Simon DELAGE c2c7198455 Forgot an outdated comment 2014-09-09 22:01:49 +02:00
Simon DELAGE 2c7bda473c Localized templates are now working 2014-09-09 21:51:02 +02:00
Simon DELAGE 1d8e1189ec Finished templates localization 2014-09-09 20:59:31 +02:00
Simon DELAGE aa260f2242 Simplified and improved templates
Changed to simple more developped localized templates
2014-09-09 08:38:50 +02:00
Simon DELAGE b0865ce8d2 Changed process to use old template again
Previous process was to rename files but it is better to leave all files
as they are and choose wich source to use
2014-09-08 17:31:36 +02:00
Simon DELAGE b00823906a Changed process to use old template
rename it to replace userhomepage_private.default to get rid of it
2014-09-08 09:12:49 +02:00
Simon DELAGE 9a636083fe Removed test on null templatepath 2014-09-08 08:39:23 +02:00
Simon DELAGE cbe6bd4421 Reverted default templatepathvalue
If it was the default value with old version it will be empty with new
one
2014-09-08 08:37:23 +02:00
Simon DELAGE 26ce7fd583 Corrected typos in settings files 2014-09-07 19:51:08 +02:00
Simon DELAGE bd43d21107 getButton() working
Fixed and added public page button
2014-09-07 19:21:19 +02:00
Simon DELAGE 1ea6bba8ed Missing patch to revert lang strings 2014-09-07 19:05:41 +02:00
Simon DELAGE eafc5db16c Revert some lang strings to previous version
Without lang_ because it broke helper and made less sense
2014-09-07 18:57:12 +02:00
Simon DELAGE c9c0f489ec Trying to get Button ;) 2014-09-07 18:47:36 +02:00
Simon DELAGE 1842825773 Added basic getButton to helper 2014-09-07 18:44:26 +02:00
Simon DELAGE 3921f0fffc And again... 2014-09-07 17:59:07 +02:00
Simon DELAGE 55afa39744 And again :) 2014-09-07 17:53:00 +02:00
Simon DELAGE ee3cd1fe65 Improved settings text 2014-09-07 17:43:18 +02:00
Simon DELAGE 2192356d32 Added french language files 2014-09-07 17:29:00 +02:00
Simon DELAGE e110867700 Delayed creation of templates
Waiting for 'create' options to be set
2014-09-07 16:46:00 +02:00
Simon DELAGE c0e65f46d2 Switched uhpreplace to global and require_once 2014-09-07 16:26:27 +02:00
Simon DELAGE 29562ca0a9 Got local replacement to work 2014-09-07 15:13:54 +02:00
Simon DELAGE f8b44f400c Added local replacement patterns 2014-09-07 15:01:34 +02:00
Simon DELAGE 97331956da Changed process to determine targets 2014-09-07 12:17:41 +02:00
Simon DELAGE 3c8cf4a94e Renamed privatePage() to privateStart() 2014-09-07 12:15:24 +02:00
Simon DELAGE 45bfa03d22 Changed some options' text 2014-09-07 12:08:01 +02:00
Simon DELAGE 8488c1c86f Cleaned up files and checked indentation 2014-09-07 11:51:44 +02:00
Simon DELAGE 0bc23734bf Moved acl plugin called 2014-09-07 11:36:44 +02:00
Simon DELAGE 9847091c9d Changed ACL operations order
To respect the same order of entries as ACL plugin when "Update" button
is used
2014-09-07 11:14:20 +02:00
Simon DELAGE 5c22f95583 Modified default templates for localization 2014-09-07 10:16:42 +02:00
Simon DELAGE b039f6695b Patch after setting default templatepath to null 2014-09-07 10:15:14 +02:00
Simon DELAGE 942e6c20e9 Added option for ACL for public pages
And fixed a few things in ACL to make sure we use clean IDs and use
right string if
2014-09-07 09:20:39 +02:00
Simon DELAGE ac71e08bdf Added ACL for public pages 2014-09-07 07:20:41 +02:00
Simon DELAGE e83baa691b Removed old default for 'templatepath' 2014-09-07 06:39:51 +02:00
Simon DELAGE 4774ace4a7 Improved template one more step
Localized "Private Namespace" and "Public Page" strings
2014-09-06 20:39:56 +02:00
Simon DELAGE 970d6da8d5 Improved template process
Tu use any replacement pattern from
https://www.dokuwiki.org/namespace_templates
2014-09-06 19:45:24 +02:00
Simon DELAGE 9f825ed647 Improved helper
Can now provide different types of link to private namespace or public
page
2014-09-06 10:16:04 +02:00
Simon DELAGE 55add7eb37 Got helper working 2014-09-03 04:32:55 +02:00
Simon DELAGE 45a8099bf3 Choosed to move outdated functions to helper
As comments for now
2014-09-03 03:52:47 +02:00
Simon DELAGE 33a1a0908d Added a very basic helper
And removed old equivalent and outdated functions
2014-09-03 03:50:59 +02:00
Simon DELAGE 8bb4f0838a Reintruduced old templatepath option
For backward compatibility: if the old template is found, it will be
used as a source
2014-09-03 03:29:33 +02:00
Simon DELAGE a8b8f56a76 And again *sob* 2014-09-03 03:07:21 +02:00
Simon DELAGE d0e28e1412 Fixed wrong file names 2014-09-03 03:05:30 +02:00
Simon DELAGE 49f9bb064a Renamed templates from .txt to .default
To avoid confusion
2014-09-03 02:57:52 +02:00
Simon DELAGE 63d4b4c4f0 Shortened templates names
And changed to keep a copy of original template
2014-09-03 02:52:22 +02:00
Simon DELAGE 96781dbd83 Added more flexibility for templates 2014-09-03 01:45:56 +02:00
Simon DELAGE 71d672d3e6 Corrected indentation 2014-09-02 02:55:38 +02:00
Simon DELAGE a44093f735 Got it to work
Cleaned up the code, removed unneeded function, reordered
creation(s)/redirection operations
2014-09-02 02:05:54 +02:00
Simon DELAGE 814bc41469 Revert "Added option to edit public page"
This reverts commit 2d3ab28a4c.
2014-09-02 00:59:24 +02:00
Simon DELAGE 2d3ab28a4c Added option to edit public page
Edit private page option will not work wich is a good thing: after first
login, user will be redirected to his private namespace start page so he
won't forget to edit it while he might not even know he has a public one
2014-09-01 19:18:16 +02:00
Simon DELAGE 8d12996bd9 Enabled using template if edit option is on 2014-09-01 18:52:10 +02:00
Simon DELAGE debd5ac34a Check against create_... 2014-09-01 18:39:57 +02:00
Simon DELAGE 19f19f6f92 Added public page creation 2014-09-01 18:37:07 +02:00
Simon DELAGE 75232deb62 Changed template stuff
Patern on [templatepath] option was preventing to change the path. Also
renamed _template.txt to _template_private.txt and changed code
accordingly.
2014-09-01 15:57:34 +02:00
Simon DELAGE 4bfeddd685 Inverted misplaced comments 2014-08-31 05:34:34 +02:00
Simon DELAGE d837e213cd Improved redirection function
Redirect to private namespace on login if Translation plugin redirected
to translated version of wiki start page
2014-08-31 05:33:25 +02:00
Simon DELAGE 887df19155 Reindent action.php
Also removed useless functions
2014-08-31 04:10:39 +02:00
Simon DELAGE 11eb488530 Updated comments
/**
* <file description>
* Previous authors: James GuanFeng Lin, Mikhail I. Izmestev, Daniel
Stonier
* @author: Simon Delage <simon.geekitude@gmail.com>
* @license: CC Attribution-Share Alike 3.0 Unported
<http://creativecommons.org/licenses/by-sa/3.0/>
*/
2014-08-31 03:29:56 +02:00
Simon DELAGE 61bb29b755 Changed plugin.info.txt 2014-08-31 03:17:07 +02:00
Simon DELAGE fe71204944 Fixed ACL
Also changed some settings defaults and text
2014-08-31 03:13:16 +02:00
Simon DELAGE 77554d9fc3 And again... :( 2014-08-30 17:49:00 +02:00
Simon DELAGE 47ce1a8f46 Clarified more ;) 2014-08-30 17:48:04 +02:00
Simon DELAGE f46093f1e6 Clarified english language options 2014-08-30 17:45:12 +02:00
Simon DELAGE df098f672b Removed outdate language sttings.php
From now on, those files would become more and more outdated.
2014-08-30 17:27:01 +02:00
31 changed files with 1242 additions and 232 deletions

View File

@ -1,8 +1,11 @@
UserHomepage
User HomePage
============
Dokuwiki plugin to automatically create user's homepage and/or namespace.
Previous authors stopped developing it in 2009.
I started to work on it in 2014-08.
Simon Delage, simon.geekitude@gmail.com
## Live demo is up !
A [live demo website](http://demo.geekitude.fr/) is available (and also provides demo for [Mixture template](https://www.dokuwiki.org/template:mixture)). Simply log in as **demo** (same string for password) and play around.
The content is resetted every hour and any Github update is applied with a maximum delay of one hour.

View File

@ -1 +0,0 @@
====== @NAME@ (@USER@) ======

View File

@ -1,163 +1,482 @@
<?php
// AUTHOR James Lin
// Version 3.0.4
// FIXED by Simon Delage <simon.geekitude@gmail.com> on 2014-08-30
/**
* Userhomepage plugin main file
* Previous authors: James GuanFeng Lin, Mikhail I. Izmestev, Daniel Stonier
* @author: Simon Delage <simon.geekitude@gmail.com>
* @license: CC Attribution-Share Alike 3.0 Unported <http://creativecommons.org/licenses/by-sa/3.0/>
*/
// must be run within Dokuwiki
if (!defined('DOKU_INC')) die();
if (!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN', DOKU_INC . 'lib/plugins/');
require_once (DOKU_PLUGIN . 'action.php');
require_once (DOKU_PLUGIN . '/acl/admin.php');
class action_plugin_userhomepage extends DokuWiki_Action_Plugin
{
private $userHomePagePath = '';
private $userHomePageTemplate = '';
private $home_wiki_page = '';
private $home_wiki_ns = '';
private $doku_page_path = '';
private $home_page_template = '';
function init()
{
global $conf;
require_once (DOKU_INC.'inc/search.php');
if($_SERVER['REMOTE_USER']!=null)
{
//$this->doku_page_path = DOKU_INC . 'data/pages';
$this->doku_page_path = $conf['datadir'];
$this->home_page_template = DOKU_INC . $this->getConf('templatepath');
if ($this->getConf('group_by_name'))
{
// people:g:gme']li8600
$this->home_wiki_ns = cleanID($this->getConf('users_namespace').':'.strtolower(substr($this->homeNamespace(), 0, 1)).':'. $this->homeNamespace());
}
else
{
// people:gli8600
$this->home_wiki_ns = cleanID($this->getConf('users_namespace').':'. $this->homeNamespace());
}
// people:gli8600:start.txt
$this->home_wiki_page= cleanID($this->home_wiki_ns . ':' . $this->homePage());
}
}
//draws a home link, used by calls from main.php in template folder
function homeButton()
{
$this->init();
if ($_SERVER['REMOTE_USER']!=null)
{
echo '<form class="button btn_show" method="post" action="doku.php?id='.$this->home_wiki_page.'"><input class="button" type="submit" value="Home"/></form>';
}
}
//draws a home button, used by calls from main.php in template folder
function homeLink()
{
$this->init();
if ($_SERVER['REMOTE_USER']!=null)
{
echo '<a href="doku.php?id='.$this->home_wiki_page.'">Home</a>';
}
}
class action_plugin_userhomepage extends DokuWiki_Action_Plugin{
function homeNamespace() {
if ( $this->getConf('use_name_string')) {
global $INFO;
$raw_string = $INFO['userinfo']['name'];
//james_lin
return $raw_string;
} else {
//gli8600
return strtolower($_SERVER['REMOTE_USER']);
};
}
function register(Doku_Event_Handler $controller) {
$controller->register_hook('DOKUWIKI_STARTED', 'AFTER', $this, 'init',array());
$controller->register_hook('DETAIL_STARTED', 'AFTER', $this, 'init',array());
$controller->register_hook('ACTION_ACT_PREPROCESS', 'BEFORE', $this, 'redirect',array());
$controller->register_hook('ACTION_ACT_PREPROCESS', 'AFTER', $this, 'acl',array());
$controller->register_hook('COMMON_USER_LINK', 'AFTER', $this, 'replaceUserLink',array());
}
function homePage() {
if ( $this->getConf('use_start_page')) {
global $conf;
return $conf['start'];
} else {
return $this->homeNamespace();
};
}
function init(&$event, $param) {
global $conf;
function _template() {
global $INFO;
$content = io_readFile($this->home_page_template, false);
$name = $INFO['userinfo']['name'];
$user = strtolower($_SERVER['REMOTE_USER']);
$content = str_replace('@NAME@',$name,$content);
$content = str_replace('@USER@',$user,$content);
return $content;
}
function page_template(&$event, $param)
{
$this->init();
if($this->home_wiki_page && $this->home_wiki_page == $event->data[0]) {
if(!$event->result) // FIXME: another template applied?
$event->result = $this->_template();
$event->preventDefault();
if ($this->multiNsOk(true)) {
$this->helper = plugin_load('helper','userhomepage');
// If templates_path option starts with 'data/pages' it can automatically be adapted but should be changed
if (substr($this->getConf('templates_path'),0,10) == 'data/pages') {
$dest = str_replace("data/pages", "./pages", $this->getConf('templates_path'));
msg("Userhomepage option [<code>templates_path</code>] should be changed to a path relative to data folder (as set by Dokuwiki's [<code>savedir</code>] setting). Current value is based on former default (i.e. <code>data/pages/...</code>) and will still work but this message will keep appearing until the value is corrected, check <a href='https://www.dokuwiki.org/plugin:userhomepage'>this page</a> for details.",2);
} else {
$dest = $this->getConf('templates_path');
}
}
function redirect(&$event, $param)
{
global $conf;
global $INFO;
if (($_SERVER['REMOTE_USER']!=null)&&($_REQUEST['do']=='login'))
{
$this->init();
$id = $this->home_wiki_page;
//check if page not exists, create it
if (!page_exists($id) && !checklock($id) && !checkwordblock())
{
// set acl's if requested
if ( $this->getConf('set_permissions') == 1 )
{
$acl = new admin_plugin_acl();
$ns = cleanID($this->home_wiki_ns.':'.$this->homePage());
$acl->_acl_add($ns, '@ALL', (int)$this->getConf('set_permissions_others'));
$acl->_acl_add($ns, strtolower($_SERVER['REMOTE_USER']), AUTH_DELETE);
}
if (!$this->getConf('edit_before_create'))
{
//writes the user info to page
lock($id);
saveWikiText($id,$this->_template(),$lang['created']);
unlock($id);
}
// redirect to edit home page
send_redirect(wl($id, array("do" => ($this->getConf('edit_before_create'))?"edit":"show"), false, "&"));
//if ($event == "DETAIL_STARTED") { return false; }
$this->dataDir = $conf['savedir'];
// CREATE PRIVATE NAMESPACE START PAGE TEMPLATES IF NEEDED (is required by options, doesn't exist yet and a known user is logged in and not showing image details page)
if (($this->getConf('create_private_ns')) && (!is_file($this->dataDir.'/'.$this->getConf('templates_path').'/userhomepage_private.txt')) && ($this->userOk()) && ($event != "DETAIL_STARTED")) {
// If a template exists in path as builded before 2015/05/14 version, use it as source to create userhomepage_private.txt in new templates_path
if ((is_file(DOKU_CONF.'../'.$this->getConf('templates_path').'/userhomepage_private.txt')) && ($this->getConf('templatepath') != null)) {
$source = DOKU_CONF.'../'.$this->getConf('templates_path').'/userhomepage_private.txt';
// If a template from version 3.0.4 exists, use it as source to create userhomepage_private.txt in templates_path
} elseif ((is_file(DOKU_INC.$this->getConf('templatepath'))) && ($this->getConf('templatepath') != null)) {
$source = $this->getConf('templatepath');
// Otherwise, we're on a fresh install
} else {
$source = 'lib/plugins/userhomepage/lang/'.$conf['lang'].'/userhomepage_private.default';
}
// if the user was at a specific page, then don't redirect to personal page.
if (($_REQUEST['id']==$conf['start'])||(!isset($_REQUEST['id'])))
{
send_redirect(wl($id));
}
$this->copyFile($source, $dest, 'userhomepage_private.txt');
}
// CREATE PUBLIC PAGE TEMPLATES IF NEEDED (is required by options, doesn't exist yet and a known user is logged in and not showing image details page)
if (($this->getConf('create_public_page')) and (!is_file($this->dataDir.'/'.$this->getConf('templates_path').'/userhomepage_public.txt')) and ($this->userOk()) && ($event != "DETAIL_STARTED")) {
// If a template exists in path as builded before 2015/05/14 version, use it as source to create userhomepage_private.txt in new templates_path
if ((is_file(DOKU_CONF.'../'.$this->getConf('templates_path').'/userhomepage_public.txt')) && ($this->getConf('templatepath') != null)) {
$source = DOKU_CONF.'../'.$this->getConf('templates_path').'/userhomepage_public.txt';
} else {
$source = 'lib/plugins/userhomepage/lang/'.$conf['lang'].'/userhomepage_public.default';
}
$this->copyFile($source, $dest, 'userhomepage_public.txt');
}
// TARGETS
// ...:start.txt or ...:simon_delage.txt
$this->private_page = $this->helper->getPrivateID();
// user:simon.txt
$this->public_page = $this->helper->getPublicID();
// If a user is logged in, store timestamp (if it wasn't stored yet)
if (($_SERVER['REMOTE_USER'] != null) && (!isset($_SESSION['uhptimestamp']))) {
$_SESSION['uhptimestamp'] = time();
// If no user is logged in and a timestamp exists, set timestamp to null (ensures that redirection will work if user just logged out and comes back before closing browser)
} elseif (($_SERVER['REMOTE_USER'] == null) && (isset($_SESSION['uhptimestamp']))) {
$_SESSION['uhptimestamp'] = null;
}
} else {
return false;
}
function getInfo()
{
return array
(
'name' => 'User Home Page',
'email' => 'simon.geekitude@gmail.com',
'date' => '2009-05-28',
'author' => 'Simon Delage (previously James GuanFeng Lin, Mikhail I. Izmestev & Daniel Stonier)',
'desc' => 'auto redirects users to <create> their homepage',
'url' => 'https://www.dokuwiki.org/plugin:userhomepage'
);
}
function redirect(&$event, $param) {
global $conf;
global $lang;
global $ID;
if ($this->multiNsOk()) {
$created = array();
// If a user is logged in and not allready requesting his private namespace start page
if (($this->userOk())&&($_REQUEST['id']!=$this->private_page)) {
// if private page doesn't exists, create it (from template)
if ($this->getConf('create_private_ns') && is_file($this->dataDir.'/'.$this->getConf('templates_path').'/userhomepage_private.txt') && !page_exists($this->private_page) && !checklock($this->private_page) && !checkwordblock() && ($this->userOk('private'))) {
// Target private start page template
$this->private_page_template = $this->dataDir.'/'.$this->getConf('templates_path').'/userhomepage_private.txt';
// Create private page
lock($this->private_page);
saveWikiText($this->private_page,$this->applyTemplate('private'),'Automatically created');
unlock($this->private_page);
// Announce private namespace was created
msg($this->getLang('createdprivatens').' ('.$this->private_page.')', 1);
// Note that we created private page
$created['private'] = page_exists($this->private_page);
}
// If private ns is managed by plugin, check for any template from skeleton that doesn't exist yet
if ($this->getConf('create_private_ns') && (is_dir($this->dataDir.'/'.$this->getConf('templates_path').'/uhp_private_skeleton')) && ($this->userOk('private'))) {
//$files = scandir($this->dataDir.'/'.$this->getConf('templates_path').'/uhp_private_skeleton/');
$path = realpath($this->dataDir.'/'.$this->getConf('templates_path').'/uhp_private_skeleton/');
$objects = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path), RecursiveIteratorIterator::SELF_FIRST);
if ($this->getConf('group_by_name')) {
// private:s:simon or private:s:simon_delage
$this->private_ns = cleanID($this->getConf('users_namespace').':'.substr($this->privateNamespace(), 0, 1).':'. $this->privateNamespace());
} else {
// private:simon or private:simon_delage
$this->private_ns = cleanID($this->getConf('users_namespace').':'. $this->privateNamespace());
}
foreach($objects as $objectName => $object){
$file = str_replace($path, '', $objectName);
if ((is_file($this->dataDir.'/'.$this->getConf('templates_path').'/uhp_private_skeleton'.$file)) and (strpos($file, '.txt') !== false)) {
$custom_page_id = cleanID(str_replace('.txt', '', str_replace('/', ':', str_replace('\\', ':', $file))));
$this->custom_target = $this->private_ns.':'.$custom_page_id;
if (!page_exists($this->custom_target)) {
$this->custom_page_template = $this->dataDir.'/'.$this->getConf('templates_path').'/uhp_private_skeleton'.$file;
lock($this->custom_target);
saveWikiText($this->custom_target,$this->applyTemplate($this->custom_page_template),'Automatically created');
msg("Added '".$this->custom_target."' page from user namespace skeleton to your private namespace.",0);
unlock($this->custom_target);
}
}
}
}
// Public page?
// If public page doesn't exists, create it (from template)
if ($this->getConf('create_public_page') && is_file($this->dataDir.'/'.$this->getConf('templates_path').'/userhomepage_public.txt') && !page_exists($this->public_page) && !checklock($this->public_page) && !checkwordblock() && ($this->userOk('public'))) {
// Target public page template
$this->public_page_template = $this->dataDir.'/'.$this->getConf('templates_path').'/userhomepage_public.txt';
// Create public page
lock($this->public_page);
saveWikiText($this->public_page,$this->applyTemplate('public'),'Automatically created');
unlock($this->public_page);
// Announce plubic page was created
msg($this->getLang('createdpublicpage').' ('.$this->public_page.')', 1);
// Note that we created public page
$created['public'] = page_exists($this->public_page);
}
// List IDs that can match wiki start
$wikistart = array($conf['start'], ':'.$conf['start']);
// If Translation plugin is active, wiki start page can also be '??:start'
if (!plugin_isdisabled('translation')) {
// For each language in Translation settings
foreach (explode(' ',$conf['plugin']['translation']['translations']) as $language){
array_push($wikistart, $language.':'.$conf['start'], ':'.$language.':'.$conf['start']);
}
}
// If user isn't on public or private page yet, check for redirection conditions
if (($ID != $this->public_page) && ($ID != $this->private_page)) {
// If Public page was just created, redirect to it and edit (or show)
if (($created['public']) && (page_exists($this->public_page))) {
send_redirect(wl($this->public_page, array('do='.$this->getConf('action')), true));
// Else if private start page was just created and edit option is set, redirect to it and edit
} elseif (($created['private']) && (page_exists($this->private_page)) && ($this->getConf('edit_before_create'))) {
send_redirect(wl($this->private_page, array('do='.$this->getConf('action')), true));
// Else if redirection is enabled and user's private page exists AND [(user isn't requesting a specific page OR he's requesting wiki start page) AND logged in 2sec ago max]
} elseif (($this->getConf('redirection')) && (page_exists($this->private_page)) && (((!isset($_GET['id'])) or (in_array($_GET['id'], $wikistart))) && (time()-$_SESSION["uhptimestamp"] <= 2))) {
send_redirect(wl($this->private_page, '', true));
}
}
}
} else {
return false;
}
function register(&$controller)
{
$controller->register_hook('ACTION_ACT_PREPROCESS', 'BEFORE', $this, 'redirect',array());
$controller->register_hook('HTML_PAGE_FROMTEMPLATE', 'BEFORE', $this, 'page_template',array());
}
function acl(&$event, $param) {
global $conf;
if ($this->multiNsOk()) {
if ((!$this->getConf('no_acl')) && ($conf['useacl']) && ($this->userOk())) {
global $config_cascade;
$existingLines = file($config_cascade['acl']['default']);
$newLines = array();
// ACL
$acl = new admin_plugin_acl();
// On private namespace
if ($this->getConf('create_private_ns')) {
// For known users
// If use_name_string or group_by_name is enabled, we can't use ACL wildcards so let's create ACL for current user on his private ns
if (($this->getConf('use_name_string')) or ($this->getConf('group_by_name'))) {
$where = $this->private_ns.':*';
$who = strtolower($_SERVER['REMOTE_USER']);
// Otherwise we can set ACL for all known users at once
} else {
$where = cleanID($this->getConf('users_namespace')).':%USER%:*';
$who = '%USER%';
}
$perm = AUTH_DELETE;
if (!in_array("$where\t$who\t$perm\n", $existingLines)) { $newLines[] = array('where' => $where, 'who' => $who, 'perm' => $perm); }
// For @ALL
if ($this->getConf('acl_all_private') != 'noacl') {
$where = cleanID($this->getConf('users_namespace')).':*';
$who = '@ALL';
$perm = (int)$this->getConf('acl_all_private');
if (!in_array("$where\t$who\t$perm\n", $existingLines)) { $newLines[] = array('where' => $where, 'who' => $who, 'perm' => $perm); }
}
// For @user
if (($this->getConf('acl_user_private') != 'noacl') && ($this->getConf('acl_user_private') !== $this->getConf('acl_all_private'))) {
$where = cleanID($this->getConf('users_namespace')).':*';
$who = '@user';
$perm = (int)$this->getConf('acl_user_private');
if (!in_array("$where\t$who\t$perm\n", $existingLines)) { $newLines[] = array('where' => $where, 'who' => $who, 'perm' => $perm); }
}
} // end of private namespaces acl
// On public user pages
if ($this->getConf('create_public_page')) {
// For known users
if (strpos($this->getConf('public_pages_ns'),':%NAME%:%START%') !== false) {
$where = cleanID(str_replace(':%NAME%:%START%', '', $this->getConf('public_pages_ns'))).':*';
} else {
$where = cleanID($this->getConf('public_pages_ns')).':%USER%';
}
$who = '%USER%';
$perm = AUTH_EDIT;
if (!in_array("$where\t$who\t$perm\n", $existingLines)) { $newLines[] = array('where' => $where, 'who' => $who, 'perm' => $perm); }
// For others
if ($this->getConf('acl_all_public') != 'noacl') {
// If both private and public namespaces are identical, we need to force rights for @ALL and/or @user on each public page
if ($this->getConf('users_namespace') == $this->getConf('public_pages_ns')) {
$files = scandir($this->dataDir.'/pages/'.$this->getConf('public_pages_ns'));
foreach($files as $file) {
if (is_file($this->dataDir.'/pages/'.$this->getConf('public_pages_ns').'/'.$file)) {
// ACL on templates will be managed another way
if (strpos($file, 'userhomepage_p') !== 0) {
// @ALL
if ($this->getConf('acl_all_public') != 'noacl') {
$where = $this->getConf('public_pages_ns').':'.substr($file, 0, -4);
$who = '@ALL';
$perm = $this->getConf('acl_all_public');
if (!in_array("$where\t$who\t$perm\n", $existingLines)) { $newLines[] = array('where' => $where, 'who' => $who, 'perm' => $perm); }
}
// @user
if ($this->getConf('acl_user_public') != 'noacl') {
$where = $this->getConf('public_pages_ns').':'.substr($file, 0, -4);
$who = '@user';
$perm = $this->getConf('acl_user_public');
if (!in_array("$where\t$who\t$perm\n", $existingLines)) { $newLines[] = array('where' => $where, 'who' => $who, 'perm' => $perm); }
}
}
}
}
// Otherwise we just need to give the right permission to each group on public pages namespace
} else {
// @ALL
if ($this->getConf('acl_all_public') != 'noacl') {
$where = cleanID(str_replace(':%NAME%:%START%', '', $this->getConf('public_pages_ns'))).':*';
$who = '@ALL';
$perm = $this->getConf('acl_all_public');
if (!in_array("$where\t$who\t$perm\n", $existingLines)) { $newLines[] = array('where' => $where, 'who' => $who, 'perm' => $perm); }
}
// @user
if ($this->getConf('acl_user_public') != 'noacl') {
$where = cleanID(str_replace(':%NAME%:%START%', '', $this->getConf('public_pages_ns'))).':*';
$who = '@user';
$perm = $this->getConf('acl_user_public');
if (!in_array("$where\t$who\t$perm\n", $existingLines)) { $newLines[] = array('where' => $where, 'who' => $who, 'perm' => $perm); }
}
}
}
} // end for public pages acl
// On templates if they're in data/pages
if (strpos($this->getConf('templates_path'),'/pages') !== false) {
// For @ALL
if (($this->getConf('acl_all_templates') != 'noacl') && (($this->getConf('create_private_ns')) or ($this->getConf('create_public_page')))) {
$where = end(explode('/',$this->getConf('templates_path'))).':userhomepage_private';
$who = '@ALL';
$perm = (int)$this->getConf('acl_all_templates');
if (!in_array("$where\t$who\t$perm\n", $existingLines)) { $newLines[] = array('where' => $where, 'who' => $who, 'perm' => $perm); }
$where = end(explode('/',$this->getConf('templates_path'))).':userhomepage_public';
$who = '@ALL';
$perm = (int)$this->getConf('acl_all_templates');
if (!in_array("$where\t$who\t$perm\n", $existingLines)) { $newLines[] = array('where' => $where, 'who' => $who, 'perm' => $perm); }
}
// For @user
if (($this->getConf('acl_user_templates') != 'noacl') && ($this->getConf('acl_user_templates') !== $this->getConf('acl_all_templates')) && (($this->getConf('create_private_ns')) or ($this->getConf('create_public_page')))) {
$where = end(explode('/',$this->getConf('templates_path'))).':userhomepage_private';
$who = '@user';
$perm = (int)$this->getConf('acl_user_templates');
if (!in_array("$where\t$who\t$perm\n", $existingLines)) { $newLines[] = array('where' => $where, 'who' => $who, 'perm' => $perm); }
$where = end(explode('/',$this->getConf('templates_path'))).':userhomepage_public';
$who = '@user';
$perm = (int)$this->getConf('acl_user_templates');
if (!in_array("$where\t$who\t$perm\n", $existingLines)) { $newLines[] = array('where' => $where, 'who' => $who, 'perm' => $perm); }
}
} // end of templates acl
$i = count($newLines);
if ($i > 0) {
msg("Userhomepage: adding or updating ".$i." ACL rules.",1);
foreach($newLines as $line) {
if (($line['where'] != null) && ($line['who'] != null)) {
// delete potential ACL rule with same scope (aka 'where') and same user (aka 'who')
$acl->_acl_del($line['where'], $line['who']);
$acl->_acl_add($line['where'], $line['who'], $line['perm']);
}
}
}
}
} else {
return false;
}
}
function copyFile($source = null, $target_dir = null, $target_file = null) {
if (!is_file($this->dataDir.DIRECTORY_SEPARATOR.$target_dir.DIRECTORY_SEPARATOR.$target_file)) {
if(!is_dir($this->dataDir.DIRECTORY_SEPARATOR.$target_dir)){
io_mkdir_p($this->dataDir.DIRECTORY_SEPARATOR.$target_dir) || msg("Creating directory $target_dir failed",-1);
}
$source = str_replace('/', DIRECTORY_SEPARATOR, $source);
copy($source, $this->dataDir.DIRECTORY_SEPARATOR.$target_dir.DIRECTORY_SEPARATOR.$target_file);
if (is_file($this->dataDir.DIRECTORY_SEPARATOR.$target_dir.DIRECTORY_SEPARATOR.$target_file)) {
msg($this->getLang('copysuccess').' ('.$source.' > '.$this->dataDir.DIRECTORY_SEPARATOR.$target_dir.DIRECTORY_SEPARATOR.$target_file.')', 1);
} else {
msg($this->getLang('copyerror').' ('.$source.' > '.$this->dataDir.DIRECTORY_SEPARATOR.$target_dir.DIRECTORY_SEPARATOR.$target_file.')', -1);
}
} else {
msg($this->getLang('copynotneeded').' ('.$source.' > '.$this->dataDir.DIRECTORY_SEPARATOR.$target_dir.DIRECTORY_SEPARATOR.$target_file.')', 0);
}
}
function privateNamespace() {
if ( $this->getConf('use_name_string')) {
global $INFO;
$raw_string = cleanID($INFO['userinfo']['name']);
// simon_delage
return $raw_string;
} else {
// simon
return strtolower($_SERVER['REMOTE_USER']);
}
}
function privateStart() {
if ($this->getConf('use_start_page')) {
global $conf;
return cleanID($conf['start']);
} else {
return $this->privateNamespace();
}
}
function applyTemplate($type) {
if ($type == 'private') {
$content = io_readFile($this->private_page_template, false);
} elseif ($type == 'public') {
$content = io_readFile($this->public_page_template, false);
} else {
$content = io_readFile($type, false);
}
$content = str_replace('@TARGETPRIVATEPAGE@', $this->helper->getPrivateID(), $content);
$content = str_replace('@TARGETPRIVATENS@', cleanID(str_replace(':start', '', $this->helper->getPrivateID())), $content);
$content = str_replace('@TARGETPUBLICPAGE@', $this->helper->getPublicID(), $content);
$content = str_replace('@TARGETPUBLICNS@', cleanID(str_replace(':start', '', $this->helper->getPublicID())), $content);
// Improved template process to use standard replacement patterns from https://www.dokuwiki.org/namespace_templates based on code proposed by Christian Nancy
// Build a fake data structure for the parser
$data = array('tpl' => $content, 'id' => $this->private_page);
// Use the built-in parser
$content = parsePageTemplate($data);
return $content;
}
function replaceUserLink(&$event, $param) {
global $INFO;
global $conf;
if ($this->multiNsOk()) {
if (($conf['showuseras'] == "username_link") and ($this->getConf('userlink_replace'))) {
$classes = $this->getConf('userlink_classes');
$classes = str_replace(',', ' ', $classes);
//if ($this->getConf('userlink_fa')) {
// $classes = str_replace('interwiki', '', $classes);
//}
$this->username = $event->data['username'];
$this->name = $event->data['name'];
$this->link = $event->data['link'];
$this->userlink = $event->data['userlink'];
$this->textonly = $event->data['textonly'];
// Logged in as...
if (strpos($this->name, '<bdi>') !== false) {
$privateId = $this->helper->getPrivateID();
$publicId = $this->helper->getPublicID();
if ((page_exists($privateId)) && (page_exists($publicId))) {
if ($this->getConf('userlink_fa')) {
$return = '<a href="'.wl($privateId).'" class="'.$classes.' uhp_fa" rel="nofollow" title="'.$this->getLang('privatenamespace').' ('.$privateId.')'.'"><bdi><i class="fa fa-user-secret"></i>'.$INFO['userinfo']['name'].'</bdi></a> (<a href="'.wl($publicId).'" class="'.$classes.' uhp_fa" rel="nofollow" title="'.$this->getLang('publicpage').' ('.$publicId.')'.'"><bdi><i class="fa fa-user"></i>'.$_SERVER['REMOTE_USER'].'</bdi></a>)';
} else {
$return = '<a href="'.wl($privateId).'" class="'.$classes.' uhp_private" rel="nofollow" title="'.$this->getLang('privatenamespace').' ('.$privateId.')'.'"><bdi>'.$INFO['userinfo']['name'].'</bdi></a> (<a href="'.wl($publicId).'" class="'.$classes.' uhp_public" rel="nofollow" title="'.$this->getLang('publicpage').' ('.$publicId.')'.'"><bdi>'.$_SERVER['REMOTE_USER'].'</bdi></a>)';
}
} elseif (page_exists($publicId)) {
if ($this->getConf('userlink_fa')) {
$return = '</a> (<a href="'.wl($publicId).'" class="'.$classes.' uhp_fa" rel="nofollow" title="'.$this->getLang('publicpage').'('.$publicId.')'.'"><bdi><i class="fa fa-user"></i>'.$_SERVER['REMOTE_USER'].'</bdi></a>)';
} else {
$return = '<bdi>'.$INFO['userinfo']['name'].'</bdi> (<a href="'.wl($publicId).'" class="'.$classes.' uhp_public" rel="nofollow" title="'.$this->getLang('publicpage').' ('.$publicId.')'.'"><bdi>'.$_SERVER['REMOTE_USER'].'</bdi></a>)';
}
} elseif (page_exists($privateId)) {
if ($this->getConf('userlink_fa')) {
$return = '<a href="'.wl($privateId).'" class="'.$classes.' uhp_fa" rel="nofollow" title="'.$this->getLang('privatenamespace').' ('.$privateId.')'.'"><bdi><i class="fa fa-user-secret"></i>'.$INFO['userinfo']['name'].'</bdi></a>';
} else {
$return = '<a href="'.wl($privateId).'" class="'.$classes.' uhp_private" rel="nofollow" title="'.$this->getLang('privatenamespace').' ('.$privateId.')'.'"><bdi>'.$INFO['userinfo']['name'].'</bdi></a> (<bdi>'.$_SERVER['REMOTE_USER'].'</bdi>)';
}
} else {
$return = null;
}
// ... or Last modified...
} else {
// No change for this right now
$return = null;
}
if ($return != null) {
$event->data = array(
'username' => $this->username,
'name' => $this->name,
'link' => $this->link,
'userlink' => $return,
'textonly' => $this->textonly
);
}
}
} else {
return false;
}
}
function multiNsOk($msg=false) {
// Error: Public page switched to namespace and is in conflict with Private namespace
if (strpos($this->getConf('public_pages_ns'),':%NAME%:%START%') !== false) {
$PublicNS = str_replace(':%NAME%:%START%', '', $this->getConf('public_pages_ns'));
$PublicNS = str_replace(':', '', $PublicNS);
$PrivateNS = str_replace(':', '', $this->getConf('users_namespace'));
if ($PublicNS == $PrivateNS) {
if ($msg) {
msg("UserHomePage settings conflict ! Make sure Private and Public namespaces are different. Plugin will have no effect untill this is corrected.", -1);
}
return false;
} else {
return true;
}
} else {
return true;
}
}
function userOk($check = null) {
global $INFO;
// Proceed only if named user is connected...
if ($_SERVER['REMOTE_USER'] != null) {
// Check if user is member of a group in 'groups_private' or 'groups_public' (depending on $check)
if (($check == 'private') or ($check == 'public')) {
// Stop if 'groups_private' is set and and user is not member of at least one of said groups
$groups = $this->getConf('groups_'.$check);
$groups = str_replace(' ','', $groups);
$groups = explode(',', $groups);
$userGroups = $INFO['userinfo']['grps'];
// If UHP is set to check user's group(s)
if (($groups != null) and ($groups[0] != null) and ($userGroups != null)) {
$test = array_intersect($groups, $userGroups);
// Proceed if user is member of at least one group set UHP's corresponding setting
if (count($test) > 0) {
return true;
} else {
return false;
}
// If UHP isn't set to ckeck user's group(s) we can proceed
} else {
return true;
}
// If $check is null, we only need to know that a named user is connected (wich we allready know if we went that far)
} else {
return true;
}
// ... else stop
} else {
return false;
}
}
}

View File

@ -1,14 +1,32 @@
<?php
/*
* Userhomepage plugin, configuration defaults
* FIXED by Simon Delage <simon.geekitude@gmail.com> on 2014-08-30
/**
* Configuration defaults file for Userhomepage plugin
* Previous authors: James GuanFeng Lin, Mikhail I. Izmestev, Daniel Stonier
* @author: Simon Delage <simon.geekitude@gmail.com>
* @license: CC Attribution-Share Alike 3.0 Unported <http://creativecommons.org/licenses/by-sa/3.0/>
*/
$conf['use_name_string'] = 0; // use name string instead of login string for the user's ns
$conf['use_start_page'] = 1; // use state page instead of namespace string for home page
$conf['set_permissions'] = 1; // configure acl's
$conf['set_permissions_others'] = '0';
$conf['templatepath'] = 'lib/plugins/userhomepage/_template.txt'; // the location of the template file
$conf['users_namespace'] = 'people'; // namespace storing the user namespaces
$conf['group_by_name'] = 1; // use the first character of name to group people
$conf['edit_before_create'] = 1; // allow users to edit their home pages before create
$conf['create_private_ns'] = 0;
$conf['use_name_string'] = 0;
$conf['use_start_page'] = 1;
$conf['users_namespace'] = 'user';
$conf['group_by_name'] = 0;
$conf['edit_before_create'] = 0;
$conf['acl_all_private'] = '0';
$conf['acl_user_private'] = '0';
$conf['groups_private'] = '';
$conf['create_public_page'] = 0;
$conf['public_pages_ns'] = 'user';
$conf['acl_all_public'] = '1';
$conf['acl_user_public'] = '1';
$conf['groups_public'] = '';
$conf['templates_path'] = './pages/user';
$conf['templatepath'] = 'lib/plugins/userhomepage/_template.txt';
$conf['acl_all_templates'] = '1';
$conf['acl_user_templates'] = '1';
$conf['no_acl'] = 0;
$conf['redirection'] = 1;
$conf['action'] = 'edit';
$conf['userlink_replace'] = 1;
$conf['userlink_classes'] = 'interwiki iw_user wikilink1';
$conf['userlink_fa'] = 0;

View File

@ -1,14 +1,32 @@
<?php
/*
* Userhomepage plugin, configuration metadata
* FIXED by Simon Delage <simon.geekitude@gmail.com> on 2014-08-30
/**
* Configuration metadata file for Userhomepage plugin
* Previous authors: James GuanFeng Lin, Mikhail I. Izmestev, Daniel Stonier
* @author: Simon Delage <simon.geekitude@gmail.com>
* @license: CC Attribution-Share Alike 3.0 Unported <http://creativecommons.org/licenses/by-sa/3.0/>
*/
$meta['use_name_string'] = array('onoff'); // use name string instead of login string for the user's namespace
$meta['use_start_page'] = array('onoff'); // use start page instead of namespace string for home page
$meta['set_permissions'] = array('onoff'); // configure permissions
$meta['set_permissions_others'] = array('multichoice','_choices'=>array('0','1','2','4','8','16')); // if enable set permission, what permission for other people?
$meta['templatepath'] = array('string','_pattern' => '/^(|[a-zA-Z\-]+)$/'); // the location of the template file
$meta['users_namespace'] = array('string','_pattern' => '/^(|[a-zA-Z\-:]+)$/'); // the namespace containing user directories
$meta['group_by_name'] = array('onoff'); // group people by the first character of name
$meta['edit_before_create'] = array('onoff'); // allow users to edit their home page before create.
$meta['create_private_ns'] = array('onoff');
$meta['use_name_string'] = array('onoff');
$meta['use_start_page'] = array('onoff');
$meta['users_namespace'] = array('string','_pattern' => '/^(|[a-zA-Z\-:]+)$/');
$meta['group_by_name'] = array('onoff');
$meta['edit_before_create'] = array('onoff');
$meta['acl_all_private'] = array('multichoice','_choices'=>array('0','1','2','4','8','16','noacl'));
$meta['acl_user_private'] = array('multichoice','_choices'=>array('0','1','2','4','8','16','noacl'));
$meta['groups_private'] = array('string');
$meta['create_public_page'] = array('onoff');
$meta['public_pages_ns'] = array('string','_pattern' => '/^(|[a-zA-Z\-:%]+)$/','_caution' => 'warning');
$meta['acl_all_public'] = array('multichoice','_choices'=>array('0','1','2','noacl'));
$meta['acl_user_public'] = array('multichoice','_choices'=>array('0','1','2','noacl'));
$meta['groups_public'] = array('string');
$meta['templates_path'] = array('string');
$meta['templatepath'] = array('string');
$meta['acl_all_templates'] = array('multichoice','_choices'=>array('0','1','2','noacl'));
$meta['acl_user_templates'] = array('multichoice','_choices'=>array('0','1','2','noacl'));
$meta['no_acl'] = array('onoff');
$meta['redirection'] = array('onoff');
$meta['action'] = array('multichoice','_choices'=>array('edit','show'));
$meta['userlink_replace'] = array('onoff');
$meta['userlink_classes'] = array('string');
$meta['userlink_fa'] = array('onoff');

160
helper.php Normal file
View File

@ -0,0 +1,160 @@
<?php
/**
* Helper Component for the Userhomepage Plugin
*
* @author: Simon Delage <simon.geekitude@gmail.com>
* @license: CC Attribution-Share Alike 3.0 Unported <http://creativecommons.org/licenses/by-sa/3.0/>
*/
// must be run within Dokuwiki
if(!defined('DOKU_INC')) die();
class helper_plugin_userhomepage extends DokuWiki_Plugin {
// Returns the ID of current user's private namespace start page (even if it doesn't exist)
function getPrivateID() {
if ($this->getConf('group_by_name')) {
// private:s:simon or private:s:simon_delage
$this->private_ns = cleanID($this->getConf('users_namespace').':'.strtolower(substr($this->privateNamespace(), 0, 1)).':'. $this->privateNamespace());
} else {
// private:simon or private:simon_delage
$this->private_ns = cleanID($this->getConf('users_namespace').':'. $this->privateNamespace());
}
// ...:start.txt
return $this->private_page = $this->private_ns.':'.$this->privateStart();
}
// Returns the ID of any (or current) user's public page (even if it doesn't exist)
function getPublicID($userLogin=null) {
global $conf;
if ($userLogin == null) {
$userLogin = $_SERVER['REMOTE_USER'];
}
if (strpos($this->getConf('public_pages_ns'),':%NAME%:%START%') !== false) {
$target = str_replace('%NAME%', $userLogin, $this->getConf('public_pages_ns'));
$target = str_replace('%START%', $conf['start'], $target);
} else {
$target = $this->getConf('public_pages_ns').':'.$userLogin;
}
return $this->public_page = cleanID($target);
}
// Returns a link to current user's private namespace start page (even if it doesn't exist)
// If @param == "loggedinas", the link will be wraped in an <li> element
function getPrivateLink($param=null) {
global $INFO;
global $lang;
if ($param == "loggedinas") {
return '<li>'.$lang['loggedinas'].' <a href="'.wl($this->getPrivateID()).'" class="uhp_private" rel="nofollow" title="'.$this->getLang('privatenamespace').'">'.$INFO['userinfo']['name'].' ('.$_SERVER['REMOTE_USER'].')</a></li>';
} elseif ($param != null) {
return '<a href="'.wl($this->getPrivateID()).'" rel="nofollow" title="'.$this->getLang('privatenamespace').'">'.$param.'</a>';
} else {
return '<a href="'.wl($this->getPrivateID()).'" rel="nofollow" title="'.$this->getLang('privatenamespace').'">'.$this->getLang('privatenamespace').'</a>';
}
}
// Returns a link to current user's public page (even if it doesn't exist)
// If @param == "loggedinas", the link will be wraped in an <li> element
function getPublicLink($param=null) {
global $INFO;
global $lang;
if ($param == "loggedinas") {
return '<li>'.$lang['loggedinas'].' <a href="'.wl($this->getPublicID()).'" class="uhp_public" rel="nofollow" title="'.$this->getLang('publicpage').'">'.$INFO['userinfo']['name'].' ('.$_SERVER['REMOTE_USER'].')</a></li>';
} elseif ($param != null) {
return '<a href="'.wl($this->getPublicID()).'" rel="nofollow" title="'.$this->getLang('publicpage').'">'.$param.'</a>';
} else {
return '<a href="'.wl($this->getPublicID()).'" rel="nofollow" title="'.$this->getLang('publicpage').'">'.$this->getLang('publicpage').'</a>';
}
}
function getComplexLoggedInAs() {
global $INFO;
global $lang;
// If user's private namespace and public page exist, return a 'Logged in as' string with both styled links)
if ((page_exists($this->getPrivateID())) && (page_exists($this->getPublicID()))) {
return '<li>'.$lang['loggedinas'].' <a href="'.wl($this->getPrivateID()).'" class="uhp_private" rel="nofollow" title="'.$this->getLang('privatenamespace').'">'.$INFO['userinfo']['name'].'</a> (<a href="'.wl($this->getPublicID()).'" class="uhp_public" rel="nofollow" title="'.$this->getLang('publicpage').'">'.$_SERVER['REMOTE_USER'].'</a>)</li>';
// Else if only private namespace exists, return 'Logged in as' string with private namespace styled link
} elseif (page_exists($this->getPrivateID())) {
return $this->getPrivateLink("loggedinas");
// Else if only public page exists, return 'Logged in as' string with public page styled link
} elseif (page_exists($this->getPublicID())) {
return $this->getPublicLink("loggedinas");
// Else default back to standard string
} else {
return '<li class="user">'.$lang['loggedinas'].' '.userlink().'</li>';
}
}
// Returns a link to any user's public page (user login is required and page must exist)
// This is to provide proper "Last update by" link
function getAnyPublicLink($userLogin) {
global $lang;
if ($userLogin != null) {
$publicID = $this->getPublicID($userLogin);
$result = '<a href="'.wl($publicID).'" class="uhp_public ';
if (page_exists($publicID)) {
$result = $result.'wikilink1';
} else {
$result = $result.'wikilink2';
}
$result = $result.'" rel="nofollow" title="'.$this->getLang('publicpage').'">'.editorinfo($userLogin, true).'</a>';
return $result;
} else {
return false;
}
}
function getButton($type="private") {
global $INFO;
global $lang;
if ($type == "private") {
echo '<form class="button btn_show" method="post" action="doku.php?id='.$this->getPrivateID().'"><input class="button" type="submit" value="'.$this->getLang('privatenamespace').'"/></form>';
} elseif ($type == "public") {
echo '<form class="button btn_show" method="post" action="doku.php?id='.$this->getPublicID().'"><input class="button" type="submit" value="'.$this->getLang('publicpage').'"/></form>';
}
}
// Returns an array containing id and language of Private NS Start Page and/or Public Page (depending on options, page existance isn't checked)
function getElements() {
$return = array();
// Don't return anything if no known user is logged in
if ($_SERVER['REMOTE_USER'] != null) {
// Add PRIVATE NAMESPACE START PAGE INFO IF NEEDED (is required by options)
if ($this->getConf('create_private_ns')) {
$return['private'] = array();
$return['private']['id'] = $this->getPrivateID();
$return['private']['string'] = $this->getLang('privatenamespace');
}
// Add PUBLIC PAGE INFO IF NEEDED (is required by options)
if ($this->getConf('create_public_page')) {
$return['public'] = array();
$return['public']['id'] = $this->getPublicID();
$return['public']['string'] = $this->getLang('publicpage');
}
}
return $return;
}
function privateNamespace() {
if ($this->getConf('use_name_string')) {
global $INFO;
$raw_string = cleanID($INFO['userinfo']['name']);
// simon_delage
return $raw_string;
} else {
// simon
return strtolower($_SERVER['REMOTE_USER']);
}
}
function privateStart() {
if ( $this->getConf('use_start_page')) {
global $conf;
return cleanID($conf['start']);
} else {
return $this->privateNamespace();
}
}
}

BIN
images/ns.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 792 B

BIN
images/user.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 742 B

15
lang/de/lang.php Normal file
View File

@ -0,0 +1,15 @@
<?php
/**
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*
* @author Simon DELAGE <simon.geekitude@gmail.com>
* @author Dana <dannax3@gmx.de>
*/
$lang['copyerror'] = 'Fehler beim Kopieren';
$lang['copysuccess'] = 'Erfolgreich kopiert';
$lang['copynotneeded'] = 'Kopie wird nicht benötigt';
$lang['createdprivatens'] = 'Privaten Namespace erstellt';
$lang['createdpublicpage'] = 'Öffentliche Seite erstellt';
$lang['privatenamespace'] = 'Privater Namespace';
$lang['publicpage'] = 'Öffentliche Seite';

65
lang/de/settings.php Normal file
View File

@ -0,0 +1,65 @@
<?php
/**
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*
* @author Simon Delage <simon.geekitude@gmail.com>
* @author Padhie <develop@padhie.de>
* @author Dana <dannax3@gmx.de>
*/
$lang['create_private_ns'] = 'Privaten Namespace für die Benutzer anlegen (alle anderen Optionen überprüfen, bevor diese Option aktiviert wird!)';
$lang['use_name_string'] = 'Den vollen Namen des Benutzers statt des Logins für seinen privaten Namespace benutzen';
$lang['use_start_page'] = 'Den Startseitennamen des Wikis für die Startseiten der privaten Namespaces benutzen (andernfalls wird der Name des privaten Namespace benutzt).';
$lang['users_namespace'] = 'Namespace, unter dem die privaten Namespaces der Benutzer angelegt werden';
$lang['group_by_name'] = 'Namespaces der Benutzer nach dem ersten Buchstaben des Benutzernamens gruppieren';
$lang['edit_before_create'] = 'Benutzern erlauben, die Startseite ihres privaten Namespace beim Anlegen zu bearbeiten (funktioniert nur, wenn nicht gleichzeitig eine öffentliche Seite angelegt wird)';
$lang['acl_all_private'] = 'Berechtigungen der Gruppe @ALL für private Namespaces';
$lang['acl_all_private_o_0'] = 'Keine (Standard)';
$lang['acl_all_private_o_1'] = 'Lesen';
$lang['acl_all_private_o_2'] = 'Bearbeiten';
$lang['acl_all_private_o_4'] = 'Anlegen';
$lang['acl_all_private_o_8'] = 'Hochladen';
$lang['acl_all_private_o_16'] = 'Entfernen';
$lang['acl_all_private_o_noacl'] = 'Kein automatischer ACL-Eintrag';
$lang['acl_user_private'] = 'Berechtigungen der Gruppe @user für private Namespaces';
$lang['acl_user_private_o_0'] = 'Keine (Standard)';
$lang['acl_user_private_o_1'] = 'Lesen';
$lang['acl_user_private_o_2'] = 'Bearbeiten';
$lang['acl_user_private_o_4'] = 'Anlegen';
$lang['acl_user_private_o_8'] = 'Hochladen';
$lang['acl_user_private_o_16'] = 'Entfernen';
$lang['acl_user_private_o_noacl'] = 'Kein automatischer ACL-Eintrag';
$lang['groups_private'] = 'Durch Kommata getrennte Liste von Benutzergruppen bezüglich der Erstellung von privaten Namesräumen (Freilassen, um oben stehende Einstellungen auf alle Benutzer anzuwenden).';
$lang['create_public_page'] = 'Öffentliche Seite für die Benutzer anlegen';
$lang['public_pages_ns'] = 'Namespace, unter dem die öffentlichen Seiten der Benutzer angelegt werden';
$lang['acl_all_public'] = 'Berechtigungen der Gruppe @ALL für öffentliche Seiten';
$lang['acl_all_public_o_0'] = 'Keine';
$lang['acl_all_public_o_1'] = 'Lesen (Standard)';
$lang['acl_all_public_o_2'] = 'Bearbeiten';
$lang['acl_all_public_o_noacl'] = 'Kein automatischer ACL-Eintrag';
$lang['acl_user_public'] = 'Berechtigungen für @user Gruppe auf öffentlichen Seiten';
$lang['acl_user_public_o_0'] = 'Keine';
$lang['acl_user_public_o_1'] = 'Lesen (Standard)';
$lang['acl_user_public_o_2'] = 'Bearbeiten';
$lang['acl_user_public_o_noacl'] = 'Kein automatischer ACL-Eintrag';
$lang['groups_public'] = 'Durch Kommata getrennte Liste von Benutzergruppen bezüglich der Erstellung von öffentlichen Seiten (Freilassen, um oben stehende Einstellungen auf alle Benutzer anzuwenden).';
$lang['templates_path'] = 'Relativer Pfad von [<code>savedir</code>] wo Templates gespeichert werden (userhomepage_private.txt and userhomepage_public.txt). Beispiel: <code>./pages/user</code> or <code>../lib/plugins/userhomepage</code>.';
$lang['templatepath'] = 'Templatepfad aus Version 3.0.4. Exisitert diese Datei, wird sie als Template für die Startseite neuer privater Namespaces verwendet (löschen, wenn dies nicht gewünscht wird)';
$lang['acl_all_templates'] = 'Berechtigungen der Gruppe @ALL für Templates, die in <code>data/pages...</code> liegen';
$lang['acl_all_templates_o_0'] = 'Keine';
$lang['acl_all_templates_o_1'] = 'Lesen (Standard)';
$lang['acl_all_templates_o_2'] = 'Bearbeiten';
$lang['acl_all_templates_o_noacl'] = 'Kein automatischer ACL-Eintrag';
$lang['acl_user_templates'] = 'Berechtigungen der Gruppe @user für Templates, die in <code>data/pages...</code> liegen';
$lang['acl_user_templates_o_0'] = 'Keine';
$lang['acl_user_templates_o_1'] = 'Lesen (Standard)';
$lang['acl_user_templates_o_2'] = 'Bearbeiten';
$lang['acl_user_templates_o_noacl'] = 'Kein automatischer ACL-Eintrag';
$lang['no_acl'] = 'Automatische Erstellung von ACL-Einträgen deaktivieren; bereits erstellte Einträge müssen manuell entfernt werden. Vergessen Sie nicht, ggf. ACL-Einträge für die Templates zu erstellen, falls diese in <code>data/pages...</code> liegen.';
$lang['redirection'] = 'Aktivieren einer Weiterleitung (Auch bei Deaktivierung, wird dies weiterhin bei der Erstellung von Seiten auftreten).';
$lang['action'] = 'Aktion bei der ersten Weiterleitung auf eine öffentliche Seite nach deren Erstellung (oder auf Startseite eines privaten Namespace).';
$lang['action_o_edit'] = 'Bearbeiten';
$lang['action_o_show'] = 'Anzeigen';
$lang['userlink_replace'] = 'Aktivieren des Ersetzens des [<code>Logged in as</code>] interwiki-Links, abhängig von Seiten erstellt durch Userhomepage (Funktioniert nur, wenn <code>showuseras</code> Option auf interwiki-Link gesetzt ist).';
$lang['userlink_classes'] = 'Durch Leerzeichen getrennte Liste von CSS-Klassen die auf [<code>Logged in as</code>] Interwiki-Links angewendet werden (Default: <code>interwiki iw_user wikilink1</code>).';
$lang['userlink_fa'] = 'Benutzen von Fontawesome-Icons anstelle von Bildern (Fontawesome muss durch ein Template oder Plugin installiert sein) ?';

View File

@ -0,0 +1,10 @@
====== @NAME@ (@USER@) - Privater Namespace ======
Dieser Namespace ''//@TARGETPRIVATENS@://'' und sein Inhalt (Seiten, Bilder, ...) ist **für Ihre eigene Verwendung reserviert** (nur Administratoren können ebenfalls darauf zugreifen).
* Um eine Seite in Ihrem privaten Namespace zu erstellen, benutzen Sie einfach die normale Link-Syntax __ohne Angabe eines Namespace__ :
<code>[[beispielseite 1]]
[[beispiel 2|Meine Beispielseite 2]]</code>
* Um einen Unter-Namespace zu erstellen, geben Sie einfach die vollständige Position einer neuen Seite an:
<code>[[@TARGETPRIVATENS@:<zu-erstellender-unter-namespace>:beispiel 3]]</code>
Sie können diesen Absatz (abgesehen vom Titel der Seite) nun gerne löschen.\\
Los, schreiben Sie etwas! :-D

View File

@ -0,0 +1,10 @@
====== @NAME@ (@USER@) - Öffentliche Seite ======
Diese öffentliche Seite ''//@TARGETPUBLICPAGE@.txt//'' kann, wie der Name schon sagt, **von jedem gelesen, aber nur vom Besitzer bearbeitet werden** (oder einem Administrator).
* Sie können sich selbst vorstellen, Links zu Ihren Beiträgen in diesem Wiki erstellen, eine Geschichte erzählen oder Ihre anderen Arbeiten präsentieren
* Denken Sie an die [[wp>http://de.wikipedia.org/wiki/Netiquette|Netiquette]] ;-)
Beschränkungen:
* Sie können keine anderen Seiten in diesem Namespace ''//@TARGETPUBLICNS@//'' erstellen
* Nur ein Administrator kann ein Bild hinzufügen
Sie können diesen Absatz (abgesehen vom Titel der Seite) nun gerne löschen.\\
Los, schreiben Sie etwas! :-D

14
lang/en/lang.php Normal file
View File

@ -0,0 +1,14 @@
<?php
/**
* English language file for Userhomepage plugin
* @author Simon DELAGE <simon.geekitude@gmail.com>
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*/
$lang['copyerror'] = 'Copy error';
$lang['copysuccess'] = 'Successfull copy';
$lang['copynotneeded'] = 'Copy not needed';
$lang['createdprivatens'] = 'Created your private namespace';
$lang['createdpublicpage'] = 'Created your public page';
$lang['privatenamespace'] = 'Private Space';
$lang['publicpage'] = 'Public Page';

View File

@ -1,21 +1,64 @@
<?php
/**
* English language file for config of Userhomepage plugin
* @author: Daniel Stonier <d.stonier@gmail.com>
* FIXED by Simon Delage <simon.geekitude@gmail.com> on 2014-08-30
* English settings file for Userhomepage plugin
* Previous authors: James GuanFeng Lin, Mikhail I. Izmestev, Daniel Stonier
* @author: Simon Delage <simon.geekitude@gmail.com>
* @license: CC Attribution-Share Alike 3.0 Unported <http://creativecommons.org/licenses/by-sa/3.0/>
*/
$lang['use_name_string'] = 'Use names strings for the user\'s namespace (alt. login strings).';
$lang['use_start_page'] = 'Use the wiki\'s start page string instead of the user\'s namespace string for the home page.';
$lang['set_permissions'] = 'Configure acl\'s to permit user full access to their home namespace.';
$lang['set_permissions_others'] = 'If set permission enabled, what permission for other people?';
$lang['set_permissions_others_o_0'] = 'None';
$lang['set_permissions_others_o_1'] = 'Read';
$lang['set_permissions_others_o_2'] = 'Edit';
$lang['set_permissions_others_o_4'] = 'Create';
$lang['set_permissions_others_o_8'] = 'Upload';
$lang['set_permissions_others_o_16'] = 'Delete';
$lang['templatepath'] = 'Doku relative path to the template file.';
$lang['users_namespace'] = 'Namespace under which user namespaces are created.';
$lang['group_by_name'] = 'Group home pages by the first character of user name?';
$lang['edit_before_create'] = 'Allow users to edit their home pages before create';
$lang['create_private_ns'] = 'Create user\'s private namespace (double-check all options before enabling)?';
$lang['use_name_string'] = 'Use user\'s full name instead of login for his private namespace.';
$lang['use_start_page'] = 'Use the wiki\'s start page name for the start page of each private namespace (otherwise, the private namespace name will be used).';
$lang['users_namespace'] = 'Namespace under which user namespaces are created.';
$lang['group_by_name'] = 'Group users\' namespaces by the first character of user name?';
$lang['edit_before_create'] = 'Allow users to edit the start page of their private namespace on creation (will only work if a public page isn\'t generated at the same time).';
$lang['acl_all_private'] = 'Permissions for @ALL group on Private Namespaces';
$lang['acl_all_private_o_0'] = 'None (Default)';
$lang['acl_all_private_o_1'] = 'Read';
$lang['acl_all_private_o_2'] = 'Edit';
$lang['acl_all_private_o_4'] = 'Create';
$lang['acl_all_private_o_8'] = 'Upload';
$lang['acl_all_private_o_16'] = 'Delete';
$lang['acl_all_private_o_noacl'] = 'No automatic ACL';
$lang['acl_user_private'] = 'Permissions for @user group on Private Namespaces';
$lang['acl_user_private_o_0'] = 'None (Default)';
$lang['acl_user_private_o_1'] = 'Read';
$lang['acl_user_private_o_2'] = 'Edit';
$lang['acl_user_private_o_4'] = 'Create';
$lang['acl_user_private_o_8'] = 'Upload';
$lang['acl_user_private_o_16'] = 'Delete';
$lang['acl_user_private_o_noacl'] = 'No automatic ACL';
$lang['groups_private'] = 'Comma separated list of user groups concerned by Private Namespace creation (leave empty to apply above settings to all users).';
$lang['create_public_page'] = 'Create a user\'s public page?';
$lang['public_pages_ns'] = 'Namespace under wich public pages are created.';
$lang['acl_all_public'] = 'Permissions for @ALL group on Public Pages';
$lang['acl_all_public_o_0'] = 'None';
$lang['acl_all_public_o_1'] = 'Read (Default)';
$lang['acl_all_public_o_2'] = 'Edit';
$lang['acl_all_public_o_noacl'] = 'No automatic ACL';
$lang['acl_user_public'] = 'Permissions for @user group on Public Pages';
$lang['acl_user_public_o_0'] = 'None';
$lang['acl_user_public_o_1'] = 'Read (Default)';
$lang['acl_user_public_o_2'] = 'Edit';
$lang['acl_user_public_o_noacl'] = 'No automatic ACL';
$lang['groups_public'] = 'Comma separated list of user groups concerned by Public Page creation (leave empty to apply above settings to all users).';
$lang['templates_path'] = 'Relative path from [<code>savedir</code>] where templates will be stored (userhomepage_private.txt and userhomepage_public.txt). Examples: <code>./pages/user</code> or <code>../lib/plugins/userhomepage</code>.';
$lang['templatepath'] = 'Template path from version 3.0.4. If this file exists, it will be used as default source for new private namespace start page template (clear the path if you don\'t want to).';
$lang['acl_all_templates'] = 'Permissions for @ALL group on templates (if they are stored in <code>data/pages...</code>)';
$lang['acl_all_templates_o_0'] = 'None';
$lang['acl_all_templates_o_1'] = 'Read (Default)';
$lang['acl_all_templates_o_2'] = 'Edit';
$lang['acl_all_templates_o_noacl'] = 'No automatic ACL';
$lang['acl_user_templates'] = 'Permissions for @user group on templates (if they are stored in <code>data/pages...</code>)';
$lang['acl_user_templates_o_0'] = 'None';
$lang['acl_user_templates_o_1'] = 'Read (Default)';
$lang['acl_user_templates_o_2'] = 'Edit';
$lang['acl_user_templates_o_noacl'] = 'No automatic ACL';
$lang['no_acl'] = 'No automated ACL setting at all but you\'ll have to remove those created so far manually. Don\'t forget to set some ACL on templates.';
$lang['redirection'] = 'Enable redirection (even if disabled, it will still occur on pages creation).';
$lang['action'] = 'Action on first redirection to public page after it\'s creation (or private namespace start page).';
$lang['action_o_edit'] = 'Edit (Default)';
$lang['action_o_show'] = 'Show';
$lang['userlink_replace'] = 'Enable replacement of [<code>Logged in as</code>] interwiki link, depending on pages created by Userhomepage (only works if <code>showuseras</code> option is set to interwiki link).';
$lang['userlink_classes'] = 'Space separated list of CSS classes to apply to [<code>Logged in as</code>] interwiki links (default: <code>interwiki iw_user wikilink1</code>).';
$lang['userlink_fa'] = 'Use Fontawesome icons instead of images (Fontawesome has to be installed by template or a plugin) ?';

View File

@ -0,0 +1,10 @@
====== @NAME@ (@USER@) - Private Space ======
This namespace ''//@TARGETPRIVATENS@://'' and it's content (pages, images, ...) is **reserved for your own usage** (only superusers can also access to it)...
* To create a page inside this private space, simply use the standard link syntax __without any namespace__ :
<code>[[example page 1]]
[[example 2|My example page 2]]</code>
* To create a sub-namespace, simply indicate the new page's full position :
<code>[[@TARGETPRIVATENS@:<sub-namespace_to_create>:example 3]]</code>
Feel free to remove this paragraph (beside the title)...\\
Now, write something! :-D

View File

@ -0,0 +1,10 @@
====== @NAME@ (@USER@) - Public Page ======
This public page ''//@TARGETPUBLICPAGE@.txt//'', as stated by it's name, **can be read by anyone but only you can edit it** (or a superuser)...
* You can introduce yourself, add links to your contributions in this wiki, tell a story or present your other works
* Think about [[wp>http://en.wikipedia.org/wiki/Etiquette_in_technology|netiquette]] ;-)
Limitations:
* You can't create any other page in that namespace ''//@TARGETPUBLICNS@//''
* Only a superuser can add a picture
Feel free to remove this paragraph (beside the title)...\\
Now, write something! :-D

14
lang/fa/lang.php Normal file
View File

@ -0,0 +1,14 @@
<?php
/**
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*
* @author Sam01 <m.sajad079@gmail.com>
*/
$lang['copyerror'] = 'کپی کردن خطا';
$lang['copysuccess'] = 'با موفقیت کپی شد';
$lang['copynotneeded'] = 'کپی نیاز نیست';
$lang['createdprivatens'] = 'ایجادکردن فضای‌نام خصوصی شما';
$lang['createdpublicpage'] = 'ایجادکردن صفحه‌ی عمومی شما';
$lang['privatenamespace'] = 'فضای خصوصی';
$lang['publicpage'] = 'فضای عمومی';

62
lang/fa/settings.php Normal file
View File

@ -0,0 +1,62 @@
<?php
/**
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*
* @author Sam01 <m.sajad079@gmail.com>
*/
$lang['create_private_ns'] = 'ایجاد صفحه‌ی خصوصی کاربر (دوبار بررسی‌شدن همه‌ی گزینه‌ها قبل از فراهم شدن؟)';
$lang['use_name_string'] = 'استفاده از نام کامل کاربر به‌ جای ورود به سیستم برای فضای‌نام خصوصی خود.';
$lang['use_start_page'] = 'استفاده نام صفحه آغازین ویکی برای صفحه آغازین هر فضای نام خصوصی (در غیر این صورت، نام فضای نامی خصوصی استفاده خواهد شد).';
$lang['users_namespace'] = 'فضای‌نام زیر فضای‌نام های کاربر که ایجاد شده اند.';
$lang['group_by_name'] = 'گروه فضای‌نام کاربران توسط کاراکتر اول نام کاربر؟';
$lang['edit_before_create'] = 'دسترسی کاربران برای ویرایش صفحه آغازین فضای نام خصوصی‌شان در ایجاد (کار خواهد کرد فقط اگر یک صفحه عمومی در همان زمان تولید نشود)';
$lang['acl_all_private'] = 'مجوز برای گروه @ALL در فضای‌نام‌های خصوصی';
$lang['acl_all_private_o_0'] = 'هیچ (پیشفرض)';
$lang['acl_all_private_o_1'] = 'خواندن';
$lang['acl_all_private_o_2'] = 'ویرایش';
$lang['acl_all_private_o_4'] = 'ایجاد';
$lang['acl_all_private_o_8'] = 'آپلود';
$lang['acl_all_private_o_16'] = 'حذف';
$lang['acl_all_private_o_noacl'] = 'بدون ACL خودکار';
$lang['acl_user_private'] = 'مجوز برای گروه @user در فضای‌نام خصوصی';
$lang['acl_user_private_o_0'] = 'هیچ (پیشفرض)';
$lang['acl_user_private_o_1'] = 'خواندن';
$lang['acl_user_private_o_2'] = 'ویرایش';
$lang['acl_user_private_o_4'] = 'ایجاد';
$lang['acl_user_private_o_8'] = 'آپلود';
$lang['acl_user_private_o_16'] = 'حذف';
$lang['acl_user_private_o_noacl'] = 'بدون ACL خودکار';
$lang['groups_private'] = 'جداکردن لیست نگران گروهای کاربر با کاما توسط ایجاد فضای نام خصوصی (خالی بگذارید تا تنظیمات بالا برای همه کاربران استفاده شود)';
$lang['create_public_page'] = 'ایجاد یک صفحه‌ی عمومی کاربر؟';
$lang['public_pages_ns'] = 'فضای‌نام زیر صفحه‌های عمومی ایجاد شده.';
$lang['acl_all_public'] = 'مجوز برای گروه @ALL در صفحات عمومی';
$lang['acl_all_public_o_0'] = 'هیچ';
$lang['acl_all_public_o_1'] = 'خواندن (پیشفرض)';
$lang['acl_all_public_o_2'] = 'ویرایش';
$lang['acl_all_public_o_noacl'] = 'بدون ACL خودکار';
$lang['acl_user_public'] = 'مجوز برای گروه @user در صفحات عمومی';
$lang['acl_user_public_o_0'] = 'هیچ';
$lang['acl_user_public_o_1'] = 'خواندن(پیشفرض)';
$lang['acl_user_public_o_2'] = 'ویرایش';
$lang['acl_user_public_o_noacl'] = 'بدون ACL خودکار';
$lang['groups_public'] = 'جداکردن با کاما لیست گروه کاربر که صفحه عمومی ایجاد';
$lang['templatepath'] = 'قالب مسیر از نسخه 3.0.4 اگر این فایل وجود داشته باشد، آن استفاده خواهد شد به عنوان امنیت پیش فرض برای فضای‌نام خصوصی جدید قالب صفحه آغازین (پاک کردن مسیر اگر شما نمیخواهید)';
$lang['acl_all_templates'] = 'مجوز برای گروه @ALL در قالب‌ها (اگر آنها ذخیره شده اند در <code>data/pages...</code>)';
$lang['acl_all_templates_o_0'] = 'هیچ';
$lang['acl_all_templates_o_1'] = 'خواندن (پیشفرض)';
$lang['acl_all_templates_o_2'] = 'ویرایش';
$lang['acl_all_templates_o_noacl'] = 'بدون ACL خودکار';
$lang['acl_user_templates'] = 'مجوز برای گروه @ALL در قالب‌ها (اگر آنها ذخیره شده اند در <code>data/pages...</code>)';
$lang['acl_user_templates_o_0'] = 'هیچ';
$lang['acl_user_templates_o_1'] = 'خواندن (پیشفرض)';
$lang['acl_user_templates_o_2'] = 'ویرایش';
$lang['acl_user_templates_o_noacl'] = 'بدون ACL خودکار';
$lang['no_acl'] = 'بدون ACL خودکار تنظیمات در همه اما شما باید حذف کنید آن را یا ایجاد کنید به طور دستی. تنظیم را فراموش نکنید در برخی ACL در قالب‌ها.';
$lang['redirection'] = 'فعال بودن تغییرمسیر (حتی اگر غیرفعال هم باشد، در ایجاد صفحه‌ها رخ می‌دهد).';
$lang['action'] = 'اقدام در اولین تغییرمسیر به صفحه عمومی بعد از ایجاد آن (یا فضای‌نام خصوصی صفحه آغازین)';
$lang['action_o_edit'] = 'ویرایش (پیشفرض)';
$lang['action_o_show'] = 'نمایش';
$lang['userlink_replace'] = 'فعال بودن جایگزینی [<code>وارد شده به عنوان</code>] در لینک‌های داخلی ویکی، بسته به صفحات ایجاد شده توسط صفحه خانگی کاربر (درصورتی کار می‌کند <code>showuseras</code> که تنظیمات روی لینک‌های داخلی ویکی باشند).';
$lang['userlink_classes'] = 'فضای لیست جدا شده از همه برای کلاس‌های CSS به درخواست [<code>واردشده به عنوان</code>] در لینک‌های داخلی ویکی (پیشفرض: <code>interwiki iw_user wikilink1</code>).';
$lang['userlink_fa'] = 'استفاده از آیکون‌های Fontawesome به جای تصاویر (Fontawesome باید توسط قالب یا افزونه نصب شده باشد) ؟';

14
lang/fr/lang.php Normal file
View File

@ -0,0 +1,14 @@
<?php
/**
* French language file for Userhomepage plugin
* @author Simon DELAGE <simon.geekitude@gmail.com>
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*/
$lang['copyerror'] = 'Erreur de copie';
$lang['copysuccess'] = 'Copie réussie';
$lang['copynotneeded'] = 'Copie non nécessaire';
$lang['createdprivatens'] = 'Votre espace privé est créé';
$lang['createdpublicpage'] = 'Votre page publique est créée';
$lang['privatenamespace'] = 'Espace Privé';
$lang['publicpage'] = 'Page Publique';

64
lang/fr/settings.php Normal file
View File

@ -0,0 +1,64 @@
<?php
/**
* French settings file for Userhomepage plugin
* Previous authors: James GuanFeng Lin, Mikhail I. Izmestev, Daniel Stonier
* @author: Simon Delage <simon.geekitude@gmail.com>
* @license: CC Attribution-Share Alike 3.0 Unported <http://creativecommons.org/licenses/by-sa/3.0/>
*/
$lang['create_private_ns'] = 'Créer les espaces privés des utilisateurs (vérifier soigneusement toutes les options avant l\'activation)?';
$lang['use_name_string'] = 'Utiliser le nom complet de l\'utilisateurs au lieu du login pour son espace privé.';
$lang['use_start_page'] = 'Utiliser le nom de page d\'accueil du wiki pour celle de chaque espace privé (sinon le nom de l\'espace privé sera utilisé).';
$lang['users_namespace'] = 'Espace de nom sous lequel créer les espaces privés des utilisateurs.';
$lang['group_by_name'] = 'Grouper les espaces privés des utilisateurs par la première lettre de leur nom ?';
$lang['edit_before_create'] = 'Permettre aux utilisateurs d\'éditer la page d\'accueil de leur espace privé à sa création (fonctionnera uniquement si une page publique n\'est pas créée en même temps).';
$lang['acl_all_private'] = 'Droits d\'accès pour le groupe @ALL sur les Espaces Privés';
$lang['acl_all_private_o_0'] = 'Aucun (Défaut)';
$lang['acl_all_private_o_1'] = 'Lecture';
$lang['acl_all_private_o_2'] = 'Écriture';
$lang['acl_all_private_o_4'] = 'Création';
$lang['acl_all_private_o_8'] = 'Envoyer';
$lang['acl_all_private_o_16'] = 'Effacer';
$lang['acl_all_private_o_noacl'] = 'Pas de gestion automatique des droits';
$lang['acl_user_private'] = 'Droits d\'accès pour le groupe @user sur les Espaces Privés';
$lang['acl_user_private_o_0'] = 'Aucun (Défaut)';
$lang['acl_user_private_o_1'] = 'Lecture';
$lang['acl_user_private_o_2'] = 'Écriture';
$lang['acl_user_private_o_4'] = 'Création';
$lang['acl_user_private_o_8'] = 'Envoyer';
$lang['acl_user_private_o_16'] = 'Effacer';
$lang['acl_user_private_o_noacl'] = 'Pas de gestion automatique des droits';
$lang['groups_private'] = 'Liste séparée par des virgules de groupes d\'utilisateurs concernés par la création d\'un espace privé (laisser vide pour appliquer les réglages ci-dessus à tous les utilisateurs).';
$lang['create_public_page'] = 'Créer une page publique pour chaque utilisateur?';
$lang['public_pages_ns'] = 'Espace de nom sous lequel créer les pages publiques.';
$lang['acl_all_public'] = 'Droits d\'accès pour le groupe @ALL sur les Pages Publiques';
$lang['acl_all_public_o_0'] = 'Aucun';
$lang['acl_all_public_o_1'] = 'Lecture (Défaut)';
$lang['acl_all_public_o_2'] = 'Écriture';
$lang['acl_all_public_o_noacl'] = 'Pas de gestion automatique des droits';
$lang['acl_user_public'] = 'Droits d\'accès pour le groupe @user sur les Pages Publiques';
$lang['acl_user_public_o_0'] = 'Aucun';
$lang['acl_user_public_o_1'] = 'Lecture (Défaut)';
$lang['acl_user_public_o_2'] = 'Écriture';
$lang['acl_user_public_o_noacl'] = 'Pas de gestion automatique des droits';
$lang['groups_public'] = 'Liste séparée par des virgules de groupes d\'utilisateurs concernés par la création d\'une page publique (laisser vide pour appliquer les réglages ci-dessus à tous les utilisateurs).';
$lang['templates_path'] = 'Chemin relatif depuis [<code>savedir</code>] où les modèles seront stockés (userhomepage_private.txt et userhomepage_public.txt). Exemples: <code>./pages/user</code> (permet d\'éditer les modèles depuis le wiki) ou <code>../lib/plugins/userhomepage</code> (pour plus de protecion ou pour les centraliser dans une ferme de wikis).';
$lang['templatepath'] = 'Chemin vers le modèle de la version 3.0.4. Si le fichier existe, il sera utilisé comme source pour le modèle des pages d\'accueil des espaces privés (videz le chemin si vous ne le souhaitez pas).';
$lang['acl_all_templates'] = 'Droits d\'accès pour le groupe @ALL sur les modèles (s\'ils sont stockés dans <code>data/pages...</code>)';
$lang['acl_all_templates_o_0'] = 'Aucun';
$lang['acl_all_templates_o_1'] = 'Lecture (Défaut)';
$lang['acl_all_templates_o_2'] = 'Écriture';
$lang['acl_all_templates_o_noacl'] = 'Pas de gestion automatique des droits';
$lang['acl_user_templates'] = 'Droits d\'accès pour le groupe @user sur les modèles (s\'ils sont stockés dans <code>data/pages...</code>)';
$lang['acl_user_templates_o_0'] = 'Aucun';
$lang['acl_user_templates_o_1'] = 'Lecture (Défaut)';
$lang['acl_user_templates_o_2'] = 'Écriture';
$lang['acl_user_templates_o_noacl'] = 'Pas de gestion automatique des droits';
$lang['no_acl'] = 'Aucun règlage automatique des droits d\'accès mais vous devrez nettoyer manuellement les règles déjà créées. Pensez à protéger les modèles.';
$lang['redirection'] = 'Activer la redirection (même désactivée, elle aura tout de même lieu lors de la création des pages).';
$lang['action'] = 'Action à la première redirection vers la page publique après sa création (ou la page d\'accueil de l\'espace de nom privé).';
$lang['action_o_edit'] = 'Editer (Défaut)';
$lang['action_o_show'] = 'Afficher';
$lang['userlink_replace'] = 'Activer le remplacement du lien interwiki [<code>Connecté en tant que</code>], selon les pages créées par Userhomepage (ne fonctionne que si l\'option <code>showuseras</code> est configurée pour le lien interwiki).';
$lang['userlink_classes'] = 'Liste séparée par des espaces de classes CSS à appliquer aux liens de la chaîne [<code>Connecté en tant que</code>] (défaut: <code>interwiki iw_user wikilink1</code>).';
$lang['userlink_fa'] = 'Utiliser des icônes Fontawesome au lieu d\'images (Fontawesome doit être installé par le thème ou un plugin) ?';

View File

@ -0,0 +1,10 @@
====== @NAME@ (@USER@) - Espace Privé ======
Cet espace de nom ''//@TARGETPRIVATENS@://'' et son contenu (pages, images, ...) **vous est réservé** (seul un super-utilisateur peut y accéder)...
* Pour créer une page au sein de cet espace réservé, utilisez simplement la syntaxe de lien __sans aucun espace de nom__ :
<code>[[page exemple 1]]
[[exemple2|Ma page exemple2]]</code>
* Pour créer un sous-espace de nom, il suffit d'indiquer une nouvelle page avec son emplacement complet :
<code>[[@TARGETPRIVATENS@:<sous-espace_à_créer>:exemple3]]</code>
Vous pouvez évidement supprimer ce paragraphe (sauf le titre)...\\
A vos claviers! :-D

View File

@ -0,0 +1,10 @@
====== @NAME@ (@USER@) - Page Publique ======
Cette page publique ''//@TARGETPUBLICPAGE@.txt//'' est par définition **accessible à tous en lecture mais vous seul pouvez la modifier** (en dehors d'un super-utilisateur)...
* Vous pouvez vous présenter, raconter une histoire ou présenter vos travaux personnels (même sans lien avec ce wiki)
* Ne créez pas d'autre page dans cet espace de nom ''//@TARGETPUBLICNS@//''
* Pensez à la [[wpfr>http://fr.wikipedia.org/wiki/N%C3%A9tiquette|nétiquette]] ;-)
Contrainte:
* Seul un super-utilisateur peut ajouter une image
Vous pouvez évidement supprimer ce paragraphe (sauf le titre)...\\
A vos claviers! :-D

14
lang/ja/lang.php Normal file
View File

@ -0,0 +1,14 @@
<?php
/**
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*
* @author Hideaki SAWADA <chuno@live.jp>
*/
$lang['copyerror'] = 'コピー失敗';
$lang['copysuccess'] = 'コピー成功';
$lang['copynotneeded'] = 'コピー不要';
$lang['createdprivatens'] = '私用の名前空間を作成した。';
$lang['createdpublicpage'] = '公開ページを作成した。';
$lang['privatenamespace'] = '私用の名前空間';
$lang['publicpage'] = '公開ページ';

65
lang/ja/settings.php Normal file
View File

@ -0,0 +1,65 @@
<?php
/**
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*
* @author Hideaki SAWADA <chuno@live.jp>
*/
$lang['create_private_ns'] = 'ユーザーの私用の名前空間の作成(有効化する前に全オプションを再度確認して下さい)';
$lang['use_name_string'] = '私用の名前空間名としてユーザー名の代わりに氏名を使用する。';
$lang['use_start_page'] = 'Wiki のスタートページ名を私用の名前空間のスタートページに使用する(無効の場合、名前空間名を使用)。';
$lang['users_namespace'] = 'ユーザーの名前空間を作成する名前空間';
$lang['group_by_name'] = 'ユーザー名の一文字目による users グループの名前空間';
$lang['edit_before_create'] = '私用の名前空間作成時にスタートページの編集を許可する(同時に公開ページを作成しない場合のみ)。';
$lang['acl_all_private'] = '私用の名前空間に対する @ALL グループのアクセス権限';
$lang['acl_all_private_o_0'] = '無し(デフォルト)';
$lang['acl_all_private_o_1'] = '読取';
$lang['acl_all_private_o_2'] = '編集';
$lang['acl_all_private_o_4'] = '作成';
$lang['acl_all_private_o_8'] = 'アップロード';
$lang['acl_all_private_o_16'] = '削除';
$lang['acl_all_private_o_noacl'] = '自動的にアクセス権限を与えない';
$lang['acl_user_private'] = '私用の名前空間に対する @user グループのアクセス権限';
$lang['acl_user_private_o_0'] = '無し(デフォルト)';
$lang['acl_user_private_o_1'] = '読取';
$lang['acl_user_private_o_2'] = '編集';
$lang['acl_user_private_o_4'] = '作成';
$lang['acl_user_private_o_8'] = 'アップロード';
$lang['acl_user_private_o_16'] = '削除';
$lang['acl_user_private_o_noacl'] = '自動的にアクセス権限を与えない';
$lang['groups_private'] = '私用の名前空間を作成するユーザーグループのカンマ区切り一覧(上記の設定を全ユーザーに適用する場合、空のままにします)';
$lang['create_public_page'] = 'ユーザーの公開ページの作成';
$lang['public_pages_ns'] = '公開ページを作成する名前空間';
$lang['acl_all_public'] = '公開ページに対する @ALL グループのアクセス権限';
$lang['acl_all_public_o_0'] = '無し';
$lang['acl_all_public_o_1'] = '読取(デフォルト)';
$lang['acl_all_public_o_2'] = '編集';
$lang['acl_all_public_o_noacl'] = '自動的にアクセス権限を与えない';
$lang['acl_user_public'] = '公開ページに対する @user グループのアクセス権限';
$lang['acl_user_public_o_0'] = '無し';
$lang['acl_user_public_o_1'] = '読取(デフォルト)';
$lang['acl_user_public_o_2'] = '編集';
$lang['acl_user_public_o_noacl'] = '自動的にアクセス権限を与えない';
$lang['groups_public'] = '公開ページを作成するユーザーグループのカンマ区切り一覧(上記の設定を全ユーザーに適用する場合、空のままにします)';
$lang['templates_path'] = 'テンプレートが保存される [<code>savedir</code>] からの相対パスuserhomepage_private.txt userhomepage_public.txt
例: <code>./pages/user</code> または <code>../lib/plugins/userhomepage</code>';
$lang['templatepath'] = 'バージョン 3.0.4 から引き継いだテンプレートのパス。このファイルがある場合、私用の名前空間の新規スタートページテンプレートのデフォルト元として使用する(望まない場合は初期化する)。';
$lang['acl_all_templates'] = 'テンプレート対する @ALL グループのアクセス権限(<code>data/pages...</code>に置いた場合)';
$lang['acl_all_templates_o_0'] = '無し';
$lang['acl_all_templates_o_1'] = '読取(デフォルト)';
$lang['acl_all_templates_o_2'] = '編集';
$lang['acl_all_templates_o_noacl'] = '自動的にアクセス権限を与えない';
$lang['acl_user_templates'] = 'テンプレート対する @user グループのアクセス権限(<code>data/pages...</code>に置いた場合)';
$lang['acl_user_templates_o_0'] = '無し';
$lang['acl_user_templates_o_1'] = '読取(デフォルト)';
$lang['acl_user_templates_o_2'] = '編集';
$lang['acl_user_templates_o_noacl'] = '自動的にアクセス権限を与えない';
$lang['no_acl'] = '自動的にアクセス権限を与えませんが、これまでに手動で設定しらアクセス権限を削除する必要があります。
テンプレートにアクセス権限設定することを忘れないでください。';
$lang['redirection'] = 'リダイレクトを有効にする。(無効の場合でも、ページは作成します)';
$lang['action'] = '公開ページ(または私用の名前空間のスタートページ)作成直後のリダイレクト時の操作。';
$lang['action_o_edit'] = '編集(デフォルト)';
$lang['action_o_show'] = '表示';
$lang['userlink_replace'] = 'Userhomepage が作成したページに応じて、[<code>Logged in as</code>] インターウィキリンクの置換えを有効にします。(<code>showuseras</code> オプションがインターウィキリンクに設定されている場合のみ動作します)';
$lang['userlink_classes'] = '[<code>Logged in as</code>] インターウィキリンクに適用する CSS クラスのスペース区切り一覧(デフォルト: <code>interwiki iw_user wikilink1</code>';
$lang['userlink_fa'] = '画像の代わりに Fontawesome アイコンを使用しますか(テンプレートやプラグインには Fontawesome をインストールする必要がある)?';

View File

@ -0,0 +1,10 @@
====== @NAME@ (@USER@) - 私用の名前空間 ======
この名前空間(//@TARGETPRIVATENS@://)と内容(ページ・画像・…)は**あなた専用として予約されました**(スーパーユーザー以外はアクセスできません)…
* この私用の名前空間内にページを作成するには__名前空間なしの__内部リンク構文を使用します
<code>[[example page 1]]
[[example 2|My example page 2]]</code>
* サブ名前空間を作成するには新規ページの絶対内部リンクを使用します:
<code>[[@TARGETPRIVATENS@:<sub-namespace_to_create>:exemple 3]]</code>
この文章は(見出し以外)自由に削除して下さい…\\
さぁ、何かを書きましょう! :-D

View File

@ -0,0 +1,10 @@
====== @NAME@ (@USER@) - 公開ページ ======
この公開ページ(//@TARGETPUBLICPAGE@.txt//)は、名前の通り**誰でも読めますがあなた(またはスーパーユーザー)しか編集できません**…
* 自己紹介・Wiki 内の自分の投稿へのリンク・話を書く・自分の他の作品発表が可能です。
* [[wpjp>ネチケット]]について考えてみよう ;-)
制限事項:
* 名前空間(//@TARGETPUBLICNS@//)内に他のページを作成できません。
* スーパーユーザーしか画像を追加できません。
この文章は(見出し以外)自由に削除して下さい…\\
さぁ、何かを書きましょう! :-D

14
lang/ko/lang.php Normal file
View File

@ -0,0 +1,14 @@
<?php
/**
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*
* @author Erial <erial2@gmail.com>
*/
$lang['copyerror'] = '복사 에러';
$lang['copysuccess'] = '복사 성공';
$lang['copynotneeded'] = '복사할 필요가 없습니다';
$lang['createdprivatens'] = '당신의 개인 이름공간이 만들어졌습니다';
$lang['createdpublicpage'] = '당신의 공개 문서가 만들어졌습니다';
$lang['privatenamespace'] = '개인 공간';
$lang['publicpage'] = '공개 문서';

View File

@ -1,21 +1,63 @@
<?php
/**
* Korean language file for the configuration manager
* @author: 이재영 <jakan2@gmail.com>
* FIXED by Simon Delage <simon.geekitude@gmail.com> on 2014-08-30
*/
$lang['use_name_string'] = 'Use names strings for the user\'s namespace (alt. login strings).';
$lang['use_start_page'] = 'Use the wiki\'s start page string instead of the user\'s namespace string for the home page.';
$lang['set_permissions'] = '홈 네임스페이스에 대한 모든 권한을 갖도론 acl을 설정하세요.';
$lang['set_permissions_others'] = 'If set permission enabled, what permission for other people?';
$lang['set_permissions_others_o_0'] = 'None';
$lang['set_permissions_others_o_1'] = 'Read';
$lang['set_permissions_others_o_2'] = 'Edit';
$lang['set_permissions_others_o_4'] = 'Create';
$lang['set_permissions_others_o_8'] = 'Upload';
$lang['set_permissions_others_o_16'] = 'Delete';
$lang['templatepath'] = '템플릿화일들이 존재하는 Doku 의 경로를 알려주세요.';
$lang['users_namespace'] = '사용자 네임스페이스가 있는 네임스페이스.';
$lang['group_by_name'] = 'Group home pages by the first character of user name?';
$lang['edit_before_create'] = 'Allow users to edit their home pages before create';
/**
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*
* @author Erial <erial2@gmail.com>
*/
$lang['create_private_ns'] = '사용자의 개인 이름공간 만들기 (활성화 하기 전에 모든 옵션을 재차 확인하십시오)';
$lang['use_name_string'] = '개인 이름공간에서 로그인명 대신 풀네임을 사용함.';
$lang['use_start_page'] = '각각의 개인 이름공간의 시작 문서를 위키의 시작 문서명을 따라 사용함 (미체크시 개인 이름공간 이름의 문서를 사용함)';
$lang['users_namespace'] = '사용자 이름공간 아래에 하부 이름공간이 생성되었습니다.';
$lang['group_by_name'] = '사용자 이름의 첫자로 그룹 사용자의 이름공간을 만드시겠습니까?';
$lang['edit_before_create'] = '계정 생성시 개인 이름공간의 시작문서 편집을 허용하시겠습니까 (공개 문서가 동시에 생성되지 않을 경우에만 작동합니다)';
$lang['acl_all_private'] = '개인 이름공간에대한 @ALL 그룹의 권한';
$lang['acl_all_private_o_0'] = '없음 (기본설정)';
$lang['acl_all_private_o_1'] = '읽기';
$lang['acl_all_private_o_2'] = '수정';
$lang['acl_all_private_o_4'] = '만들기';
$lang['acl_all_private_o_8'] = '업로드';
$lang['acl_all_private_o_16'] = '삭제';
$lang['acl_all_private_o_noacl'] = '자동 ACL 사용 안함';
$lang['acl_user_private'] = '개인 이름공간에대한 @user 그룹의 권한';
$lang['acl_user_private_o_0'] = '없음 (기본설정)';
$lang['acl_user_private_o_1'] = '읽기';
$lang['acl_user_private_o_2'] = '수정';
$lang['acl_user_private_o_4'] = '만들기';
$lang['acl_user_private_o_8'] = '업로드';
$lang['acl_user_private_o_16'] = '삭제';
$lang['acl_user_private_o_noacl'] = '자동 ACL 사용 안함';
$lang['groups_private'] = '개인 이름공간 생성에 참여할 수 있는 사용자 그룹의 목록을 콤마로 구분지어 입력해주십시오 (비워두면 상기설정은 모든 사용자에게 적용됩니다)';
$lang['create_public_page'] = '사용자의 공개 문서를 만들겠습니까?';
$lang['public_pages_ns'] = '공개 문서 아래의 이름공간이 만들어졌습니다.';
$lang['acl_all_public'] = '공개 문서에 대한 @ALL 그룹의 권한';
$lang['acl_all_public_o_0'] = '없음';
$lang['acl_all_public_o_1'] = '읽기 (기본설정)';
$lang['acl_all_public_o_2'] = '수정';
$lang['acl_all_public_o_noacl'] = '자동 ACL 사용 안함';
$lang['acl_user_public'] = '공개 문서에 대한 @user 그룹의 권한';
$lang['acl_user_public_o_0'] = '없음';
$lang['acl_user_public_o_1'] = '읽기 (기본설정)';
$lang['acl_user_public_o_2'] = '수정';
$lang['acl_user_public_o_noacl'] = '자동 ACL 사용 안함';
$lang['groups_public'] = '공개 문서 생성에 참여할 수 있는 사용자 그룹의 목록을 콤마로 구분지어 입력해주십시오 (비워두면 상기설정은 모든 사용자에게 적용됩니다)';
$lang['templates_path'] = '템플릿이 저장될 [<code>savedir</code>]와의 연관 위치 (userhomepage_private.txt 또는 userhomepage_public.txt). 예제: <code>./pages/user</code> 또는 <code>../lib/plugins/userhomepage</code>.';
$lang['templatepath'] = '버전 3.0.4 이후의 템플릿 위치. 만약 이 파일이 있으면 새로운 개인 이름공간의 시작문서를 만들 때 기본 양식 문서로 사용합니다. (사용하지 않으면 비워두세요)';
$lang['acl_all_templates'] = '템플릿에 대한 @ALL 그룹의 권한 (내용이 <code>data/pages...</code>에 저장될 경우)';
$lang['acl_all_templates_o_0'] = '없음';
$lang['acl_all_templates_o_1'] = '읽기 (기본설정)';
$lang['acl_all_templates_o_2'] = '수정';
$lang['acl_all_templates_o_noacl'] = '자동 ACL 사용 안함';
$lang['acl_user_templates'] = '템플릿에 대한 @user 그룹의 권한 (내용이 <code>data/pages...</code>에 저장될 경우)';
$lang['acl_user_templates_o_0'] = '없음';
$lang['acl_user_templates_o_1'] = '읽기 (기본설정)';
$lang['acl_user_templates_o_2'] = '수정';
$lang['acl_user_templates_o_noacl'] = '자동 ACL 사용 안함';
$lang['no_acl'] = '자동 ACL 설정을 전혀 사용하지 않습니다. 이미 생성된 것들은 수동으로 삭제해야 합니다. 템플릿 ACL 설정도 잊지 마세요.';
$lang['redirection'] = '자동 넘기기 활성화 (이 옵션을 비활성화 해도 문서 생성시에는 작동합니다)';
$lang['action'] = '공개 문서(또는 개인 이름공간의 시작문서)가 만들어진 후 사용자가 처음 접속할 때 진행할 처리 ';
$lang['action_o_edit'] = '수정 (기본설정)';
$lang['action_o_show'] = '보기';
$lang['userlink_replace'] = '위키 내부로 연결된 [<code>로그인한 사용자</code>]를 Userhomepage가 만든 문서로 대체하는걸 허용함 (<code>showuseras</code> 옵션이 위키 내부 연결로 설정된 경우에만 작동함)';
$lang['userlink_classes'] = '띄어쓰기로 구분된 [<code>로그인한 사용자</code>]의 위키 내부 연결에 사용할 CSS 클래스의 목록. (기본설정: <code>interwiki iw_user wikilink1</code>).';
$lang['userlink_fa'] = '이미지 대신에 Fontawesome 아이콘을 사용하시겠습니까? (Fontawesome 기능이 템플릿이나 플러그인으로 설치되어있어야합니다)';

View File

@ -1,22 +0,0 @@
<?php
/**
* Russian language file for the configuration manager
* @author: Mikhail I. Izmestev <izmmishao5@gmail.com>
* FIXED by Simon Delage <simon.geekitude@gmail.com> on 2014-08-30
*/
$lang['use_name_string'] = 'Использовать полное имя для неймспейса пользователя (иначе будет использоваться логин).';
$lang['use_start_page'] = 'Использовать имя стартовой страницы вместо имени пользователя для домашней страницы.';
$lang['set_permissions'] = 'Устанавливать пользователю полные права доступа к домашней странице.';
$lang['set_permissions_others'] = 'Какие права доступа устанавливать для остальных пользователей?';
$lang['set_permissions_others_o_0'] = 'Замечание';
$lang['set_permissions_others_o_1'] = 'Чтение';
$lang['set_permissions_others_o_2'] = 'Правка';
$lang['set_permissions_others_o_4'] = 'Создание';
$lang['set_permissions_others_o_8'] = 'Загрузка файлов';
$lang['set_permissions_others_o_16'] = 'Удаление';
$lang['templatepath'] = 'Относительный путь до файла шаблона.';
$lang['users_namespace'] = 'Неймспейс где будут создаваться неймспейсы пользователей.';
$lang['group_by_name'] = 'Группировать неймспейсы пользователей по первой букве имени?';
$lang['edit_before_create'] = 'Редактировать домашнюю страницу, но не создавать её.';

View File

@ -1,7 +1,7 @@
base userhomepage
author Simon Delage
email simon.geekitude@gmail.com
date 2009-05-28
name User Home Page
desc Auto redirects users to <create> their homepage.
date 2016-12-01
name User Homepage
desc Automatically create user's private namespace and/or public page and redirects users to private namespace on login.
url https://www.dokuwiki.org/plugin:userhomepage

9
style.css Normal file
View File

@ -0,0 +1,9 @@
/********************************************************************
Screen Styles for the Userhomepage Plugin (additional to all.css)
********************************************************************/
a.uhp_private,a.uhp_public { padding-left:19px; }
a.uhp_private { background:url(images/ns.png) no-repeat left; }
a.uhp_public { background:url(images/user.png) no-repeat left; }
a.uhp_fa i.fa-user-secret,
a.uhp_fa i.fa-user { padding: 0 5px 0 2px !important; }