plugin:userhomepage
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
plugin:userhomepage [2017-01-16 14:03] – Date update Geekitude | plugin:userhomepage [2022-08-29 07:34] (current) – Added [userlink_icons] setting to choose image style Geekitude | ||
---|---|---|---|
Line 4: | Line 4: | ||
description: | description: | ||
author | author | ||
- | email : simon.geekitude@gmail.com | + | email : sdelage@gmail.com |
- | type : Action | + | type : Action |
- | lastupdate : 2017-01-13 | + | lastupdate : 2022-08-29 |
- | compatible : Ponder Stibbons, | + | compatible : Ponder Stibbons, |
depends | depends | ||
conflicts | conflicts | ||
Line 20: | Line 20: | ||
screenshot_img : http:// | screenshot_img : http:// | ||
---- | ---- | ||
+ | |||
+ | :!: if you installed this plugin before 2021-12-16, note that instructions in [[plugin: | ||
===== Installation ===== | ===== Installation ===== | ||
- | Install | + | Search and install |
- | :!: **Important: | + | :!: **Important: |
+ | :-) | ||
==== Upgrading from version 3.0.4 ==== | ==== Upgrading from version 3.0.4 ==== | ||
Line 34: | Line 37: | ||
A new option [Create Private Namespace] wich is disabled by default will prevent any page creation just after the installation of the new version. **Before enabling that option**, backup your ACL file (// | A new option [Create Private Namespace] wich is disabled by default will prevent any page creation just after the installation of the new version. **Before enabling that option**, backup your ACL file (// | ||
and then remove ACL rules linked to the old version of the plugin.\\ | and then remove ACL rules linked to the old version of the plugin.\\ | ||
- | Note that the old template file is no longer bundled so it can't be overwritten by the new package ;-) | + | Note that the old page template file is no longer bundled so it can't be overwritten by the new package ;-) |
If you prefer to stick to old 3.0.4 version, [[https:// | If you prefer to stick to old 3.0.4 version, [[https:// | ||
Line 40: | Line 43: | ||
===== Settings ===== | ===== Settings ===== | ||
- | :!: **Warning** : some templates include an option for users' pages namespace wich default doesn' | + | :!: **Warning |
+ | |||
+ | :!: **Warning about templates** : some templates include an option for users' pages namespace wich default doesn' | ||
To my knowledge, concerned templates are [[doku> | To my knowledge, concerned templates are [[doku> | ||
Line 53: | Line 58: | ||
* **groups_private** : list of groups concerned by private namespace creation (nothing will happen for users who don't belong to at least one of set groups) [default : empty (every users' groups are concerned)], | * **groups_private** : list of groups concerned by private namespace creation (nothing will happen for users who don't belong to at least one of set groups) [default : empty (every users' groups are concerned)], | ||
* **create_public_page** : enable creation of users' public pages [default: disabled (to make sure no public page is created before all settings are set the right way)] | * **create_public_page** : enable creation of users' public pages [default: disabled (to make sure no public page is created before all settings are set the right way)] | ||
- | * **public_pages_ns** : namespace under wich users' public pages will be created (:!: __if you decide to change this setting__, you will have to manually manage interwiki user link used with '' | + | * **public_pages_ns** : namespace under wich users' public pages will be created (:!: __if you decide to change this setting__, you will have to manually manage interwiki user link used with '' |
* **acl_all_public** : ACL for @ALL group on others' | * **acl_all_public** : ACL for @ALL group on others' | ||
* **acl_user_public** : ACL for @user group on others' | * **acl_user_public** : ACL for @user group on others' | ||
* **groups_public** : list of groups concerned by public page creation (nothing will happen for users who don't belong to at least one of set groups) [default : empty (every users' groups are concerned)], | * **groups_public** : list of groups concerned by public page creation (nothing will happen for users who don't belong to at least one of set groups) [default : empty (every users' groups are concerned)], | ||
- | * **templates_path** : :!:**since 2015-06-04 version**, this path should be relative to what is set by [' | + | * **templates_path** : :!:**since 2015-06-04 version**, this path should be relative to what is set by [' |
- | * **templatepath** : only kept for backward compatibility, | + | * **templatepath** : only kept for backward compatibility, |
* **acl_all_templates** : ACL for @ALL group on plugin' | * **acl_all_templates** : ACL for @ALL group on plugin' | ||
* **acl_all_templates** : ACL for @user group on plugin' | * **acl_all_templates** : ACL for @user group on plugin' | ||
- | * **no_acl** : absolutely no ACL rule will be automatically set (ACL options above will be ignored), including any protection on templates. Rules allready set will have to be manually removed. Only enable this option if you know what you're doing and have a specific need not covered by the options above. [default : disabled] | + | * **no_acl** : absolutely no ACL rule will be automatically set (ACL options above will be ignored), including any protection on page templates. Rules allready set will have to be manually removed. Only enable this option if you know what you're doing and have a specific need not covered by the options above. [default : disabled] |
- | * **redirection** : enable or disable redirection (note that it will however occur on page creation). [default : enabled] //(added on 2015/ | + | * **redirection** : enable or disable redirection (note that it will however occur on page creation |
* **action** : choose wich action is used on redirection to public page right after it's creation between ' | * **action** : choose wich action is used on redirection to public page right after it's creation between ' | ||
* **userlink_replace** : if '' | * **userlink_replace** : if '' | ||
- | * **userlink_classes** : wich CSS classes will be applied to the replacement link(s). | + | * **userlink_classes** : wich CSS classes will be applied to the replacement link(s). |
+ | * **userlink_icons** : choose between old school png or modern svg images for replacement link(s). [default : '' | ||
* **userlink_fa** : if enabled, this option will switch from image icons to Fontawesome icons for the links sent with '' | * **userlink_fa** : if enabled, this option will switch from image icons to Fontawesome icons for the links sent with '' | ||
- | Right after saving settings, depending on selected options, you will get a success (or error m() message about the creation of the templates: | + | Right after saving settings, depending on selected options, you will get a success (or error m() message about the creation of the page templates: |
{{http:// | {{http:// | ||
===== Templates ===== | ===== Templates ===== | ||
- | The plugin uses two templates ('' | + | The plugin uses three page templates ('' |
- | :!: Don't edit the localized source files as they will be overwritten by plugin updates | + | :!: Don't edit the localized source files as they will be overwritten by plugin updates, only those within the path set in '' |
- | Templates | + | Page templates |
* @TARGETPRIVATEPAGE@ : ID of user's private namespace start page | * @TARGETPRIVATEPAGE@ : ID of user's private namespace start page | ||
* @TARGETPRIVATENS@ : ID of user's private namespace | * @TARGETPRIVATENS@ : ID of user's private namespace | ||
* @TARGETPUBLICPAGE@ : ID of user's public page | * @TARGETPUBLICPAGE@ : ID of user's public page | ||
* @TARGETPUBLICNS@ : ID of the namespace containing all users' public pages | * @TARGETPUBLICNS@ : ID of the namespace containing all users' public pages | ||
- | Once the templates are set, here's what will happen when a user logs in:\\ | + | Once the page templates are set, here's what will happen when a user logs in:\\ |
{{http:// | {{http:// | ||
- | ==== Get more out of templates ==== | + | ==== Get more out of page templates ==== |
* The [[plugin: | * The [[plugin: | ||
- | * [[plugin: | + | * [[plugin: |
* ''< | * ''< | ||
* ''< | * ''< | ||
- | ==== Private Namespace Skeleton ==== | + | ==== Private |
- | If tou create a folder named '// | + | If you create a folder named '// |
- | * You can add as many templates as you want in skeleton (even in sub folders if you wish) | + | * You can add as many page templates as you want in skeleton (even in sub folders if you wish) |
- | * Skeleton templates can use same placeholders as regular ' | + | * Skeleton |
- | * Skeleton templates files should be named as regular wiki pages (spaces must be replaced with underscores, | + | * Skeleton |
:!: This feature was added in 2015-10-04 version. | :!: This feature was added in 2015-10-04 version. | ||
+ | :!: Skeleton feature was added for Public Namespace in 2018-02-27 version. | ||
===== About ACL ===== | ===== About ACL ===== | ||
Line 135: | Line 142: | ||
* **getComplexLoggedInAs()** returns an <li> element like the " | * **getComplexLoggedInAs()** returns an <li> element like the " | ||
* **getAnyPublicLink(" | * **getAnyPublicLink(" | ||
- | * **getElements()** returns an array containing id and localized string | + | * **getElements()** returns an array containing id, strings |
==== User links ==== | ==== User links ==== | ||
Line 149: | Line 156: | ||
</ | </ | ||
...with... | ...with... | ||
- | <code php>if (!plugin_isdisabled(' | + | <code php> |
- | $userhomepageHelper = plugin_load(' | + | if ((!plugin_isdisabled(' |
- | } | + | $userhomepageHelper = plugin_load(' |
- | // If User HomePage helper is loaded, replace standard ' | + | } |
- | if ($userhomepageHelper) { | + | // If User HomePage helper is loaded, replace standard ' |
- | echo $userhomepageHelper-> | + | if ($userhomepageHelper) { |
- | } else { | + | echo $userhomepageHelper-> |
- | echo '< | + | } else { |
- | tpl_userinfo(); | + | echo '< |
- | echo '</ | + | tpl_userinfo(); |
- | } | + | echo '</ |
+ | } | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | ==== Editor/ | ||
+ | |||
+ | Dokuwiki' | ||
+ | |||
+ | The file to change depends on template but with //Dokuwiki template//, it would be the file '' | ||
+ | <code php> | ||
+ | </ | ||
+ | ...with... | ||
+ | <code php> | ||
+ | <?php | ||
+ | // If Userhomepage helper is loaded | ||
+ | if ($userhomepageHelper != null) { | ||
+ | $userhomepageHelper-> | ||
+ | // Else if Userhomepage helper is not loaded yet but enabled | ||
+ | } elseif (!plugin_isdisabled(' | ||
+ | $userhomepageHelper = plugin_load(' | ||
+ | $userhomepageHelper-> | ||
+ | // Otherwise use plain text | ||
+ | } else { | ||
+ | tpl_pageinfo(); | ||
+ | } | ||
+ | ?> | ||
+ | </ | ||
</ | </ | ||
Line 166: | Line 200: | ||
==== Compatibility ==== | ==== Compatibility ==== | ||
- | That event is triggered by templates when they are ready to print out the //Logged in as// string and link. User Homepage will then be abble to automatically replace the standard link with it's own. Here's a list of tested templates and the compatibility with that feature (feel free to add any other) : | + | That event is triggered by templates when they are ready to print out the //Logged in as// string and link. User Homepage will then be able to automatically replace the standard link with it's own. Here's a list of tested templates and the compatibility with that feature (feel free to add any other) : |
^ Template name ^ Compatibility | Notes | | ^ Template name ^ Compatibility | Notes | | ||
^ arctic | ^ arctic | ||
Line 211: | Line 245: | ||
{{rss> | {{rss> | ||
+ | |||
+ | See [[https:// | ||
===== Known Bugs and Issues ===== | ===== Known Bugs and Issues ===== |
plugin/userhomepage.1484571829.txt.gz · Last modified: 2017-01-16 14:03 by Geekitude