DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:tplmod

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
plugin:tplmod [2019-03-25 21:24] – [The Date Tagline] turnermmplugin:tplmod [2024-04-03 15:06] (current) LMS23
Line 6: Line 6:
 email      : turnermm02@shaw.ca  email      : turnermm02@shaw.ca 
 type       : action type       : action
-lastupdate : 2019-03-01 +lastupdate : 2021-12-06 
-compatible : Elenor of Tsort, Frusterick Manners,Greebo+compatible : Elenor of Tsort, Frusterick Manners,Greebo,Hogfather,Igor,Kaos,Jack Jackrum
 depends    :  depends    : 
 conflicts  conflicts 
 similar    :  similar    : 
-tags       : template,tools,title,logo,tagline,toggle,sidebar, disable-actions,language+tags       : template,tools,title,logo,tagline,toggle,sidebar, disable-actions,language, cms, hide-menus
  
-downloadurl: https://github.com/turnermm/tplmod/archive/master.zip+downloadurl: https://github.com/turnermm/tplmod/archive/refs/heads/master.zip
 bugtracker : https://github.com/turnermm/tplmod/issues bugtracker : https://github.com/turnermm/tplmod/issues
 sourcerepo : https://github.com/turnermm/tplmod/ sourcerepo : https://github.com/turnermm/tplmod/
Line 24: Line 24:
 Search and install ​the plugin using the [[plugin:extension|Extension ​Manager]]. Search and install ​the plugin using the [[plugin:extension|Extension ​Manager]].
 ====== Usage ====== ====== Usage ======
-This plugin enables you to modify the Dokuwiki template based on IP address, ACL level of the user, and day of the week. The wiki logo (image), tagline, and the wiki name can be rotated by day or changed based on the IP address of the user.  The links and buttons at top ((Site tools)) and side ((Page tools)) of the template can be changed based on the ACL level of the user; similarly the actions that they trigger are also governed by the ACL level of the user.+This plugin enables you to modify the DokuWiki template based on IP address, ACL level of the user, and day of the week. The wiki logo (image), tagline, and the wiki name can be rotated by day or changed based on the IP address of the user.  The links and buttons at top ((Site tools)) and side ((Page tools)) of the template can be changed based on the ACL level of the user; similarly the actions that they trigger are also governed by the ACL level of the user.
  
 ==== Some rationales ==== ==== Some rationales ====
