Notice

The forum is in read only mode.

Support Forum

Welcome! Support Forums have been reactivated

limit the characters name

10 years 5 months ago
  • gustavo's Avatar
    Topic Author
  • gustavo
  • Offline
  • Fresh Boarder
  • Posts: 86
  • Thank you received: 1
Licenses:
JomSocial Active iSEO Expired Socialize Expired

hi, is it possible to limit the characters name lets say 40 letters?

thanks!

10 years 5 months ago
  • Dimas Tekad Santosa's Avatar
  • Dimas Tekad Santosa
  • Visitor
  • Thank you received: 0
Licenses:

Hi,

Yes it possible, you can change the limit from Jomsocial configuration->Site->Character Limit

I hope it helps

10 years 5 months ago
  • gustavo's Avatar
    Topic Author
  • gustavo
  • Offline
  • Fresh Boarder
  • Posts: 86
  • Thank you received: 1
Licenses:
JomSocial Active iSEO Expired Socialize Expired

but that one will be for a post in the wall

the one I want to limit is the name at the top right before the user picture

thanks!

10 years 5 months ago
  • Dimas Tekad Santosa's Avatar
  • Dimas Tekad Santosa
  • Visitor
  • Thank you received: 0
Licenses:

ops sorry, Please provide me the screenshoot which one do you mean? do you wanna limit from the input name or only on the display?

10 years 5 months ago
  • gustavo's Avatar
    Topic Author
  • gustavo
  • Offline
  • Fresh Boarder
  • Posts: 86
  • Thank you received: 1
Licenses:
JomSocial Active iSEO Expired Socialize Expired

here is the pic... I want to limit the name up to 40 letters thanks! :)

Attachments:
10 years 5 months ago
  • Dimas Tekad Santosa's Avatar
  • Dimas Tekad Santosa
  • Visitor
  • Thank you received: 0
Licenses:

Hi Gustavo,

You should edit the edit profile page components/com_community/templates/default/profile.edit.php, find this code :

<input class="input text" type="text" id="name" name="name" size="40" value="<?php echo $this->escape($user->get('name'));?>" />

replace to :
<input class="input text" type="text" id="name" name="name" size="40" value="<?php echo $this->escape($user->get('name'));?>" maxlength="40" />

10 years 5 months ago
  • gustavo's Avatar
    Topic Author
  • gustavo
  • Offline
  • Fresh Boarder
  • Posts: 86
  • Thank you received: 1
Licenses:
JomSocial Active iSEO Expired Socialize Expired

hi, it did not work... I put it at 25... im talking about the toolbar

here is the pic

Attachments:
10 years 5 months ago
  • Dimas Tekad Santosa's Avatar
  • Dimas Tekad Santosa
  • Visitor
  • Thank you received: 0
Licenses:

My code above only for the chars when you edit profile, so if user want to edit the profile, they cant add the name more than 40 chars..

another solution, please you open this file modules/mod_community_toolbar/tmpl/default.php, find this code :

<h3><?php echo $my->getDisplayName(); ?></h3>

replace to :
<h3><?php echo substr ($my->getDisplayName(),40); ?></h3>

I hope it will help

Moderators: Piotr Garasiński
Powered by Kunena Forum

Join 180,000 websites creating Amazing communities

JomSocial is the most complete, easy-to-use addon that turns Joomla CMS into a
full -fledged, social networking site

TRY NOW BUY NOW