Support

  1. Mafketel
  2. Support
  3. Wednesday, May 21 2014, 09:14 PM
Hi,

Is there a posibility to limit the size of a textarea field (in edit profile)? Also, is it possible to show less of a textarea field if it is shown in a profile list? and full text if it isdisplayed as a single profile (view)?

Thanks
Accepted Answer
admin Accepted Answer
Admin
Hi,
I think this:
you can create 2 textarea (alias: textarea_full and textarea_intro), textarea_full is visible on profile,edit page and registration, textarea_intro is hidden on profile,edit and registration.
When user fill and save your profile you can add in textarea_intro truncated text of textarea_full with our triggers. Also you can truncate the textarea_full is you want a maximum lenght.
In list user you can render the field textarea_intro.

You can do this:
- Download, install, and enable our skeleton plugin, you can find here: https://www.easy-profile.com/docs/44-triggers.html
- Go in /plugins/jsn/skeleton/skeleton.php and remove the function: triggerFieldAvatarUpdate and triggerProfileUpdate
- add this function to file:
triggerFieldTextare_fullUpdate($user,&$data,$changed,$isNew){
// textarea_full max lenght - 250 characters
if( strlen($data['textarea_full'])>251 ) $data['textarea_full']=substr($data['textarea_full'],0,250);
// fill textarea_intro - 100 characters
if( strlen($data['textarea_full'])>101 ) $data['textarea_intro']=substr($data['textarea_full'],0,100).'...';
}


NOTE: this code is not tested and not supported, only serves to give you an idea
  1. more than a month ago
  2. Support
  3. # Permalink
admin Accepted Answer
Admin
Sorry for late reply, for we it's night.
These are not possible with actually features. But you can do with develop simple plugin.

Tomorrow we will send you some thing to do this.
  1. more than a month ago
  2. Support
  3. # 1
Mafketel Accepted Answer
Ok no problem, I will wait for you code.
Thanks
  1. more than a month ago
  2. Support
  3. # 2
Mafketel Accepted Answer
Thanks, I worked it out and it does the trick. I also used a jQuery maxlength in the edit profile at the specific textarea_full.
  1. more than a month ago
  2. Support
  3. # 3
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.
Sorry, the discussion is currently locked. You will not be able to post a reply at the moment.

Request Support

Support is currently Offline

Support Availability

Working days: Monday to Friday. The support staff is not available on weekends; in the most of cases tickets will not be answered during that time.

Reply time: Depending on the complexity of your support issue it's usually between a few minutes and 24 hours for paid members and about one week for free members. When we expect longer delays we will notify you.

Guidelines

Before you post: read the documentation and search the forums for an answer to your question.

When you post: include Site Details if you request a support (you can use the form below the reply in Site Details tab).

Auto Solved Question: If after a week the author of the post does not reply to a request by moderator, the question will be marked as resolved.

Language: only English

Search Users

Easy Profile® is not affiliated with or endorsed by Open Source Matters or the Joomla Project. Joomla is Free Software released under the GNU/GPL License.