Line 48: Line 48:
 [[http://php.net/manual/en/function.date.php|php date]] string.  For instance: [[http://php.net/manual/en/function.date.php|php date]] string.  For instance:
     \T\o\d\a\y \i\s l F jS Y     \T\o\d\a\y \i\s l F jS Y
-This will output ''Today is Tuesday July 4th 2017'' (or whatever the date is).  Notice that all the text which is not part of the actual date itself is escaped: ''\T\o\d\a\y \i\s'' Not every character has to be escaped, only those which wll be interpreted as formatting characters.  The date tagline takes precedence over the rotating taglines, so you cannot have both a date tagline and rotating tagline. **Please Note: \\ As with the rotating taglines, a Dokuwiki [[config:tagline]] must be set in the Configuration Manager.+This will output ''Today is Tuesday July 4th 2017'' (or whatever the date is).  Notice that all the text which is not part of the actual date itself is escaped: ''\T\o\d\a\y \i\s'' Not every character has to be escaped, only those which wll be interpreted as formatting characters.  The date tagline takes precedence over the rotating taglines, so you cannot have both a date tagline and rotating tagline. \\ **Please Note:** As with the rotating taglines, a Dokuwiki [[config:tagline]] must be set in the Configuration Manager.  Moreover, for the ''rotatewhich'' option, either ''BOTH'' or ''TAG'' must be selected.
  
 ===== ACL controls ===== ===== ACL controls =====
Line 69: Line 69:
 ===== Sidebar Toggle ===== ===== Sidebar Toggle =====
 The sidebar toggle mechanism is enabled by setting the ''toggle_sidebar'' configuration option to ''true''. See [[https://mturner.org/devel/start|mturner.org]] for an example of its use.  The toggle is an action link at the top right of the page. The sidebar toggle mechanism is enabled by setting the ''toggle_sidebar'' configuration option to ''true''. See [[https://mturner.org/devel/start|mturner.org]] for an example of its use.  The toggle is an action link at the top right of the page.
 +
 +An adjunct to sidebar toggling is the facility to suppress the sidebar by page and namespace.  The pages and namespaces are set in the Configuration Manager, using the ''xcl_sidebar'' setting.
 ===== Supported Templates ===== ===== Supported Templates =====
 Tplmod was initially desiged for use with the default DokuWiki template. While tplmod should work with templates based on the DokuWiki [[template:starter|starter template]], there could be differences that stand in the way of some of the functions that tplmod provides.  However, there is current  built-in support for these templates: Tplmod was initially desiged for use with the default DokuWiki template. While tplmod should work with templates based on the DokuWiki [[template:starter|starter template]], there could be differences that stand in the way of some of the functions that tplmod provides.  However, there is current  built-in support for these templates:
Line 90: Line 92:
 The language change occurs immediately upon leaving the **User Profile** dialogs. The user can change language as need arises. The language change occurs immediately upon leaving the **User Profile** dialogs. The user can change language as need arises.
 ===== Configuration and Settings ===== ===== Configuration and Settings =====
-^ Option            ^ Description                                                                                                                                                                                                                                                                               +^ Option            ^ Description                                                                                                                                                                                                                                                                                                                                                         
-| logos             | Comma separated list of image names for home page logo: names only, not paths                                                                                                                                                                                                             +| logos             | Comma separated list of image names for home page logo: names only, not paths                                                                                                                                                                                                                                                                                       
-| ips               | Comma separated list of IPs for rotation by IP. Rotations follow sequence of IPs                                                                                                                                                                                                          +| ips               | Comma separated list of IPs for rotation by IP. Rotations follow sequence of IPs                                                                                                                                                                                                                                                                                    
-| sitetools         | **Site Tools** \\ Remove the selected site tools. In the Dokuwiki template Site Tools are located at the top of the template.                                                                                                                                                             +| sitetools         | **Site Tools** \\ Remove the selected site tools. In the Dokuwiki template Site Tools are located at the top of the template.                                                                                                                                                                                                                                       
-| pagetools         | **Page Tools** \\ Remove the selected page tools. In the Dokuwiki template these are located along the right-hand side of the template.  You can remove non-standard tools, using the input box:  enter them as a comma separated list of unique words from their query strings or urls.  Selecting ''edit'' will also hide and disable the ''view source'' button | +| pagetools         | **Page Tools** \\ Remove the selected page tools. In the Dokuwiki template these are located along the right-hand side of the template.  You can remove non-standard tools, using the input box:  enter them as a comma separated list of unique words from their query strings or urls.  Selecting ''edit'' will also hide and disable the ''view source'' button. Current versions of ''tplmod'' support a ''Revert'' option, which is not explicitly a button, but setting this to true prevents attackers from reloading old versions of pages in place of the current versions. 
-| profile           | Remove User Profile link                                                                                                                                                                                                                                                                  +| profile           | Remove User Profile link                                                                                                                                                                                                                                                                                                                                            
-| search            | Remove Search box                                                                                                                                                                                                                                                                         +| search            | Remove Search box                                                                                                                                                                                                                                                                                                                                                   
-| taglines          | Comma separated list of taglines                                                                                                                                                                                                                                                          +| taglines          | Comma separated list of taglines                                                                                                                                                                                                                                                                                                                                    
-| tag_date_format   | A PHP [[http://php.net/manual/en/function.date.php|date format string]].   If present, this date string will be output as your tagline                                                                                                                                                    +| tag_date_format   | A PHP [[http://php.net/manual/en/function.date.php|date format string]].   If present, this date string will be output as your tagline                                                                                                                                                                                                                              
-| acl_all           | The ACL level required for access to the sitetoools and pagetools. Users with lesser ACL levels will be barred from access to these tools. Defaults to EDIT.                                                                                                                              +| acl_all           | The ACL level required for access to the sitetoools and pagetools. Users with lesser ACL levels will be barred from access to these tools. Defaults to EDIT.                                                                                                                                                                                                        
-| dateorip          | Rotate logos, tag lines, and wiki names  by ip address or days of the week. Select  ''NEITHER'' if you do not want rotation.                                                                                                                                                              +| dateorip          | Rotate logos, tag lines, and wiki names  by ip address or days of the week. Select  ''NEITHER'' if you do not want rotation.                                                                                                                                                                                                                                        
-| rotatewhich       | If rotating the logo and/or tagline, select which to rotate. You have a choice of NONE, LOGO,TAG, BOTH.                                                                                                                                                                                   +| rotatewhich       | If rotating the logo and/or tagline, select which to rotate. You have a choice of NONE, LOGO,TAG, BOTH. For the ''tag_date_format'', either TAG or BOTH must be selected.                                                                                                                                                                                                                                                          
-| ptools_xcl        | If pagetools is set to ''All'', you can retain selected tools by entering  a comma separated list of unique words from their urls in this text box                                                                                                                                        +| ptools_xcl        | If pagetools is set to ''All'', you can retain selected tools by entering  a comma separated list of unique words from their urls in this text box                                                                                                                                                                                                                  
-| rotate_title      | Rotate the wiki name (title)                                                                                                                                                                                                                                                              +| rotate_title      | Rotate the wiki name (title)                                                                                                                                                                                                                                                                                                                                        
-| wiki_names        | Comma separated list of wiki names                                                                                                                                                                                                                                                        +| wiki_names        | Comma separated list of wiki names                                                                                                                                                                                                                                                                                                                                  
-| toggle_sidebar    | Display a toggle link at the top of the page to page to hide and show the sidebar.  Defaults to false.                                                                                                                                                                                    +| toggle_sidebar    | Display a toggle link in the site tools to hide and show the sidebar.  Defaults to false.                                                                                                                                                                                                                                                              
-| blocking          | Prevent attempts to access hidden actions by adding  ''do=<action>'' parameters to the url.   Defaults to ''true''                                                                                                                                                                        +| blocking          | Prevent attempts to access hidden actions by adding  ''do=<action>'' parameters to the url.   Defaults to ''true''                                                                                                                                                                                                                                                  
-| background_color  | The browser background color, i.e. surrounding the wiki page. See [[#background_color_setting]]                                                                                                                                                                                           +| background_color  | The browser background color, i.e. surrounding the wiki page. See [[#background_color_setting]]                                                                                                                                                                                                                                                                     
-|restricted_group|Name of group which is restricted from accessing the User Profile dialog. If no group is assigned and the profile ''option'' is true, all users will have the User Profile link removed.| +| restricted_group  | Name of group which is restricted from accessing the User Profile dialog. If no group is assigned and the profile ''option'' is true, all users will have the User Profile link removed.                                                                                                                                                                            
-|deflang|User Interface Languages.  Select the languages from which users can set their own UI Language in the User Profile dialog|+| deflang           | User Interface Languages.  Select the languages from which users can set their own UI Language in the User Profile dialog                                                                                                                                                                                                                                           | 
 +| xcl_sidebar       | Comma separated list of pages and/or namespaces where sidebar should be suppressed.  Pages should be in ''namespace:pagename'' format. Namespaces as ''namespace:*''                                                                                                                                                                                              |
  
 ===== Development ===== ===== Development =====
plugin/tplmod.1553545493.txt.gz · Last modified: 2019-03-25 21:24 by turnermm

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki