Browse Source

style edits

pull/2/head
Mark (ilosuna) 12 years ago
parent
commit
413e193cee
10 changed files with 67 additions and 66 deletions
  1. BIN
      cms/data/content.sqlite
  2. BIN
      cms/data/entries.sqlite
  3. BIN
      cms/data/userdata.sqlite
  4. +24
    -31
      cms/includes/classes/News.class.php
  5. +1
    -1
      cms/lang/english.page.lang.php
  6. +1
    -2
      cms/templates/default.tpl
  7. +16
    -10
      cms/templates/subtemplates/comments.inc.tpl
  8. +7
    -4
      cms/templates/subtemplates/news.inc.tpl
  9. +4
    -7
      cms/templates/subtemplates/overview.inc.tpl
  10. +14
    -11
      static/css/style.css

BIN
cms/data/content.sqlite View File


BIN
cms/data/entries.sqlite View File


BIN
cms/data/userdata.sqlite View File


+ 24
- 31
cms/includes/classes/News.class.php View File

@ -62,12 +62,12 @@ class News
if($this->category) if($this->category)
{ {
$dbr = Database::$content->prepare("SELECT id, page, title, page_title, category, type, time, teaser_headline, teaser, teaser_formatting, teaser_img, link_name, headline, content, content_formatting FROM ".Database::$db_settings['pages_table']." WHERE include_page=:include_page AND time<=:time AND category=:category AND status!=0 ORDER BY time DESC LIMIT ".(($this->current_page-1)*$this->news_per_page).", ".$this->news_per_page);
$dbr = Database::$content->prepare("SELECT id, page, title, page_title, category, type, time, teaser_headline, teaser, teaser_img, link_name, headline, content FROM ".Database::$db_settings['pages_table']." WHERE include_page=:include_page AND time<=:time AND category=:category AND status!=0 ORDER BY time DESC LIMIT ".(($this->current_page-1)*$this->news_per_page).", ".$this->news_per_page);
$dbr->bindParam(':category', $this->category, PDO::PARAM_STR); $dbr->bindParam(':category', $this->category, PDO::PARAM_STR);
} }
else else
{ {
$dbr = Database::$content->prepare("SELECT id, page, title, page_title, category, type, time, teaser_headline, teaser, teaser_formatting, teaser_img, link_name, headline, content, content_formatting FROM ".Database::$db_settings['pages_table']." WHERE include_page=:include_page AND time<=:time AND status!=0 ORDER BY time DESC LIMIT ".(($this->current_page-1)*$this->news_per_page).", ".$this->news_per_page);
$dbr = Database::$content->prepare("SELECT id, page, title, page_title, category, type, time, teaser_headline, teaser, teaser_img, link_name, headline, content FROM ".Database::$db_settings['pages_table']." WHERE include_page=:include_page AND time<=:time AND status!=0 ORDER BY time DESC LIMIT ".(($this->current_page-1)*$this->news_per_page).", ".$this->news_per_page);
} }
$dbr->bindParam(':include_page', $this->id, PDO::PARAM_INT); $dbr->bindParam(':include_page', $this->id, PDO::PARAM_INT);
$dbr->bindParam(':time', $this->current_time, PDO::PARAM_INT); $dbr->bindParam(':time', $this->current_time, PDO::PARAM_INT);
@ -125,26 +125,19 @@ class News
} }
if($news_data['teaser']!='') if($news_data['teaser']!='')
{ {
if($news_data['teaser_formatting']==1)
{
$news[$i]['teaser'] = auto_html($news_data['teaser']);
}
else
{
$news[$i]['teaser'] = $news_data['teaser'];
}
$news[$i]['teaser'] = $news_data['teaser'];
$news[$i]['more'] = true; $news[$i]['more'] = true;
} }
else else
{ {
if($news_data['content_formatting']==1)
{
$news[$i]['teaser'] = auto_html($news_data['content']);
}
else
{
#if($news_data['content_formatting']==1)
# {
# $news[$i]['teaser'] = auto_html($news_data['content']);
# }
#else
# {
$news[$i]['teaser'] = $news_data['content']; $news[$i]['teaser'] = $news_data['content'];
}
# }
$news[$i]['teaser'] = parse_special_tags($news[$i]['teaser'], $news_data['page']); $news[$i]['teaser'] = parse_special_tags($news[$i]['teaser'], $news_data['page']);
$news[$i]['more'] = false; $news[$i]['more'] = false;
} }
@ -178,7 +171,7 @@ class News
public function get_feed($rss_maximum_items=20, $fullfeed=false) public function get_feed($rss_maximum_items=20, $fullfeed=false)
{ {
$dbr = Database::$content->prepare("SELECT id, page, type, category, title, teaser, teaser_formatting, teaser_img, headline, content, content_formatting, time, last_modified FROM ".Database::$db_settings['pages_table']." WHERE include_page=:include_page AND time<=:time AND status!=0 ORDER BY time DESC LIMIT ".$rss_maximum_items);
$dbr = Database::$content->prepare("SELECT id, page, type, category, title, teaser, teaser_img, headline, content, time, last_modified FROM ".Database::$db_settings['pages_table']." WHERE include_page=:include_page AND time<=:time AND status!=0 ORDER BY time DESC LIMIT ".$rss_maximum_items);
$dbr->bindParam(':include_page', $this->id, PDO::PARAM_INT); $dbr->bindParam(':include_page', $this->id, PDO::PARAM_INT);
$dbr->bindParam(':time', $this->current_time, PDO::PARAM_INT); $dbr->bindParam(':time', $this->current_time, PDO::PARAM_INT);
$dbr->execute(); $dbr->execute();
@ -195,26 +188,26 @@ class News
if($fullfeed || $rss_data['teaser']=='') if($fullfeed || $rss_data['teaser']=='')
{ {
if($rss_data['content_formatting']==1)
{
$rss_items[$i]['content'] = auto_html($rss_data['content']);
}
else
{
#if($rss_data['content_formatting']==1)
# {
# $rss_items[$i]['content'] = auto_html($rss_data['content']);
# }
#else
# {
$rss_items[$i]['content'] = $rss_data['content']; $rss_items[$i]['content'] = $rss_data['content'];
}
# }
$rss_items[$i]['content'] = parse_special_tags($rss_items[$i]['content'], $parent_page=$rss_data['page'], $rss=true); $rss_items[$i]['content'] = parse_special_tags($rss_items[$i]['content'], $parent_page=$rss_data['page'], $rss=true);
} }
else else
{ {
if($rss_data['teaser_formatting']==1)
{
#if($rss_data['teaser_formatting']==1)
# {
$rss_items[$i]['content'] = auto_html($rss_data['teaser']); $rss_items[$i]['content'] = auto_html($rss_data['teaser']);
}
else
{
# }
#else
# {
$rss_items[$i]['content'] = $rss_data['teaser']; $rss_items[$i]['content'] = $rss_data['teaser'];
}
# }
} }
if(!$fullfeed && $rss_data['teaser_img']) if(!$fullfeed && $rss_data['teaser_img'])


+ 1
- 1
cms/lang/english.page.lang.php View File

@ -68,7 +68,7 @@ $lang['comment_delete_link'] = 'delete';
$lang['comment_delete_confirm'] = 'Do you really want to delete this comment?'; $lang['comment_delete_confirm'] = 'Do you really want to delete this comment?';
$lang['comment_edit_link'] = 'edit'; $lang['comment_edit_link'] = 'edit';
$lang['comment_note_email'] = '(optional)'; $lang['comment_note_email'] = '(optional)';
$lang['comments_open'] = 'open';
$lang['comments_open'] = 'open comments';
$lang['comments_close'] = 'Close comments'; $lang['comments_close'] = 'Close comments';
$lang['comment_notification_subject'] = 'Comment to [page]'; $lang['comment_notification_subject'] = 'Comment to [page]';
$lang['comment_notification_message'] = "[name]\n\n[comment]\n\n[link]"; $lang['comment_notification_message'] = "[name]\n\n[comment]\n\n[link]";


+ 1
- 2
cms/templates/default.tpl View File

@ -91,7 +91,7 @@
<?php if($gcb_1 && isset($gcb[$gcb_1])): ?> <?php if($gcb_1 && isset($gcb[$gcb_1])): ?>
<?php echo $gcb[$gcb_1]; ?> <?php echo $gcb[$gcb_1]; ?>
<?php else: ?> <?php else: ?>
<p>&copy; 2013 <?php echo $settings['author']; ?><?php if($type!='news' && $type!='search' && $type!='notes'): ?><br /><?php echo $lang['page_last_modified']; ?><?php endif; ?><br />Powered by <a href="http://phpsqlitecms.net">phpSQLiteCMS</a></p>
<p>&copy; <?php echo date("Y"); ?> <?php echo $settings['author']; ?><?php if($type!='news' && $type!='search' && $type!='notes'): ?><br /><?php echo $lang['page_last_modified']; ?><?php endif; ?><br />Powered by <a href="http://phpsqlitecms.net">phpSQLiteCMS</a></p>
<?php endif; ?> <?php endif; ?>
</div> </div>
</footer> </footer>
@ -112,4 +112,3 @@
<?php endif; ?> <?php endif; ?>
</body> </body>
</html> </html>

+ 16
- 10
cms/templates/subtemplates/comments.inc.tpl View File

@ -1,5 +1,14 @@
<div id="comments" class="panel panel-default"> <div id="comments" class="panel panel-default">
<div class="panel-heading"><h3 class="panel-title"><?php echo $lang['comment_headline']; ?> (<?php echo $total_comments; ?>)</h3></div>
<div class="panel-heading">
<?php if($admin): ?>
<?php if(empty($comments_closed)): ?>
<a class="btn btn-danger btn-xs pull-right" href="<?php echo BASE_URL . PAGE; ?>,openclose" ><span class="glyphicon glyphicon-lock"></span> <?php echo $lang['comments_close']; ?></a>
<?php else: ?>
<a class="btn btn-success btn-xs pull-right" href="<?php echo BASE_URL . PAGE; ?>,openclose"><span class="glyphicon glyphicon-lock"></span> <?php echo $lang['comments_open']; ?></a>
<?php endif; ?>
<?php endif; ?>
<h3 class="panel-title"><?php echo $lang['comment_headline']; ?> <span class="badge"><?php echo $total_comments; ?></span></h3>
</div>
<div class="panel-body"> <div class="panel-body">
<?php if(isset($edit_data)): ?> <?php if(isset($edit_data)): ?>
@ -8,12 +17,12 @@
<input type="hidden" name="current_page" value="<?php echo $edit_data['current_page']; ?>" /> <input type="hidden" name="current_page" value="<?php echo $edit_data['current_page']; ?>" />
<input type="hidden" name="id" value="<?php echo $edit_data['id']; ?>" /> <input type="hidden" name="id" value="<?php echo $edit_data['id']; ?>" />
<p><label for="comment_text"><strong><?php echo $lang['comment_edit_text']; ?></strong></label><br /> <p><label for="comment_text"><strong><?php echo $lang['comment_edit_text']; ?></strong></label><br />
<textarea id="comment_text" name="comment_text" cols="63" rows="10"><?php echo $edit_data['comment']; ?></textarea></p>
<textarea id="comment_text" class="form-control" name="comment_text" cols="63" rows="10"><?php echo $edit_data['comment']; ?></textarea></p>
<p class="userdata"><label for="name"><?php echo $lang['comment_input_name']; ?></label><br /> <p class="userdata"><label for="name"><?php echo $lang['comment_input_name']; ?></label><br />
<input type="text" id="name" name="name" value="<?php echo $edit_data['name']; ?>" size="30" /></p>
<input type="text" id="name" class="form-control" name="name" value="<?php echo $edit_data['name']; ?>" size="30" /></p>
<p class="userdata"><label for="email_hp"><?php echo $lang['comment_input_email_hp']; ?></label><br /> <p class="userdata"><label for="email_hp"><?php echo $lang['comment_input_email_hp']; ?></label><br />
<input type="text" id="email_hp" name="email_hp" value="<?php echo $edit_data['email_hp']; ?>" size="30" /></p>
<p><input name="edit_save" type="submit" value="<?php echo $lang['comment_input_submit']; ?>" /></p>
<input type="text" id="email_hp" class="form-control" name="email_hp" value="<?php echo $edit_data['email_hp']; ?>" size="30" /></p>
<p><input class="btn btn-primary" name="edit_save" type="submit" value="<?php echo $lang['comment_input_submit']; ?>" /></p>
</div> </div>
</form> </form>
@ -73,7 +82,7 @@
<?php endif; ?> <?php endif; ?>
<?php if(empty($preview) && empty($errors)): ?> <?php if(empty($preview) && empty($errors)): ?>
<p><button type="button" class="btn btn-default" data-toggle="collapse" data-target="#commentformwrapper"><span class="glyphicon glyphicon-plus"></span> <?php echo $lang['comments_add_comment']; ?></button></p>
<p><button type="button" class="btn btn-success" data-toggle="collapse" data-target="#commentformwrapper"><span class="glyphicon glyphicon-plus"></span> <?php echo $lang['comments_add_comment']; ?></button></p>
<?php endif; ?> <?php endif; ?>
<div id="commentformwrapper" class="collapse<?php if(isset($preview) || $errors): ?> in<?php endif; ?>"> <div id="commentformwrapper" class="collapse<?php if(isset($preview) || $errors): ?> in<?php endif; ?>">
@ -129,11 +138,8 @@
<?php endif; ?> <?php endif; ?>
<?php if(isset($comments_closed)): ?> <?php if(isset($comments_closed)): ?>
<p id="closed"><em><?php echo $lang['comments_closed']; ?></em><?php if($admin): ?> &nbsp;<a href="<?php echo BASE_URL . PAGE; ?>,openclose" class="opencomments"><?php echo $lang['comments_open']; ?></a><?php endif; ?></p>
<p><em><span class="glyphicon glyphicon-lock"></span> <?php echo $lang['comments_closed']; ?></em></p>
<?php endif; ?> <?php endif; ?>
<?php if($admin && empty($comments_closed)): ?>
<p id="close"><a href="<?php echo BASE_URL . PAGE; ?>,openclose" class="closecomments"><?php echo $lang['comments_close']; ?></a></p>
<?php endif; ?>
</div> </div>
</div> </div>

+ 7
- 4
cms/templates/subtemplates/news.inc.tpl View File

@ -1,7 +1,7 @@
<?php if($news): ?> <?php if($news): ?>
<?php foreach($news as $item): ?> <?php foreach($news as $item): ?>
<div class="news-teaser">
<div class="news">
<p class="time"><?php echo $lang['news_time'][$item['id']]; ?></p> <p class="time"><?php echo $lang['news_time'][$item['id']]; ?></p>
@ -15,9 +15,12 @@
<?php if(isset($item['teaser'])) echo $item['teaser']; ?>
<p class="news-link"><a href="<?php echo BASE_URL.$item['page']; ?>"><?php echo $item['link_name']; ?></a>
<?php if(isset($item['comments'])): ?><a href="<?php echo BASE_URL.$item['page']; ?>#comments" class="comments">(<?php echo $lang['number_of_comments'][$item['id']]; ?>)</a><?php endif; ?></p>
<?php if(isset($item['teaser'])): ?>
<p><?php echo $item['teaser']; ?></p>
<?php endif; ?>
<p><a class="btn btn-primary" href="<?php echo BASE_URL.$item['page']; ?>"><?php echo $item['link_name']; ?></a>
<?php if(isset($item['comments'])): ?><a class="btn btn-default" href="<?php echo BASE_URL.$item['page']; ?>#comments" class="comments"><?php echo $lang['number_of_comments'][$item['id']]; ?></a><?php endif; ?></p>
</div> </div>
</div> </div>


+ 4
- 7
cms/templates/subtemplates/overview.inc.tpl View File

@ -6,20 +6,17 @@
<div class="col-md-6"> <div class="col-md-6">
<?php if(isset($included_pages[$n])): ?> <?php if(isset($included_pages[$n])): ?>
<div class="overview">
<h2 class="teaser"><a href="<?php echo BASE_URL.$included_pages[$n]['page']; ?>"><?php echo $included_pages[$n]['teaser_headline']; ?></a></h2> <h2 class="teaser"><a href="<?php echo BASE_URL.$included_pages[$n]['page']; ?>"><?php echo $included_pages[$n]['teaser_headline']; ?></a></h2>
<div class="media"> <div class="media">
<?php if($included_pages[$n]['teaser_img']): ?> <?php if($included_pages[$n]['teaser_img']): ?>
<a class="thumbnail thumbnail-left" href="<?php echo BASE_URL.$included_pages[$n]['page']; ?>"><img src="<?php echo BASE_URL.MEDIA_DIR.$included_pages[$n]['teaser_img']; ?>" alt="<?php echo $included_pages[$n]['teaser_headline']; ?>" width="<?php echo $included_pages[$n]['teaser_img_width']; ?>" height="<?php echo $included_pages[$n]['teaser_img_height']; ?>" /></a> <a class="thumbnail thumbnail-left" href="<?php echo BASE_URL.$included_pages[$n]['page']; ?>"><img src="<?php echo BASE_URL.MEDIA_DIR.$included_pages[$n]['teaser_img']; ?>" alt="<?php echo $included_pages[$n]['teaser_headline']; ?>" width="<?php echo $included_pages[$n]['teaser_img_width']; ?>" height="<?php echo $included_pages[$n]['teaser_img_height']; ?>" /></a>
<?php endif; ?> <?php endif; ?>
<p class="teaser"><?php echo $included_pages[$n]['teaser']; ?><br />
<a href="<?php echo BASE_URL.$included_pages[$n]['page']; ?>"><?php echo $included_pages[$n]['link_name']; ?></a></p>
<p class="teaser"><?php echo $included_pages[$n]['teaser']; ?></p>
<p><a class="btn btn-primary" href="<?php echo BASE_URL.$included_pages[$n]['page']; ?>"><?php echo $included_pages[$n]['link_name']; ?></a></p>
<?php endif; ?> <?php endif; ?>
</div> </div>
</div>
</div> </div>
<?php endfor; ?> <?php endfor; ?>


+ 14
- 11
static/css/style.css View File

@ -1,5 +1,5 @@
body { margin-bottom: 20px; }
body.admin { padding-top: 50px; padding-bottom: 20px;margin-bottom: 20px; }
body { margin-bottom:30px; }
body.admin { padding-top:50px; padding-bottom:20px; margin-bottom: 20px; }
#logo { margin:30px 0 15px -20px; font-family:Patua One; font-size:48px; font-weight:bold; transform:rotate(-6deg); -moz-transform:rotate(-6deg); -webkit-transform:rotate(-6deg); } #logo { margin:30px 0 15px -20px; font-family:Patua One; font-size:48px; font-weight:bold; transform:rotate(-6deg); -moz-transform:rotate(-6deg); -webkit-transform:rotate(-6deg); }
#logo a { padding:5px; color:#333; text-decoration:none; border:5px solid #333; border-radius:10px; } #logo a { padding:5px; color:#333; text-decoration:none; border:5px solid #333; border-radius:10px; }
@ -29,15 +29,6 @@ header ul { padding:20px 0 0 0; }
.thumbnail img { width:100%; } .thumbnail img { width:100%; }
a.thumbnail:hover { opacity:0.9; } a.thumbnail:hover { opacity:0.9; }
.news-teaser { margin-bottom:30px; }
.news-teaser:first-child { padding-top:20px; }
.news-teaser h2 { font-size:26px; margin:0; padding:0; }
.news-teaser p { margin:0; padding:0; }
.news-teaser .time { color:#808080; font-size:13px; margin:0 0 7px 0; padding:0; }
.simple-news h2 { margin:10px 0; }
.simple-news-delete { background:#f2dede; }
.caption + p { margin-top:20px; } .caption + p { margin-top:20px; }
.topspace { margin-top:10px; } .topspace { margin-top:10px; }
@ -53,6 +44,18 @@ a.thumbnail:hover { opacity:0.9; }
.alert h3 { margin:0; } .alert h3 { margin:0; }
.alert-danger h3 { color:#b94a48; } .alert-danger h3 { color:#b94a48; }
.overview h2 a { color:#333; text-decoration:none; }
.news { margin-bottom:30px; }
.news:first-child { margin-top:20px; }
.news h2 { margin:0; padding:0; }
.news h2 a { color:#333; text-decoration:none; }
.news .time { color:#808080; font-size:13px; margin:0 0 7px 0; padding:0; }
.simple-news h2 { margin:10px 0; }
.simple-news h2 a { color:#333; text-decoration:none; }
.simple-news-delete { background:#f2dede; }
#comments { margin-top:50px; } #comments { margin-top:50px; }
#commentformwrapper { padding-top:20px; } #commentformwrapper { padding-top:20px; }
h3#preview { color:#ca9853; margin-bottom:10px;} h3#preview { color:#ca9853; margin-bottom:10px;}


Loading…
Cancel
Save