1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
<?php
/**
* @package boards
* @subpackage functions
*/
$boardsSettings = array(
/*
'boards_show_avatars' => array(
'pref' => 'boards_show_avatars',
'label' => "Show Avatars",
'type' => "checkbox",
'default' => 'y',
'note' => "",
),
*/
);
if (!empty( $_REQUEST['boards'] ) ) {
foreach( $boardsSettings as $option => $op) {
if ($op['type']=="checkbox") {
$editUser->storePreference($op['pref'], !empty( $_REQUEST['boards'][$option]) ? 'y' : 'n', 'users');
} else {
$editUser->storePreference($op['pref'], !empty( $_REQUEST['boards'][$option]) ? $_REQUEST['boards'][$option] : '', 'users');
}
}
}
$gBitSmarty->assign('boardsSettings',$boardsSettings);
if( isset( $_REQUEST['bitboarduprefs']['board_id'] ) ) {
$_REQUEST['b'] = $_REQUEST['bitboarduprefs']['board_id'];
}
$signatureContent= new LibertyContent();
$content_type = $editUser->getPreference('signature_content_type',"");
$content_data = $editUser->getPreference('signature_content_data',"");
if (!empty($content_type) && !empty($content_data)) {
$signatureContent->mInfo['format_guid']=$editUser->getPreference('signature_content_type');
$signatureContent->mInfo['data']=$content_data;
}
$gBitSmarty->assignByRef( 'signatureContent', $signatureContent );
if( isset( $_REQUEST["format_guid"] ) ) {
$signatureContent->mInfo['format_guid'] = $_REQUEST["format_guid"];
}
if( isset( $_REQUEST['bitboarduprefs']["edit"] ) ) {
$signatureContent->mInfo["data"] = $_REQUEST['bitboarduprefs']["edit"];
$signatureContent->mInfo['parsed_data'] = $signatureContent->parseData();
}
// If we are in preview mode then preview it!
if( isset( $_REQUEST["preview"] ) ) {
$gBitSmarty->assign('preview', 'y');
}
// Pro
// Check if the page has changed
if( !empty( $_REQUEST["save_bitboarduprefs"] ) ) {
// Check if all Request values are delivered, and if not, set them
// to avoid error messages. This can happen if some features are
// disabled
$editUser->storePreference('signature_content_type',$signatureContent->mInfo['format_guid'], 'users');
$editUser->storePreference('signature_content_data',$signatureContent->mInfo['data'], 'users');
}
?>
|