test
This commit is contained in:
24
README.md
24
README.md
@@ -1,13 +1,13 @@
|
|||||||
emlog 定时发布插件
|
emlog 定时发布插件
|
||||||
====================
|
====================
|
||||||
|
|
||||||
定时自动发布保存为草稿的日志。
|
定时自动发布保存为草稿的日志。
|
||||||
|
|
||||||
使用方法:
|
使用方法:
|
||||||
--------------------
|
--------------------
|
||||||
1. 通过后台安装插件;
|
1. 通过后台安装插件;
|
||||||
2. 将你要预发布的文章统统写好但不要点发布,而是保存成草稿;
|
2. 将你要预发布的文章统统写好但不要点发布,而是保存成草稿;
|
||||||
3. 在插件后台去设置插件的触发条件和设置你要发布文章的时间,并保存;
|
3. 在插件后台去设置插件的触发条件和设置你要发布文章的时间,并保存;
|
||||||
4. 木有了~元芳,对于此插件,你怎么看?
|
4. 木有了~元芳,对于此插件,你怎么看?
|
||||||
|
|
||||||
[插件主页](http://xiaosong.org/share/new-version-automatically-publish-plugin-released)
|
[插件主页](http://xiaosong.org/share/new-version-automatically-publish-plugin-released)
|
||||||
@@ -1,21 +1,21 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* 自动发布插件
|
* 自动发布插件
|
||||||
* @copyright (c) xiaosong.org All Rights Reserved
|
* @copyright (c) xiaosong.org All Rights Reserved
|
||||||
*/
|
*/
|
||||||
ignore_user_abort(true);
|
ignore_user_abort(true);
|
||||||
set_time_limit(0);
|
set_time_limit(0);
|
||||||
|
|
||||||
if (!defined('EMLOG_ROOT')) {
|
if (!defined('EMLOG_ROOT')) {
|
||||||
require_once('../../../init.php');
|
require_once('../../../init.php');
|
||||||
}
|
}
|
||||||
|
|
||||||
do {
|
do {
|
||||||
clearstatcache();
|
clearstatcache();
|
||||||
$run = EMLOG_ROOT.'/content/plugins/autopub/autopub_cron_pid.php';
|
$run = EMLOG_ROOT.'/content/plugins/autopub/autopub_cron_pid.php';
|
||||||
if(!file_exists($run)) die('do nothing');
|
if(!file_exists($run)) die('do nothing');
|
||||||
doPub();
|
doPub();
|
||||||
sleep(30);
|
sleep(30);
|
||||||
} while (true);
|
} while (true);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@@ -1,13 +1,13 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* 自动发布插件
|
* 自动发布插件
|
||||||
* @copyright (c) xiaosong.org All Rights Reserved
|
* @copyright (c) xiaosong.org All Rights Reserved
|
||||||
*/
|
*/
|
||||||
!defined('EMLOG_ROOT') && exit('access deined!');
|
!defined('EMLOG_ROOT') && exit('access deined!');
|
||||||
$isAjax = (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strstr($_SERVER['HTTP_X_REQUESTED_WITH'], 'XMLHttpRequest')) ? 1 : 0;
|
$isAjax = (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strstr($_SERVER['HTTP_X_REQUESTED_WITH'], 'XMLHttpRequest')) ? 1 : 0;
|
||||||
if ($isAjax) {
|
if ($isAjax) {
|
||||||
doPub();
|
doPub();
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
emDirect(BLOG_URL);
|
emDirect(BLOG_URL);
|
||||||
?>
|
?>
|
||||||
Reference in New Issue
Block a user