mirror of
https://github.com/e107inc/e107.git
synced 2025-05-08 21:26:07 +02:00
Feature: Ability to hide the amount of chatbox posts from user profiles.
This commit is contained in:
parent
15865aa907
commit
ae5a72b87f
@ -36,6 +36,7 @@ if (isset($_POST['updatesettings']))
|
|||||||
$temp['cb_layer_height'] = max(varset($_POST['cb_layer_height'], 200), 150);
|
$temp['cb_layer_height'] = max(varset($_POST['cb_layer_height'], 200), 150);
|
||||||
$temp['cb_emote'] = intval($_POST['cb_emote']);
|
$temp['cb_emote'] = intval($_POST['cb_emote']);
|
||||||
$temp['cb_mod'] = intval($_POST['cb_mod']);
|
$temp['cb_mod'] = intval($_POST['cb_mod']);
|
||||||
|
$temp['cb_user_addon'] = intval($_POST['cb_user_addon']);
|
||||||
|
|
||||||
|
|
||||||
e107::getConfig('core')->setPref($temp)->save(false);
|
e107::getConfig('core')->setPref($temp)->save(false);
|
||||||
@ -117,6 +118,10 @@ $text = "
|
|||||||
}
|
}
|
||||||
|
|
||||||
$text .= "
|
$text .= "
|
||||||
|
<tr>
|
||||||
|
<td>".CHBLAN_42."</td>
|
||||||
|
<td>".$frm->radio_switch('cb_user_addon', $pref['cb_user_addon'])."</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>".LAN_PRUNE.":</td>
|
<td>".LAN_PRUNE.":</td>
|
||||||
<td>".CHBLAN_23.$frm->select('chatbox_prune', array(86400 => CHBLAN_24, 604800 => CHBLAN_25, 2592000 => CHBLAN_26, 1 => CHBLAN_27), '', '', true).$frm->admin_button('prune', LAN_PRUNE, 'other')."<span class='field-help'>".CHBLAN_22."</span></td>
|
<td>".CHBLAN_23.$frm->select('chatbox_prune', array(86400 => CHBLAN_24, 604800 => CHBLAN_25, 2592000 => CHBLAN_26, 1 => CHBLAN_27), '', '', true).$frm->admin_button('prune', LAN_PRUNE, 'other')."<span class='field-help'>".CHBLAN_22."</span></td>
|
||||||
|
@ -16,6 +16,12 @@ class chatbox_menu_user // plugin-folder + '_user'
|
|||||||
|
|
||||||
function profile($udata)
|
function profile($udata)
|
||||||
{
|
{
|
||||||
|
$pref = e107::getPref();
|
||||||
|
|
||||||
|
if (!$pref['cb_user_addon'])
|
||||||
|
{
|
||||||
|
return array();
|
||||||
|
}
|
||||||
|
|
||||||
if(!$chatposts = e107::getRegistry('total_chatposts'))
|
if(!$chatposts = e107::getRegistry('total_chatposts'))
|
||||||
{
|
{
|
||||||
|
@ -53,7 +53,7 @@ define("CHBLAN_38", "Use javascript code to update posts dynamically (AJAX)");
|
|||||||
//define('CHBLAN_39', 'Nothing changed - not updated');
|
//define('CHBLAN_39', 'Nothing changed - not updated');
|
||||||
// define('CHBLAN_40', 'Chatbox');
|
// define('CHBLAN_40', 'Chatbox');
|
||||||
// define('CHBLAN_41', 'Chatbox Menu');
|
// define('CHBLAN_41', 'Chatbox Menu');
|
||||||
|
define("CHBLAN_42", "Amount of posts displayed in user profile");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -14,5 +14,6 @@
|
|||||||
<pref name="cb_layer_height">200</pref>
|
<pref name="cb_layer_height">200</pref>
|
||||||
<pref name="cb_emote">0</pref>
|
<pref name="cb_emote">0</pref>
|
||||||
<pref name="cb_mod">254</pref>
|
<pref name="cb_mod">254</pref>
|
||||||
|
<pref name="cb_user_addon">1</pref>
|
||||||
</mainPrefs>
|
</mainPrefs>
|
||||||
</e107Plugin>
|
</e107Plugin>
|
Loading…
x
Reference in New Issue
Block a user