mirror of
https://github.com/danpros/htmly.git
synced 2026-04-21 13:06:22 +05:30
Cleaning up
This commit is contained in:
parent
6ff9b03bf3
commit
dcbf9f0700
26 changed files with 488 additions and 488 deletions
|
|
@ -89,9 +89,9 @@ function remove_accent($str)
|
|||
function edit_post($title, $tag, $url, $content, $oldfile, $destination = null, $description = null, $date = null, $revertPost, $publishDraft)
|
||||
{
|
||||
$oldurl = explode('_', $oldfile);
|
||||
$dir = explode('/', $oldurl[0]);
|
||||
$dir = explode('/', $oldurl[0]);
|
||||
$olddate = date('Y-m-d-h-i-s', strtotime($date));
|
||||
|
||||
|
||||
if ($date !== null) {
|
||||
$oldurl[0] = substr($oldurl[0], 0, strrpos($oldurl[0], '/')) . '/' . $olddate;
|
||||
}
|
||||
|
|
@ -104,52 +104,52 @@ function edit_post($title, $tag, $url, $content, $oldfile, $destination = null,
|
|||
$post_description = "\n<!--d " . $description . " d-->";
|
||||
} else {
|
||||
$post_description = "";
|
||||
}
|
||||
}
|
||||
$post_content = '<!--t ' . $post_title . ' t-->' . $post_description ."\n\n" . $content;
|
||||
|
||||
if (!empty($post_title) && !empty($post_tag) && !empty($post_url) && !empty($post_content)) {
|
||||
|
||||
|
||||
if (get_magic_quotes_gpc()) {
|
||||
$post_content = stripslashes($post_content);
|
||||
}
|
||||
|
||||
|
||||
if(!empty($revertPost) || !empty($publishDraft)) {
|
||||
|
||||
|
||||
$dirBlog = $dir[0] . '/' . $dir[1] . '/blog/';
|
||||
$dirDraft = $dir[0] . '/' . $dir[1] . '/draft/';
|
||||
|
||||
|
||||
if($dir[2] == 'draft') {
|
||||
$filename = $dirBlog . $olddate . '_' . $post_tag . '_' . $post_url . '.md';
|
||||
} else {
|
||||
$filename = $dirDraft . $olddate . '_' . $post_tag . '_' . $post_url . '.md';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (is_dir($dirBlog)) {
|
||||
} else {
|
||||
mkdir($dirBlog, 0775, true);
|
||||
}
|
||||
|
||||
if (is_dir($dirDraft)) {
|
||||
|
||||
if (is_dir($dirDraft)) {
|
||||
} else {
|
||||
mkdir($dirDraft, 0775, true);
|
||||
}
|
||||
|
||||
|
||||
file_put_contents($filename, print_r($post_content, true));
|
||||
unlink($oldfile);
|
||||
$newfile = $olddate . '_' . $post_tag . '_' . $post_url . '.md';
|
||||
|
||||
} else {
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
$newfile = $oldurl[0] . '_' . $post_tag . '_' . $post_url . '.md';
|
||||
|
||||
|
||||
if ($oldfile === $newfile) {
|
||||
file_put_contents($oldfile, print_r($post_content, true));
|
||||
} else {
|
||||
rename($oldfile, $newfile);
|
||||
file_put_contents($newfile, print_r($post_content, true));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(!empty($publishDraft)) {
|
||||
$dt = $olddate;
|
||||
|
|
@ -162,14 +162,14 @@ function edit_post($title, $tag, $url, $content, $oldfile, $destination = null,
|
|||
$t = str_replace('-', '', $dt);
|
||||
$time = new DateTime($t);
|
||||
$timestamp = $time->format("Y-m-d");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// The post date
|
||||
$postdate = strtotime($timestamp);
|
||||
|
||||
// The post URL
|
||||
$posturl = site_url() . date('Y/m', $postdate) . '/' . $post_url;
|
||||
|
||||
|
||||
rebuilt_cache('all');
|
||||
clear_post_cache($dt, $post_tag, $post_url, $newfile);
|
||||
if ($destination == 'post') {
|
||||
|
|
@ -197,9 +197,9 @@ function edit_post($title, $tag, $url, $content, $oldfile, $destination = null,
|
|||
function edit_image($title, $tag, $url, $content, $oldfile, $destination = null, $description = null, $date = null, $image, $revertPost, $publishDraft)
|
||||
{
|
||||
$oldurl = explode('_', $oldfile);
|
||||
$dir = explode('/', $oldurl[0]);
|
||||
$dir = explode('/', $oldurl[0]);
|
||||
$olddate = date('Y-m-d-h-i-s', strtotime($date));
|
||||
|
||||
|
||||
if ($date !== null) {
|
||||
$oldurl[0] = substr($oldurl[0], 0, strrpos($oldurl[0], '/')) . '/' . $olddate;
|
||||
}
|
||||
|
|
@ -218,52 +218,52 @@ function edit_image($title, $tag, $url, $content, $oldfile, $destination = null,
|
|||
$post_image = "\n<!--image " . $post_image. " image-->";
|
||||
} else {
|
||||
$post_image = "";
|
||||
}
|
||||
}
|
||||
$post_content = '<!--t ' . $post_title . ' t-->' . $post_description . $post_image ."\n\n" . $content;
|
||||
|
||||
if (!empty($post_title) && !empty($post_tag) && !empty($post_url) && !empty($post_content)) {
|
||||
|
||||
|
||||
if (get_magic_quotes_gpc()) {
|
||||
$post_content = stripslashes($post_content);
|
||||
}
|
||||
|
||||
|
||||
if(!empty($revertPost) || !empty($publishDraft)) {
|
||||
|
||||
|
||||
$dirBlog = $dir[0] . '/' . $dir[1] . '/blog/';
|
||||
$dirDraft = $dir[0] . '/' . $dir[1] . '/draft/';
|
||||
|
||||
|
||||
if($dir[2] == 'draft') {
|
||||
$filename = $dirBlog . $olddate . '_' . $post_tag . '_' . $post_url . '.md';
|
||||
} else {
|
||||
$filename = $dirDraft . $olddate . '_' . $post_tag . '_' . $post_url . '.md';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (is_dir($dirBlog)) {
|
||||
} else {
|
||||
mkdir($dirBlog, 0775, true);
|
||||
}
|
||||
|
||||
if (is_dir($dirDraft)) {
|
||||
|
||||
if (is_dir($dirDraft)) {
|
||||
} else {
|
||||
mkdir($dirDraft, 0775, true);
|
||||
}
|
||||
|
||||
|
||||
file_put_contents($filename, print_r($post_content, true));
|
||||
unlink($oldfile);
|
||||
$newfile = $olddate . '_' . $post_tag . '_' . $post_url . '.md';
|
||||
|
||||
} else {
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
$newfile = $oldurl[0] . '_' . $post_tag . '_' . $post_url . '.md';
|
||||
|
||||
|
||||
if ($oldfile === $newfile) {
|
||||
file_put_contents($oldfile, print_r($post_content, true));
|
||||
} else {
|
||||
rename($oldfile, $newfile);
|
||||
file_put_contents($newfile, print_r($post_content, true));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(!empty($publishDraft)) {
|
||||
$dt = $olddate;
|
||||
|
|
@ -276,14 +276,14 @@ function edit_image($title, $tag, $url, $content, $oldfile, $destination = null,
|
|||
$t = str_replace('-', '', $dt);
|
||||
$time = new DateTime($t);
|
||||
$timestamp = $time->format("Y-m-d");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// The post date
|
||||
$postdate = strtotime($timestamp);
|
||||
|
||||
// The post URL
|
||||
$posturl = site_url() . date('Y/m', $postdate) . '/' . $post_url;
|
||||
|
||||
|
||||
rebuilt_cache('all');
|
||||
clear_post_cache($dt, $post_tag, $post_url, $newfile);
|
||||
if ($destination == 'post') {
|
||||
|
|
@ -311,9 +311,9 @@ function edit_image($title, $tag, $url, $content, $oldfile, $destination = null,
|
|||
function edit_video($title, $tag, $url, $content, $oldfile, $destination = null, $description = null, $date = null, $video, $revertPost, $publishDraft)
|
||||
{
|
||||
$oldurl = explode('_', $oldfile);
|
||||
$dir = explode('/', $oldurl[0]);
|
||||
$dir = explode('/', $oldurl[0]);
|
||||
$olddate = date('Y-m-d-h-i-s', strtotime($date));
|
||||
|
||||
|
||||
if ($date !== null) {
|
||||
$oldurl[0] = substr($oldurl[0], 0, strrpos($oldurl[0], '/')) . '/' . $olddate;
|
||||
}
|
||||
|
|
@ -332,52 +332,52 @@ function edit_video($title, $tag, $url, $content, $oldfile, $destination = null,
|
|||
$post_video = "\n<!--video " . $post_video . " video-->";
|
||||
} else {
|
||||
$post_video = "";
|
||||
}
|
||||
}
|
||||
$post_content = '<!--t ' . $post_title . ' t-->' . $post_description . $post_video ."\n\n" . $content;
|
||||
|
||||
if (!empty($post_title) && !empty($post_tag) && !empty($post_url) && !empty($post_content)) {
|
||||
|
||||
|
||||
if (get_magic_quotes_gpc()) {
|
||||
$post_content = stripslashes($post_content);
|
||||
}
|
||||
|
||||
|
||||
if(!empty($revertPost) || !empty($publishDraft)) {
|
||||
|
||||
|
||||
$dirBlog = $dir[0] . '/' . $dir[1] . '/blog/';
|
||||
$dirDraft = $dir[0] . '/' . $dir[1] . '/draft/';
|
||||
|
||||
|
||||
if($dir[2] == 'draft') {
|
||||
$filename = $dirBlog . $olddate . '_' . $post_tag . '_' . $post_url . '.md';
|
||||
} else {
|
||||
$filename = $dirDraft . $olddate . '_' . $post_tag . '_' . $post_url . '.md';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (is_dir($dirBlog)) {
|
||||
} else {
|
||||
mkdir($dirBlog, 0775, true);
|
||||
}
|
||||
|
||||
if (is_dir($dirDraft)) {
|
||||
|
||||
if (is_dir($dirDraft)) {
|
||||
} else {
|
||||
mkdir($dirDraft, 0775, true);
|
||||
}
|
||||
|
||||
|
||||
file_put_contents($filename, print_r($post_content, true));
|
||||
unlink($oldfile);
|
||||
$newfile = $olddate . '_' . $post_tag . '_' . $post_url . '.md';
|
||||
|
||||
} else {
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
$newfile = $oldurl[0] . '_' . $post_tag . '_' . $post_url . '.md';
|
||||
|
||||
|
||||
if ($oldfile === $newfile) {
|
||||
file_put_contents($oldfile, print_r($post_content, true));
|
||||
} else {
|
||||
rename($oldfile, $newfile);
|
||||
file_put_contents($newfile, print_r($post_content, true));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(!empty($publishDraft)) {
|
||||
$dt = $olddate;
|
||||
|
|
@ -390,14 +390,14 @@ function edit_video($title, $tag, $url, $content, $oldfile, $destination = null,
|
|||
$t = str_replace('-', '', $dt);
|
||||
$time = new DateTime($t);
|
||||
$timestamp = $time->format("Y-m-d");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// The post date
|
||||
$postdate = strtotime($timestamp);
|
||||
|
||||
// The post URL
|
||||
$posturl = site_url() . date('Y/m', $postdate) . '/' . $post_url;
|
||||
|
||||
|
||||
rebuilt_cache('all');
|
||||
clear_post_cache($dt, $post_tag, $post_url, $newfile);
|
||||
if ($destination == 'post') {
|
||||
|
|
@ -425,9 +425,9 @@ function edit_video($title, $tag, $url, $content, $oldfile, $destination = null,
|
|||
function edit_link($title, $tag, $url, $content, $oldfile, $destination = null, $description = null, $date = null, $link, $revertPost, $publishDraft)
|
||||
{
|
||||
$oldurl = explode('_', $oldfile);
|
||||
$dir = explode('/', $oldurl[0]);
|
||||
$dir = explode('/', $oldurl[0]);
|
||||
$olddate = date('Y-m-d-h-i-s', strtotime($date));
|
||||
|
||||
|
||||
if ($date !== null) {
|
||||
$oldurl[0] = substr($oldurl[0], 0, strrpos($oldurl[0], '/')) . '/' . $olddate;
|
||||
}
|
||||
|
|
@ -446,52 +446,52 @@ function edit_link($title, $tag, $url, $content, $oldfile, $destination = null,
|
|||
$post_link = "\n<!--link" . $post_link. " link-->";
|
||||
} else {
|
||||
$post_link = "";
|
||||
}
|
||||
}
|
||||
$post_content = '<!--t ' . $post_title . ' t-->' . $post_description . $post_link ."\n\n" . $content;
|
||||
|
||||
if (!empty($post_title) && !empty($post_tag) && !empty($post_url) && !empty($post_content)) {
|
||||
|
||||
|
||||
if (get_magic_quotes_gpc()) {
|
||||
$post_content = stripslashes($post_content);
|
||||
}
|
||||
|
||||
|
||||
if(!empty($revertPost) || !empty($publishDraft)) {
|
||||
|
||||
|
||||
$dirBlog = $dir[0] . '/' . $dir[1] . '/blog/';
|
||||
$dirDraft = $dir[0] . '/' . $dir[1] . '/draft/';
|
||||
|
||||
|
||||
if($dir[2] == 'draft') {
|
||||
$filename = $dirBlog . $olddate . '_' . $post_tag . '_' . $post_url . '.md';
|
||||
} else {
|
||||
$filename = $dirDraft . $olddate . '_' . $post_tag . '_' . $post_url . '.md';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (is_dir($dirBlog)) {
|
||||
} else {
|
||||
mkdir($dirBlog, 0775, true);
|
||||
}
|
||||
|
||||
if (is_dir($dirDraft)) {
|
||||
|
||||
if (is_dir($dirDraft)) {
|
||||
} else {
|
||||
mkdir($dirDraft, 0775, true);
|
||||
}
|
||||
|
||||
|
||||
file_put_contents($filename, print_r($post_content, true));
|
||||
unlink($oldfile);
|
||||
$newfile = $olddate . '_' . $post_tag . '_' . $post_url . '.md';
|
||||
|
||||
} else {
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
$newfile = $oldurl[0] . '_' . $post_tag . '_' . $post_url . '.md';
|
||||
|
||||
|
||||
if ($oldfile === $newfile) {
|
||||
file_put_contents($oldfile, print_r($post_content, true));
|
||||
} else {
|
||||
rename($oldfile, $newfile);
|
||||
file_put_contents($newfile, print_r($post_content, true));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(!empty($publishDraft)) {
|
||||
$dt = $olddate;
|
||||
|
|
@ -504,14 +504,14 @@ function edit_link($title, $tag, $url, $content, $oldfile, $destination = null,
|
|||
$t = str_replace('-', '', $dt);
|
||||
$time = new DateTime($t);
|
||||
$timestamp = $time->format("Y-m-d");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// The post date
|
||||
$postdate = strtotime($timestamp);
|
||||
|
||||
// The post URL
|
||||
$posturl = site_url() . date('Y/m', $postdate) . '/' . $post_url;
|
||||
|
||||
|
||||
rebuilt_cache('all');
|
||||
clear_post_cache($dt, $post_tag, $post_url, $newfile);
|
||||
if ($destination == 'post') {
|
||||
|
|
@ -539,9 +539,9 @@ function edit_link($title, $tag, $url, $content, $oldfile, $destination = null,
|
|||
function edit_quote($title, $tag, $url, $content, $oldfile, $destination = null, $description = null, $date = null, $quote, $revertPost, $publishDraft)
|
||||
{
|
||||
$oldurl = explode('_', $oldfile);
|
||||
$dir = explode('/', $oldurl[0]);
|
||||
$dir = explode('/', $oldurl[0]);
|
||||
$olddate = date('Y-m-d-h-i-s', strtotime($date));
|
||||
|
||||
|
||||
if ($date !== null) {
|
||||
$oldurl[0] = substr($oldurl[0], 0, strrpos($oldurl[0], '/')) . '/' . $olddate;
|
||||
}
|
||||
|
|
@ -560,52 +560,52 @@ function edit_quote($title, $tag, $url, $content, $oldfile, $destination = null,
|
|||
$post_quote = "\n<!--quote" . $post_quote . " quote-->";
|
||||
} else {
|
||||
$post_quote = "";
|
||||
}
|
||||
}
|
||||
$post_content = '<!--t ' . $post_title . ' t-->' . $post_description . $post_quote ."\n\n" . $content;
|
||||
|
||||
if (!empty($post_title) && !empty($post_tag) && !empty($post_url) && !empty($post_content)) {
|
||||
|
||||
|
||||
if (get_magic_quotes_gpc()) {
|
||||
$post_content = stripslashes($post_content);
|
||||
}
|
||||
|
||||
|
||||
if(!empty($revertPost) || !empty($publishDraft)) {
|
||||
|
||||
|
||||
$dirBlog = $dir[0] . '/' . $dir[1] . '/blog/';
|
||||
$dirDraft = $dir[0] . '/' . $dir[1] . '/draft/';
|
||||
|
||||
|
||||
if($dir[2] == 'draft') {
|
||||
$filename = $dirBlog . $olddate . '_' . $post_tag . '_' . $post_url . '.md';
|
||||
} else {
|
||||
$filename = $dirDraft . $olddate . '_' . $post_tag . '_' . $post_url . '.md';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (is_dir($dirBlog)) {
|
||||
} else {
|
||||
mkdir($dirBlog, 0775, true);
|
||||
}
|
||||
|
||||
if (is_dir($dirDraft)) {
|
||||
|
||||
if (is_dir($dirDraft)) {
|
||||
} else {
|
||||
mkdir($dirDraft, 0775, true);
|
||||
}
|
||||
|
||||
|
||||
file_put_contents($filename, print_r($post_content, true));
|
||||
unlink($oldfile);
|
||||
$newfile = $olddate . '_' . $post_tag . '_' . $post_url . '.md';
|
||||
|
||||
} else {
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
$newfile = $oldurl[0] . '_' . $post_tag . '_' . $post_url . '.md';
|
||||
|
||||
|
||||
if ($oldfile === $newfile) {
|
||||
file_put_contents($oldfile, print_r($post_content, true));
|
||||
} else {
|
||||
rename($oldfile, $newfile);
|
||||
file_put_contents($newfile, print_r($post_content, true));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(!empty($publishDraft)) {
|
||||
$dt = $olddate;
|
||||
|
|
@ -618,14 +618,14 @@ function edit_quote($title, $tag, $url, $content, $oldfile, $destination = null,
|
|||
$t = str_replace('-', '', $dt);
|
||||
$time = new DateTime($t);
|
||||
$timestamp = $time->format("Y-m-d");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// The post date
|
||||
$postdate = strtotime($timestamp);
|
||||
|
||||
// The post URL
|
||||
$posturl = site_url() . date('Y/m', $postdate) . '/' . $post_url;
|
||||
|
||||
|
||||
rebuilt_cache('all');
|
||||
clear_post_cache($dt, $post_tag, $post_url, $newfile);
|
||||
if ($destination == 'post') {
|
||||
|
|
@ -653,9 +653,9 @@ function edit_quote($title, $tag, $url, $content, $oldfile, $destination = null,
|
|||
function edit_audio($title, $tag, $url, $content, $oldfile, $destination = null, $description = null, $date = null, $audio, $revertPost, $publishDraft)
|
||||
{
|
||||
$oldurl = explode('_', $oldfile);
|
||||
$dir = explode('/', $oldurl[0]);
|
||||
$dir = explode('/', $oldurl[0]);
|
||||
$olddate = date('Y-m-d-h-i-s', strtotime($date));
|
||||
|
||||
|
||||
if ($date !== null) {
|
||||
$oldurl[0] = substr($oldurl[0], 0, strrpos($oldurl[0], '/')) . '/' . $olddate;
|
||||
}
|
||||
|
|
@ -674,52 +674,52 @@ function edit_audio($title, $tag, $url, $content, $oldfile, $destination = null,
|
|||
$post_audio = "\n<!--audio" . $post_audio . " audio-->";
|
||||
} else {
|
||||
$post_audio = "";
|
||||
}
|
||||
}
|
||||
$post_content = '<!--t ' . $post_title . ' t-->' . $post_description . $post_audio ."\n\n" . $content;
|
||||
|
||||
if (!empty($post_title) && !empty($post_tag) && !empty($post_url) && !empty($post_content)) {
|
||||
|
||||
|
||||
if (get_magic_quotes_gpc()) {
|
||||
$post_content = stripslashes($post_content);
|
||||
}
|
||||
|
||||
|
||||
if(!empty($revertPost) || !empty($publishDraft)) {
|
||||
|
||||
|
||||
$dirBlog = $dir[0] . '/' . $dir[1] . '/blog/';
|
||||
$dirDraft = $dir[0] . '/' . $dir[1] . '/draft/';
|
||||
|
||||
|
||||
if($dir[2] == 'draft') {
|
||||
$filename = $dirBlog . $olddate . '_' . $post_tag . '_' . $post_url . '.md';
|
||||
} else {
|
||||
$filename = $dirDraft . $olddate . '_' . $post_tag . '_' . $post_url . '.md';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (is_dir($dirBlog)) {
|
||||
} else {
|
||||
mkdir($dirBlog, 0775, true);
|
||||
}
|
||||
|
||||
if (is_dir($dirDraft)) {
|
||||
|
||||
if (is_dir($dirDraft)) {
|
||||
} else {
|
||||
mkdir($dirDraft, 0775, true);
|
||||
}
|
||||
|
||||
|
||||
file_put_contents($filename, print_r($post_content, true));
|
||||
unlink($oldfile);
|
||||
$newfile = $olddate . '_' . $post_tag . '_' . $post_url . '.md';
|
||||
|
||||
} else {
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
$newfile = $oldurl[0] . '_' . $post_tag . '_' . $post_url . '.md';
|
||||
|
||||
|
||||
if ($oldfile === $newfile) {
|
||||
file_put_contents($oldfile, print_r($post_content, true));
|
||||
} else {
|
||||
rename($oldfile, $newfile);
|
||||
file_put_contents($newfile, print_r($post_content, true));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(!empty($publishDraft)) {
|
||||
$dt = $olddate;
|
||||
|
|
@ -732,14 +732,14 @@ function edit_audio($title, $tag, $url, $content, $oldfile, $destination = null,
|
|||
$t = str_replace('-', '', $dt);
|
||||
$time = new DateTime($t);
|
||||
$timestamp = $time->format("Y-m-d");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// The post date
|
||||
$postdate = strtotime($timestamp);
|
||||
|
||||
// The post URL
|
||||
$posturl = site_url() . date('Y/m', $postdate) . '/' . $post_url;
|
||||
|
||||
|
||||
rebuilt_cache('all');
|
||||
clear_post_cache($dt, $post_tag, $post_url, $newfile);
|
||||
if ($destination == 'post') {
|
||||
|
|
@ -815,15 +815,15 @@ function add_post($title, $tag, $url, $content, $user, $description = null, $dra
|
|||
$post_description = "\n<!--d " . $description . " d-->";
|
||||
} else {
|
||||
$post_description = "";
|
||||
}
|
||||
}
|
||||
$post_content = '<!--t ' . $post_title . ' t-->' . $post_description ."\n\n" . $content;
|
||||
|
||||
if (!empty($post_title) && !empty($post_tag) && !empty($post_url) && !empty($post_content)) {
|
||||
|
||||
if (get_magic_quotes_gpc()) {
|
||||
if (get_magic_quotes_gpc()) {
|
||||
$post_content = stripslashes($post_content);
|
||||
}
|
||||
|
||||
|
||||
$filename = $post_date . '_' . $post_tag . '_' . $post_url . '.md';
|
||||
|
||||
if (empty($draft)) {
|
||||
|
|
@ -831,7 +831,7 @@ function add_post($title, $tag, $url, $content, $user, $description = null, $dra
|
|||
} else {
|
||||
$dir = 'content/' . $user . '/draft/';
|
||||
}
|
||||
|
||||
|
||||
if (is_dir($dir)) {
|
||||
file_put_contents($dir . $filename, print_r($post_content, true));
|
||||
} else {
|
||||
|
|
@ -841,13 +841,13 @@ function add_post($title, $tag, $url, $content, $user, $description = null, $dra
|
|||
|
||||
rebuilt_cache('all');
|
||||
clear_post_cache($post_date, $post_tag, $post_url, $dir . $filename);
|
||||
|
||||
|
||||
if (empty($draft)) {
|
||||
$redirect = site_url() . 'admin/mine';
|
||||
} else {
|
||||
$redirect = site_url() . 'admin/draft';
|
||||
}
|
||||
|
||||
|
||||
header("Location: $redirect");
|
||||
}
|
||||
}
|
||||
|
|
@ -871,15 +871,15 @@ function add_image($title, $tag, $url, $content, $user, $description = null, $im
|
|||
$post_image = "\n<!--image " . $post_image. " image-->";
|
||||
} else {
|
||||
$post_image = "";
|
||||
}
|
||||
}
|
||||
$post_content = '<!--t ' . $post_title . ' t-->' . $post_description . $post_image ."\n\n" . $content;
|
||||
|
||||
if (!empty($post_title) && !empty($post_tag) && !empty($post_url) && !empty($post_content)) {
|
||||
|
||||
if (get_magic_quotes_gpc()) {
|
||||
if (get_magic_quotes_gpc()) {
|
||||
$post_content = stripslashes($post_content);
|
||||
}
|
||||
|
||||
|
||||
$filename = $post_date . '_' . $post_tag . '_' . $post_url . '.md';
|
||||
|
||||
if (empty($draft)) {
|
||||
|
|
@ -887,7 +887,7 @@ function add_image($title, $tag, $url, $content, $user, $description = null, $im
|
|||
} else {
|
||||
$dir = 'content/' . $user . '/draft/';
|
||||
}
|
||||
|
||||
|
||||
if (is_dir($dir)) {
|
||||
file_put_contents($dir . $filename, print_r($post_content, true));
|
||||
} else {
|
||||
|
|
@ -897,13 +897,13 @@ function add_image($title, $tag, $url, $content, $user, $description = null, $im
|
|||
|
||||
rebuilt_cache('all');
|
||||
clear_post_cache($post_date, $post_tag, $post_url, $dir . $filename);
|
||||
|
||||
|
||||
if (empty($draft)) {
|
||||
$redirect = site_url() . 'admin/mine';
|
||||
} else {
|
||||
$redirect = site_url() . 'admin/draft';
|
||||
}
|
||||
|
||||
|
||||
header("Location: $redirect");
|
||||
}
|
||||
}
|
||||
|
|
@ -927,15 +927,15 @@ function add_video($title, $tag, $url, $content, $user, $description = null, $vi
|
|||
$post_video = "\n<!--video " . $post_video . " video-->";
|
||||
} else {
|
||||
$post_video = "";
|
||||
}
|
||||
}
|
||||
$post_content = '<!--t ' . $post_title . ' t-->' . $post_description . $post_video ."\n\n" . $content;
|
||||
|
||||
if (!empty($post_title) && !empty($post_tag) && !empty($post_url) && !empty($post_content)) {
|
||||
|
||||
if (get_magic_quotes_gpc()) {
|
||||
if (get_magic_quotes_gpc()) {
|
||||
$post_content = stripslashes($post_content);
|
||||
}
|
||||
|
||||
|
||||
$filename = $post_date . '_' . $post_tag . '_' . $post_url . '.md';
|
||||
|
||||
if (empty($draft)) {
|
||||
|
|
@ -943,7 +943,7 @@ function add_video($title, $tag, $url, $content, $user, $description = null, $vi
|
|||
} else {
|
||||
$dir = 'content/' . $user . '/draft/';
|
||||
}
|
||||
|
||||
|
||||
if (is_dir($dir)) {
|
||||
file_put_contents($dir . $filename, print_r($post_content, true));
|
||||
} else {
|
||||
|
|
@ -953,13 +953,13 @@ function add_video($title, $tag, $url, $content, $user, $description = null, $vi
|
|||
|
||||
rebuilt_cache('all');
|
||||
clear_post_cache($post_date, $post_tag, $post_url, $dir . $filename);
|
||||
|
||||
|
||||
if (empty($draft)) {
|
||||
$redirect = site_url() . 'admin/mine';
|
||||
} else {
|
||||
$redirect = site_url() . 'admin/draft';
|
||||
}
|
||||
|
||||
|
||||
header("Location: $redirect");
|
||||
}
|
||||
}
|
||||
|
|
@ -983,15 +983,15 @@ function add_audio($title, $tag, $url, $content, $user, $description = null, $au
|
|||
$post_audio = "\n<!--audio " . $post_audio . " audio-->";
|
||||
} else {
|
||||
$post_audio = "";
|
||||
}
|
||||
}
|
||||
$post_content = '<!--t ' . $post_title . ' t-->' . $post_description . $post_audio ."\n\n" . $content;
|
||||
|
||||
if (!empty($post_title) && !empty($post_tag) && !empty($post_url) && !empty($post_content)) {
|
||||
|
||||
if (get_magic_quotes_gpc()) {
|
||||
if (get_magic_quotes_gpc()) {
|
||||
$post_content = stripslashes($post_content);
|
||||
}
|
||||
|
||||
|
||||
$filename = $post_date . '_' . $post_tag . '_' . $post_url . '.md';
|
||||
|
||||
if (empty($draft)) {
|
||||
|
|
@ -999,7 +999,7 @@ function add_audio($title, $tag, $url, $content, $user, $description = null, $au
|
|||
} else {
|
||||
$dir = 'content/' . $user . '/draft/';
|
||||
}
|
||||
|
||||
|
||||
if (is_dir($dir)) {
|
||||
file_put_contents($dir . $filename, print_r($post_content, true));
|
||||
} else {
|
||||
|
|
@ -1009,13 +1009,13 @@ function add_audio($title, $tag, $url, $content, $user, $description = null, $au
|
|||
|
||||
rebuilt_cache('all');
|
||||
clear_post_cache($post_date, $post_tag, $post_url, $dir . $filename);
|
||||
|
||||
|
||||
if (empty($draft)) {
|
||||
$redirect = site_url() . 'admin/mine';
|
||||
} else {
|
||||
$redirect = site_url() . 'admin/draft';
|
||||
}
|
||||
|
||||
|
||||
header("Location: $redirect");
|
||||
}
|
||||
}
|
||||
|
|
@ -1039,15 +1039,15 @@ function add_link($title, $tag, $url, $content, $user, $description = null, $lin
|
|||
$post_link = "\n<!--link " . $post_link . " link-->";
|
||||
} else {
|
||||
$post_link = "";
|
||||
}
|
||||
}
|
||||
$post_content = '<!--t ' . $post_title . ' t-->' . $post_description . $post_link ."\n\n" . $content;
|
||||
|
||||
if (!empty($post_title) && !empty($post_tag) && !empty($post_url) && !empty($post_content)) {
|
||||
|
||||
if (get_magic_quotes_gpc()) {
|
||||
if (get_magic_quotes_gpc()) {
|
||||
$post_content = stripslashes($post_content);
|
||||
}
|
||||
|
||||
|
||||
$filename = $post_date . '_' . $post_tag . '_' . $post_url . '.md';
|
||||
|
||||
if (empty($draft)) {
|
||||
|
|
@ -1055,7 +1055,7 @@ function add_link($title, $tag, $url, $content, $user, $description = null, $lin
|
|||
} else {
|
||||
$dir = 'content/' . $user . '/draft/';
|
||||
}
|
||||
|
||||
|
||||
if (is_dir($dir)) {
|
||||
file_put_contents($dir . $filename, print_r($post_content, true));
|
||||
} else {
|
||||
|
|
@ -1065,13 +1065,13 @@ function add_link($title, $tag, $url, $content, $user, $description = null, $lin
|
|||
|
||||
rebuilt_cache('all');
|
||||
clear_post_cache($post_date, $post_tag, $post_url, $dir . $filename);
|
||||
|
||||
|
||||
if (empty($draft)) {
|
||||
$redirect = site_url() . 'admin/mine';
|
||||
} else {
|
||||
$redirect = site_url() . 'admin/draft';
|
||||
}
|
||||
|
||||
|
||||
header("Location: $redirect");
|
||||
}
|
||||
}
|
||||
|
|
@ -1095,15 +1095,15 @@ function add_quote($title, $tag, $url, $content, $user, $description = null, $qu
|
|||
$post_quote = "\n<!--quote " . $post_quote . " quote-->";
|
||||
} else {
|
||||
$post_quote = "";
|
||||
}
|
||||
}
|
||||
$post_content = '<!--t ' . $post_title . ' t-->' . $post_description . $post_quote ."\n\n" . $content;
|
||||
|
||||
if (!empty($post_title) && !empty($post_tag) && !empty($post_url) && !empty($post_content)) {
|
||||
|
||||
if (get_magic_quotes_gpc()) {
|
||||
if (get_magic_quotes_gpc()) {
|
||||
$post_content = stripslashes($post_content);
|
||||
}
|
||||
|
||||
|
||||
$filename = $post_date . '_' . $post_tag . '_' . $post_url . '.md';
|
||||
|
||||
if (empty($draft)) {
|
||||
|
|
@ -1111,7 +1111,7 @@ function add_quote($title, $tag, $url, $content, $user, $description = null, $qu
|
|||
} else {
|
||||
$dir = 'content/' . $user . '/draft/';
|
||||
}
|
||||
|
||||
|
||||
if (is_dir($dir)) {
|
||||
file_put_contents($dir . $filename, print_r($post_content, true));
|
||||
} else {
|
||||
|
|
@ -1121,13 +1121,13 @@ function add_quote($title, $tag, $url, $content, $user, $description = null, $qu
|
|||
|
||||
rebuilt_cache('all');
|
||||
clear_post_cache($post_date, $post_tag, $post_url, $dir . $filename);
|
||||
|
||||
|
||||
if (empty($draft)) {
|
||||
$redirect = site_url() . 'admin/mine';
|
||||
} else {
|
||||
$redirect = site_url() . 'admin/draft';
|
||||
}
|
||||
|
||||
|
||||
header("Location: $redirect");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -71,19 +71,19 @@
|
|||
(function () {
|
||||
var converter = new Markdown.Converter();
|
||||
var editor = new Markdown.Editor(converter);
|
||||
|
||||
|
||||
var $dialog = $('#insertImageDialog').dialog({
|
||||
autoOpen: false,
|
||||
closeOnEscape: false,
|
||||
open: function(event, ui) { $(".ui-dialog-titlebar-close").hide(); }
|
||||
});
|
||||
|
||||
|
||||
var $url = $('input[type=text]', $dialog);
|
||||
var $file = $('input[type=file]', $dialog);
|
||||
var base = '<?php echo site_url() ?>';
|
||||
|
||||
|
||||
editor.hooks.set('insertImageDialog', function(callback) {
|
||||
|
||||
|
||||
var dialogInsertClick = function() {
|
||||
callback($url.val().length > 0 ? $url.val(): null);
|
||||
dialogClose();
|
||||
|
|
@ -113,18 +113,18 @@
|
|||
$file.val('');
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
$file.ajaxfileupload({
|
||||
'action': '<?php echo site_url() ?>upload.php',
|
||||
'onComplete': uploadComplete,
|
||||
});
|
||||
|
||||
|
||||
$dialog.dialog('open');
|
||||
|
||||
return true; // tell the editor that we'll take care of getting the image url
|
||||
});
|
||||
|
||||
editor.run();
|
||||
|
||||
|
||||
})();
|
||||
</script>
|
||||
|
|
@ -71,19 +71,19 @@
|
|||
(function () {
|
||||
var converter = new Markdown.Converter();
|
||||
var editor = new Markdown.Editor(converter);
|
||||
|
||||
|
||||
var $dialog = $('#insertImageDialog').dialog({
|
||||
autoOpen: false,
|
||||
closeOnEscape: false,
|
||||
open: function(event, ui) { $(".ui-dialog-titlebar-close").hide(); }
|
||||
});
|
||||
|
||||
|
||||
var $url = $('input[type=text]', $dialog);
|
||||
var $file = $('input[type=file]', $dialog);
|
||||
var base = '<?php echo site_url() ?>';
|
||||
|
||||
|
||||
editor.hooks.set('insertImageDialog', function(callback) {
|
||||
|
||||
|
||||
var dialogInsertClick = function() {
|
||||
callback($url.val().length > 0 ? $url.val(): null);
|
||||
dialogClose();
|
||||
|
|
@ -113,18 +113,18 @@
|
|||
$file.val('');
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
$file.ajaxfileupload({
|
||||
'action': '<?php echo site_url() ?>upload.php',
|
||||
'onComplete': uploadComplete,
|
||||
});
|
||||
|
||||
|
||||
$dialog.dialog('open');
|
||||
|
||||
return true; // tell the editor that we'll take care of getting the image url
|
||||
});
|
||||
|
||||
editor.run();
|
||||
|
||||
|
||||
})();
|
||||
</script>
|
||||
|
|
@ -71,19 +71,19 @@
|
|||
(function () {
|
||||
var converter = new Markdown.Converter();
|
||||
var editor = new Markdown.Editor(converter);
|
||||
|
||||
|
||||
var $dialog = $('#insertImageDialog').dialog({
|
||||
autoOpen: false,
|
||||
closeOnEscape: false,
|
||||
open: function(event, ui) { $(".ui-dialog-titlebar-close").hide(); }
|
||||
});
|
||||
|
||||
|
||||
var $url = $('input[type=text]', $dialog);
|
||||
var $file = $('input[type=file]', $dialog);
|
||||
var base = '<?php echo site_url() ?>';
|
||||
|
||||
|
||||
editor.hooks.set('insertImageDialog', function(callback) {
|
||||
|
||||
|
||||
var dialogInsertClick = function() {
|
||||
callback($url.val().length > 0 ? $url.val(): null);
|
||||
dialogClose();
|
||||
|
|
@ -113,18 +113,18 @@
|
|||
$file.val('');
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
$file.ajaxfileupload({
|
||||
'action': '<?php echo site_url() ?>upload.php',
|
||||
'onComplete': uploadComplete,
|
||||
});
|
||||
|
||||
|
||||
$dialog.dialog('open');
|
||||
|
||||
return true; // tell the editor that we'll take care of getting the image url
|
||||
});
|
||||
|
||||
editor.run();
|
||||
|
||||
|
||||
})();
|
||||
</script>
|
||||
|
|
@ -58,19 +58,19 @@
|
|||
(function () {
|
||||
var converter = new Markdown.Converter();
|
||||
var editor = new Markdown.Editor(converter);
|
||||
|
||||
|
||||
var $dialog = $('#insertImageDialog').dialog({
|
||||
autoOpen: false,
|
||||
closeOnEscape: false,
|
||||
open: function(event, ui) { $(".ui-dialog-titlebar-close").hide(); }
|
||||
});
|
||||
|
||||
|
||||
var $url = $('input[type=text]', $dialog);
|
||||
var $file = $('input[type=file]', $dialog);
|
||||
var base = '<?php echo site_url() ?>';
|
||||
|
||||
|
||||
editor.hooks.set('insertImageDialog', function(callback) {
|
||||
|
||||
|
||||
var dialogInsertClick = function() {
|
||||
callback($url.val().length > 0 ? $url.val(): null);
|
||||
dialogClose();
|
||||
|
|
@ -100,18 +100,18 @@
|
|||
$file.val('');
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
$file.ajaxfileupload({
|
||||
'action': '<?php echo site_url() ?>upload.php',
|
||||
'onComplete': uploadComplete,
|
||||
});
|
||||
|
||||
|
||||
$dialog.dialog('open');
|
||||
|
||||
return true; // tell the editor that we'll take care of getting the image url
|
||||
});
|
||||
|
||||
editor.run();
|
||||
|
||||
|
||||
})();
|
||||
</script>
|
||||
|
|
@ -64,19 +64,19 @@
|
|||
(function () {
|
||||
var converter = new Markdown.Converter();
|
||||
var editor = new Markdown.Editor(converter);
|
||||
|
||||
|
||||
var $dialog = $('#insertImageDialog').dialog({
|
||||
autoOpen: false,
|
||||
closeOnEscape: false,
|
||||
open: function(event, ui) { $(".ui-dialog-titlebar-close").hide(); }
|
||||
});
|
||||
|
||||
|
||||
var $url = $('input[type=text]', $dialog);
|
||||
var $file = $('input[type=file]', $dialog);
|
||||
var base = '<?php echo site_url() ?>';
|
||||
|
||||
|
||||
editor.hooks.set('insertImageDialog', function(callback) {
|
||||
|
||||
|
||||
var dialogInsertClick = function() {
|
||||
callback($url.val().length > 0 ? $url.val(): null);
|
||||
dialogClose();
|
||||
|
|
@ -106,18 +106,18 @@
|
|||
$file.val('');
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
$file.ajaxfileupload({
|
||||
'action': '<?php echo site_url() ?>upload.php',
|
||||
'onComplete': uploadComplete,
|
||||
});
|
||||
|
||||
|
||||
$dialog.dialog('open');
|
||||
|
||||
return true; // tell the editor that we'll take care of getting the image url
|
||||
});
|
||||
|
||||
editor.run();
|
||||
|
||||
|
||||
})();
|
||||
</script>
|
||||
|
|
@ -71,19 +71,19 @@
|
|||
(function () {
|
||||
var converter = new Markdown.Converter();
|
||||
var editor = new Markdown.Editor(converter);
|
||||
|
||||
|
||||
var $dialog = $('#insertImageDialog').dialog({
|
||||
autoOpen: false,
|
||||
closeOnEscape: false,
|
||||
open: function(event, ui) { $(".ui-dialog-titlebar-close").hide(); }
|
||||
});
|
||||
|
||||
|
||||
var $url = $('input[type=text]', $dialog);
|
||||
var $file = $('input[type=file]', $dialog);
|
||||
var base = '<?php echo site_url() ?>';
|
||||
|
||||
|
||||
editor.hooks.set('insertImageDialog', function(callback) {
|
||||
|
||||
|
||||
var dialogInsertClick = function() {
|
||||
callback($url.val().length > 0 ? $url.val(): null);
|
||||
dialogClose();
|
||||
|
|
@ -113,18 +113,18 @@
|
|||
$file.val('');
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
$file.ajaxfileupload({
|
||||
'action': '<?php echo site_url() ?>upload.php',
|
||||
'onComplete': uploadComplete,
|
||||
});
|
||||
|
||||
|
||||
$dialog.dialog('open');
|
||||
|
||||
return true; // tell the editor that we'll take care of getting the image url
|
||||
});
|
||||
|
||||
editor.run();
|
||||
|
||||
|
||||
})();
|
||||
</script>
|
||||
|
|
@ -71,19 +71,19 @@
|
|||
(function () {
|
||||
var converter = new Markdown.Converter();
|
||||
var editor = new Markdown.Editor(converter);
|
||||
|
||||
|
||||
var $dialog = $('#insertImageDialog').dialog({
|
||||
autoOpen: false,
|
||||
closeOnEscape: false,
|
||||
open: function(event, ui) { $(".ui-dialog-titlebar-close").hide(); }
|
||||
});
|
||||
|
||||
|
||||
var $url = $('input[type=text]', $dialog);
|
||||
var $file = $('input[type=file]', $dialog);
|
||||
var base = '<?php echo site_url() ?>';
|
||||
|
||||
|
||||
editor.hooks.set('insertImageDialog', function(callback) {
|
||||
|
||||
|
||||
var dialogInsertClick = function() {
|
||||
callback($url.val().length > 0 ? $url.val(): null);
|
||||
dialogClose();
|
||||
|
|
@ -113,18 +113,18 @@
|
|||
$file.val('');
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
$file.ajaxfileupload({
|
||||
'action': '<?php echo site_url() ?>upload.php',
|
||||
'onComplete': uploadComplete,
|
||||
});
|
||||
|
||||
|
||||
$dialog.dialog('open');
|
||||
|
||||
return true; // tell the editor that we'll take care of getting the image url
|
||||
});
|
||||
|
||||
editor.run();
|
||||
|
||||
|
||||
})();
|
||||
</script>
|
||||
|
|
@ -65,7 +65,7 @@ $delete = site_url() . date('Y/m', $postdate) . '/' . $oldmd . '/delete?destinat
|
|||
Url (optional)<br><input type="text" name="url" class="text" value="<?php echo $oldmd ?>"/><br>
|
||||
<span class="help">If the url leave empty we will use the post title.</span><br><br>
|
||||
Year, Month, Day<br><input type="date" name="date" class="text" value="<?php echo date('Y-m-d', $postdate); ?>"><br>
|
||||
Hour, Minute, Second<br><input
|
||||
Hour, Minute, Second<br><input
|
||||
type="time" name="time" class="text" value="<?php echo $time->format('H:i:s'); ?>"><br><br>
|
||||
Meta Description (optional)<br><textarea name="description" maxlength="200"><?php if (isset($p->description)) {
|
||||
echo $p->description;
|
||||
|
|
@ -82,7 +82,7 @@ $delete = site_url() . date('Y/m', $postdate) . '/' . $oldmd . '/delete?destinat
|
|||
echo 'error';
|
||||
}
|
||||
} ?>" name="content" cols="20" rows="10"><?php echo $oldcontent ?></textarea><br>
|
||||
<input type="hidden" name="is_audio" class="text" value="is_audio"/>
|
||||
<input type="hidden" name="is_audio" class="text" value="is_audio"/>
|
||||
<input type="hidden" name="oldfile" class="text" value="<?php echo $url ?>"/>
|
||||
<input type="hidden" name="csrf_token" value="<?php echo get_csrf() ?>">
|
||||
<?php if ($isdraft[2] == 'draft') { ?>
|
||||
|
|
@ -109,19 +109,19 @@ $delete = site_url() . date('Y/m', $postdate) . '/' . $oldmd . '/delete?destinat
|
|||
(function () {
|
||||
var converter = new Markdown.Converter();
|
||||
var editor = new Markdown.Editor(converter);
|
||||
|
||||
|
||||
var $dialog = $('#insertImageDialog').dialog({
|
||||
autoOpen: false,
|
||||
closeOnEscape: false,
|
||||
open: function(event, ui) { $(".ui-dialog-titlebar-close").hide(); }
|
||||
});
|
||||
|
||||
|
||||
var $url = $('input[type=text]', $dialog);
|
||||
var $file = $('input[type=file]', $dialog);
|
||||
var base = '<?php echo site_url() ?>';
|
||||
|
||||
|
||||
editor.hooks.set('insertImageDialog', function(callback) {
|
||||
|
||||
|
||||
var dialogInsertClick = function() {
|
||||
callback($url.val().length > 0 ? $url.val(): null);
|
||||
dialogClose();
|
||||
|
|
@ -151,18 +151,18 @@ $delete = site_url() . date('Y/m', $postdate) . '/' . $oldmd . '/delete?destinat
|
|||
$file.val('');
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
$file.ajaxfileupload({
|
||||
'action': '<?php echo site_url() ?>upload.php',
|
||||
'onComplete': uploadComplete,
|
||||
});
|
||||
|
||||
|
||||
$dialog.dialog('open');
|
||||
|
||||
return true; // tell the editor that we'll take care of getting the image url
|
||||
});
|
||||
|
||||
editor.run();
|
||||
|
||||
|
||||
})();
|
||||
</script>
|
||||
|
|
@ -65,7 +65,7 @@ $delete = site_url() . date('Y/m', $postdate) . '/' . $oldmd . '/delete?destinat
|
|||
Url (optional)<br><input type="text" name="url" class="text" value="<?php echo $oldmd ?>"/><br>
|
||||
<span class="help">If the url leave empty we will use the post title.</span><br><br>
|
||||
Year, Month, Day<br><input type="date" name="date" class="text" value="<?php echo date('Y-m-d', $postdate); ?>"><br>
|
||||
Hour, Minute, Second<br><input
|
||||
Hour, Minute, Second<br><input
|
||||
type="time" name="time" class="text" value="<?php echo $time->format('H:i:s'); ?>"><br><br>
|
||||
Meta Description (optional)<br><textarea name="description" maxlength="200"><?php if (isset($p->description)) {
|
||||
echo $p->description;
|
||||
|
|
@ -82,7 +82,7 @@ $delete = site_url() . date('Y/m', $postdate) . '/' . $oldmd . '/delete?destinat
|
|||
echo 'error';
|
||||
}
|
||||
} ?>" name="content" cols="20" rows="10"><?php echo $oldcontent ?></textarea><br>
|
||||
<input type="hidden" name="is_image" class="text" value="is_image"/>
|
||||
<input type="hidden" name="is_image" class="text" value="is_image"/>
|
||||
<input type="hidden" name="oldfile" class="text" value="<?php echo $url ?>"/>
|
||||
<input type="hidden" name="csrf_token" value="<?php echo get_csrf() ?>">
|
||||
<?php if ($isdraft[2] == 'draft') { ?>
|
||||
|
|
@ -109,19 +109,19 @@ $delete = site_url() . date('Y/m', $postdate) . '/' . $oldmd . '/delete?destinat
|
|||
(function () {
|
||||
var converter = new Markdown.Converter();
|
||||
var editor = new Markdown.Editor(converter);
|
||||
|
||||
|
||||
var $dialog = $('#insertImageDialog').dialog({
|
||||
autoOpen: false,
|
||||
closeOnEscape: false,
|
||||
open: function(event, ui) { $(".ui-dialog-titlebar-close").hide(); }
|
||||
});
|
||||
|
||||
|
||||
var $url = $('input[type=text]', $dialog);
|
||||
var $file = $('input[type=file]', $dialog);
|
||||
var base = '<?php echo site_url() ?>';
|
||||
|
||||
|
||||
editor.hooks.set('insertImageDialog', function(callback) {
|
||||
|
||||
|
||||
var dialogInsertClick = function() {
|
||||
callback($url.val().length > 0 ? $url.val(): null);
|
||||
dialogClose();
|
||||
|
|
@ -151,18 +151,18 @@ $delete = site_url() . date('Y/m', $postdate) . '/' . $oldmd . '/delete?destinat
|
|||
$file.val('');
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
$file.ajaxfileupload({
|
||||
'action': '<?php echo site_url() ?>upload.php',
|
||||
'onComplete': uploadComplete,
|
||||
});
|
||||
|
||||
|
||||
$dialog.dialog('open');
|
||||
|
||||
return true; // tell the editor that we'll take care of getting the image url
|
||||
});
|
||||
|
||||
editor.run();
|
||||
|
||||
|
||||
})();
|
||||
</script>
|
||||
|
|
@ -65,7 +65,7 @@ $delete = site_url() . date('Y/m', $postdate) . '/' . $oldmd . '/delete?destinat
|
|||
Url (optional)<br><input type="text" name="url" class="text" value="<?php echo $oldmd ?>"/><br>
|
||||
<span class="help">If the url leave empty we will use the post title.</span><br><br>
|
||||
Year, Month, Day<br><input type="date" name="date" class="text" value="<?php echo date('Y-m-d', $postdate); ?>"><br>
|
||||
Hour, Minute, Second<br><input
|
||||
Hour, Minute, Second<br><input
|
||||
type="time" name="time" class="text" value="<?php echo $time->format('H:i:s'); ?>"><br><br>
|
||||
Meta Description (optional)<br><textarea name="description" maxlength="200"><?php if (isset($p->description)) {
|
||||
echo $p->description;
|
||||
|
|
@ -82,7 +82,7 @@ $delete = site_url() . date('Y/m', $postdate) . '/' . $oldmd . '/delete?destinat
|
|||
echo 'error';
|
||||
}
|
||||
} ?>" name="content" cols="20" rows="10"><?php echo $oldcontent ?></textarea><br>
|
||||
<input type="hidden" name="is_link" class="text" value="is_link"/>
|
||||
<input type="hidden" name="is_link" class="text" value="is_link"/>
|
||||
<input type="hidden" name="oldfile" class="text" value="<?php echo $url ?>"/>
|
||||
<input type="hidden" name="csrf_token" value="<?php echo get_csrf() ?>">
|
||||
<?php if ($isdraft[2] == 'draft') { ?>
|
||||
|
|
@ -109,19 +109,19 @@ $delete = site_url() . date('Y/m', $postdate) . '/' . $oldmd . '/delete?destinat
|
|||
(function () {
|
||||
var converter = new Markdown.Converter();
|
||||
var editor = new Markdown.Editor(converter);
|
||||
|
||||
|
||||
var $dialog = $('#insertImageDialog').dialog({
|
||||
autoOpen: false,
|
||||
closeOnEscape: false,
|
||||
open: function(event, ui) { $(".ui-dialog-titlebar-close").hide(); }
|
||||
});
|
||||
|
||||
|
||||
var $url = $('input[type=text]', $dialog);
|
||||
var $file = $('input[type=file]', $dialog);
|
||||
var base = '<?php echo site_url() ?>';
|
||||
|
||||
|
||||
editor.hooks.set('insertImageDialog', function(callback) {
|
||||
|
||||
|
||||
var dialogInsertClick = function() {
|
||||
callback($url.val().length > 0 ? $url.val(): null);
|
||||
dialogClose();
|
||||
|
|
@ -151,18 +151,18 @@ $delete = site_url() . date('Y/m', $postdate) . '/' . $oldmd . '/delete?destinat
|
|||
$file.val('');
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
$file.ajaxfileupload({
|
||||
'action': '<?php echo site_url() ?>upload.php',
|
||||
'onComplete': uploadComplete,
|
||||
});
|
||||
|
||||
|
||||
$dialog.dialog('open');
|
||||
|
||||
return true; // tell the editor that we'll take care of getting the image url
|
||||
});
|
||||
|
||||
editor.run();
|
||||
|
||||
|
||||
})();
|
||||
</script>
|
||||
|
|
@ -23,12 +23,12 @@ if (isset($p->url)) {
|
|||
$delete = $p->url . '/delete?destination=' . $destination;
|
||||
}
|
||||
else {
|
||||
if(empty($sub)) {
|
||||
$delete = site_url() . $oldmd . '/delete?destination=' . $destination;
|
||||
}
|
||||
else {
|
||||
$delete = site_url() . $static .'/'. $sub . '/delete?destination=' . $destination;
|
||||
}
|
||||
if(empty($sub)) {
|
||||
$delete = site_url() . $oldmd . '/delete?destination=' . $destination;
|
||||
}
|
||||
else {
|
||||
$delete = site_url() . $static .'/'. $sub . '/delete?destination=' . $destination;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
@ -87,19 +87,19 @@ else {
|
|||
(function () {
|
||||
var converter = new Markdown.Converter();
|
||||
var editor = new Markdown.Editor(converter);
|
||||
|
||||
|
||||
var $dialog = $('#insertImageDialog').dialog({
|
||||
autoOpen: false,
|
||||
closeOnEscape: false,
|
||||
open: function(event, ui) { $(".ui-dialog-titlebar-close").hide(); }
|
||||
});
|
||||
|
||||
|
||||
var $url = $('input[type=text]', $dialog);
|
||||
var $file = $('input[type=file]', $dialog);
|
||||
var base = '<?php echo site_url() ?>';
|
||||
|
||||
|
||||
editor.hooks.set('insertImageDialog', function(callback) {
|
||||
|
||||
|
||||
var dialogInsertClick = function() {
|
||||
callback($url.val().length > 0 ? $url.val(): null);
|
||||
dialogClose();
|
||||
|
|
@ -129,18 +129,18 @@ else {
|
|||
$file.val('');
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
$file.ajaxfileupload({
|
||||
'action': '<?php echo site_url() ?>upload.php',
|
||||
'onComplete': uploadComplete,
|
||||
});
|
||||
|
||||
|
||||
$dialog.dialog('open');
|
||||
|
||||
return true; // tell the editor that we'll take care of getting the image url
|
||||
});
|
||||
|
||||
editor.run();
|
||||
|
||||
|
||||
})();
|
||||
</script>
|
||||
|
|
@ -64,7 +64,7 @@ $delete = site_url() . date('Y/m', $postdate) . '/' . $oldmd . '/delete?destinat
|
|||
Url (optional)<br><input type="text" name="url" class="text" value="<?php echo $oldmd ?>"/><br>
|
||||
<span class="help">If the url leave empty we will use the post title.</span><br><br>
|
||||
Year, Month, Day<br><input type="date" name="date" class="text" value="<?php echo date('Y-m-d', $postdate); ?>"><br>
|
||||
Hour, Minute, Second<br><input
|
||||
Hour, Minute, Second<br><input
|
||||
type="time" name="time" class="text" value="<?php echo $time->format('H:i:s'); ?>"><br><br>
|
||||
Meta Description (optional)<br><textarea name="description" maxlength="200"><?php if (isset($p->description)) {
|
||||
echo $p->description;
|
||||
|
|
@ -103,19 +103,19 @@ $delete = site_url() . date('Y/m', $postdate) . '/' . $oldmd . '/delete?destinat
|
|||
(function () {
|
||||
var converter = new Markdown.Converter();
|
||||
var editor = new Markdown.Editor(converter);
|
||||
|
||||
|
||||
var $dialog = $('#insertImageDialog').dialog({
|
||||
autoOpen: false,
|
||||
closeOnEscape: false,
|
||||
open: function(event, ui) { $(".ui-dialog-titlebar-close").hide(); }
|
||||
});
|
||||
|
||||
|
||||
var $url = $('input[type=text]', $dialog);
|
||||
var $file = $('input[type=file]', $dialog);
|
||||
var base = '<?php echo site_url() ?>';
|
||||
|
||||
|
||||
editor.hooks.set('insertImageDialog', function(callback) {
|
||||
|
||||
|
||||
var dialogInsertClick = function() {
|
||||
callback($url.val().length > 0 ? $url.val(): null);
|
||||
dialogClose();
|
||||
|
|
@ -145,18 +145,18 @@ $delete = site_url() . date('Y/m', $postdate) . '/' . $oldmd . '/delete?destinat
|
|||
$file.val('');
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
$file.ajaxfileupload({
|
||||
'action': '<?php echo site_url() ?>upload.php',
|
||||
'onComplete': uploadComplete,
|
||||
});
|
||||
|
||||
|
||||
$dialog.dialog('open');
|
||||
|
||||
return true; // tell the editor that we'll take care of getting the image url
|
||||
});
|
||||
|
||||
editor.run();
|
||||
|
||||
|
||||
})();
|
||||
</script>
|
||||
|
|
@ -66,19 +66,19 @@ if (file_exists($filename)) {
|
|||
(function () {
|
||||
var converter = new Markdown.Converter();
|
||||
var editor = new Markdown.Editor(converter);
|
||||
|
||||
|
||||
var $dialog = $('#insertImageDialog').dialog({
|
||||
autoOpen: false,
|
||||
closeOnEscape: false,
|
||||
open: function(event, ui) { $(".ui-dialog-titlebar-close").hide(); }
|
||||
});
|
||||
|
||||
|
||||
var $url = $('input[type=text]', $dialog);
|
||||
var $file = $('input[type=file]', $dialog);
|
||||
var base = '<?php echo site_url() ?>';
|
||||
|
||||
|
||||
editor.hooks.set('insertImageDialog', function(callback) {
|
||||
|
||||
|
||||
var dialogInsertClick = function() {
|
||||
callback($url.val().length > 0 ? $url.val(): null);
|
||||
dialogClose();
|
||||
|
|
@ -108,18 +108,18 @@ if (file_exists($filename)) {
|
|||
$file.val('');
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
$file.ajaxfileupload({
|
||||
'action': '<?php echo site_url() ?>upload.php',
|
||||
'onComplete': uploadComplete,
|
||||
});
|
||||
|
||||
|
||||
$dialog.dialog('open');
|
||||
|
||||
return true; // tell the editor that we'll take care of getting the image url
|
||||
});
|
||||
|
||||
editor.run();
|
||||
|
||||
|
||||
})();
|
||||
</script>
|
||||
|
|
@ -65,7 +65,7 @@ $delete = site_url() . date('Y/m', $postdate) . '/' . $oldmd . '/delete?destinat
|
|||
Url (optional)<br><input type="text" name="url" class="text" value="<?php echo $oldmd ?>"/><br>
|
||||
<span class="help">If the url leave empty we will use the post title.</span><br><br>
|
||||
Year, Month, Day<br><input type="date" name="date" class="text" value="<?php echo date('Y-m-d', $postdate); ?>"><br>
|
||||
Hour, Minute, Second<br><input
|
||||
Hour, Minute, Second<br><input
|
||||
type="time" name="time" class="text" value="<?php echo $time->format('H:i:s'); ?>"><br><br>
|
||||
Meta Description (optional)<br><textarea name="description" maxlength="200"><?php if (isset($p->description)) {
|
||||
echo $p->description;
|
||||
|
|
@ -82,7 +82,7 @@ $delete = site_url() . date('Y/m', $postdate) . '/' . $oldmd . '/delete?destinat
|
|||
echo 'error';
|
||||
}
|
||||
} ?>" name="content" cols="20" rows="10"><?php echo $oldcontent ?></textarea><br>
|
||||
<input type="hidden" name="is_quote" class="text" value="is_quote"/>
|
||||
<input type="hidden" name="is_quote" class="text" value="is_quote"/>
|
||||
<input type="hidden" name="oldfile" class="text" value="<?php echo $url ?>"/>
|
||||
<input type="hidden" name="csrf_token" value="<?php echo get_csrf() ?>">
|
||||
<?php if ($isdraft[2] == 'draft') { ?>
|
||||
|
|
@ -109,19 +109,19 @@ $delete = site_url() . date('Y/m', $postdate) . '/' . $oldmd . '/delete?destinat
|
|||
(function () {
|
||||
var converter = new Markdown.Converter();
|
||||
var editor = new Markdown.Editor(converter);
|
||||
|
||||
|
||||
var $dialog = $('#insertImageDialog').dialog({
|
||||
autoOpen: false,
|
||||
closeOnEscape: false,
|
||||
open: function(event, ui) { $(".ui-dialog-titlebar-close").hide(); }
|
||||
});
|
||||
|
||||
|
||||
var $url = $('input[type=text]', $dialog);
|
||||
var $file = $('input[type=file]', $dialog);
|
||||
var base = '<?php echo site_url() ?>';
|
||||
|
||||
|
||||
editor.hooks.set('insertImageDialog', function(callback) {
|
||||
|
||||
|
||||
var dialogInsertClick = function() {
|
||||
callback($url.val().length > 0 ? $url.val(): null);
|
||||
dialogClose();
|
||||
|
|
@ -151,18 +151,18 @@ $delete = site_url() . date('Y/m', $postdate) . '/' . $oldmd . '/delete?destinat
|
|||
$file.val('');
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
$file.ajaxfileupload({
|
||||
'action': '<?php echo site_url() ?>upload.php',
|
||||
'onComplete': uploadComplete,
|
||||
});
|
||||
|
||||
|
||||
$dialog.dialog('open');
|
||||
|
||||
return true; // tell the editor that we'll take care of getting the image url
|
||||
});
|
||||
|
||||
editor.run();
|
||||
|
||||
|
||||
})();
|
||||
</script>
|
||||
|
|
@ -65,7 +65,7 @@ $delete = site_url() . date('Y/m', $postdate) . '/' . $oldmd . '/delete?destinat
|
|||
Url (optional)<br><input type="text" name="url" class="text" value="<?php echo $oldmd ?>"/><br>
|
||||
<span class="help">If the url leave empty we will use the post title.</span><br><br>
|
||||
Year, Month, Day<br><input type="date" name="date" class="text" value="<?php echo date('Y-m-d', $postdate); ?>"><br>
|
||||
Hour, Minute, Second<br><input
|
||||
Hour, Minute, Second<br><input
|
||||
type="time" name="time" class="text" value="<?php echo $time->format('H:i:s'); ?>"><br><br>
|
||||
Meta Description (optional)<br><textarea name="description" maxlength="200"><?php if (isset($p->description)) {
|
||||
echo $p->description;
|
||||
|
|
@ -82,7 +82,7 @@ $delete = site_url() . date('Y/m', $postdate) . '/' . $oldmd . '/delete?destinat
|
|||
echo 'error';
|
||||
}
|
||||
} ?>" name="content" cols="20" rows="10"><?php echo $oldcontent ?></textarea><br>
|
||||
<input type="hidden" name="is_video" class="text" value="is_video"/>
|
||||
<input type="hidden" name="is_video" class="text" value="is_video"/>
|
||||
<input type="hidden" name="oldfile" class="text" value="<?php echo $url ?>"/>
|
||||
<input type="hidden" name="csrf_token" value="<?php echo get_csrf() ?>">
|
||||
<?php if ($isdraft[2] == 'draft') { ?>
|
||||
|
|
@ -109,19 +109,19 @@ $delete = site_url() . date('Y/m', $postdate) . '/' . $oldmd . '/delete?destinat
|
|||
(function () {
|
||||
var converter = new Markdown.Converter();
|
||||
var editor = new Markdown.Editor(converter);
|
||||
|
||||
|
||||
var $dialog = $('#insertImageDialog').dialog({
|
||||
autoOpen: false,
|
||||
closeOnEscape: false,
|
||||
open: function(event, ui) { $(".ui-dialog-titlebar-close").hide(); }
|
||||
});
|
||||
|
||||
|
||||
var $url = $('input[type=text]', $dialog);
|
||||
var $file = $('input[type=file]', $dialog);
|
||||
var base = '<?php echo site_url() ?>';
|
||||
|
||||
|
||||
editor.hooks.set('insertImageDialog', function(callback) {
|
||||
|
||||
|
||||
var dialogInsertClick = function() {
|
||||
callback($url.val().length > 0 ? $url.val(): null);
|
||||
dialogClose();
|
||||
|
|
@ -151,18 +151,18 @@ $delete = site_url() . date('Y/m', $postdate) . '/' . $oldmd . '/delete?destinat
|
|||
$file.val('');
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
$file.ajaxfileupload({
|
||||
'action': '<?php echo site_url() ?>upload.php',
|
||||
'onComplete': uploadComplete,
|
||||
});
|
||||
|
||||
|
||||
$dialog.dialog('open');
|
||||
|
||||
return true; // tell the editor that we'll take care of getting the image url
|
||||
});
|
||||
|
||||
editor.run();
|
||||
|
||||
|
||||
})();
|
||||
</script>
|
||||
|
|
@ -15,5 +15,5 @@ if ($updater->able()) {
|
|||
echo '<p><a href="' . site_url() . 'admin/update/now/' . $CSRF . '" alt="' . $info['name'] . '">Update to ' . $info['tag_name'] . '</a></p>';
|
||||
} else {
|
||||
echo '<h3>No Available Update</h3>';
|
||||
echo '<p>You are using the latest HTMLy version.</p>';
|
||||
echo '<p>You are using the latest HTMLy version.</p>';
|
||||
}
|
||||
154
system/htmly.php
154
system/htmly.php
|
|
@ -1693,8 +1693,8 @@ post('/:static/:sub/edit', function ($static, $sub) {
|
|||
'postTitle' => $title,
|
||||
'postUrl' => $url,
|
||||
'postContent' => $content,
|
||||
'static' => $static,
|
||||
'sub' => $sub,
|
||||
'static' => $static,
|
||||
'sub' => $sub,
|
||||
'bodyclass' => 'editpage',
|
||||
'breadcrumb' => '<a href="' . site_url() . '">' . config('breadcrumb.home') . '</a> » Edit page'
|
||||
));
|
||||
|
|
@ -1793,20 +1793,20 @@ get('/:year/:month/:name', function ($year, $month, $name) {
|
|||
} else {
|
||||
$next = array();
|
||||
}
|
||||
|
||||
if (isset($current->image)) {
|
||||
$var = 'imagePost';
|
||||
} elseif (isset($current->link)) {
|
||||
$var = 'linkPost';
|
||||
} elseif (isset($current->quote)) {
|
||||
$var = 'quotePost';
|
||||
} elseif (isset($current->audio)) {
|
||||
$var = 'audioPost';
|
||||
} elseif (isset($current->video)) {
|
||||
$var = 'videoPost'; }
|
||||
else {
|
||||
$var = 'blogPost';
|
||||
}
|
||||
|
||||
if (isset($current->image)) {
|
||||
$var = 'imagePost';
|
||||
} elseif (isset($current->link)) {
|
||||
$var = 'linkPost';
|
||||
} elseif (isset($current->quote)) {
|
||||
$var = 'quotePost';
|
||||
} elseif (isset($current->audio)) {
|
||||
$var = 'audioPost';
|
||||
} elseif (isset($current->video)) {
|
||||
$var = 'videoPost'; }
|
||||
else {
|
||||
$var = 'blogPost';
|
||||
}
|
||||
|
||||
render('post', array(
|
||||
'title' => $current->title . ' - ' . blog_title(),
|
||||
|
|
@ -1843,21 +1843,21 @@ get('/:year/:month/:name/edit', function ($year, $month, $name) {
|
|||
}
|
||||
|
||||
$current = $post['current'];
|
||||
|
||||
if (isset($current->image)) {
|
||||
$var = 'edit-image';
|
||||
} elseif (isset($current->link)) {
|
||||
$var = 'edit-link';
|
||||
} elseif (isset($current->quote)) {
|
||||
$var = 'edit-quote';
|
||||
} elseif (isset($current->audio)) {
|
||||
$var = 'edit-audio';
|
||||
} elseif (isset($current->video)) {
|
||||
$var = 'edit-video';
|
||||
} else {
|
||||
$var = 'edit-post';
|
||||
}
|
||||
|
||||
|
||||
if (isset($current->image)) {
|
||||
$var = 'edit-image';
|
||||
} elseif (isset($current->link)) {
|
||||
$var = 'edit-link';
|
||||
} elseif (isset($current->quote)) {
|
||||
$var = 'edit-quote';
|
||||
} elseif (isset($current->audio)) {
|
||||
$var = 'edit-audio';
|
||||
} elseif (isset($current->video)) {
|
||||
$var = 'edit-video';
|
||||
} else {
|
||||
$var = 'edit-post';
|
||||
}
|
||||
|
||||
if ($user === $current->author || $role === 'admin') {
|
||||
render($var, array(
|
||||
'title' => $var .' '. blog_title(),
|
||||
|
|
@ -1889,9 +1889,9 @@ post('/:year/:month/:name/edit', function () {
|
|||
$proper = is_csrf_proper(from($_REQUEST, 'csrf_token'));
|
||||
|
||||
$title = from($_REQUEST, 'title');
|
||||
$is_post = from($_REQUEST, 'is_post');
|
||||
$is_post = from($_REQUEST, 'is_post');
|
||||
$image = from($_REQUEST, 'image');
|
||||
$is_image = from($_REQUEST, 'is_image');
|
||||
$is_image = from($_REQUEST, 'is_image');
|
||||
$video = from($_REQUEST, 'video');
|
||||
$is_video = from($_REQUEST, 'is_video');
|
||||
$link = from($_REQUEST, 'link');
|
||||
|
|
@ -1914,57 +1914,57 @@ post('/:year/:month/:name/edit', function () {
|
|||
if ($date !== null && $time !== null) {
|
||||
$dateTime = $date . ' ' . $time;
|
||||
}
|
||||
|
||||
if (!empty($is_image)) {
|
||||
$var = 'edit-image';
|
||||
} elseif (!empty($is_video)) {
|
||||
$var = 'edit-video';
|
||||
} elseif (!empty($is_link)) {
|
||||
$var = 'edit-link';
|
||||
} elseif (!empty($is_quote)) {
|
||||
$var = 'edit-quote';
|
||||
} elseif (!empty($is_audio)) {
|
||||
$var = 'edit-audio';
|
||||
} elseif (!empty($is_post)) {
|
||||
$var = 'edit-post';
|
||||
}
|
||||
|
||||
if (!empty($is_image)) {
|
||||
$var = 'edit-image';
|
||||
} elseif (!empty($is_video)) {
|
||||
$var = 'edit-video';
|
||||
} elseif (!empty($is_link)) {
|
||||
$var = 'edit-link';
|
||||
} elseif (!empty($is_quote)) {
|
||||
$var = 'edit-quote';
|
||||
} elseif (!empty($is_audio)) {
|
||||
$var = 'edit-audio';
|
||||
} elseif (!empty($is_post)) {
|
||||
$var = 'edit-post';
|
||||
}
|
||||
|
||||
if ($proper && !empty($title) && !empty($tag) && !empty($content) && !empty($image)) {
|
||||
if (empty($url)) {
|
||||
$url = $title;
|
||||
}
|
||||
edit_image($title, $tag, $url, $content, $oldfile, $destination, $description, $dateTime, $image, $revertPost, $publishDraft);
|
||||
|
||||
|
||||
} else if ($proper && !empty($title) && !empty($tag) && !empty($content) && !empty($video)) {
|
||||
if (empty($url)) {
|
||||
$url = $title;
|
||||
}
|
||||
edit_video($title, $tag, $url, $content, $oldfile, $destination, $description, $dateTime, $video, $revertPost, $publishDraft);
|
||||
|
||||
|
||||
} else if ($proper && !empty($title) && !empty($tag) && !empty($content) && !empty($link)) {
|
||||
if (empty($url)) {
|
||||
$url = $title;
|
||||
}
|
||||
edit_link($title, $tag, $url, $content, $oldfile, $destination, $description, $dateTime, $link, $revertPost, $publishDraft);
|
||||
|
||||
|
||||
} else if ($proper && !empty($title) && !empty($tag) && !empty($content) && !empty($quote)) {
|
||||
if (empty($url)) {
|
||||
$url = $title;
|
||||
}
|
||||
edit_quote($title, $tag, $url, $content, $oldfile, $destination, $description, $dateTime, $quote, $revertPost, $publishDraft);
|
||||
|
||||
|
||||
} else if ($proper && !empty($title) && !empty($tag) && !empty($content) && !empty($audio)) {
|
||||
if (empty($url)) {
|
||||
$url = $title;
|
||||
}
|
||||
edit_audio($title, $tag, $url, $content, $oldfile, $destination, $description, $dateTime, $audio, $revertPost, $publishDraft);
|
||||
|
||||
|
||||
} else if ($proper && !empty($title) && !empty($tag) && !empty($content) && !empty($is_post)) {
|
||||
if (empty($url)) {
|
||||
$url = $title;
|
||||
}
|
||||
edit_post($title, $tag, $url, $content, $oldfile, $destination, $description, $dateTime, $revertPost, $publishDraft);
|
||||
|
||||
edit_post($title, $tag, $url, $content, $oldfile, $destination, $description, $dateTime, $revertPost, $publishDraft);
|
||||
|
||||
} else {
|
||||
$message['error'] = '';
|
||||
if (empty($title)) {
|
||||
|
|
@ -1980,28 +1980,28 @@ post('/:year/:month/:name/edit', function () {
|
|||
$message['error'] .= '<li>CSRF Token not correct.</li>';
|
||||
}
|
||||
|
||||
if (!empty($is_image)) {
|
||||
if (empty($image)) {
|
||||
$message['error'] .= '<li>Image field is required.</li>';
|
||||
}
|
||||
} elseif (!empty($is_video)) {
|
||||
if (empty($video)) {
|
||||
$message['error'] .= '<li>Video field is required.</li>';
|
||||
}
|
||||
} elseif (!empty($is_link)) {
|
||||
if (empty($link)) {
|
||||
$message['error'] .= '<li>Link field is required.</li>';
|
||||
}
|
||||
} elseif (!empty($is_quote)) {
|
||||
if (empty($quote)) {
|
||||
$message['error'] .= '<li>Quote field is required.</li>';
|
||||
}
|
||||
} elseif (!empty($is_audio)) {
|
||||
if (empty($audio)) {
|
||||
$message['error'] .= '<li>Audio field is required.</li>';
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($is_image)) {
|
||||
if (empty($image)) {
|
||||
$message['error'] .= '<li>Image field is required.</li>';
|
||||
}
|
||||
} elseif (!empty($is_video)) {
|
||||
if (empty($video)) {
|
||||
$message['error'] .= '<li>Video field is required.</li>';
|
||||
}
|
||||
} elseif (!empty($is_link)) {
|
||||
if (empty($link)) {
|
||||
$message['error'] .= '<li>Link field is required.</li>';
|
||||
}
|
||||
} elseif (!empty($is_quote)) {
|
||||
if (empty($quote)) {
|
||||
$message['error'] .= '<li>Quote field is required.</li>';
|
||||
}
|
||||
} elseif (!empty($is_audio)) {
|
||||
if (empty($audio)) {
|
||||
$message['error'] .= '<li>Audio field is required.</li>';
|
||||
}
|
||||
}
|
||||
|
||||
config('views.root', 'system/admin/views');
|
||||
|
||||
render($var, array(
|
||||
|
|
@ -2039,7 +2039,7 @@ get('/:year/:month/:name/delete', function ($year, $month, $name) {
|
|||
if (!$post) {
|
||||
$post = find_draft($year, $month, $name);
|
||||
if (!$post) {
|
||||
not_found();
|
||||
not_found();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -268,9 +268,9 @@ function get_posts($posts, $page = 1, $perpage = 0)
|
|||
$post->title = get_content_tag('t', $content, 'Untitled: ' . date('l jS \of F Y', $post->date));
|
||||
$post->image = get_content_tag('image', $content);
|
||||
$post->video = get_youtube_id(get_content_tag('video', $content));
|
||||
$post->link = get_content_tag('link', $content);
|
||||
$post->quote = get_content_tag('quote', $content);
|
||||
$post->audio = get_content_tag('audio', $content);
|
||||
$post->link = get_content_tag('link', $content);
|
||||
$post->quote = get_content_tag('quote', $content);
|
||||
$post->audio = get_content_tag('audio', $content);
|
||||
|
||||
// Get the contents and convert it to HTML
|
||||
$post->body = MarkdownExtra::defaultTransform(remove_html_comments($content));
|
||||
|
|
@ -404,7 +404,7 @@ function get_tag($tag, $page, $perpage, $random)
|
|||
if (empty($tmp)) {
|
||||
not_found();
|
||||
}
|
||||
|
||||
|
||||
$tmp = array_unique($tmp, SORT_REGULAR);
|
||||
|
||||
return $tmp = get_posts($tmp, $page, $perpage);
|
||||
|
|
@ -490,7 +490,7 @@ function get_author($name)
|
|||
if (!empty($names)) {
|
||||
|
||||
foreach ($names as $index => $v) {
|
||||
|
||||
|
||||
$author = new stdClass;
|
||||
|
||||
// Replaced string
|
||||
|
|
@ -666,7 +666,7 @@ function get_related($tag, $custom = null)
|
|||
$tmp[] = $post;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (empty($custom)) {
|
||||
|
||||
$total = count($tmp);
|
||||
|
|
@ -681,15 +681,15 @@ function get_related($tag, $custom = null)
|
|||
break;
|
||||
}
|
||||
echo '</ul>';
|
||||
|
||||
|
||||
} else {
|
||||
echo '<ul><li>No related post found</li></ul>';
|
||||
echo '<ul><li>No related post found</li></ul>';
|
||||
}
|
||||
|
||||
} else {
|
||||
return $tmp;
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
return $tmp;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Return post count. Matching $var and $str provided.
|
||||
|
|
@ -755,20 +755,20 @@ function keyword_count($keyword)
|
|||
// Return recent posts lists
|
||||
function recent_posts($custom = null, $count = null)
|
||||
{
|
||||
|
||||
|
||||
if (empty($count)) {
|
||||
$count = config('recent.count');
|
||||
if (empty($count)) {
|
||||
$count = 5;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$posts = get_posts(null, 1, $count);
|
||||
|
||||
if (!empty($custom)) {
|
||||
return $posts;
|
||||
|
||||
if (!empty($custom)) {
|
||||
return $posts;
|
||||
} else {
|
||||
|
||||
|
||||
$str = '<ul>';
|
||||
foreach ($posts as $post) {
|
||||
$str .= '<li><a href="' . $post->url . '">' . $post->title . '</a></li>';
|
||||
|
|
@ -778,7 +778,7 @@ function recent_posts($custom = null, $count = null)
|
|||
}
|
||||
$str .= '</ul>';
|
||||
return $str;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -826,11 +826,11 @@ function archive_list($custom = null)
|
|||
$arrow = '►';
|
||||
}
|
||||
$i++;
|
||||
|
||||
|
||||
$by_month = array_count_values($months);
|
||||
# Sort the months
|
||||
krsort($by_month);
|
||||
|
||||
|
||||
$script = <<<EOF
|
||||
if (this.parentNode.className.indexOf('expanded') > -1){this.parentNode.className = 'collapsed';this.innerHTML = '►';} else {this.parentNode.className = 'expanded';this.innerHTML = '▼';}
|
||||
EOF;
|
||||
|
|
@ -878,7 +878,7 @@ function tag_cloud($custom = null)
|
|||
|
||||
$tag_collection = array_count_values($tags);
|
||||
ksort($tag_collection);
|
||||
|
||||
|
||||
if(empty($custom)) {
|
||||
echo '<ul class="taglist">';
|
||||
foreach ($tag_collection as $tag => $count) {
|
||||
|
|
@ -886,7 +886,7 @@ function tag_cloud($custom = null)
|
|||
}
|
||||
echo '</ul>';
|
||||
} else {
|
||||
return $tag_collection;
|
||||
return $tag_collection;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -945,7 +945,7 @@ function get_description($string, $char = null)
|
|||
function get_teaser($text, $char = null)
|
||||
{
|
||||
$teaserType = config('teaser.type');
|
||||
|
||||
|
||||
if(empty($char)) {
|
||||
$char = config('teaser.char');
|
||||
}
|
||||
|
|
@ -1296,11 +1296,11 @@ function get_menu($custom)
|
|||
} else {
|
||||
$active = '';
|
||||
}
|
||||
|
||||
$subPages = get_static_sub_pages(str_replace('.md', '', $base));
|
||||
|
||||
$subPages = get_static_sub_pages(str_replace('.md', '', $base));
|
||||
if (!empty($subPages)) {
|
||||
echo '<li class="' . $class . $active .' dropdown">';
|
||||
echo '<a class="dropdown-toggle" data-toggle="dropdown" href="' . $url . '">' . ucwords($title) . '<b class="caret"></b></a>';
|
||||
echo '<li class="' . $class . $active .' dropdown">';
|
||||
echo '<a class="dropdown-toggle" data-toggle="dropdown" href="' . $url . '">' . ucwords($title) . '<b class="caret"></b></a>';
|
||||
echo '<ul class="subnav dropdown-menu" role="menu">';
|
||||
$iSub = 0;
|
||||
$countSub = count($subPages);
|
||||
|
|
@ -1324,9 +1324,9 @@ function get_menu($custom)
|
|||
}
|
||||
echo '</ul>';
|
||||
} else {
|
||||
echo '<li class="' . $class . $active .'">';
|
||||
echo '<a href="' . $url . '">' . ucwords($title) . '</a>';
|
||||
}
|
||||
echo '<li class="' . $class . $active .'">';
|
||||
echo '<a href="' . $url . '">' . ucwords($title) . '</a>';
|
||||
}
|
||||
echo '</li>';
|
||||
}
|
||||
echo '</ul>';
|
||||
|
|
@ -1345,7 +1345,7 @@ function get_menu($custom)
|
|||
// Search form
|
||||
function search($text = null)
|
||||
{
|
||||
if(!empty($text)) {
|
||||
if(!empty($text)) {
|
||||
echo <<<EOF
|
||||
<form id="search-form" method="get">
|
||||
<input type="text" class="search-input" name="search" value="{$text}" onfocus="if (this.value == '{$text}') {this.value = '';}" onblur="if (this.value == '') {this.value = '{$text}';}">
|
||||
|
|
@ -1359,7 +1359,7 @@ EOF;
|
|||
<input type="submit" value="Search" class="search-button">
|
||||
</form>
|
||||
EOF;
|
||||
}
|
||||
}
|
||||
if (isset($_GET['search'])) {
|
||||
$url = site_url() . 'search/' . $_GET['search'];
|
||||
header("Location: $url");
|
||||
|
|
@ -1874,7 +1874,7 @@ function toolbar()
|
|||
$base = site_url();
|
||||
|
||||
echo <<<EOF
|
||||
<link href="{$base}themes/default/css/toolbar.css" rel="stylesheet" />
|
||||
<link href="{$base}themes/default/css/toolbar.css" rel="stylesheet" />
|
||||
EOF;
|
||||
echo '<div id="toolbar"><ul>';
|
||||
echo '<li><a href="' . $base . 'admin">Admin</a></li>';
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
<a href="<?php echo $p->url ?>#comments"><span><fb:comments-count href=<?php echo $p->url ?>></fb:comments-count> Comments</span></a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php if (!empty($p->image)) { ?>
|
||||
<?php if (!empty($p->image)) { ?>
|
||||
<div class="featured-image">
|
||||
<a href="<?php echo $p->url ?>"><img src="<?php echo $p->image; ?>" alt="<?php echo $p->title ?>"/></a>
|
||||
</div>
|
||||
|
|
@ -34,11 +34,11 @@
|
|||
<iframe src="https://www.youtube.com/embed/<?php echo $p->video; ?>" width="560" height="315" frameborder="0" allowfullscreen></iframe>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if (!empty($p->audio)) { ?>
|
||||
<div class="featured-audio">
|
||||
<iframe width="560" height="315" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=<?php echo $p->audio;?>&auto_play=false&visual=true"></iframe>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if (!empty($p->audio)) { ?>
|
||||
<div class="featured-audio">
|
||||
<iframe width="560" height="315" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=<?php echo $p->audio;?>&auto_play=false&visual=true"></iframe>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if (!empty($p->quote)) { ?>
|
||||
<div class="featured-quote">
|
||||
<blockquote><?php echo $p->quote ?></blockquote>
|
||||
|
|
|
|||
|
|
@ -13,31 +13,31 @@
|
|||
<span itemprop="author"><a href="<?php echo $p->authorUrl ?>"><?php echo $p->author ?></a></span> -
|
||||
<span><a href="<?php echo $p->url ?>" rel="permalink">Permalink</a></span>
|
||||
</div>
|
||||
<?php if (!empty($p->image)) { ?>
|
||||
<div class="featured-image">
|
||||
<a href="<?php echo $p->url ?>"><img src="<?php echo $p->image; ?>" alt="<?php echo $p->title ?>"/></a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if (!empty($p->video)) { ?>
|
||||
<div class="featured-video">
|
||||
<iframe src="https://www.youtube.com/embed/<?php echo $p->video; ?>" width="560" height="315" frameborder="0" allowfullscreen></iframe>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if (!empty($p->audio)) { ?>
|
||||
<div class="featured-audio">
|
||||
<iframe width="560" height="315" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=<?php echo $p->audio;?>&auto_play=false&visual=true"></iframe>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if (!empty($p->quote)) { ?>
|
||||
<div class="featured-quote">
|
||||
<blockquote><?php echo $p->quote ?></blockquote>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if (!empty($p->link)) { ?>
|
||||
<div class="featured-quote">
|
||||
<a href="<?php echo $p->link ?>"><?php echo $p->link ?></a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if (!empty($p->image)) { ?>
|
||||
<div class="featured-image">
|
||||
<a href="<?php echo $p->url ?>"><img src="<?php echo $p->image; ?>" alt="<?php echo $p->title ?>"/></a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if (!empty($p->video)) { ?>
|
||||
<div class="featured-video">
|
||||
<iframe src="https://www.youtube.com/embed/<?php echo $p->video; ?>" width="560" height="315" frameborder="0" allowfullscreen></iframe>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if (!empty($p->audio)) { ?>
|
||||
<div class="featured-audio">
|
||||
<iframe width="560" height="315" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=<?php echo $p->audio;?>&auto_play=false&visual=true"></iframe>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if (!empty($p->quote)) { ?>
|
||||
<div class="featured-quote">
|
||||
<blockquote><?php echo $p->quote ?></blockquote>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if (!empty($p->link)) { ?>
|
||||
<div class="featured-quote">
|
||||
<a href="<?php echo $p->link ?>"><?php echo $p->link ?></a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div class="post-body" itemprop="articleBody">
|
||||
<?php echo $p->body; ?>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
<a href="<?php echo $p->url ?>#comments"><span><fb:comments-count href=<?php echo $p->url ?>></fb:comments-count> Comments</span></a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php if (!empty($p->image)) { ?>
|
||||
<?php if (!empty($p->image)) { ?>
|
||||
<div class="featured-image">
|
||||
<a href="<?php echo $p->url ?>"><img src="<?php echo $p->image; ?>" alt="<?php echo $p->title ?>"/></a>
|
||||
</div>
|
||||
|
|
@ -34,11 +34,11 @@
|
|||
<iframe src="https://www.youtube.com/embed/<?php echo $p->video; ?>" width="560" height="315" frameborder="0" allowfullscreen></iframe>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if (!empty($p->audio)) { ?>
|
||||
<div class="featured-audio">
|
||||
<iframe width="560" height="315" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=<?php echo $p->audio;?>&auto_play=false&visual=true"></iframe>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if (!empty($p->audio)) { ?>
|
||||
<div class="featured-audio">
|
||||
<iframe width="560" height="315" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=<?php echo $p->audio;?>&auto_play=false&visual=true"></iframe>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if (!empty($p->quote)) { ?>
|
||||
<div class="featured-quote">
|
||||
<blockquote><?php echo $p->quote ?></blockquote>
|
||||
|
|
|
|||
|
|
@ -13,31 +13,31 @@
|
|||
<span itemprop="author"><a href="<?php echo $p->authorUrl ?>"><?php echo $p->author ?></a></span> -
|
||||
<span><a href="<?php echo $p->url ?>" rel="permalink">Permalink</a></span>
|
||||
</div>
|
||||
<?php if (!empty($p->image)) { ?>
|
||||
<div class="featured-image">
|
||||
<a href="<?php echo $p->url ?>"><img src="<?php echo $p->image; ?>" alt="<?php echo $p->title ?>"/></a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if (!empty($p->video)) { ?>
|
||||
<div class="featured-video">
|
||||
<iframe src="https://www.youtube.com/embed/<?php echo $p->video; ?>" width="560" height="315" frameborder="0" allowfullscreen></iframe>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if (!empty($p->audio)) { ?>
|
||||
<div class="featured-audio">
|
||||
<iframe width="560" height="315" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=<?php echo $p->audio;?>&auto_play=false&visual=true"></iframe>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if (!empty($p->quote)) { ?>
|
||||
<div class="featured-quote">
|
||||
<blockquote><?php echo $p->quote ?></blockquote>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if (!empty($p->link)) { ?>
|
||||
<div class="featured-quote">
|
||||
<a href="<?php echo $p->link ?>"><?php echo $p->link ?></a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if (!empty($p->image)) { ?>
|
||||
<div class="featured-image">
|
||||
<a href="<?php echo $p->url ?>"><img src="<?php echo $p->image; ?>" alt="<?php echo $p->title ?>"/></a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if (!empty($p->video)) { ?>
|
||||
<div class="featured-video">
|
||||
<iframe src="https://www.youtube.com/embed/<?php echo $p->video; ?>" width="560" height="315" frameborder="0" allowfullscreen></iframe>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if (!empty($p->audio)) { ?>
|
||||
<div class="featured-audio">
|
||||
<iframe width="560" height="315" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=<?php echo $p->audio;?>&auto_play=false&visual=true"></iframe>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if (!empty($p->quote)) { ?>
|
||||
<div class="featured-quote">
|
||||
<blockquote><?php echo $p->quote ?></blockquote>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if (!empty($p->link)) { ?>
|
||||
<div class="featured-quote">
|
||||
<a href="<?php echo $p->link ?>"><?php echo $p->link ?></a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div class="post-body" itemprop="articleBody">
|
||||
<?php echo $p->body; ?>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@
|
|||
</div>
|
||||
<?php if (disqus()): ?>
|
||||
<div class="comments">
|
||||
<h3>Comments</h3>
|
||||
<h3>Comments</h3>
|
||||
<?php echo recent_comments() ?>
|
||||
<style>li.dsq-widget-item {border-bottom: 1px solid #ebebeb;margin:0;margin-bottom:10px;padding:0;padding-bottom:10px;}a.dsq-widget-user {font-weight:normal;}img.dsq-widget-avatar {margin-right:10px; }.dsq-widget-comment {display:block;padding-top:5px;}.dsq-widget-comment p {display:block;margin:0;}p.dsq-widget-meta {padding-top:5px;margin:0;}#dsq-combo-widget.grey #dsq-combo-content .dsq-combo-box {background: transparent;}#dsq-combo-widget.grey #dsq-combo-tabs li {background: none repeat scroll 0 0 #DDDDDD;}</style>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
<a href="<?php echo $p->url ?>#comments"><span><fb:comments-count href=<?php echo $p->url ?>></fb:comments-count> Comments</span></a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php if (!empty($p->image)) { ?>
|
||||
<?php if (!empty($p->image)) { ?>
|
||||
<div class="featured-image">
|
||||
<a href="<?php echo $p->url ?>"><img src="<?php echo $p->image; ?>" alt="<?php echo $p->title ?>"/></a>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -13,31 +13,31 @@
|
|||
<span itemprop="author"><a href="<?php echo $p->authorUrl ?>"><?php echo $p->author ?></a></span> -
|
||||
<span><a href="<?php echo $p->url ?>" rel="permalink">Permalink</a></span>
|
||||
</div>
|
||||
<?php if (!empty($p->image)) { ?>
|
||||
<div class="featured-image">
|
||||
<a href="<?php echo $p->url ?>"><img src="<?php echo $p->image; ?>" alt="<?php echo $p->title ?>"/></a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if (!empty($p->video)) { ?>
|
||||
<div class="featured-video">
|
||||
<iframe src="https://www.youtube.com/embed/<?php echo $p->video; ?>" width="560" height="315" frameborder="0" allowfullscreen></iframe>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if (!empty($p->audio)) { ?>
|
||||
<div class="featured-audio">
|
||||
<iframe width="560" height="315" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=<?php echo $p->audio;?>&auto_play=false&visual=true"></iframe>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if (!empty($p->quote)) { ?>
|
||||
<div class="featured-quote">
|
||||
<blockquote><?php echo $p->quote ?></blockquote>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if (!empty($p->link)) { ?>
|
||||
<div class="featured-quote">
|
||||
<a href="<?php echo $p->link ?>"><?php echo $p->link ?></a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if (!empty($p->image)) { ?>
|
||||
<div class="featured-image">
|
||||
<a href="<?php echo $p->url ?>"><img src="<?php echo $p->image; ?>" alt="<?php echo $p->title ?>"/></a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if (!empty($p->video)) { ?>
|
||||
<div class="featured-video">
|
||||
<iframe src="https://www.youtube.com/embed/<?php echo $p->video; ?>" width="560" height="315" frameborder="0" allowfullscreen></iframe>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if (!empty($p->audio)) { ?>
|
||||
<div class="featured-audio">
|
||||
<iframe width="560" height="315" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=<?php echo $p->audio;?>&auto_play=false&visual=true"></iframe>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if (!empty($p->quote)) { ?>
|
||||
<div class="featured-quote">
|
||||
<blockquote><?php echo $p->quote ?></blockquote>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if (!empty($p->link)) { ?>
|
||||
<div class="featured-quote">
|
||||
<a href="<?php echo $p->link ?>"><?php echo $p->link ?></a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div class="post-body" itemprop="articleBody">
|
||||
<?php echo $p->body; ?>
|
||||
</div>
|
||||
|
|
@ -47,8 +47,8 @@
|
|||
<div class="author-info">
|
||||
<h4>By <strong><?php echo $author->name ?></strong></h4>
|
||||
<?php echo $author->about ?>
|
||||
</div>
|
||||
<div class="share">
|
||||
</div>
|
||||
<div class="share">
|
||||
<h4>Share this post</h4>
|
||||
<a class="twitter" target="_blank"
|
||||
href="https://twitter.com/share?url=<?php echo $p->url ?>&text=<?php echo $p->title ?>">Twitter</a>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue