Skip to content

Commit

Permalink
mengaktifkan link fullsite di tampilan moda bergerak
Browse files Browse the repository at this point in the history
  • Loading branch information
sutriadi committed Apr 23, 2012
1 parent 6dcbce9 commit bee423e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
10 changes: 6 additions & 4 deletions m/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
?>
2 changes: 1 addition & 1 deletion sysconfig.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
5 changes: 4 additions & 1 deletion template/lightweight/index_template.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -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')
)
);

/*----------------------------------------------------
Expand Down Expand Up @@ -150,4 +153,4 @@
</div>
</div>
</body>
</html>
</html>

0 comments on commit bee423e

Please sign in to comment.