Multi language tags

This commit is contained in:
Danang Probo Sayekti 2015-08-06 21:34:13 +07:00
commit f1b6128f22
6 changed files with 25 additions and 6 deletions

View file

@ -8,6 +8,7 @@ if (isset($p->file)) {
$content = file_get_contents($url);
$oldtitle = get_content_tag('t', $content, 'Untitled');
$olddescription = get_content_tag('d', $content);
$oldtag = get_content_tag('tag', $content);
$oldaudio = get_content_tag('audio', $content);
$oldcontent = remove_html_comments($content);
@ -15,7 +16,9 @@ $dir = substr($url, 0, strrpos($url, '/'));
$isdraft = explode('/', $dir);
$oldurl = explode('_', $url);
$oldtag = $oldurl[1];
if (empty($oldtag)) {
$oldtag = $oldurl[1];
}
$oldmd = str_replace('.md', '', $oldurl[2]);

View file

@ -8,6 +8,7 @@ if (isset($p->file)) {
$content = file_get_contents($url);
$oldtitle = get_content_tag('t', $content, 'Untitled');
$olddescription = get_content_tag('d', $content);
$oldtag = get_content_tag('tag', $content);
$oldimage = get_content_tag('image', $content);
$oldcontent = remove_html_comments($content);
@ -15,7 +16,9 @@ $dir = substr($url, 0, strrpos($url, '/'));
$isdraft = explode('/', $dir);
$oldurl = explode('_', $url);
$oldtag = $oldurl[1];
if (empty($oldtag)) {
$oldtag = $oldurl[1];
}
$oldmd = str_replace('.md', '', $oldurl[2]);

View file

@ -8,6 +8,7 @@ if (isset($p->file)) {
$content = file_get_contents($url);
$oldtitle = get_content_tag('t', $content, 'Untitled');
$olddescription = get_content_tag('d', $content);
$oldtag = get_content_tag('tag', $content);
$oldlink = get_content_tag('link', $content);
$oldcontent = remove_html_comments($content);
@ -15,7 +16,9 @@ $dir = substr($url, 0, strrpos($url, '/'));
$isdraft = explode('/', $dir);
$oldurl = explode('_', $url);
$oldtag = $oldurl[1];
if (empty($oldtag)) {
$oldtag = $oldurl[1];
}
$oldmd = str_replace('.md', '', $oldurl[2]);

View file

@ -8,13 +8,16 @@ if (isset($p->file)) {
$content = file_get_contents($url);
$oldtitle = get_content_tag('t', $content, 'Untitled');
$olddescription = get_content_tag('d', $content);
$oldtag = get_content_tag('tag', $content);
$oldcontent = remove_html_comments($content);
$dir = substr($url, 0, strrpos($url, '/'));
$isdraft = explode('/', $dir);
$oldurl = explode('_', $url);
$oldtag = $oldurl[1];
if (empty($oldtag)) {
$oldtag = $oldurl[1];
}
$oldmd = str_replace('.md', '', $oldurl[2]);

View file

@ -8,6 +8,7 @@ if (isset($p->file)) {
$content = file_get_contents($url);
$oldtitle = get_content_tag('t', $content, 'Untitled');
$olddescription = get_content_tag('d', $content);
$oldtag = get_content_tag('tag', $content);
$oldquote = get_content_tag('quote', $content);
$oldcontent = remove_html_comments($content);
@ -15,7 +16,9 @@ $dir = substr($url, 0, strrpos($url, '/'));
$isdraft = explode('/', $dir);
$oldurl = explode('_', $url);
$oldtag = $oldurl[1];
if (empty($oldtag)) {
$oldtag = $oldurl[1];
}
$oldmd = str_replace('.md', '', $oldurl[2]);

View file

@ -8,6 +8,7 @@ if (isset($p->file)) {
$content = file_get_contents($url);
$oldtitle = get_content_tag('t', $content, 'Untitled');
$olddescription = get_content_tag('d', $content);
$oldtag = get_content_tag('tag', $content);
$oldvideo = get_content_tag('video', $content);
$oldcontent = remove_html_comments($content);
@ -15,7 +16,10 @@ $dir = substr($url, 0, strrpos($url, '/'));
$isdraft = explode('/', $dir);
$oldurl = explode('_', $url);
$oldtag = $oldurl[1];
if (empty($oldtag)) {
$oldtag = $oldurl[1];
}
$oldmd = str_replace('.md', '', $oldurl[2]);