DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:loadskin:discussion

Discussion for LoadSkin Plugin

Discussion page for the LoadSkin plugin

Please start new requests with a new heading.

Templateswitcher on Profile only

Thanks for this nice plugin!

One thing I miss is the option to only display the Templateswitcher on the Profilepage (instead of having it in the header of every page).

Rules not added

When adding new rules for namespaces in the admin-interface nothing gets added. When clicking save, after entering a new rule, the page simply reloads. However when entering an empty rule string (just nothing and then save), this gets added. Firing ?tpl=*&act=select on any of my dokuwiki-urls with any given installed template works properly.

Any ideas for a solution? First I thought permission problem, but when being able to add 'something' i'm now doubting this.

Thanks

Lasse

Lasse Christensen 2016/05/03 05:38

Multitemplate template

Does this plugin do the same thing as the multitemplate template? — Terence J. Grant 2008/08/09 05:38

Yes, but it doesn't require to modify the templates (instead it requires a change in the DokuWiki source which isn't optimal either, however with the inc/preload.php in the current devel version this shouldn't be no problem). Hope you don't mind the competition. — Michael Klier 2008/08/09 10:14
I'd rather phase out multitemplate in favor of this actually… — Terence J. Grant 2008/08/10 00:34

Templates per user

This worked just as advertised. Very nice. =) Now, how hard would it be to make a plug-in that allows individual users to choose a template that suits their visual limitations (low lux, large fonts, etc.)? — Joyful 2008/09/18 06:32

I just implemented a template switcher that can be used by every user to switch to any installed template. — achAnika Henke
ach

2010/11/29 01:46
The latest version even stores the template per user if you're logged in. — achAnika Henke
ach

2011/02/07 02:34

Appreciation

Super Plugin!!! Vielen Dank! tokuehn@web.de 05.06.2009

Manager sets template for whole wiki

:!: This doesn't work as advertised with my Anteater DW. I want different templates for different namespaces. I see, how the template manager can handle it, but each time I set a new 'property' (namespace → template), the tpl gets applied to the whole wiki :-( Any ideas? Lnz 2011/01/19 00:04

This is a bug which only affects the admin who has used the template manager. Everyone else (including the admin who opens the wiki in a different browser) is not affected by that bug and it will work as expected for them. The only way to make it go away for the admin currently is to clear the DokuWiki cookie. I will fix it and release a new version (with some more changes) this coming weekend. — achAnika Henke
ach

2011/01/19 02:32
You're right! It only affects the admin… It works as advertised now. Thank you for your quick response -Lnz 2011/01/20
A bit later than planned, but I updated the plugin now, which will fix that problem. The old bug will still be in affect because the old values are stored in the cookie. So, you'd either have to delete your DokuWiki cookie or use the follow “trick”: Add ?tpl=*&act=select to the end of the URL of your wiki, and that should take care of things and revert to your usual settings. — achAnika Henke
ach

2011/02/07 02:34

Template script.js does not work without DOKU_TPLINC

:!: I noticed small trouble with javascript loading. All lib/tpl/<currenttemplate>/script.js should be loaded at the start. But because I commented out part of init.php definig DOKU_TPLINC as suggested, script.js in template directory does not get loaded. It's because DOKU_TPLINC constant is needed when list of scripts to include is generated. It is in lib/exe/js.php in function js_out().

The plugin is great anyway, but it took me some time to localize reason, why my new template does not uses the script.js, so be warned. — Jan Kreps 2011/03/16 12:38

Thanks for reporting this issue. I added it the bug tracker to better be able to keep track of it. I don't know when I will fix it, as I don't have much time at the moment. — Anika HenkeAnika Henke
ach

2011/05/29 13:31
I have looked a bit deeper into this problem and found that it's not easy to fix. See more information in the aforementioned bug report. — Anika HenkeAnika Henke
ach

2012/09/10 13:44
This was fixed in the core and is part of the latest DokuWiki release (2015-08-10 “Detritus”). — Anika HenkeAnika Henke
ach

2016-04-07 01:06

Template per HTTP_USER_AGENT

