You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jspwiki.apache.org by "Ulf Dittmer (Jira)" <ji...@apache.org> on 2020/06/22 09:25:00 UTC

[jira] [Reopened] (JSPWIKI-1114) Show only part of Weblog entry on the overview page

     [ https://issues.apache.org/jira/browse/JSPWIKI-1114?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ulf Dittmer reopened JSPWIKI-1114:
----------------------------------

Apologies for reopening this issue, but my previous fix turns out to have been too simplistic. The problem is figuring out where to break off the content, and specifically, breaking it off at a period. That can break the HTML all too easily, e.g. in the middle of a link, so we should break only at newline characters. The fix for [https://gitbox.apache.org/repos/asf?p=jspwiki.git;a=blob;f=jspwiki-main/src/main/java/org/apache/wiki/plugin/WeblogPlugin.java;h=ae5e712ef6aa6d193bd8d662dd978291e5129c95;hb=17e5e21] would be to remove the "else if" block from lines 377 to 383. The words "or a period" on line 364 should also go.

> Show only part of Weblog entry on the overview page
> ---------------------------------------------------
>
>                 Key: JSPWIKI-1114
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-1114
>             Project: JSPWiki
>          Issue Type: Improvement
>    Affects Versions: 2.11.0-M4
>            Reporter: Ulf Dittmer
>            Priority: Minor
>             Fix For: 2.11.0-M5
>
>         Attachments: WeblogPlugin.java
>
>
> Attached is an enhanced version of the WeblogPlugin.java. It adds a "preview" parameter that takes an integer value after how many characters the entry should be cut off on the overview page. It then adds a "More" link to the full entry. If the parameter is missing, no truncation is done, as it is now.
> Also needed is this in PluginResources.properties:
>  
> {code:java}
> weblogentryplugin.more = (more){code}
> and this in PluginResources_de.properties
>  
>  
> {code:java}
> weblogentryplugin.postedby = Von {0}&nbsp;&nbsp;
> weblogentryplugin.addcomment = <span class="icon-plus"></span> Kommentieren ({0})
> weblogentryplugin.more = (mehr)
> {code}
> This addresses one of the questions asked on https://jspwiki-wiki.apache.org/Wiki.jsp?page=WeblogPlugin



--
This message was sent by Atlassian Jira
(v8.3.4#803005)