Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flags in archive with "showhistogram" don't work #67

Open
selfthinker opened this issue Feb 3, 2015 · 6 comments
Open

Flags in archive with "showhistogram" don't work #67

selfthinker opened this issue Feb 3, 2015 · 6 comments

Comments

@selfthinker
Copy link
Contributor

I'm not sure if this behaviour is intentional and therefore only a "bug" in the documentation or if it's unintentional and a real bug.

The documentation gives this as the example code for a blog archive:

{{archive>[namespace]?[month]&[flags]}}

But as soon as the showhistogram config option is set, the code doesn't call the pagelist plugin at all and does its own thing. Therefore it also doesn't do anything with the flags.
(The name and description of the option is also misleading because it doesn't just show a histogram, but it changes the whole design and functionality of the archive.)

@selfthinker selfthinker changed the title Flags in archive with "showhistogram" doesn't work Flags in archive with "showhistogram" don't work Feb 3, 2015
@michitux
Copy link
Member

My guess is that it was intentional but I would consider it a bug. The showhistogram mode was implemented by a different author, that's why it doesn't really fit in the plugin. I would suggest to use the pagelist plugin for the monthly archives in the showhistogram mode. If this other list style is really desired we could also add this as an additional option/flag as a replacement for the pagelist plugin. It could also take a date format string as parameter, then it could also make sense for lists that cover more than a month.

An alternative I would also be happy with is to simply drop the histogram feature... But maybe people actually like/use it?

@qwertologe
Copy link

qwertologe commented Jun 20, 2016

I am not sure but for me the plugins works as follows:

If you set the showhistogram option in the preferences, the histogram is used and a nice grouped layout is used (you are not able to deactivate it).

If you do not activate it in the preferences, you are not able to activate it as an option - instead a simpler variant is used (simplelist, table, ... is possible).

I use it with showhistogram because it looks nice.

I will have a look at it (especially the recommended usage of the pagelist plugin) and post again in 1-2 days...

@michitux
Copy link
Member

@qwertologe But is it really the histogram you want, or is it the grouping, or is it the list in the form "date-title"? Because I think these are actually three different features. For example you could have histogram and grouping with the pagelist output.

@qwertologe
Copy link

qwertologe commented Jun 21, 2016

@michitux No, i don't need the histogram but the grouping. I am not sure, how to achieve this with the pagelist plugin.

http://sk-schwanstetten.de/dw/doku.php?id=archiv

The code for this is simply: {{archive>news:2015-2016?*}}

I have enabled the histogram with plugin»blog»showhistogram=true and disabled it again with plugin»blog»max_months=0 :-)

This setup works without the pagelist plugin (as i recognized in this minute).

@michitux
Copy link
Member

It is currently not possible, but I think the plugin should be changed to make it possible.

@qwertologe
Copy link

@michitux

Maybe the "showhistogram" should be changed to somethink like "bloglayout" or "internallayout". This (and updating the plugin-docs at dokuwiki.org) should clarify the things. But: This will break the sites using it...
Maybe better improve the hint at plugin»blog»showhistogram:

# lang/../settings.php
$lang['showhistogram']         = '... (will activate an internal layout -> only the histogram options are considered)'

A solution for:

If you set the showhistogram option in the preferences, the histogram is used and a nice grouped layout is used (you are not able to deactivate it).
If you do not activate it in the preferences, you are not able to activate it as an option - instead a simpler variant is used (simplelist, table, ... is possible).

.. would be a change archive.php:

# old (~ line 119) 
if ($this->getConf('showhistogram')) {

# new
if (in_array('showhistogram',$flags) or ($this->getConf('showhistogram') and !in_array('noshowhistogram',$flags))) {

or "hidehistogram", "nohistogram", "nobloglayout", "nointernallayout" or whatever you want...

The new flag must then be mentioned in the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants