Skip to content

Instantly share code, notes, and snippets.

@lianglee
Created June 3, 2021 15:19
Show Gist options
  • Save lianglee/764e102be571df162de1c8fe2e87a980 to your computer and use it in GitHub Desktop.
Save lianglee/764e102be571df162de1c8fe2e87a980 to your computer and use it in GitHub Desktop.
themes\Awesome\plugins\default\theme\page\page.php
<?php
/**
* Open Source Social Network
*
* @package (softlab24.com).ossn
* @author OSSN Core Team <[email protected]>
* @copyright 2014-2017 SOFTLAB24 LIMITED
* @license Open Source Social Network License (OSSN LICENSE) http://www.opensource-socialnetwork.org/licence
* @link https://www.opensource-socialnetwork.org/
*/
$sitename = ossn_site_settings('site_name');
if (isset($params['title'])) {
$title = $params['title'] . ' : ' . $sitename;
} else {
$title = $sitename;
}
if (isset($params['contents'])) {
$contents = $params['contents'];
} else {
$contents = '';
}
$sitelang = ossn_site_settings('language');
$rtl = '';
if($sitelang == 'ar'){
$rtl = 'dir="rtl"';
}
if(ossn_isLoggedin()){
$user = ossn_loggedin_user();
if(isset($user->langauge) && $user->langauge == 'ar'){
$rtl = 'dir="rtl"';
}
}
?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title><?php echo $title; ?></title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<?php echo ossn_fetch_extend_views('ossn/endpoint'); ?>
<?php echo ossn_fetch_extend_views('ossn/site/head'); ?>
<script>
<?php echo ossn_fetch_extend_views('ossn/js/head'); ?>
</script>
</head>
<body <?php echo $rtl;?>>
<div class="ossn-page-loading-annimation">
<div class="ossn-page-loading-annimation-inner">
<div class="ossn-loading"></div>
</div>
</div>
<div class="ossn-halt ossn-light"></div>
<div class="ossn-message-box"></div>
<div class="ossn-viewer" style="display:none"></div>
<div class="opensource-socalnetwork">
<?php echo ossn_plugin_view('theme/page/elements/sidebar');?>
<div class="ossn-page-container">
<?php echo ossn_plugin_view('theme/page/elements/topbar');?>
<div class="ossn-inner-page">
<?php echo $contents; ?>
</div>
</div>
</div>
<div id="theme-config" class="hidden" data-desktop-cover-height="200" data-minimum-cover-image-width="1040"></div>
<?php echo ossn_fetch_extend_views('ossn/page/footer'); ?>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment