mirror of
https://github.com/danpros/htmly.git
synced 2026-04-19 12:06:22 +05:30
Multi language tags
This commit is contained in:
parent
0b100044b4
commit
f1b6128f22
6 changed files with 25 additions and 6 deletions
|
|
@ -8,6 +8,7 @@ if (isset($p->file)) {
|
||||||
$content = file_get_contents($url);
|
$content = file_get_contents($url);
|
||||||
$oldtitle = get_content_tag('t', $content, 'Untitled');
|
$oldtitle = get_content_tag('t', $content, 'Untitled');
|
||||||
$olddescription = get_content_tag('d', $content);
|
$olddescription = get_content_tag('d', $content);
|
||||||
|
$oldtag = get_content_tag('tag', $content);
|
||||||
$oldaudio = get_content_tag('audio', $content);
|
$oldaudio = get_content_tag('audio', $content);
|
||||||
$oldcontent = remove_html_comments($content);
|
$oldcontent = remove_html_comments($content);
|
||||||
|
|
||||||
|
|
@ -15,7 +16,9 @@ $dir = substr($url, 0, strrpos($url, '/'));
|
||||||
$isdraft = explode('/', $dir);
|
$isdraft = explode('/', $dir);
|
||||||
$oldurl = explode('_', $url);
|
$oldurl = explode('_', $url);
|
||||||
|
|
||||||
$oldtag = $oldurl[1];
|
if (empty($oldtag)) {
|
||||||
|
$oldtag = $oldurl[1];
|
||||||
|
}
|
||||||
|
|
||||||
$oldmd = str_replace('.md', '', $oldurl[2]);
|
$oldmd = str_replace('.md', '', $oldurl[2]);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ if (isset($p->file)) {
|
||||||
$content = file_get_contents($url);
|
$content = file_get_contents($url);
|
||||||
$oldtitle = get_content_tag('t', $content, 'Untitled');
|
$oldtitle = get_content_tag('t', $content, 'Untitled');
|
||||||
$olddescription = get_content_tag('d', $content);
|
$olddescription = get_content_tag('d', $content);
|
||||||
|
$oldtag = get_content_tag('tag', $content);
|
||||||
$oldimage = get_content_tag('image', $content);
|
$oldimage = get_content_tag('image', $content);
|
||||||
$oldcontent = remove_html_comments($content);
|
$oldcontent = remove_html_comments($content);
|
||||||
|
|
||||||
|
|
@ -15,7 +16,9 @@ $dir = substr($url, 0, strrpos($url, '/'));
|
||||||
$isdraft = explode('/', $dir);
|
$isdraft = explode('/', $dir);
|
||||||
$oldurl = explode('_', $url);
|
$oldurl = explode('_', $url);
|
||||||
|
|
||||||
$oldtag = $oldurl[1];
|
if (empty($oldtag)) {
|
||||||
|
$oldtag = $oldurl[1];
|
||||||
|
}
|
||||||
|
|
||||||
$oldmd = str_replace('.md', '', $oldurl[2]);
|
$oldmd = str_replace('.md', '', $oldurl[2]);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ if (isset($p->file)) {
|
||||||
$content = file_get_contents($url);
|
$content = file_get_contents($url);
|
||||||
$oldtitle = get_content_tag('t', $content, 'Untitled');
|
$oldtitle = get_content_tag('t', $content, 'Untitled');
|
||||||
$olddescription = get_content_tag('d', $content);
|
$olddescription = get_content_tag('d', $content);
|
||||||
|
$oldtag = get_content_tag('tag', $content);
|
||||||
$oldlink = get_content_tag('link', $content);
|
$oldlink = get_content_tag('link', $content);
|
||||||
$oldcontent = remove_html_comments($content);
|
$oldcontent = remove_html_comments($content);
|
||||||
|
|
||||||
|
|
@ -15,7 +16,9 @@ $dir = substr($url, 0, strrpos($url, '/'));
|
||||||
$isdraft = explode('/', $dir);
|
$isdraft = explode('/', $dir);
|
||||||
$oldurl = explode('_', $url);
|
$oldurl = explode('_', $url);
|
||||||
|
|
||||||
$oldtag = $oldurl[1];
|
if (empty($oldtag)) {
|
||||||
|
$oldtag = $oldurl[1];
|
||||||
|
}
|
||||||
|
|
||||||
$oldmd = str_replace('.md', '', $oldurl[2]);
|
$oldmd = str_replace('.md', '', $oldurl[2]);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,13 +8,16 @@ if (isset($p->file)) {
|
||||||
$content = file_get_contents($url);
|
$content = file_get_contents($url);
|
||||||
$oldtitle = get_content_tag('t', $content, 'Untitled');
|
$oldtitle = get_content_tag('t', $content, 'Untitled');
|
||||||
$olddescription = get_content_tag('d', $content);
|
$olddescription = get_content_tag('d', $content);
|
||||||
|
$oldtag = get_content_tag('tag', $content);
|
||||||
$oldcontent = remove_html_comments($content);
|
$oldcontent = remove_html_comments($content);
|
||||||
|
|
||||||
$dir = substr($url, 0, strrpos($url, '/'));
|
$dir = substr($url, 0, strrpos($url, '/'));
|
||||||
$isdraft = explode('/', $dir);
|
$isdraft = explode('/', $dir);
|
||||||
$oldurl = explode('_', $url);
|
$oldurl = explode('_', $url);
|
||||||
|
|
||||||
$oldtag = $oldurl[1];
|
if (empty($oldtag)) {
|
||||||
|
$oldtag = $oldurl[1];
|
||||||
|
}
|
||||||
|
|
||||||
$oldmd = str_replace('.md', '', $oldurl[2]);
|
$oldmd = str_replace('.md', '', $oldurl[2]);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ if (isset($p->file)) {
|
||||||
$content = file_get_contents($url);
|
$content = file_get_contents($url);
|
||||||
$oldtitle = get_content_tag('t', $content, 'Untitled');
|
$oldtitle = get_content_tag('t', $content, 'Untitled');
|
||||||
$olddescription = get_content_tag('d', $content);
|
$olddescription = get_content_tag('d', $content);
|
||||||
|
$oldtag = get_content_tag('tag', $content);
|
||||||
$oldquote = get_content_tag('quote', $content);
|
$oldquote = get_content_tag('quote', $content);
|
||||||
$oldcontent = remove_html_comments($content);
|
$oldcontent = remove_html_comments($content);
|
||||||
|
|
||||||
|
|
@ -15,7 +16,9 @@ $dir = substr($url, 0, strrpos($url, '/'));
|
||||||
$isdraft = explode('/', $dir);
|
$isdraft = explode('/', $dir);
|
||||||
$oldurl = explode('_', $url);
|
$oldurl = explode('_', $url);
|
||||||
|
|
||||||
$oldtag = $oldurl[1];
|
if (empty($oldtag)) {
|
||||||
|
$oldtag = $oldurl[1];
|
||||||
|
}
|
||||||
|
|
||||||
$oldmd = str_replace('.md', '', $oldurl[2]);
|
$oldmd = str_replace('.md', '', $oldurl[2]);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ if (isset($p->file)) {
|
||||||
$content = file_get_contents($url);
|
$content = file_get_contents($url);
|
||||||
$oldtitle = get_content_tag('t', $content, 'Untitled');
|
$oldtitle = get_content_tag('t', $content, 'Untitled');
|
||||||
$olddescription = get_content_tag('d', $content);
|
$olddescription = get_content_tag('d', $content);
|
||||||
|
$oldtag = get_content_tag('tag', $content);
|
||||||
$oldvideo = get_content_tag('video', $content);
|
$oldvideo = get_content_tag('video', $content);
|
||||||
$oldcontent = remove_html_comments($content);
|
$oldcontent = remove_html_comments($content);
|
||||||
|
|
||||||
|
|
@ -15,7 +16,10 @@ $dir = substr($url, 0, strrpos($url, '/'));
|
||||||
$isdraft = explode('/', $dir);
|
$isdraft = explode('/', $dir);
|
||||||
$oldurl = explode('_', $url);
|
$oldurl = explode('_', $url);
|
||||||
|
|
||||||
$oldtag = $oldurl[1];
|
if (empty($oldtag)) {
|
||||||
|
$oldtag = $oldurl[1];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$oldmd = str_replace('.md', '', $oldurl[2]);
|
$oldmd = str_replace('.md', '', $oldurl[2]);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue