Commit 86a87c3c authored by pkdille's avatar pkdille

[MOD] lesser magic deployment to messages admin grid

parent b4048673
......@@ -2064,6 +2064,7 @@ lib/phplayers_tiki/tiki-phplayers.php -text
lib/polls/index.php -text
lib/polls/polllib.php -text
lib/polls/polllib_shared.php -text
lib/prefs/allowmsg.php -text
lib/prefs/auth.php -text
lib/prefs/available.php -text
lib/prefs/change.php -text
......@@ -2080,6 +2081,7 @@ lib/prefs/load.php -text
lib/prefs/log.php -text
lib/prefs/mail.php -text
lib/prefs/menus.php -text
lib/prefs/messu.php -text
lib/prefs/page.php -text
lib/prefs/proxy.php -text
lib/prefs/quantify.php -text
......
<?php
function prefs_allowmsg_list() {
return array(
'allowmsg_by_default' => array(
'name' => tra('Users accept internal messages by default'),
'description' => tra('Users accept internal messages by default'),
'type' => 'flag',
'dependencies' => array(
'feature_messages',
),
),
'allowmsg_is_optional' => array(
'name' => tra('Users can opt-out internal messages'),
'description' => tra('Users can opt-out internal messages'),
'type' => 'flag',
'dependencies' => array(
'feature_messages',
),
),
);
}
<?php
function prefs_messu_list() {
return array(
'messu_mailbox_size' => array(
'name' => tra('Maximum mailbox size (messages, 0=unlimited)'),
'description' => tra('Maximum mailbox size (messages, 0=unlimited)'),
'type' => 'text',
'size' => '10',
'filter' => 'digits',
'dependencies' => array(
'feature_messages',
),
),
'messu_archive_size' => array(
'name' => tra('Maximum mail archive size (messages, 0=unlimited)'),
'description' => tra('Maximum mail archive size (messages, 0=unlimited)'),
'type' => 'text',
'size' => '10',
'filter' => 'digits',
'dependencies' => array(
'feature_messages',
),
),
'messu_sent_size' => array(
'name' => tra('Maximum sent box size (messages, 0=unlimited)'),
'description' => tra('Maximum sent box size (messages, 0=unlimited)'),
'type' => 'text',
'size' => '10',
'filter' => 'digits',
'dependencies' => array(
'feature_messages',
),
),
);
}
......@@ -2,23 +2,22 @@
<form action="tiki-admin.php?page=messages" method="post" name="messages">
<div class="heading input_submit_container" style="text-align: right">
<input type="submit" name="messagesprefs" value="{tr}Apply{/tr}" />
<input type="submit" name="messagesprefs" value="{tr}Change preferences{/tr}" />
</div>
{preference name=feature_messages}
{preference name=feature_messages}
<fieldset class="admin">
<legend>{tr}Settings{/tr}</legend>
<table class="admin">
<tr><td class="form">{tr}Users accept internal messages by default{/tr}:</td><td><input type="checkbox" name="allowmsg_by_default" {if $prefs.allowmsg_by_default eq 'y'}checked="checked"{/if}/></td></tr>
<tr><td class="form">{tr}Users can opt-out internal messages{/tr}:</td><td><input type="checkbox" name="allowmsg_is_optional" {if $prefs.allowmsg_is_optional eq 'y'}checked="checked"{/if}/></td></tr>
<tr><td class="form">{tr}Maximum mailbox size (messages, 0=unlimited){/tr}:</td><td><input type="text" name="messu_mailbox_size" value="{$prefs.messu_mailbox_size|escape}" /></td></tr>
<tr><td class="form">{tr}Maximum mail archive size (messages, 0=unlimited){/tr}:</td><td><input type="text" name="messu_archive_size" value="{$prefs.messu_archive_size|escape}" /></td></tr>
<tr><td class="form">{tr}Maximum sent box size (messages, 0=unlimited){/tr}:</td><td><input type="text" name="messu_sent_size" value="{$prefs.messu_sent_size|escape}" /></td></tr>
</table>
{preference name=allowmsg_by_default}
{preference name=allowmsg_is_optional}
{preference name=messu_mailbox_size}
{preference name=messu_archive_size}
{preference name=messu_sent_size}
</fieldset>
<div class="heading input_submit_container" style="text-align: center">
<input type="submit" name="messagesprefs" value="{tr}Apply{/tr}" />
<input type="submit" name="messagesprefs" value="{tr}Change preferences{/tr}" />
</div>
</form>
......@@ -3,7 +3,7 @@
//
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
// $Id: /cvsroot/tikiwiki/tiki/tiki-admin_include_messages.php,v 1.1.2.1 2008-03-16 17:43:14 luciash Exp $
//this script may only be included - so its better to die if called directly.
if (strpos($_SERVER["SCRIPT_NAME"], basename(__FILE__)) !== false) {
header("location: index.php");
......@@ -11,9 +11,4 @@ if (strpos($_SERVER["SCRIPT_NAME"], basename(__FILE__)) !== false) {
}
if (isset($_REQUEST["messagesprefs"])) {
ask_ticket('admin-inc-messages');
simple_set_value('messu_mailbox_size');
simple_set_value('messu_archive_size');
simple_set_value('messu_sent_size');
simple_set_toggle('allowmsg_is_optional');
simple_set_toggle('allowmsg_by_default');
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment