aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mod/settings.php20
-rw-r--r--version.inc2
-rw-r--r--view/css/mod_settings.css14
-rw-r--r--view/js/icon_translate.js1
-rwxr-xr-xview/tpl/chanview.tpl2
-rwxr-xr-xview/tpl/settings.tpl19
6 files changed, 53 insertions, 5 deletions
diff --git a/mod/settings.php b/mod/settings.php
index 945a75134..e9f4c9f8d 100644
--- a/mod/settings.php
+++ b/mod/settings.php
@@ -261,7 +261,7 @@ function settings_post(&$a) {
$maxreq = ((x($_POST,'maxreq')) ? intval($_POST['maxreq']) : 0);
$expire = ((x($_POST,'expire')) ? intval($_POST['expire']) : 0);
$def_group = ((x($_POST,'group-selection')) ? notags(trim($_POST['group-selection'])) : '');
-
+ $channel_menu = ((x($_POST['channel_menu'])) ? htmlspecialchars_decode(trim($_POST['channel_menu'])) : '');
$expire_items = ((x($_POST,'expire_items')) ? intval($_POST['expire_items']) : 0);
$expire_starred = ((x($_POST,'expire_starred')) ? intval($_POST['expire_starred']) : 0);
@@ -403,7 +403,7 @@ function settings_post(&$a) {
set_pconfig(local_user(),'system','post_profilechange', $post_profilechange);
set_pconfig(local_user(),'system','blocktags',$blocktags);
set_pconfig(local_user(),'system','hide_online_status',$hide_presence);
-
+ set_pconfig(local_user(),'system','channel_menu',$channel_menu);
$r = q("update channel set channel_name = '%s', channel_pageflags = %d, channel_timezone = '%s', channel_location = '%s', channel_notifyflags = %d, channel_max_anon_mail = %d, channel_max_friend_req = %d, channel_expire_days = %d, channel_default_group = '%s', channel_r_stream = %d, channel_r_profile = %d, channel_r_photos = %d, channel_r_abook = %d, channel_w_stream = %d, channel_w_wall = %d, channel_w_tagwall = %d, channel_w_comment = %d, channel_w_mail = %d, channel_w_photos = %d, channel_w_chat = %d, channel_a_delegate = %d, channel_r_storage = %d, channel_w_storage = %d, channel_r_pages = %d, channel_w_pages = %d, channel_a_republish = %d, channel_a_bookmark = %d, channel_allow_cid = '%s', channel_allow_gid = '%s', channel_deny_cid = '%s', channel_deny_gid = '%s' where channel_id = %d limit 1",
dbesc($username),
@@ -911,6 +911,18 @@ function settings_content(&$a) {
require_once('include/group.php');
$group_select = mini_group_select(local_user(),$channel['channel_default_group']);
+ require_once('include/menu.php');
+ $m1 = menu_list(local_user());
+ $menu = false;
+ if($m1) {
+ $menu = array();
+ $current = get_pconfig(local_user(),'system','channel_menu');
+ $menu[] = array('name' => '', 'selected' => ((! $current) ? true : false));
+ foreach($m1 as $m) {
+ $menu[] = array('name' => htmlspecialchars($m['menu_name'],ENT_COMPAT,'UTF-8'), 'selected' => (($m['menu_name'] === $current) ? ' selected="selected" ' : false));
+ }
+ }
+
$o .= replace_macros($stpl,array(
'$ptitle' => t('Channel Settings'),
@@ -981,7 +993,9 @@ function settings_content(&$a) {
'$pagetype' => $pagetype,
'$expert' => feature_enabled(local_user(),'expert'),
'$hint' => t('Please enable expert mode (in <a href="settings/features">Settings > Additional features</a>) to adjust!'),
-
+ '$lbl_misc' => t('Miscellaneous Settings'),
+ '$menus' => $menu,
+ '$menu_desc' => t('Personal menu to display in your channel pages'),
));
call_hooks('settings_form',$o);
diff --git a/version.inc b/version.inc
index 4551fa398..9e1971efd 100644
--- a/version.inc
+++ b/version.inc
@@ -1 +1 @@
-2014-02-18.592
+2014-02-19.593
diff --git a/view/css/mod_settings.css b/view/css/mod_settings.css
index 0d3dd36fe..5b0105204 100644
--- a/view/css/mod_settings.css
+++ b/view/css/mod_settings.css
@@ -35,3 +35,17 @@
margin-bottom: 15px;
}
+#settings-menu-desc {
+ font-weight: bold;
+ float: left;
+ width: 350px;
+}
+
+#settings-channel-menu-div select {
+ float: left;
+}
+
+#settings-channel-menu-end {
+ clear: both;
+ margin-bottom: 15px;
+} \ No newline at end of file
diff --git a/view/js/icon_translate.js b/view/js/icon_translate.js
index 737164cb8..45deef05b 100644
--- a/view/js/icon_translate.js
+++ b/view/js/icon_translate.js
@@ -52,4 +52,5 @@ $(document).ready(function() {
$('.icon-circle-blank').addClass('');
$('.icon-circle').addClass('');
$('.icon-bookmark').addClass('');
+ $('.icon-fullscreen').addClass('');
}); \ No newline at end of file
diff --git a/view/tpl/chanview.tpl b/view/tpl/chanview.tpl
index 4df327bf9..a43ea1b5d 100755
--- a/view/tpl/chanview.tpl
+++ b/view/tpl/chanview.tpl
@@ -1,2 +1,2 @@
-<div id="chanview-iframe-border" class="fakelink" onclick="chanviewFull(); return true;" title="{{$full}}" >&#x2610;</div>
+<div id="chanview-iframe-border" class="fakelink" onclick="chanviewFull(); return true;" title="{{$full}}" ><i class="icon-fullscreen"></i></div>
<iframe id="remote-channel" width="100%" src="{{$url}}" onload="resize_iframe()"></iframe>
diff --git a/view/tpl/settings.tpl b/view/tpl/settings.tpl
index f5f2206bc..49dff4822 100755
--- a/view/tpl/settings.tpl
+++ b/view/tpl/settings.tpl
@@ -127,4 +127,23 @@
<input type="submit" name="submit" class="settings-submit" value="{{$submit}}"{{if !$expert}} onclick="$('select').prop('disabled', false);"{{/if}} />
</div>
+
+{{if $menus}}
+<h3 class="settings-heading">{{$lbl_misc}}</h3>
+
+<div id="settings-menu-desc">{{$menu_desc}}</div>
+<div class="settings-channel-menu-div">
+<select name="channel_menu" class="settings-channel-menu-sel">
+{{foreach $menus as $menu }}
+<option value="{{$menu.name}}" {{$menu.selected}} >{{$menu.name}} </option>
+{{/foreach}}
+</select>
+</div>
+<div class="settings-submit-wrapper" >
+<input type="submit" name="submit" class="settings-submit" value="{{$submit}}"{{if !$expert}} onclick="$('select').prop('disabled', false);"{{/if}} />
+</div>
+<div id="settings-channel-menu-end"></div>
+{{/if}}
+
+
</div>