Skip to content

Commit

Permalink
Renamed static/' to theme/' to better fit the purpose and not to co…
Browse files Browse the repository at this point in the history
…nfuse people.
  • Loading branch information
phistep committed Aug 27, 2012
1 parent c2c8669 commit a8ccbfa
Show file tree
Hide file tree
Showing 18 changed files with 29 additions and 29 deletions.
8 changes: 4 additions & 4 deletions admin/index.php
Expand Up @@ -7,12 +7,12 @@

if(isset($_GET['new'])){
$type = 'new';
require(BASE_PATH.'static/templates/new-edit.php');
require(BASE_PATH.'theme/templates/new-edit.php');
}
else if(preg_match('/^\d\d\d\d-\d\d-\d\d_\d\d-\d\d$/', $_GET['edit'])){
$type = 'edit';
$post = post_details(BASE_PATH."posts/".$_GET['edit'].".md");
require(BASE_PATH.'/static/templates/new-edit.php');
require(BASE_PATH.'/theme/templates/new-edit.php');
}
else if(preg_match('/^\d\d\d\d-\d\d-\d\d_\d\d-\d\d$/', $_GET['delete'])){
if(isset($_GET['really'])){
Expand All @@ -24,10 +24,10 @@
}
}
else
require(BASE_PATH.'static/templates/really.php');
require(BASE_PATH.'theme/templates/really.php');
}
else{
require(BASE_PATH.'static/templates/admin.php');
require(BASE_PATH.'theme/templates/admin.php');
}
}
if('POST' == $_SERVER['REQUEST_METHOD']){
Expand Down
2 changes: 1 addition & 1 deletion core/functions/functions.php
Expand Up @@ -86,7 +86,7 @@ function to_url($string){

function alert($alert_message, $alert_type, $alert_return_url = BASE_URL, $alert_delay = DEFAULT_ALERT_DELAY){
foreach(glob(BASE_PATH."plugins/*/php_functions-alert.php") as $filename){include $filename;}
include(BASE_PATH.'/static/templates/alert.php');
include(BASE_PATH.'/theme/templates/alert.php');
exit();
}
?>
8 changes: 4 additions & 4 deletions index.php
Expand Up @@ -85,7 +85,7 @@ function SpeedTest(){

foreach(glob(BASE_PATH."plugins/*/php_main-before-include-header.php") as $pluginfilename){include $pluginfilename;}

include(BASE_PATH.'static/templates/header.php');
include(BASE_PATH.'theme/templates/header.php');

if($files)
foreach($files as $filename){
Expand All @@ -101,13 +101,13 @@ function SpeedTest(){

foreach(glob(BASE_PATH."plugins/*/php_main-post-before-include.php") as $pluginfilename){include $pluginfilename;}

include(BASE_PATH.'static/templates/post.php');
include(BASE_PATH.'theme/templates/post.php');
}
}
else
include(BASE_PATH.'static/templates/no-results.php');
include(BASE_PATH.'theme/templates/no-results.php');

include(BASE_PATH.'static/templates/footer.php');
include(BASE_PATH.'theme/templates/footer.php');

if(DEV_MODE){
echo "<!-- Execution Time: ".SpeedTest()."s -->";
Expand Down
4 changes: 2 additions & 2 deletions install/index.php
Expand Up @@ -18,8 +18,8 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title><?php echo POWERED_BY; ?></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<link rel="stylesheet" type="text/css" href="../static/css/style.css" media="all and (min-width: 840px)">
<link rel="stylesheet" type="text/css" href="../static/css/mobile.css" media="only screen and (max-width: 839px)">
<link rel="stylesheet" type="text/css" href="../theme/css/style.css" media="all and (min-width: 840px)">
<link rel="stylesheet" type="text/css" href="../theme/css/mobile.css" media="only screen and (max-width: 839px)">
<link href='http://fonts.googleapis.com/css?family=Average' rel='stylesheet' type='text/css'>
<style>
.progressbar.outer{
Expand Down
14 changes: 7 additions & 7 deletions plugins/README.md
Expand Up @@ -49,8 +49,8 @@ I would like it to keep all plugins in the [mdbl0g Plugin Directory](https://git

## List of available hook points
* `php_main-after-type-selection` - Hooks into `index.php` after the conditionals which select the `$type` of the query and the `$files` that get rendered. This is the place to go if you want to mod these.
* `php_main-before-include-header` - Hooks into `index.php` after the `$DATA` has been set and before the `static/templates/header.php` is included.
* `php_main-post-before-include` - Hooks into the `index.php` before the `static/templates/post.php` gets included, so it enables you to modify the `$DATA[]` of the post before it gets rendered.
* `php_main-before-include-header` - Hooks into `index.php` after the `$DATA` has been set and before the `theme/templates/header.php` is included.
* `php_main-post-before-include` - Hooks into the `index.php` before the `theme/templates/post.php` gets included, so it enables you to modify the `$DATA[]` of the post before it gets rendered.
* `php_main-bottom-dev_mode` - Hooks the `if(DEV_MODE){}` conditional at the end of `index.php` so you can display debug information. Consider wrapping it up in html comments (`<!-- foobar -->`).
* `php_main-post-before-set-data` - Hooks into the `index.php` before the `$DATA[]` array is filled, markdown text is rendered, etc.
* `php_functions-to_html-md` - Hooks into the `core/functions/functions.php to_html()` function, before the conversion, `$markdown` is available for modification.
Expand All @@ -69,13 +69,13 @@ I would like it to keep all plugins in the [mdbl0g Plugin Directory](https://git
* `php_admin-before-write-post` - Hooks into the `admin.index.php` and lets you modify the `$filecontent` directly before it gets written. `$_POST[]` is available. You can use this to to modify the file format and add extensions to it. Do checks for form fields to be non-empty if they are required (not recommended!) and throw suitable `alert();`s with predefined strings (so they are localized) like `$STR["alert_new_error_fields"]`. When using `php_admin*` hooks please read the section about security!


* `html_head-top` - Hooks into the very top of the `<head>` element in `static/templates/header.php` before all other tags. This enables you to load recourses e.g. frameworks that are taken advantage of by other plugins and thus have to be strictly included _before_ the all other resources.
* `html_head` - Hooks into the `<head>` element in `static/templates/header.php` after all other tags to load assets and overwrite previously loaded files.
* `html_head-top` - Hooks into the very top of the `<head>` element in `theme/templates/header.php` before all other tags. This enables you to load recourses e.g. frameworks that are taken advantage of by other plugins and thus have to be strictly included _before_ the all other resources.
* `html_head` - Hooks into the `<head>` element in `theme/templates/header.php` after all other tags to load assets and overwrite previously loaded files.
* `html_aside` - Hooks in the end of the `<aside>` element. Used to display, widgets etc.
* `html_aside-list` - Hooks into the `<aside>` but in a list element. May not be supported by all themes. The corresponding `<li> </li>` are already wrapped around.
* `html_post-info` - Hooks into the info section of the post, after the publishing date and the admin links. Use it to add custom information
* `html_post-bottom` - Hooks in at the end of the post element in `static/templates/post.php` to add html after the post. Add links or other short information here. For very long content use `html_post-bottom-last` so it won't interfere with other plugins right after the post content.
* `html_post-bottom-last` - Hooks in at the end of the post element in `static/templates/post.php` to add html after the post. In contradiction to`html_post-bottom` it is the very last hook point in the post so its suitable for long content like a comments section.
* `html_post-bottom` - Hooks in at the end of the post element in `theme/templates/post.php` to add html after the post. Add links or other short information here. For very long content use `html_post-bottom-last` so it won't interfere with other plugins right after the post content.
* `html_post-bottom-last` - Hooks in at the end of the post element in `theme/templates/post.php` to add html after the post. In contradiction to`html_post-bottom` it is the very last hook point in the post so its suitable for long content like a comments section.
* `html_footer-bottom` - Hooks in right before `</body>`. It's purpose is to be home to javascript code that need to parse the whole `<body>`.
* `html_admin` - Hooks into the admin interface and lets you present options/links/information etc. to the admin. Headline and style should be provided by the theme, just put html to present the actual user interface here.
* `html_admin-new-edit-after-textarea` - Hooks in the input form of the `static/templates/new-edit.php` and lets you add custom form fields after the `content` field.
* `html_admin-new-edit-after-textarea` - Hooks in the input form of the `theme/templates/new-edit.php` and lets you add custom form fields after the `content` field.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions static/templates/admin.php → theme/templates/admin.php
Expand Up @@ -3,8 +3,8 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<link rel="stylesheet" type="text/css" href="<?php echo BASE_URL; ?>static/css/style.css" media="all and (min-width: 840px)">
<link rel="stylesheet" type="text/css" href="<?php echo BASE_URL ?>static/css/mobile.css" media="only screen and (max-width: 839px)">
<link rel="stylesheet" type="text/css" href="<?php echo BASE_URL; ?>theme/css/style.css" media="all and (min-width: 840px)">
<link rel="stylesheet" type="text/css" href="<?php echo BASE_URL ?>theme/css/mobile.css" media="only screen and (max-width: 839px)">
<link href='http://fonts.googleapis.com/css?family=Average' rel='stylesheet' type='text/css'>
<title>Admin Interface <?php echo BLOG_TITLE; ?></title>
</head>
Expand Down
2 changes: 1 addition & 1 deletion static/templates/alert.php → theme/templates/alert.php
Expand Up @@ -3,7 +3,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<link rel="stylesheet" type="text/css" href="<?php echo BASE_URL; ?>static/css/style.css" media="all">
<link rel="stylesheet" type="text/css" href="<?php echo BASE_URL; ?>theme/css/style.css" media="all">
<title><?php echo BLOG_TITLE; ?></title>

<!-- Refresh -->
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions static/templates/header.php → theme/templates/header.php
Expand Up @@ -7,8 +7,8 @@
<link rel="alternate" type="application/rss+xml" title="<?php echo BLOG_TITLE; ?> Feed" href="<?php echo $DATA['rssLink']; ?>">
<title><?php echo BLOG_TITLE; ?></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<link rel="stylesheet" type="text/css" href="<?php echo BASE_URL; ?>static/css/style.css" media="all and (min-width: 610px)">
<link rel="stylesheet" type="text/css" href="<?php echo BASE_URL; ?>static/css/mobile.css" media="only screen and (max-width: 609px)">
<link rel="stylesheet" type="text/css" href="<?php echo BASE_URL; ?>theme/css/style.css" media="all and (min-width: 610px)">
<link rel="stylesheet" type="text/css" href="<?php echo BASE_URL; ?>theme/css/mobile.css" media="only screen and (max-width: 609px)">
<?php foreach(glob(BASE_PATH."plugins/*/html_head.php") as $filename){include $filename;} ?>
</head>
<body>
Expand Down
10 changes: 5 additions & 5 deletions static/templates/new-edit.php → theme/templates/new-edit.php
Expand Up @@ -4,12 +4,12 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title><?php echo BLOG_TITLE; ?></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<link rel="stylesheet" type="text/css" href="<?php echo BASE_URL; ?>static/css/style.css" media="all and (min-width: 840px)">
<link rel="stylesheet" type="text/css" href="<?php echo BASE_URL ?>static/css/mobile.css" media="only screen and (max-width: 839px)">
<link rel="stylesheet" type="text/css" href="<?php echo BASE_URL; ?>theme/css/style.css" media="all and (min-width: 840px)">
<link rel="stylesheet" type="text/css" href="<?php echo BASE_URL ?>theme/css/mobile.css" media="only screen and (max-width: 839px)">
<link href='http://fonts.googleapis.com/css?family=Average' rel='stylesheet' type='text/css'>
<script type="text/javascript" src="<?php echo BASE_URL; ?>static/js/showdown.js"></script>
<script type="text/javascript" src="<?php echo BASE_URL; ?>static/js/showdown-gui.js"></script>
<script type="text/javascript" src="<?php echo BASE_URL; ?>static/js/php-date-format.js"></script>
<script type="text/javascript" src="<?php echo BASE_URL; ?>theme/js/showdown.js"></script>
<script type="text/javascript" src="<?php echo BASE_URL; ?>theme/js/showdown-gui.js"></script>
<script type="text/javascript" src="<?php echo BASE_URL; ?>theme/js/php-date-format.js"></script>
</head>
<body>
<div class="newpost-wrapper">
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion static/templates/really.php → theme/templates/really.php
Expand Up @@ -3,7 +3,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<link rel="stylesheet" type="text/css" href="<?php echo BASE_URL; ?>static/css/style.css" media="all">
<link rel="stylesheet" type="text/css" href="<?php echo BASE_URL; ?>theme/css/style.css" media="all">
<title><?php echo BLOG_TITLE; ?></title>
</head>
<body>
Expand Down

0 comments on commit a8ccbfa

Please sign in to comment.