Forums | Mahara Community
Open Discussion
/
Viewing filenames
04 September 2012, 10:22
Hi,
When displaying a folder of content is there a way to modify how the content is displayed?
Currently there seems to be a restriction on how many characters are in the display name - see attached screenshot. If there was a way of increasing this to see the full name it would at least make it more visually appealing and user-friendly.
05 September 2012, 11:21
Hi Gordon,
I changed two things:
1) To adjust file name length for what you reported edit this file: /artefact/file/lib.php
Change '20' to something of your liking, probably not too high in this line:
from: $child->title = str_shorten_text($child->title, 20);
to: $child->title = str_shorten_text($child->title, 40);
2) To lengthen filenames in the file area of the content section
Change '20' to what you think it should be in this file: artefact/file/theme/raw/form/filelist.tpl
from: {assign var=displaytitle value=$file->title|str_shorten_text:20|safe}
to:{assign var=displaytitle value=$file->title|str_shorten_text:60|safe}
06 September 2012, 4:53
Hello Gordon and Dirk,
I filed a wishlist item at https://bugs.launchpad.net/mahara/+bug/1046750 as this should be in core Mahara. Dirk, if you want to you can give it a try to fix it for core and submit for review (maybe a bit more flexible so that it depends on the block width?) for Mahara 1.7?
Cheers
Kristina
06 September 2012, 5:04
Hi Dirk,
Thanks for this - currently moving Mahara to new server today so fingers crossed can make this change as part of the update to our new site.
Kristina - have added a comment on the tracker item - wondered if it might also relate as a solution forĀ https://bugs.launchpad.net/mahara/+bug/1034382 about filenames being displayed as a link for blocks.
Thanks, Gordon.