It could be a great step for Multi-Device-DokuWiki Usinge, to admin a relation list between THEME ↔ HTTP_USER_AGENT.

I don't think it's a good idea to do exactly that (because there are too many HTTP_USER_AGENTs, to at least allow a RegEx there would be better). However, I have just implemented a mobile switcher (which automatically switches to a mobile template if $info['ismobile'] is set, which also uses HTTP_USER_AGENT for mobile device detection). — Anika HenkeAnika Henke
ach

2012/09/10 13:44

Enhancements to Admin interface

Table headers would be nice.

[[namespace]] | [[template Page]]

In looking to use your plugin for more administration functions I tried to work out putting in the code for

line 100 " echo '    <td>' .$key.'</td>' . DOKU_LF;

Was unable to setup code for hyperlink to bracket the $key then allow the page to send you to the example.

example if on dokuwiki would be:
 http://www.dokuwiki.org/examples:themes:default:default
                         -------- $key ---------

Another adjustment would be to enhance the template column is a similar mannaer. In looking to use your plugin for more administration functions I tried to work out putting in the code for

line 101 echo '    <td>' . $value . '</td>' . DOKU_LF;

Was unable to setup code for hyperlink to bracket the $key then allow the page to send you to the example.

example if on dokuwiki would be:
 http://www.dokuwiki.org/themes:default
                                 $value

I only been playing with this environment for two months so I am unable to give you a better example.

I fixed the table headers (they used to be there, but were buggy). Adding hyperlinks to the table doesn't make much sense IMO. A “namespace/page pattern” doesn't need to be a proper namespace, so would be confusing in the case it isn't. Linking the template names makes less sense to me. — Anika HenkeAnika Henke
ach

2013/03/31 19:30

Multilingual site

First, thanks for a great plugin! =)
I have a multilingual site that uses the translation plugin. My site uses the folder structure where the top level is the default language and translations are in sub-folders for each language. All my translations for a given page use the same template. I thought it would be nice not to enter repeats in loadskin due only to the language change. Also to not clutter the admin loadskin table with those repeats. Here is a change I made in action.php of the loadskin plugin to do that.

function _getTplPerNamespace() {
  global $ID;
  $config = DOKU_CONF.'loadskin.conf';

  if(@file_exists($config)) {
    $data = unserialize(io_readFile($config, false));
    $id   = $ID;

    // remove language path from $id before you check for a match (it would only be at the start)
    if (file_exists(DOKU_PLUGIN."translation/helper.php") && !plugin_isdisabled("translation")) {
      $transplugin = &plugin_load("helper", "translation");
      $langPath = $transplugin->getLangPart($ID).':';
      $pos = strpos($id, $langPath);
      if (($pos !== false) and ($pos == 0))
        $id = str_ireplace($langPath, '', $id);
    }
            
    if($data[$id]) return $data[$id];
        ...

Only the commented block was added and nothing else changed. It strips out the language part of the path in the $id before it uses the $id to look-up the template. It may be better to put the change in as a conf selection but I wanted to keep the change in one place for now. A conf selection would allow for people that use the translation plugin but do not want this feature to not be affected by this change. Thanks again for a great plugin. — tom_ctom_c

2013/06/26 02:17

Thanks. I have implemented that in the latest version (out since today). — Anika HenkeAnika Henke
ach

2015-05-03 17:09

Search Page shows default Template

I'm using Loadskin as well as Namespace Search plugins, so the search function limits search results to the current namespace. However, the search page itself is on the root so the template switches to the root template when search results are shown. Has anyone solved this challenge, so that a namespace's template is shown on the search results page? — Randy WhitakerRandy Whitaker
Fumigator

2015-03-10 18:37

The search page has always behaved as if it was a page with the name of the search term within the root namespace. I don't think this plugin can change that unless that behaviour is changed in the core. I found that the NSsearch plugin claims it would work with the LoadSkin plugin. But I cannot imagine how that could work (and don't believe it ever has worked) unless the NSsearch plugin somehow changes the URL of a search. — Anika HenkeAnika Henke
ach

2015-05-03 17:04
plugin/loadskin/discussion.txt · Last modified: 2016-07-15 13:55 by l.schumann