Changeset 28764


Ignore:
Timestamp:
Jun 22, 2014, 1:41:47 PM (10 years ago)
Author:
mistic100
Message:

feature 3095: add "comments_enable_website" param + GUI

Location:
trunk
Files:
1 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/configuration.php

    r26461 r28764  
    7777    'comments_author_mandatory',
    7878    'comments_email_mandatory',
     79    'comments_enable_website',
    7980  );
    8081
  • trunk/admin/themes/default/template/configuration.tpl

    r25709 r28764  
    270270        <input type="checkbox" name="comments_email_mandatory" {if ($comments.comments_email_mandatory)}checked="checked"{/if}>
    271271        {'Email address is mandatory'|@translate}
     272      </label>
     273    </li>
     274
     275    <li>
     276      <label>
     277        <input type="checkbox" name="comments_enable_website" {if ($comments.comments_enable_website)}checked="checked"{/if}>
     278        {'Allow users to add a link to their website'|translate}
    272279      </label>
    273280    </li>
  • trunk/include/picture_comment.inc.php

    r28587 r28764  
    263263        'EMAIL_MANDATORY' =>  $conf['comments_email_mandatory'],
    264264        'EMAIL' =>            '',
     265        'SHOW_WEBSITE' =>     $conf['comments_enable_website'],
    265266      );
    266267
  • trunk/install/config.sql

    r25576 r28764  
    99INSERT INTO piwigo_config (param,value,comment) VALUES ('comments_author_mandatory','false','Comment author is mandatory');
    1010INSERT INTO piwigo_config (param,value,comment) VALUES ('comments_email_mandatory','false','Comment email is mandatory');
     11INSERT INTO piwigo_config (param,value,comment) VALUES ('comments_enable_website','true','Enable "website" field on add comment form');
    1112INSERT INTO piwigo_config (param,value,comment) VALUES ('user_can_delete_comment','false','administrators can allow user delete their own comments');
    1213INSERT INTO piwigo_config (param,value,comment) VALUES ('user_can_edit_comment','false','administrators can allow user edit their own comments');
  • trunk/language/en_UK/admin.lang.php

    r28492 r28764  
    169169$lang['Allow user customization'] = 'Allow user customization';
    170170$lang['Allow user registration'] = "Allow user registration";
     171$lang['Allow users to add a link to their website'] = "Allow users to add a link to their website";
    171172$lang['Allow users to delete their own comments'] = "Allow users to delete their own comments";
    172173$lang['Allow users to edit their own comments'] = "Allow users to edit their own comments";
  • trunk/language/fr_FR/admin.lang.php

    r28492 r28764  
    975975$lang['close'] = 'fermer';
    976976$lang['Activate it now'] = 'Activate it now';
     977$lang['Allow users to add a link to their website'] = 'Autoriser les utilisateurs à donner un lien vers leur site web';
    977978?>
  • trunk/themes/default/template/picture.tpl

    r24881 r28764  
    341341                                        <p><input type="text" name="email" id="email" value="{$comment_add.EMAIL}"></p>
    342342                                {/if}
    343                                 <p><label for="website_url">{'Website'|@translate} :</label></p>
    344                                 <p><input type="text" name="website_url" id="website_url" value="{$comment_add.WEBSITE_URL}"></p>
     343        {if $comment_add.SHOW_WEBSITE}
     344          <p><label for="website_url">{'Website'|@translate} :</label></p>
     345          <p><input type="text" name="website_url" id="website_url" value="{$comment_add.WEBSITE_URL}"></p>
     346        {/if}
    345347                                <p><label for="contentid">{'Comment'|@translate} ({'mandatory'|@translate}) :</label></p>
    346348                                <p><textarea name="content" id="contentid" rows="5" cols="50">{$comment_add.CONTENT}</textarea></p>
Note: See TracChangeset for help on using the changeset viewer.