Setting Character Limits

How can i set Character Limits on Album Cover Titles??

  • You could write some javascript to do this on the client side. That's probably best for your users. The wire has some javascript that limits posts to 140 characters.

  • I thought there would be a simpler way, like just modifying the form, but thanks, i'll look into that

  • Hello triout,

    Have you managed to solve it?

  • @democracy i went a simpler way than writing some javascript and added a little to the edit.php file in the tidypics mod (i'm overriding this file in my own plugin):

    <label><?php echo elgg_echo('album:title'); ?></label>
    <?php  echo elgg_view("input/tp-text", array("internalname" => "tidypicstitle", "value" => $title, 'maxlength' => 25));  ?>

    in my own plugin, i've also given 'album:title' a new value with help text saying "Album title (max 25 characters)"in the en.php file

    this seemed to do the trick, hope this helps.

  • @triout, Thanks much, for your kind response.


    May I ask, is it possible to give image a name say "a new photo" when the used does not provide title?

    Because, when the user does not provide title, it adds the big file name in the river, I wanted to avoid it with something small?

    Thanks again!