[Tiki-devel] query about auto toc option

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[Tiki-devel] query about auto toc option

Geoff - Enmore Services

Hi – for a recent 16.2 deployment I noticed a ‘new’ option in the edit wiki parameters tab that I wasn’t familiar with – which was labelled “Automatic table of contents” and had options ‘Default’ and ‘Off’ which didn’t seem to do anything.

 

Looking in to this I found a new pref – but I didn’t have it switched on – which probably explains why it didn’t do anything, but in that case I wondered why I was seeing it as an option at all?

 

Digging into the tiki-editpage.tpl file there is section from lines 611 to 622 which checks whether to display this but the ‘if check’ at line 611 does not make sense to me i.e it is

 

{if $prefs.wiki_auto_toc eq 'y' and $prefs.wiki_page_hide_title eq 'y'}

 

So for my set up I don’t have wiki_auto_toc ‘on’ but I do happen to have wiki_page_hide_title ‘on’ – so it displays, but I really shouldn’t be seeing this option.

 

Can anyone explain the logic behind the if check?

 

For now I have simply patched my install with a custom version of the .tpl that uses an ‘and’ instead of an ‘or’ on the two parameters – but this does need to be fixed properly – which I’m happy to do if someone can explain the required logic

 

Thanks

 

Geoff

 

 

 

No virus found in this message.
Checked by AVG - www.avg.com
Version: 2016.0.7998 / Virus Database: 4756/14035 - Release Date: 02/27/17


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
TikiWiki-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
Reply | Threaded
Open this post in threaded view
|

Re: [Tiki-devel] query about auto toc option

Jonny Bradley-4

Basically unfinished work from many tikis ago i think. I updated it to use the bootstrap components in 14.x but didn't manage to clear up the switching logic. You can default it to be on and then disable it per page, but not the other way round, which would be more useful imho. Would be lovely to do, but not near the top of my list i'm afraid...

I have no idea why it's connected with prefs.wiki_page_hide_title though, anyone else?

jb



> On 27 Feb 2017, at 23:25, Geoff - Enmore Services <[hidden email]> wrote:
>
> Hi – for a recent 16.2 deployment I noticed a ‘new’ option in the edit wiki parameters tab that I wasn’t familiar with – which was labelled “Automatic table of contents” and had options ‘Default’ and ‘Off’ which didn’t seem to do anything.
>  
> Looking in to this I found a new pref – but I didn’t have it switched on – which probably explains why it didn’t do anything, but in that case I wondered why I was seeing it as an option at all?
>  
> Digging into the tiki-editpage.tpl file there is section from lines 611 to 622 which checks whether to display this but the ‘if check’ at line 611 does not make sense to me i.e it is
>  
> {if $prefs.wiki_auto_toc eq 'y' and $prefs.wiki_page_hide_title eq 'y'}
>  
> So for my set up I don’t have wiki_auto_toc ‘on’ but I do happen to have wiki_page_hide_title ‘on’ – so it displays, but I really shouldn’t be seeing this option.
>  
> Can anyone explain the logic behind the if check?
>  
> For now I have simply patched my install with a custom version of the .tpl that uses an ‘and’ instead of an ‘or’ on the two parameters – but this does need to be fixed properly – which I’m happy to do if someone can explain the required logic
>  
> Thanks
>  
> Geoff
>  
>  
>  
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 2016.0.7998 / Virus Database: 4756/14035 - Release Date: 02/27/17
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot_______________________________________________
> TikiWiki-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
TikiWiki-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
Reply | Threaded
Open this post in threaded view
|

Re: [Tiki-devel] query about auto toc option

Geoff - Enmore Services
Thanks for your comments Jonny

As no one else has come back with any suggestions why the logic uses prefs.wiki_page_hide_title I'm going to do a trivial commit to trunk and backported as needed to change the current logic from OR to AND

I think this makes it safer rather than just ignoring prefs.wiki_page_hide_title on the assumption that it is needed for some reason - but I'll add a note to the code to say that this is still a bit odd

Cheers

Geoff



-----Original Message-----
From: Jonny Bradley [mailto:[hidden email]]
Sent: 28 February 2017 10:58
To: Tiki developers <[hidden email]>
Subject: Re: [Tiki-devel] query about auto toc option


Basically unfinished work from many tikis ago i think. I updated it to use the bootstrap components in 14.x but didn't manage to clear up the switching logic. You can default it to be on and then disable it per page, but not the other way round, which would be more useful imho. Would be lovely to do, but not near the top of my list i'm afraid...

I have no idea why it's connected with prefs.wiki_page_hide_title though, anyone else?

jb



> On 27 Feb 2017, at 23:25, Geoff - Enmore Services <[hidden email]> wrote:
>
> Hi – for a recent 16.2 deployment I noticed a ‘new’ option in the edit wiki parameters tab that I wasn’t familiar with – which was labelled “Automatic table of contents” and had options ‘Default’ and ‘Off’ which didn’t seem to do anything.
>  
> Looking in to this I found a new pref – but I didn’t have it switched on – which probably explains why it didn’t do anything, but in that case I wondered why I was seeing it as an option at all?
>  
> Digging into the tiki-editpage.tpl file there is section from lines
> 611 to 622 which checks whether to display this but the ‘if check’ at
> line 611 does not make sense to me i.e it is
>  
> {if $prefs.wiki_auto_toc eq 'y' or $prefs.wiki_page_hide_title eq
> 'y'}
>  
> So for my set up I don’t have wiki_auto_toc ‘on’ but I do happen to have wiki_page_hide_title ‘on’ – so it displays, but I really shouldn’t be seeing this option.
>  
> Can anyone explain the logic behind the if check?
>  
> For now I have simply patched my install with a custom version of the
> .tpl that uses an ‘and’ instead of an ‘or’ on the two parameters – but
> this does need to be fixed properly – which I’m happy to do if someone
> can explain the required logic
>  
> Thanks
>  
> Geoff
>  
>  
>  
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 2016.0.7998 / Virus Database: 4756/14035 - Release Date:
> 02/27/17
>
> ----------------------------------------------------------------------
> -------- Check out the vibrant tech community on one of the world's
> most engaging tech sites, SlashDot.org!
> http://sdm.link/slashdot______________________________________________
> _
> TikiWiki-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________
TikiWiki-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel


-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2016.0.7998 / Virus Database: 4756/14035 - Release Date: 02/27/17




-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2016.0.7998 / Virus Database: 4756/14041 - Release Date: 03/01/17




------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
TikiWiki-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel