Browse Source

Merge pull request #82 from Kanti/master

Bug Fixes on Meta Description and View Counter by @Kanti.
pull/89/head
Danang Probo Sayekti 11 years ago
parent
commit
17974a9e3a
3 changed files with 5 additions and 7 deletions
  1. +2
    -3
      system/admin/views/edit-profile.html.php
  2. +2
    -2
      system/admin/views/user-posts.html.php
  3. +1
    -2
      system/htmly.php

+ 2
- 3
system/admin/views/edit-profile.html.php View File

@ -12,8 +12,8 @@
$oldcontent = remove_html_comments($content); $oldcontent = remove_html_comments($content);
} }
else { else {
$oldtitle = $user;
$oldcontent = 'Just another HTMLy user.';
$oldtitle = $user;
$oldcontent = 'Just another HTMLy user.';
} }
?> ?>
@ -28,7 +28,6 @@
<div class="wmd-panel"> <div class="wmd-panel">
<form method="POST"> <form method="POST">
Title <span class="required">*</span> <br><input type="text" name="title" class="text <?php if (isset($postTitle)) { if (empty($postTitle)) { echo 'error';}} ?>" value="<?php echo $oldtitle?>"/><br><br> Title <span class="required">*</span> <br><input type="text" name="title" class="text <?php if (isset($postTitle)) { if (empty($postTitle)) { echo 'error';}} ?>" value="<?php echo $oldtitle?>"/><br><br>
Meta Description (optional)<br><input type="text" class="text" name="description" value="<?php if (isset($postDescription)) { echo $postDescription;} ?>"/><br>
<br> <br>
<div id="wmd-button-bar" class="wmd-button-bar"></div> <div id="wmd-button-bar" class="wmd-button-bar"></div>
<textarea id="wmd-input" class="wmd-input <?php if (isset($postContent)) { if (empty($postContent)) { echo 'error';}} ?>" name="content" cols="20" rows="10"><?php echo $oldcontent ?></textarea><br> <textarea id="wmd-input" class="wmd-input <?php if (isset($postContent)) { if (empty($postContent)) { echo 'error';}} ?>" name="content" cols="20" rows="10"><?php echo $oldcontent ?></textarea><br>


+ 2
- 2
system/admin/views/user-posts.html.php View File

@ -1,7 +1,7 @@
<h2 class="post-index"><?php echo $heading?></h2> <h2 class="post-index"><?php echo $heading?></h2>
<?php if(!empty($posts)) {?> <?php if(!empty($posts)) {?>
<table class="post-list"> <table class="post-list">
<tr class="head"><th>Title</th><th>Published</th><th>Views</th><th>Tag</th><th>Operations</th></tr>
<tr class="head"><th>Title</th><th>Published</th><?php if(config("views.counter") == "true"):?><th>Views</th><?php endif; ?><th>Tag</th><th>Operations</th></tr>
<?php $i = 0; $len = count($posts);?> <?php $i = 0; $len = count($posts);?>
<?php foreach($posts as $p):?> <?php foreach($posts as $p):?>
<?php <?php
@ -19,7 +19,7 @@
<tr class="<?php echo $class ?>"> <tr class="<?php echo $class ?>">
<td><a target="_blank" href="<?php echo $p->url ?>"><?php echo $p->title ?></a></td> <td><a target="_blank" href="<?php echo $p->url ?>"><?php echo $p->title ?></a></td>
<td><?php echo date('d F Y', $p->date) ?></td> <td><?php echo date('d F Y', $p->date) ?></td>
<td><?php echo $p->views ?></td>
<?php if(config("views.counter") == "true"):?><td><?php echo $p->views ?></td><?php endif;?>
<td><?php echo $p->tag ?></td> <td><?php echo $p->tag ?></td>
<td><a href="<?php echo $p->url ?>/edit?destination=admin/mine">Edit</a> <a href="<?php echo $p->url ?>/delete?destination=admin/mine">Delete</a></td> <td><a href="<?php echo $p->url ?>/edit?destination=admin/mine">Edit</a> <a href="<?php echo $p->url ?>/delete?destination=admin/mine">Delete</a></td>
</tr> </tr>


+ 1
- 2
system/htmly.php View File

@ -501,9 +501,8 @@ post('/edit/profile', function() {
$user = $_SESSION[config("site.url")]['user']; $user = $_SESSION[config("site.url")]['user'];
$title = from($_REQUEST, 'title'); $title = from($_REQUEST, 'title');
$content = from($_REQUEST, 'content'); $content = from($_REQUEST, 'content');
$description = from($_REQUEST, 'description');
if ($proper && !empty($title) && !empty($content)) { if ($proper && !empty($title) && !empty($content)) {
edit_profile($title, $content, $user, $description);
edit_profile($title, $content, $user);
} else { } else {
$message['error'] = ''; $message['error'] = '';
if (empty($title)) { if (empty($title)) {


Loading…
Cancel
Save