Allow Customizable URL Trim Length
timtrinidad - December 20, 2008 - 18:23
| Project: | HTML Mail |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
The module defaults to 72 for URL lengths - any longer and it trims it and adds a "...". This breaks for a couple of mail clients (my school uses SquirrelMail a lot, and it doesn't read HTML mail properly so copy-pasting a link longer than 72 characters doesn't work). I suggest that the length be customizable through the admin/settings/htmlmail page as follows (using "0" to disable trimming):
- Add the field to the settings page
- In the _htmlmail_url_trim function, replace "72" with the appropriate variable_get
- In _htmlmail_url_trim, add $length != 0 && to the second if statement.
I've included a patch to the latest CVS snapshot for review; I'm not entirely sure about my wording for the URL Length field description.
| Attachment | Size |
|---|---|
| urltrim.patch | 1.24 KB |

#1
Thoughts?
#2
patch applied to 6.x-1.x-dev
#3
Automatically closed -- issue fixed for two weeks with no activity.