1
1
Fork 0

theme cleanup

This commit is contained in:
Mike Macgirvin 2010-09-18 21:11:18 -07:00
commit 65a420b227
23 changed files with 179 additions and 36 deletions

View file

@ -72,6 +72,7 @@ function contacts_post(&$a) {
function contacts_content(&$a) {
$o .= '<script> $(document).ready(function() { $(\'#nav-contacts-link\').addClass(\'nav-selected\'); });</script>';
if(! local_user()) {
notice( t('Permission denied.') . EOL);
return;

View file

@ -4,6 +4,7 @@ function directory_init(&$a) {
}
function directory_content(&$a) {
$o .= '<script> $(document).ready(function() { $(\'#nav-directory-link\').addClass(\'nav-selected\'); });</script>';
$search = ((x($_GET,'search')) ? notags(trim($_GET['search'])) : '');

View file

@ -15,6 +15,8 @@ function home_content(&$a) {
$a->page['footer'] .= "<div class=\"powered\" >Powered by <a href=\"http://mistpark.com\" name=\"mistpark\" >mistpark</a></div>";
$o .= '<h1>Welcome' . ((x($a->config,'sitename')) ? " to {$a->config['sitename']}" : "" ) . '</h1>';
if(file_exists('home.html'))
$o .= file_get_contents('home.html');
$o .= login(($a->config['register_policy'] == REGISTER_CLOSED) ? 0 : 1);
return $o;

View file

@ -82,6 +82,7 @@ function message_post(&$a) {
}
function message_content(&$a) {
$o .= '<script> $(document).ready(function() { $(\'#nav-messages-link\').addClass(\'nav-selected\'); });</script>';
if(! local_user()) {
notice( t('Permission denied.') . EOL);

View file

@ -19,6 +19,8 @@ function network_content(&$a, $update = false) {
$group = 0;
if(! $update) {
$o .= '<script> $(document).ready(function() { $(\'#nav-network-link\').addClass(\'nav-selected\'); });</script>';
// pull out the group here because the updater might have different args
if($a->argc > 1) {
$group = intval($a->argv[1]);

View file

@ -57,6 +57,7 @@ function notifications_content(&$a) {
}
$o = '';
$o .= '<script> $(document).ready(function() { $(\'#nav-notify-link\').addClass(\'nav-selected\'); });</script>';
if(($a->argc > 1) && ($a->argv[1] == 'all'))
$sql_extra = '';

View file

@ -89,6 +89,7 @@ function profile_content(&$a, $update = false) {
$a->profile['profile_uid'] = $_SESSION['profile_uid'];
}
else {
$o .= '<script> $(document).ready(function() { $(\'#nav-home-link\').addClass(\'nav-selected\'); });</script>';
// set the uid so we can pick it up during update
$_SESSION['profile_uid'] = $a->profile['uid'];
}

View file

@ -157,6 +157,7 @@ function profiles_post(&$a) {
function profiles_content(&$a) {
$o .= '<script> $(document).ready(function() { $(\'#nav-profiles-link\').addClass(\'nav-selected\'); });</script>';
if(! local_user()) {
notice( t('Permission denied.') . EOL);
return;

View file

@ -155,6 +155,7 @@ function settings_post(&$a) {
if(! function_exists('settings_content')) {
function settings_content(&$a) {
$o .= '<script> $(document).ready(function() { $(\'#nav-settings-link\').addClass(\'nav-selected\'); });</script>';
if(! local_user()) {
notice( t('Permission denied.') . EOL );
@ -229,9 +230,9 @@ function settings_content(&$a) {
'$basepath' => $a->get_hostname(),
'$baseurl' => $a->get_baseurl()));
$o = file_get_contents('view/settings.tpl');
$stpl = file_get_contents('view/settings.tpl');
$o = replace_macros($o,array(
$o .= replace_macros($stpl,array(
'$baseurl' => $a->get_baseurl(),
'$uid' => $_SESSION['uid'],
'$username' => $username,