Browse Source

Change config folder

Change config folder for later developments. A few style improvements.
pull/31/merge
Danang Probo Sayekti 12 years ago
parent
commit
5358f21d50
23 changed files with 208 additions and 28 deletions
  1. +1
    -1
      admin/action/create_page.php
  2. +1
    -1
      admin/action/create_post.php
  3. +1
    -1
      admin/action/delete_page.php
  4. +1
    -1
      admin/action/delete_post.php
  5. +1
    -1
      admin/action/edit_bio.php
  6. +2
    -2
      admin/action/edit_page.php
  7. +2
    -2
      admin/action/edit_post.php
  8. +1
    -1
      admin/action/login.php
  9. +7
    -2
      admin/editor/css/editor.css
  10. +1
    -1
      admin/includes/page_list.php
  11. +1
    -1
      admin/includes/post_list.php
  12. +1
    -1
      admin/includes/user.php
  13. +1
    -1
      admin/index.php
  14. +61
    -5
      admin/resources/style.css
  15. +0
    -0
      config/.htaccess
  16. +0
    -0
      config/config.ini
  17. +0
    -0
      config/users/username.ini.example
  18. +1
    -1
      system/htmly.php
  19. +1
    -1
      system/includes/functions.php
  20. +60
    -3
      themes/clean/css/style.css
  21. +1
    -1
      themes/clean/profile.html.php
  22. +62
    -0
      themes/default/css/style.css
  23. +1
    -1
      themes/default/profile.html.php

+ 1
- 1
admin/action/create_page.php View File

