Skip to content

Commit

Permalink
#1094 Rename /style/ to /themes/
Browse files Browse the repository at this point in the history
  • Loading branch information
Yannick committed Feb 25, 2015
1 parent 5a265cc commit b23e01c
Show file tree
Hide file tree
Showing 55 changed files with 26 additions and 26 deletions.
14 changes: 7 additions & 7 deletions backstage/theme.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@
<?php

$current_theme = $luna_config['o_default_style'];
include FORUM_ROOT.'/style/'.$current_theme.'/information.php';
include FORUM_ROOT.'/themes/'.$current_theme.'/information.php';
$style_info = new SimpleXMLElement($xmlstr);

?>
<div class="thumbnail"><a data-toggle="modal" href="#" data-target="#<?php echo $current_theme ?>"><img src="../style/<?php echo $current_theme ?>/logo.png" /></a></div>
<div class="thumbnail"><a data-toggle="modal" href="#" data-target="#<?php echo $current_theme ?>"><img src="../themes/<?php echo $current_theme ?>/logo.png" /></a></div>
<div class="panel-footer">
<span class="h2"><?php echo $style_info->name; ?></span>
</div>
Expand All @@ -68,8 +68,8 @@
<div class="panel-body">
<?php

if (file_exists(FORUM_ROOT.'/style/'.$current_theme.'/theme_settings.php')) {
include FORUM_ROOT.'/style/'.$current_theme.'/theme_settings.php';
if (file_exists(FORUM_ROOT.'/themes/'.$current_theme.'/theme_settings.php')) {
include FORUM_ROOT.'/themes/'.$current_theme.'/theme_settings.php';
} else {
echo 'This theme has no settings available...';
}
Expand All @@ -93,7 +93,7 @@

foreach ($styles as $temp) {
?>
<?php include FORUM_ROOT.'/style/'.$temp.'/information.php'; $style_info = new SimpleXMLElement($xmlstr); ?>
<?php include FORUM_ROOT.'/themes/'.$temp.'/information.php'; $style_info = new SimpleXMLElement($xmlstr); ?>
<div class="col-xs-12 col-sm-6 col-md-4 style-entry">
<div class="modal fade" id="<?php echo $temp ?>" tabindex="-1" role="dialog" aria-labelledby="<?php echo $temp ?>" aria-hidden="true">
<div class="modal-dialog modal-lg">
Expand All @@ -105,7 +105,7 @@
<div class="modal-body">
<div class="row">
<div class="col-sm-8">
<div class="thumbnail"><img src="../style/<?php echo $temp ?>/screenshot.png" /></div>
<div class="thumbnail"><img src="../themes/<?php echo $temp ?>/screenshot.png" /></div>
</div>
<div class="col-sm-4">
<h2><?php echo $style_info->name; ?> <small><?php printf($lang['version'], $style_info->version) ?></small></h2>
Expand All @@ -121,7 +121,7 @@
</div>
</div>
<div class="panel panel-style">
<div class="thumbnail"><a data-toggle="modal" href="#" data-target="#<?php echo $temp ?>"><img src="../style/<?php echo $temp ?>/logo.png" /></a></div>
<div class="thumbnail"><a data-toggle="modal" href="#" data-target="#<?php echo $temp ?>"><img src="../themes/<?php echo $temp ?>/logo.png" /></a></div>
<div class="panel-footer">
<span class="h2"><?php echo $style_info->name; ?></span>
<div class="btn-group pull-right">
Expand Down
2 changes: 1 addition & 1 deletion db_update.php
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,7 @@ function stripslashes_array($array) {
$db->query('UPDATE '.$db->prefix.'config SET conf_value = \'English\' WHERE conf_name = \'o_default_lang\'') or error('Unable to update default language', __FILE__, __LINE__, $db->error());

// Check the default style still exists!
if (!file_exists(FORUM_ROOT.'style/'.$luna_config['o_default_style'].'/style.css'))
if (!file_exists(FORUM_ROOT.'themes/'.$luna_config['o_default_style'].'/style.css'))
$db->query('UPDATE '.$db->prefix.'config SET conf_value = \'Sunrise\' WHERE conf_name = \'o_default_style\'') or error('Unable to update default style', __FILE__, __LINE__, $db->error());

// This feels like a good time to synchronize the forums
Expand Down
32 changes: 16 additions & 16 deletions include/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ function check_cookie(&$luna_user) {
$luna_user['language'] = $luna_config['o_default_lang'];

// Set a default style if the user selected style no longer exists
if (!file_exists(FORUM_ROOT.'style/'.$luna_user['style'].'/style.css'))
if (!file_exists(FORUM_ROOT.'themes/'.$luna_user['style'].'/style.css'))
$luna_user['style'] = $luna_config['o_default_style'];

if (!$luna_user['disp_topics'])
Expand Down Expand Up @@ -1590,7 +1590,7 @@ function forum_list_styles() {
if ($entry{0} == '.')
continue;

if (is_dir(FORUM_ROOT.'style/'.$entry) && file_exists(FORUM_ROOT.'style/'.$entry.'/style.css'))
if (is_dir(FORUM_ROOT.'themes/'.$entry) && file_exists(FORUM_ROOT.'themes/'.$entry.'/style.css'))
$styles[] = $entry;
}
$d->close();
Expand Down Expand Up @@ -2005,10 +2005,10 @@ function dump() {
function get_template_path($tpl_file) {
global $luna_user;

if (file_exists(FORUM_ROOT.'style/'.$luna_user['style'].'/templates/'.$tpl_file)) {
return FORUM_ROOT.'style/'.$luna_user['style'].'/templates/'.$tpl_file;
if (file_exists(FORUM_ROOT.'themes/'.$luna_user['style'].'/templates/'.$tpl_file)) {
return FORUM_ROOT.'themes/'.$luna_user['style'].'/templates/'.$tpl_file;
} else {
return FORUM_ROOT.'style/Core/templates/'.$tpl_file;
return FORUM_ROOT.'themes/Core/templates/'.$tpl_file;
}
}

Expand All @@ -2018,13 +2018,13 @@ function get_template_path($tpl_file) {
function get_view_path($object) {
global $luna_user, $luna_config;

include FORUM_ROOT.'/style/'.$luna_config['o_default_style'].'/information.php';
include FORUM_ROOT.'/themes/'.$luna_config['o_default_style'].'/information.php';
$style_info = new SimpleXMLElement($xmlstr);

if (($style_info->parent_theme == '') || (file_exists(FORUM_ROOT.'style/'.$luna_user['style'].'/objects/'.$object)))
return FORUM_ROOT.'style/'.$luna_user['style'].'/objects/'.$object;
if (($style_info->parent_theme == '') || (file_exists(FORUM_ROOT.'themes/'.$luna_user['style'].'/objects/'.$object)))
return FORUM_ROOT.'themes/'.$luna_user['style'].'/objects/'.$object;
else
return FORUM_ROOT.'style/'.$style_info->parent_theme.'/objects/'.$object;
return FORUM_ROOT.'themes/'.$style_info->parent_theme.'/objects/'.$object;
}

//
Expand All @@ -2033,13 +2033,13 @@ function get_view_path($object) {
function load_page($page) {
global $luna_user, $luna_config;

include FORUM_ROOT.'/style/'.$luna_config['o_default_style'].'/information.php';
include FORUM_ROOT.'/themes/'.$luna_config['o_default_style'].'/information.php';
$style_info = new SimpleXMLElement($xmlstr);

if (($style_info->parent_theme == '') || (file_exists(FORUM_ROOT.'style/'.$luna_config['o_default_style'].'/'.$page)))
return FORUM_ROOT.'style/'.$luna_config['o_default_style'].'/'.$page;
if (($style_info->parent_theme == '') || (file_exists(FORUM_ROOT.'themes/'.$luna_config['o_default_style'].'/'.$page)))
return FORUM_ROOT.'themes/'.$luna_config['o_default_style'].'/'.$page;
else
return FORUM_ROOT.'style/'.$style_info->parent_theme.'/'.$page;
return FORUM_ROOT.'themes/'.$style_info->parent_theme.'/'.$page;
}

//
Expand All @@ -2048,13 +2048,13 @@ function load_page($page) {
function load_css() {
global $luna_config;

include FORUM_ROOT.'/style/'.$luna_config['o_default_style'].'/information.php';
include FORUM_ROOT.'/themes/'.$luna_config['o_default_style'].'/information.php';
$style_info = new SimpleXMLElement($xmlstr);

if ($style_info->parent_theme != '')
echo '<link rel="stylesheet" type="text/css" href="style/'.$style_info->parent_theme.'/style.css" />';
echo '<link rel="stylesheet" type="text/css" href="themes/'.$style_info->parent_theme.'/style.css" />';

echo '<link rel="stylesheet" type="text/css" href="style/'.$luna_config['o_default_style'].'/style.css" />';
echo '<link rel="stylesheet" type="text/css" href="themes/'.$luna_config['o_default_style'].'/style.css" />';
}

//
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion style/Sunrise/header.php → themes/Sunrise/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<?php
// Allow childs
load_css();
include ('style/'.$luna_config['o_default_style'].'/style.php');
include ('themes/'.$luna_config['o_default_style'].'/style.php');

if (!defined('FORUM_ALLOW_INDEX'))
echo '<meta name="ROBOTS" content="NOINDEX, FOLLOW" />'."\n";
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="stylesheet" type="text/css" href="style/Sunrise/style.css" />
<link rel="stylesheet" type="text/css" href="themes/Sunrise/style.css" />
<link rel="stylesheet" type="text/css" href="include/css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" href="include/css/font-awesome.css" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.

0 comments on commit b23e01c

Please sign in to comment.