From 170c15ceb9cac013146b7f9687b83a376a3a21ff Mon Sep 17 00:00:00 2001 From: tommy tomson Date: Sun, 15 Apr 2012 02:50:16 +0200 Subject: diabook: theme-settings: add a wide-option --- view/theme/diabook/theme.php | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) mode change 100644 => 100755 view/theme/diabook/theme.php (limited to 'view/theme/diabook/theme.php') diff --git a/view/theme/diabook/theme.php b/view/theme/diabook/theme.php old mode 100644 new mode 100755 index b039e1b82..4b4064a6c --- a/view/theme/diabook/theme.php +++ b/view/theme/diabook/theme.php @@ -14,7 +14,9 @@ $a->page['htmlhead'] .= sprintf('', $diabook_version); //change css on network and profilepages $cssFile = null; - +$resolution=false; +$resolution = get_pconfig(local_user(), "diabook", "resolution"); +if ($resolution===false) $resolution="normal"; /** * prints last community activity @@ -267,9 +269,10 @@ if ($a->argv[0] === "network" && local_user()){ if($ccCookie != "8") { // COMMUNITY diabook_community_info(); - + // CUSTOM CSS - $cssFile = $a->get_baseurl($ssl_state)."/view/theme/diabook/style-network.css"; + if($resolution == "normal") {$cssFile = $a->get_baseurl($ssl_state)."/view/theme/diabook/style-network.css";} + if($resolution == "wide") {$cssFile = $a->get_baseurl($ssl_state)."/view/theme/diabook/style-network-wide.css";} } } @@ -282,8 +285,8 @@ if ($a->argv[0].$a->argv[1] === "profile".$a->user['nickname']){ diabook_community_info(); // CUSTOM CSS - $cssFile = $a->get_baseurl($ssl_state)."/view/theme/diabook/style-profile.css"; - + if($resolution == "normal") {$cssFile = $a->get_baseurl($ssl_state)."/view/theme/diabook/style-profile.css";} + if($resolution == "wide") {$cssFile = $a->get_baseurl($ssl_state)."/view/theme/diabook/style-profile-wide.css";} } } @@ -291,6 +294,8 @@ if ($a->argv[0].$a->argv[1] === "profile".$a->user['nickname']){ // custom css if (!is_null($cssFile)) $a->page['htmlhead'] .= sprintf('', $cssFile); + + //load jquery.cookie.js $cookieJS = $a->get_baseurl($ssl_state)."/view/theme/diabook/js/jquery.cookie.js"; $a->page['htmlhead'] .= sprintf('', $cookieJS); -- cgit v1.2.3