[Building Sakai] Proposed minor enhancement: SAK-23567 NeoPortal site title handling

JOSE MARIANO LUJáN GONZáLEZ jmariano at um.es
Fri May 31 05:17:25 PDT 2013


Hi all,

What you describe seems like a reasonable simplification that will make 
configuration much easier, and also could be totally open.
If we could add a property value with an Interface, something like:

     site.title.cut.method=org.sakaiproject.util.Abbreviator
     site.title.maxlength=25
     #site.title.cut.separator= (Not needed, ... by default in both 
provided implementations)

We could provide as the default implementation StringUtils.abbreviate, 
and an alternative implementation StringUtils.abbreviateMiddle, and 
therefore, anyone could create his own custom implementation by adding 
other abbreviate functionalities like for example: replace Mister with 
Mr. or things like that.

Less configuration but more configurable :-)

Both comments have been added to the ticket: 
https://jira.sakaiproject.org/browse/SAK-23567

cheers!

El 31/05/2013 9:39, Steve Swinsburg escribió:
> Hi
>
> It probably too configurable, I would just use the current site length 
> and code it to use stringutils abbreviateMiddle. Maybe a property to 
> control either the abbreviateMiddle or the normal abbreviate method, 
> but percentages is a bit overkill when it's a fixed property.
>
> Cheers
> Steve
>
> Sent from my iPhone
>
> On 31/05/2013, at 7:32, José Mariano Luján <jmariano at um.es 
> <mailto:jmariano at um.es>> wrote:
>
>> Hi dev list,
>> Today, on the CLE Call, we discussed jira *SAK-23567 [1]* which is a 
>> feature request from Univ. of Murcia. The CLE Team thinks that some 
>> discussion from the list is needed so, please, consider taking a few 
>> minutes to look at it. It would be much appreciated.
>>
>> *Use case*
>> Our CLE installation features many long site titles, as in, "This 
>> is the subject part I", "This is the subject part II".  In each case, 
>> truncating the site titles at position X results in site titles that 
>> are indistinguishable from one another (e.g., "This is the subj..."). 
>> We need greater flexibility than what the current solution provides.
>>
>> *Proposed Solution (patches provided)*
>> We patched
>> portal-impl/impl/src/java/org/sakaiproject/portal/charon/site/PortalSiteHelperImpl.java
>> portal-render-engine-impl/pack/src/webapp/vm/neoskin/includeTabs.vm
>>
>> Note the introduction of 2 new properties
>>
>>       site.title.cut.method = customize the cut method. Default 100:0.
>>       site.title.cut.separator = separator string. Default ...
>>
>> We basically use a couple of new properties to choose the way we want 
>> to cut the title displayed. The value 'cut.method' has the format 
>> X:Y, wich means that X is the percent of maxlength at the beginning 
>> and Y is the percent of maxlength at the end. Now, if you choose 
>> 50:50 and [...], the above example, will get something like "This 
>> is[...]part I" and "This is[...]part II".
>>
>> An example of how it could work. Screenshots attached on the jira.
>>
>>    # Max length for site title display
>>    # Default 25 characters
>>    #site.title.maxlength=25
>>
>>    # Cut method for site title display
>>    # Default 100:0 display the first site.title.maxlength characters 
>> and the separator string at the end
>>    # Other values:
>>    # 0:100 display the last site.title.maxlength characters and the 
>> separator string at the beginning
>>    # 50:50 display first site.title.maxlength*50% characters the 
>> separator string and the last site.title.maxlength*50%
>>    #site.title.cut.method=100:0
>>
>>    # Separator string used to separate characters in cut method
>>    # Default ...
>>    #site.title.cut.separator= ...
>>
>> *Proposed fix version*
>> Trunk (2.10), 2.9.3
>>
>> Feel free to review or comment, your help is much appreciated.
>>
>> Thanks, Mariano
>>
>> [1] - https://jira.sakaiproject.org/browse/SAK-23567
>> _______________________________________________
>> sakai-dev mailing list
>> sakai-dev at collab.sakaiproject.org 
>> <mailto:sakai-dev at collab.sakaiproject.org>
>> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>>
>> TO UNSUBSCRIBE: send email to 
>> sakai-dev-unsubscribe at collab.sakaiproject.org 
>> <mailto:sakai-dev-unsubscribe at collab.sakaiproject.org> with a subject 
>> of "unsubscribe"

-- 
******************************************
José Mariano Luján González - Aula Virtual
Area de Tecnologías de la Información
y las Comunicaciones Aplicadas (ATICA)
UNIVERSIDAD DE MURCIA - http://www.um.es

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20130531/cd25249c/attachment.html 


More information about the sakai-dev mailing list