Permalink
Browse files

mengaktifkan link fullsite di tampilan moda bergerak

  • Loading branch information...
1 parent 6dcbce9 commit bee423ea6157b5c2fb8d5dcfd06e9698a6d402a5 @sutriadi sutriadi committed Apr 23, 2012
Showing with 11 additions and 6 deletions.
  1. +6 −4 m/index.php
  2. +1 −1 sysconfig.inc.php
  3. +4 −1 template/lightweight/index_template.inc.php
View
@@ -28,12 +28,14 @@
require '../sysconfig.inc.php';
// set cookie
-$cookie_path = preg_replace('@\/m\/*@i', '', SENAYAN_WEB_ROOT_DIR);
+$cookie_path = preg_replace('@m\/*@i', '', SENAYAN_WEB_ROOT_DIR);
// create cookies of lightweight mode
if (isset($_GET['fullsite'])) {
- // remove cookies
- @setcookie('LIGHTWEIGHT_MODE', 1, time()-43200, $cookie_path);
-} else { @setcookie('LIGHTWEIGHT_MODE', 1, time()+43200, $cookie_path); }
+ @setcookie('FULLSITE_MODE', 1, time()+43200, $cookie_path);
+} else {
+ // remove cookies
+ @setcookie('FULLSITE_MODE', 0, time()-43200, $cookie_path);
+}
// redirect to main bootstrap
header('Location: ../index.php');
?>
View
@@ -550,7 +550,7 @@ function stripslashes_deep($value)
$sysconf['authority_level'][10] = __('Contributor');
// redirect to mobile template on mobile mode
-if (defined('LIGHTWEIGHT_MODE') OR isset($_COOKIE['LIGHTWEIGHT_MODE'])) {
+if (defined('LIGHTWEIGHT_MODE') AND ! isset($_COOKIE['FULLSITE_MODE'])) {
$sysconf['template']['theme'] = 'lightweight';
$sysconf['template']['css'] = $sysconf['template']['dir'].'/'.$sysconf['template']['theme'].'/style.css';
$sysconf['enable_xml_detail'] = false;
@@ -60,6 +60,9 @@
'site' => array('url' => 'index.php?p=member',
'text' => __('Member Area')
)
+ 'fullsite' => array('url' => 'm/index.php?fullsite=1',
+ 'text' => __('Full Site')
+ )
);
/*----------------------------------------------------
@@ -150,4 +153,4 @@
</div>
</div>
</body>
-</html>
+</html>

0 comments on commit bee423e

Please sign in to comment.