@ -2,7 +2,7 @@
// Change this to your timezone
date_default_timezone_set('Asia/Jakarta');
require '../../system/includes/dispatch.php';
config('source', '../../admin/config.ini');
config('source', '../../config/config.ini');
include '../includes/session.php';
if(isset($_POST['submit'])) {


+ 1
- 1
admin/action/create_post.php View File

@ -2,7 +2,7 @@
// Change this to your timezone
date_default_timezone_set('Asia/Jakarta');
require '../../system/includes/dispatch.php';
config('source', '../../admin/config.ini');
config('source', '../../config/config.ini');
include '../includes/session.php';
if(isset($_POST['submit'])) {


+ 1
- 1
admin/action/delete_page.php View File

@ -2,7 +2,7 @@
// Change this to your timezone
date_default_timezone_set('Asia/Jakarta');
require '../../system/includes/dispatch.php';
config('source', '../../admin/config.ini');
config('source', '../../config/config.ini');
include '../includes/session.php';
if(isset($_GET['url'])) {


+ 1
- 1
admin/action/delete_post.php View File

@ -2,7 +2,7 @@
// Change this to your timezone
date_default_timezone_set('Asia/Jakarta');
require '../../system/includes/dispatch.php';
config('source', '../../admin/config.ini');
config('source', '../../config/config.ini');
include '../includes/session.php';
if(isset($_GET['url'])) {


+ 1
- 1
admin/action/edit_bio.php View File

@ -2,7 +2,7 @@
// Change this to your timezone
date_default_timezone_set('Asia/Jakarta');
require '../../system/includes/dispatch.php';
config('source', '../../admin/config.ini');
config('source', '../../config/config.ini');
include '../includes/session.php';
if(isset($_SESSION['user'])) {


+ 2
- 2
admin/action/edit_page.php View File

@ -2,7 +2,7 @@
// Change this to your timezone
date_default_timezone_set('Asia/Jakarta');
require '../../system/includes/dispatch.php';
config('source', '../../admin/config.ini');
config('source', '../../config/config.ini');
include '../includes/session.php';
if(isset($_GET['url'])) {
@ -21,7 +21,7 @@
$post_url = rtrim($post_url, ',\.\-');
$post_content = $_POST['content'];
}
if(!empty($post_content)) {
if(!empty($post_url) && !empty($post_content)) {
if(get_magic_quotes_gpc()) {
$post_content = stripslashes($post_content);
}


+ 2
- 2
admin/action/edit_post.php View File

@ -2,7 +2,7 @@
// Change this to your timezone
date_default_timezone_set('Asia/Jakarta');
require '../../system/includes/dispatch.php';
config('source', '../../admin/config.ini');
config('source', '../../config/config.ini');
include '../includes/session.php';
if(isset($_GET['url'])) {
@ -27,7 +27,7 @@
$post_url = rtrim($post_url, ',\.\-');
$post_content = $_POST['content'];
}
if(!empty($post_content)) {
if(!empty($post_tag) && !empty($post_url) && !empty($post_content)) {
if(get_magic_quotes_gpc()) {
$post_content = stripslashes($post_content);
}


+ 1
- 1
admin/action/login.php View File

@ -6,7 +6,7 @@
$user = $_REQUEST['user'];
$pass = $_REQUEST['password'];
$user_file = '../../admin/users/' . $user . '.ini';
$user_file = '../../config/users/' . $user . '.ini';
$user_pass = user('password', $user);
if(file_exists($user_file)) {


+ 7
- 2
admin/editor/css/editor.css View File

@ -9,9 +9,9 @@ blockquote {
}
.wmd-panel{
width: 46%;
width: 44%;
float:left;
padding:2%;
padding-right:20px;
}
.wmd-button-bar {
@ -127,6 +127,11 @@ pre code {
@media all and (max-width: 980px) {
.nav {
width: 100%;
padding: 2%;
}
.wmd-panel, .wmd-preview {
width: 96%;
float:left;


+ 1
- 1
admin/includes/page_list.php View File

@ -1,6 +1,6 @@
<?php
date_default_timezone_set('Asia/Jakarta');
config('source', '../../admin/config.ini');
config('source', '../../config/config.ini');
// Get static page path. Unsorted.
function admin_get_static(){


+ 1
- 1
admin/includes/post_list.php View File

@ -1,7 +1,7 @@
<?php
date_default_timezone_set('Asia/Jakarta');
config('source', '../../admin/config.ini');
config('source', '../../config/config.ini');
// Get blog post with more info about the path. Sorted by filename.
function admin_get_post(){


+ 1
- 1
admin/includes/user.php View File

@ -1,7 +1,7 @@
<?php
function user($key, $user=null) {
$value = '../../admin/users/' . $user . '.ini';
$value = '../../config/users/' . $user . '.ini';
static $_config = array();
if (file_exists($value)) {
$_config = parse_ini_file($value, true);


+ 1
- 1
admin/index.php View File

@ -1,7 +1,7 @@
<?php
date_default_timezone_set('Asia/Jakarta');
require '../system/includes/dispatch.php';
config('source', '../admin/config.ini');
config('source', '../config/config.ini');
include 'includes/session.php';
include 'includes/post_list.php';
include 'includes/page_list.php';


+ 61
- 5
admin/resources/style.css View File

@ -11,6 +11,7 @@ body {
float:left;
position:relative;
width:100%;
padding-bottom: 30px;
}
.wrapper-inner {
@ -20,16 +21,71 @@ body {
.nav {
width: 96%;
padding:2%;
padding:2% 0;
border-bottom: 4px solid #cccccc;
margin-bottom: 30px;
}
/*-------------------------
Link
--------------------------*/
a, a:visited {
outline:none;
text-decoration:none;
}
a:hover{
text-decoration:underline;
}
/*-------------------------
Table
--------------------------*/
table {
border: 1px solid #ccc;
font-size:14px;
border: none;
color:#333333;
border: 1px solid #E3E3E3;
margin: 1em 0;
}
table h2.title {
margin:5px 0;
}
th, td {
padding: 5px 10px;
border: none;
}
th.title {
margin:5px 0;
font-family: Arial,sans-serif;
font-size:18px;
font-weight:normal;
}
td.title {
font-weight:normal;
background-color: #eeeeee;
font-family: Arial,sans-serif;
}
th {
background-color: #eeeeee;
border-bottom: 1px solid #E3E3E3;
border-right: 1px solid #E3E3E3;
font-family: Arial,sans-serif;
font-size:18px;
}
table td {
border: 1px solid #ccc;
background: #ddd;
td {
background-color: #eeeeee;
border: 1px solid #E3E3E3;
border-top: none;
border-left:none;
}
@media all and (max-width: 980px) {


admin/users/.htaccess → config/.htaccess View File


admin/config.ini → config/config.ini View File


admin/users/username.ini.example → config/users/username.ini.example View File


+ 1
- 1
system/htmly.php View File

@ -10,7 +10,7 @@ require 'system/includes/functions.php';
require 'system/includes/opml.php';
// Load the configuration file
config('source', 'admin/config.ini');
config('source', 'config/config.ini');
// The front page of the blog.
// This will match the root url


+ 1
- 1
system/includes/functions.php View File

@ -1135,7 +1135,7 @@ function welcome_page() {
echo <<<EOF
<div style="font-size:20px;text-align:center;padding:50px 20px;">
<h1>Welcome to your new HTMLy-powered blog.</h1>
<p>The next thing you will need to do is creating the first account. Please create <strong><em>YourUsername.ini</em></strong> inside <strong><em>admin/users</em></strong> folder and write down your password there:</p>
<p>The next thing you will need to do is creating the first account. Please create <strong><em>YourUsername.ini</em></strong> inside <strong><em>config/users</em></strong> folder and write down your password there:</p>
<pre><code>password = YourPassword</code></pre>
<p>Login to your blog admin panel at <strong><em>www.example.com/admin</em></strong> to creating your first post.</p>
<p>This welcome message will disappear after your first post published.</p>


+ 60
- 3
themes/clean/css/style.css View File

@ -208,6 +208,14 @@ pre {
background: #F1F1FF;
}
code {
color: #333333;
font-family: Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif;
font-size: 15px;
padding: 5px 10px;
background: #F1F1FF;
}
pre code {
color: #333333;
display: block;
@ -276,9 +284,8 @@ blockquote:after {
vertical-align: -0.45em;
}
blockquote {
font-style: italic;
margin: 1em 0 1em 1em;
blockquote p {
display:inline;
}
.credit {
@ -287,6 +294,56 @@ blockquote {
padding: 10px 0;
}
/*-------------------------
Table
--------------------------*/
table {
font-size:12px;
border: none;
width:100%;
color:#333333;
border: 1px solid #E3E3E3;
margin: 1em 0;
}
table h2.title {
margin:5px 0;
}
th, td {
padding: 5px 10px;
border: none;
}
th.title {
margin:5px 0;
font-family: 'Open Sans Condensed', sans-serif;
font-size:18px;
font-weight:normal;
}
td.title {
font-weight:normal;
background-color: #f6f6f6;
font-family: 'Open Sans Condensed', sans-serif;
}
th {
background-color: #f6f6f6;
border-bottom: 1px solid #E3E3E3;
border-right: 1px solid #E3E3E3;
font-family: 'Open Sans Condensed', sans-serif;
font-size:18px;
}
td {
background-color: #fafafa;
border: 1px solid #E3E3E3;
border-top: none;
border-left:none;
}
/*----------------------------
The left bar
-----------------------------*/


+ 1
- 1
themes/clean/profile.html.php View File

@ -20,7 +20,7 @@
$i++;
?>
<li>
<span><a href="<?php echo $p->url?>"><?php echo $p->title ?></a></span> on <span><?php echo date('d F Y', $p->date)?></span> - Posted in <span><a href="<?php echo $p->tagurl ?>"><?php echo $p->tag ?></a></span>
<span><a href="<?php echo $p->url?>"><?php echo $p->title ?></a></span> on <span><?php echo date('d F Y', $p->date)?></span> - Posted in <span><?php echo $p->tag ?></span>
</li>
<?php endforeach;?>
</ul>


+ 62
- 0
themes/default/css/style.css View File

@ -151,12 +151,24 @@ blockquote {
margin: 1em 0 1em 1em;
}
blockquote p {
display:inline;
}
pre {
margin: 1em 0;
overflow: auto;
background: #F1F1FF;
}
code {
color: #333333;
font-family: Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif;
font-size: 15px;
padding: 5px 10px;
background: #F1F1FF;
}
pre code {
color: #333333;
display: block;
@ -186,6 +198,56 @@ ul li, ol li{
margin: 0.25em 0;
}
/*-------------------------
Table
--------------------------*/
table {
font-size:12px;
border: none;
width:100%;
color:#333333;
border: 1px solid #E3E3E3;
margin: 1em 0;
}
table h2.title {
margin:5px 0;
}
th, td {
padding: 5px 10px;
border: none;
}
th.title {
margin:5px 0;
font-family: 'Open Sans',sans-serif;
font-size:18px;
font-weight:normal;
}
td.title {
font-weight:normal;
background-color: #f6f6f6;
font-family: 'Open Sans',sans-serif;
}
th {
background-color: #f6f6f6;
border-bottom: 1px solid #E3E3E3;
border-right: 1px solid #E3E3E3;
font-family: 'Open Sans',sans-serif;
font-size:18px;
}
td {
background-color: #fafafa;
border: 1px solid #E3E3E3;
border-top: none;
border-left:none;
}
/*-------------------------
Menu
--------------------------*/


+ 1
- 1
themes/default/profile.html.php View File

@ -20,7 +20,7 @@
$i++;
?>
<li>
<span><a href="<?php echo $p->url?>"><?php echo $p->title ?></a></span> on <span><?php echo date('d F Y', $p->date)?></span> - Posted in <span><a href="<?php echo $p->tagurl ?>"><?php echo $p->tag ?></a></span>
<span><a href="<?php echo $p->url?>"><?php echo $p->title ?></a></span> on <span><?php echo date('d F Y', $p->date)?></span> - Posted in <span><?php echo $p->tag ?></span>
</li>
<?php endforeach;?>
</ul>


Loading…
Cancel
Save