You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jspwiki.apache.org by "Christophe Dupriez (JIRA)" <ji...@apache.org> on 2007/12/12 08:39:43 UTC

[jira] Created: (JSPWIKI-100) Displaying a simple count instead of a whole list

Displaying a simple count instead of a whole list
-------------------------------------------------

                 Key: JSPWIKI-100
                 URL: https://issues.apache.org/jira/browse/JSPWIKI-100
             Project: JSPWiki
          Issue Type: New Feature
          Components: Plugins
            Reporter: Christophe Dupriez


ReferringPages, RecentChanges and other plugins are displaying (sometime long) lists of pages. On the other side, one may want users to consult those lists regularly. The best way may be to put links in the main page of a Wiki which brings the users to those lists and to put a COUNT nearby the link so the user see that there are new entries.

Example:
Let suppose you use [Category Discussion] in some pages of your site.
You make a CategoryDiscussion page containing:

!!!Pages under peer scrutiny:
[{INSERT ReferringPagesPlugin exclude='Main,leftmenu,LeftMenu,Category*'}]

You want to show "Category Discussion: nnn pages" on your main page (nnn being the number of pages containing [Category Discussion]. 

 By the way, apart from the simple count, the latest modification date of the pages in the list would also be a very nice information. It would then be possible to display:
[Category Discussion] nnn pages, last modified 2007/12/13 14:56

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (JSPWIKI-100) Displaying a simple count instead of a whole list

Posted by "Christophe Dupriez (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JSPWIKI-100?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12552101 ] 

Christophe Dupriez commented on JSPWIKI-100:
--------------------------------------------

I agree that attributes should be consistent with other plugins: you are the one with the most global view!
BUT, please do not forget that latest modification date/time should also be available.
They could also be a title to the list.

So, what do we do?

Suggestion: to allow max=0 to suppress the list but to keep printing of "before" and "after" IF there is something in the list.
To allow %d and %c in before= and after= string, %d being the latest modification date and %c being the count of the pages in the list.
(or you may have another convention somewhere for a parameter within a string)

Thanks!

> Displaying a simple count instead of a whole list
> -------------------------------------------------
>
>                 Key: JSPWIKI-100
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-100
>             Project: JSPWiki
>          Issue Type: New Feature
>          Components: Plugins
>            Reporter: Christophe Dupriez
>
> ReferringPages, RecentChanges and other plugins are displaying (sometime long) lists of pages. On the other side, one may want users to consult those lists regularly. The best way may be to put links in the main page of a Wiki which brings the users to those lists and to put a COUNT nearby the link so the user see that there are new entries.
> Example:
> Let suppose you use [Category Discussion] in some pages of your site.
> You make a CategoryDiscussion page containing:
> !!!Pages under peer scrutiny:
> [{INSERT ReferringPagesPlugin exclude='Main,leftmenu,LeftMenu,Category*'}]
> You want to show "Category Discussion: nnn pages" on your main page (nnn being the number of pages containing [Category Discussion]. 
>  By the way, apart from the simple count, the latest modification date of the pages in the list would also be a very nice information. It would then be possible to display:
> [Category Discussion] nnn pages, last modified 2007/12/13 14:56

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (JSPWIKI-100) Displaying a simple count instead of a whole list

Posted by "Janne Jalkanen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JSPWIKI-100?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12552176 ] 

Janne Jalkanen commented on JSPWIKI-100:
----------------------------------------

Um, no, I have nothing against the showLastModified parameter as such, as it's a clear toggle on-off -switch.  I was just referring to the countOnly, which I think should be not a toggle, but a sort of a mode parameter.

> Displaying a simple count instead of a whole list
> -------------------------------------------------
>
>                 Key: JSPWIKI-100
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-100
>             Project: JSPWiki
>          Issue Type: New Feature
>          Components: Plugins
>            Reporter: Christophe Dupriez
>
> ReferringPages, RecentChanges and other plugins are displaying (sometime long) lists of pages. On the other side, one may want users to consult those lists regularly. The best way may be to put links in the main page of a Wiki which brings the users to those lists and to put a COUNT nearby the link so the user see that there are new entries.
> Example:
> Let suppose you use [Category Discussion] in some pages of your site.
> You make a CategoryDiscussion page containing:
> !!!Pages under peer scrutiny:
> [{INSERT ReferringPagesPlugin exclude='Main,leftmenu,LeftMenu,Category*'}]
> You want to show "Category Discussion: nnn pages" on your main page (nnn being the number of pages containing [Category Discussion]. 
>  By the way, apart from the simple count, the latest modification date of the pages in the list would also be a very nice information. It would then be possible to display:
> [Category Discussion] nnn pages, last modified 2007/12/13 14:56

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (JSPWIKI-100) Displaying a simple count instead of a whole list

Posted by "Janne Jalkanen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JSPWIKI-100?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12588429#action_12588429 ] 

Janne Jalkanen commented on JSPWIKI-100:
----------------------------------------

Minor complaint: these don't following the coding standard set in http://www.jspwiki.org/wiki/JSPWikiCodingStandard, especially with respect to spacing around keywords, and sometimes with respect to the starting braces.

Now I know that we're letting it slip every now and then, but still...

Otherwise the patches seem good, and should be integrated, well, whenever it is not the middle of the night.

> Displaying a simple count instead of a whole list
> -------------------------------------------------
>
>                 Key: JSPWIKI-100
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-100
>             Project: JSPWiki
>          Issue Type: New Feature
>          Components: Plugins
>            Reporter: Christophe Dupriez
>            Assignee: Harry Metske
>             Fix For: 2.8
>
>         Attachments: christophe_dupriez.vcf, JSPWiki-100-junittests.patch, JSPWiki-100.patch
>
>
> ReferringPages, RecentChanges and other plugins are displaying (sometime long) lists of pages. On the other side, one may want users to consult those lists regularly. The best way may be to put links in the main page of a Wiki which brings the users to those lists and to put a COUNT nearby the link so the user see that there are new entries.
> Example:
> Let suppose you use [Category Discussion] in some pages of your site.
> You make a CategoryDiscussion page containing:
> !!!Pages under peer scrutiny:
> [{INSERT ReferringPagesPlugin exclude='Main,leftmenu,LeftMenu,Category*'}]
> You want to show "Category Discussion: nnn pages" on your main page (nnn being the number of pages containing [Category Discussion]. 
>  By the way, apart from the simple count, the latest modification date of the pages in the list would also be a very nice information. It would then be possible to display:
> [Category Discussion] nnn pages, last modified 2007/12/13 14:56

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (JSPWIKI-100) Displaying a simple count instead of a whole list

Posted by "Harry Metske (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JSPWIKI-100?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12551913 ] 

Harry Metske commented on JSPWIKI-100:
--------------------------------------

I'd like to propose the following:

Two new parameters are introduced:
* countOnly (true/false)
* showLastModified (true/false)

The countOnly parameter will give you just the number of pages, not the list of pages.
It is only valid for the ReferringPagesPlugin, the UndefinedPagesPlugin and the UnusedPagesPlugin.

The showLastModified parameter gives you the last modified date/time of the most recently changed page.
\\It is only valid if countOnly=true, otherwise a PluginException is thrown.
\\It is only valid for the ReferringPagesPlugin and the UnusedPagesPlugin.

I made some changes to AbstractReferralPlugin, and it's subclasses
I have a test/demo available at : http://www.computerhok.nl:10289/JSPWiki/Wiki.jsp?page=ReferralPluginTest

Please let me know what you all think about it before I attach the patches.


> Displaying a simple count instead of a whole list
> -------------------------------------------------
>
>                 Key: JSPWIKI-100
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-100
>             Project: JSPWiki
>          Issue Type: New Feature
>          Components: Plugins
>            Reporter: Christophe Dupriez
>
> ReferringPages, RecentChanges and other plugins are displaying (sometime long) lists of pages. On the other side, one may want users to consult those lists regularly. The best way may be to put links in the main page of a Wiki which brings the users to those lists and to put a COUNT nearby the link so the user see that there are new entries.
> Example:
> Let suppose you use [Category Discussion] in some pages of your site.
> You make a CategoryDiscussion page containing:
> !!!Pages under peer scrutiny:
> [{INSERT ReferringPagesPlugin exclude='Main,leftmenu,LeftMenu,Category*'}]
> You want to show "Category Discussion: nnn pages" on your main page (nnn being the number of pages containing [Category Discussion]. 
>  By the way, apart from the simple count, the latest modification date of the pages in the list would also be a very nice information. It would then be possible to display:
> [Category Discussion] nnn pages, last modified 2007/12/13 14:56

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (JSPWIKI-100) Displaying a simple count instead of a whole list

Posted by "Harry Metske (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JSPWIKI-100?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12552271 ] 

Harry Metske commented on JSPWIKI-100:
--------------------------------------

O, I forgot to mention, that attached patches also contain a bugfix for 
http://www.jspwiki.org/wiki/BugExcludeFailsOnUnusedPagesPlugin.

This wasn't really fixed in 2.4.102

> Displaying a simple count instead of a whole list
> -------------------------------------------------
>
>                 Key: JSPWIKI-100
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-100
>             Project: JSPWiki
>          Issue Type: New Feature
>          Components: Plugins
>            Reporter: Christophe Dupriez
>         Attachments: JSPWiki-100-junittests.patch, JSPWiki-100.patch
>
>
> ReferringPages, RecentChanges and other plugins are displaying (sometime long) lists of pages. On the other side, one may want users to consult those lists regularly. The best way may be to put links in the main page of a Wiki which brings the users to those lists and to put a COUNT nearby the link so the user see that there are new entries.
> Example:
> Let suppose you use [Category Discussion] in some pages of your site.
> You make a CategoryDiscussion page containing:
> !!!Pages under peer scrutiny:
> [{INSERT ReferringPagesPlugin exclude='Main,leftmenu,LeftMenu,Category*'}]
> You want to show "Category Discussion: nnn pages" on your main page (nnn being the number of pages containing [Category Discussion]. 
>  By the way, apart from the simple count, the latest modification date of the pages in the list would also be a very nice information. It would then be possible to display:
> [Category Discussion] nnn pages, last modified 2007/12/13 14:56

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (JSPWIKI-100) Displaying a simple count instead of a whole list

Posted by "Harry Metske (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JSPWIKI-100?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12554274 ] 

Harry Metske commented on JSPWIKI-100:
--------------------------------------

Can this issue be assigned to me ?

> Displaying a simple count instead of a whole list
> -------------------------------------------------
>
>                 Key: JSPWIKI-100
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-100
>             Project: JSPWiki
>          Issue Type: New Feature
>          Components: Plugins
>            Reporter: Christophe Dupriez
>         Attachments: christophe_dupriez.vcf, JSPWiki-100-junittests.patch, JSPWiki-100.patch
>
>
> ReferringPages, RecentChanges and other plugins are displaying (sometime long) lists of pages. On the other side, one may want users to consult those lists regularly. The best way may be to put links in the main page of a Wiki which brings the users to those lists and to put a COUNT nearby the link so the user see that there are new entries.
> Example:
> Let suppose you use [Category Discussion] in some pages of your site.
> You make a CategoryDiscussion page containing:
> !!!Pages under peer scrutiny:
> [{INSERT ReferringPagesPlugin exclude='Main,leftmenu,LeftMenu,Category*'}]
> You want to show "Category Discussion: nnn pages" on your main page (nnn being the number of pages containing [Category Discussion]. 
>  By the way, apart from the simple count, the latest modification date of the pages in the list would also be a very nice information. It would then be possible to display:
> [Category Discussion] nnn pages, last modified 2007/12/13 14:56

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (JSPWIKI-100) Displaying a simple count instead of a whole list

Posted by "Janne Jalkanen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JSPWIKI-100?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12552054 ] 

Janne Jalkanen commented on JSPWIKI-100:
----------------------------------------

Looks good, I think this should be taken in 2.8.

However, I don't like the naming of "countOnly".  To be consistent with other plugins we have, I think it should be something like

show=count, if you want to show the count.
show=pages, if you want to show the page names (and this is the default).

That way it can be extended to other types later.

> Displaying a simple count instead of a whole list
> -------------------------------------------------
>
>                 Key: JSPWIKI-100
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-100
>             Project: JSPWiki
>          Issue Type: New Feature
>          Components: Plugins
>            Reporter: Christophe Dupriez
>
> ReferringPages, RecentChanges and other plugins are displaying (sometime long) lists of pages. On the other side, one may want users to consult those lists regularly. The best way may be to put links in the main page of a Wiki which brings the users to those lists and to put a COUNT nearby the link so the user see that there are new entries.
> Example:
> Let suppose you use [Category Discussion] in some pages of your site.
> You make a CategoryDiscussion page containing:
> !!!Pages under peer scrutiny:
> [{INSERT ReferringPagesPlugin exclude='Main,leftmenu,LeftMenu,Category*'}]
> You want to show "Category Discussion: nnn pages" on your main page (nnn being the number of pages containing [Category Discussion]. 
>  By the way, apart from the simple count, the latest modification date of the pages in the list would also be a very nice information. It would then be possible to display:
> [Category Discussion] nnn pages, last modified 2007/12/13 14:56

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (JSPWIKI-100) Displaying a simple count instead of a whole list

Posted by "Janne Jalkanen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JSPWIKI-100?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Janne Jalkanen resolved JSPWIKI-100.
------------------------------------

    Resolution: Fixed

Fixed in 2.7.0-svn-15.

Please also update the documentation!

> Displaying a simple count instead of a whole list
> -------------------------------------------------
>
>                 Key: JSPWIKI-100
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-100
>             Project: JSPWiki
>          Issue Type: New Feature
>          Components: Plugins
>            Reporter: Christophe Dupriez
>            Assignee: Harry Metske
>             Fix For: 2.8
>
>         Attachments: christophe_dupriez.vcf, JSPWiki-100-junittests.patch, JSPWiki-100.patch
>
>
> ReferringPages, RecentChanges and other plugins are displaying (sometime long) lists of pages. On the other side, one may want users to consult those lists regularly. The best way may be to put links in the main page of a Wiki which brings the users to those lists and to put a COUNT nearby the link so the user see that there are new entries.
> Example:
> Let suppose you use [Category Discussion] in some pages of your site.
> You make a CategoryDiscussion page containing:
> !!!Pages under peer scrutiny:
> [{INSERT ReferringPagesPlugin exclude='Main,leftmenu,LeftMenu,Category*'}]
> You want to show "Category Discussion: nnn pages" on your main page (nnn being the number of pages containing [Category Discussion]. 
>  By the way, apart from the simple count, the latest modification date of the pages in the list would also be a very nice information. It would then be possible to display:
> [Category Discussion] nnn pages, last modified 2007/12/13 14:56

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Re: [jira] Commented: (JSPWIKI-100) Displaying a simple count instead of a whole list

Posted by Murray Altheim <mu...@altheim.com>.
Harry Metske (JIRA) wrote:
>     [ https://issues.apache.org/jira/browse/JSPWIKI-100?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12552103 ] 
> 
> Harry Metske commented on JSPWIKI-100:
> --------------------------------------
> 
> I would say one new parameter called "show".
> This has a default value of  "pages", to remain compatible with the current behavior.
> It can have a value of "count", showing you the number of pages.
> It can have a value of "lastModified", showing you the count, followed by the date/time of the most recent changed page.
> 
> Is that what you would like ?

I have a utility method that I use in a number of the CeryleWikiPlugins
that receives a Collection and a format type parameter and generates one
of a variety of outputs, comma- or space-separated lists, HTML OL or UL
lists, counts, etc. I'd be happy to donate that to the plugin utilities
in JSPWiki if that would help.

See formatOutput() in:

   http://www.altheim.com/ceryle/api/org/ceryle/wiki/plugin/util/PluginTextUtils.html

Murray

...........................................................................
Murray Altheim <murray07 at altheim.com>                           ===  = =
http://www.altheim.com/murray/                                     = =  ===
SGML Grease Monkey, Banjo Player, Wantanabe Zen Monk               = =  = =

       Boundless wind and moon - the eye within eyes,
       Inexhaustible heaven and earth - the light beyond light,
       The willow dark, the flower bright - ten thousand houses,
       Knock at any door - there's one who will respond.
                                       -- The Blue Cliff Record

[jira] Commented: (JSPWIKI-100) Displaying a simple count instead of a whole list

Posted by "Harry Metske (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JSPWIKI-100?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12552103 ] 

Harry Metske commented on JSPWIKI-100:
--------------------------------------

I would say one new parameter called "show".
This has a default value of  "pages", to remain compatible with the current behavior.
It can have a value of "count", showing you the number of pages.
It can have a value of "lastModified", showing you the count, followed by the date/time of the most recent changed page.

Is that what you would like ?


> Displaying a simple count instead of a whole list
> -------------------------------------------------
>
>                 Key: JSPWIKI-100
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-100
>             Project: JSPWiki
>          Issue Type: New Feature
>          Components: Plugins
>            Reporter: Christophe Dupriez
>
> ReferringPages, RecentChanges and other plugins are displaying (sometime long) lists of pages. On the other side, one may want users to consult those lists regularly. The best way may be to put links in the main page of a Wiki which brings the users to those lists and to put a COUNT nearby the link so the user see that there are new entries.
> Example:
> Let suppose you use [Category Discussion] in some pages of your site.
> You make a CategoryDiscussion page containing:
> !!!Pages under peer scrutiny:
> [{INSERT ReferringPagesPlugin exclude='Main,leftmenu,LeftMenu,Category*'}]
> You want to show "Category Discussion: nnn pages" on your main page (nnn being the number of pages containing [Category Discussion]. 
>  By the way, apart from the simple count, the latest modification date of the pages in the list would also be a very nice information. It would then be possible to display:
> [Category Discussion] nnn pages, last modified 2007/12/13 14:56

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (JSPWIKI-100) Displaying a simple count instead of a whole list

Posted by "Christophe Dupriez (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JSPWIKI-100?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12551955 ] 

Christophe Dupriez commented on JSPWIKI-100:
--------------------------------------------

For my users, this would be just nice! Thanks!

> Displaying a simple count instead of a whole list
> -------------------------------------------------
>
>                 Key: JSPWIKI-100
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-100
>             Project: JSPWiki
>          Issue Type: New Feature
>          Components: Plugins
>            Reporter: Christophe Dupriez
>
> ReferringPages, RecentChanges and other plugins are displaying (sometime long) lists of pages. On the other side, one may want users to consult those lists regularly. The best way may be to put links in the main page of a Wiki which brings the users to those lists and to put a COUNT nearby the link so the user see that there are new entries.
> Example:
> Let suppose you use [Category Discussion] in some pages of your site.
> You make a CategoryDiscussion page containing:
> !!!Pages under peer scrutiny:
> [{INSERT ReferringPagesPlugin exclude='Main,leftmenu,LeftMenu,Category*'}]
> You want to show "Category Discussion: nnn pages" on your main page (nnn being the number of pages containing [Category Discussion]. 
>  By the way, apart from the simple count, the latest modification date of the pages in the list would also be a very nice information. It would then be possible to display:
> [Category Discussion] nnn pages, last modified 2007/12/13 14:56

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.