Jump to content

InputfieldFile.module filename preview too short


Henner7
 Share

Recommended Posts

Good morning,

there is a function getDisplayBasename in InputfieldFile.module which has a default parameter $maxLength = 25. However I can not see to change this value as from the backend. I suggest, to set the default value to 100 (nowadays screens are larger) or making this parameter available to the backend.

Anybody knows if there is a bugtracker in processwire where I can add feature requests or improvements?

Christian

Link to comment
Share on other sites

Welcome to the forums @Henner7,

The link @abdus gave is actually for bug reports. Feature requests go here: https://github.com/processwire/processwire-requests/issues

There is already a request to remove the default truncation: https://github.com/processwire/processwire-requests/issues/83

Besides the solution from BitPoet that you'll find in the feature request, you can disable truncation for all File inputfields by adding a hook in /site/ready.php:

$wire->addHookBefore('InputfieldFile::render', function(HookEvent $event) {
    $inputfield = $event->object;
    $inputfield->noShortName = true;
});

 

  • Like 4
Link to comment
Share on other sites

@tpr's AdminOnSteroids can fix it along with a useful related tweak:

https://github.com/rolandtoth/AdminOnSteroids/wiki#filefieldtweaks

"Disable filename truncation for File fields: filenames displayed are cut to 20 characters by default. This tweak removes this limitation and shows the full name. If enabled, the delete button is not positioned to the right but right after the filename to avoid display issues when the filename spans to multiple rows."

  • Like 2
  • Thanks 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...