ПЛАГИН xF2 Style Variation Default
- Автор xenforo2
- Плагины xF2.x.x
- 0 Скачиваний
- 0 Оценка
Добавлена возможность устанавливать изменение стиля по умолчанию для гостей.
Посмотрите видео ниже, чтобы узнать, как установить наш сайт в качестве веб-приложения на главный экран.
Примечание: Эта функция может быть недоступна в некоторых браузерах.
xf-addon: build-release [addon_id]
добавляется новый в дополнительный каталог с названием "_repo", который может использоваться для VCS (Version Control System)$ php <path to your forum root>/cmd.php hg:run-jobs
$ php /srv/www/xenforo/community/cmd.php hg:run-jobs
$ sudo crontab -u www-data -e
* * * * * php /path/to/your/forum/root/cmd.php --quiet hg:run-jobs
* * * * * webserver-user php /path/to/your/forum/root/cmd.php --quiet hg:run-jobs
echo "* * * * * www-data php /srv/www/xenforo/community/cmd.php --quiet hg:run-jobs" | sudo tee -a /etc/cron.d/xenforo
$ php <path to your forum root>/cmd.php --max-execution-time=45 hg:run-jobs
$config['jobMaxRunTime'] = 8;
$ php cmd.php xf:show-jobs
2 pending jobs found
+----------------+-----------------+----------------------+----------------------+
| Key | Class | Next Run | Last Run |
+----------------+-----------------+----------------------+----------------------+
| cron | XF\Job\Cron | 11-Apr-2019 10:52:01 | 11-Apr-2019 10:52:31 |
| xfUpgradeCheck | XF:UpgradeCheck | 12-Apr-2019 00:12:21 | 10-Apr-2019 21:24:03 |
+----------------+-----------------+----------------------+----------------------+
The current time is: 11-Apr-2019 10:52:31 (UTC+10:00)
$ php cmd.php hg:run-jobs -v
[2019-11-27 23:53:09] XF\Job\Cron: Cron entry XF\Cron\CleanUp::runUserDowngrade executed in 0.01 seconds
[2019-11-27 23:53:09] XF\Job\Cron: Cron entry Hampel\LogDigest\Cron\SendLogs::serverError executed in 0.00 seconds
[2019-11-27 23:53:09] XF\Job\Cron: Cron entry XF\Cron\MemberStats::rebuildMemberStatsCache executed in 0.00 seconds
[2019-11-27 23:53:09] XF\Job\Cron: Cron entry Hampel\Slack\Cron\NotifyLogs::notify executed in 0.03 seconds
[2019-11-27 23:53:09] XF\Job\Cron: Cron entry XF\Cron\Feeder::importFeeds executed in 0.01 seconds
[2019-11-27 23:53:09] XF\Job\Cron: Cron entry XFMG\Cron\RandomCache::generateRandomMediaCache executed in 0.07 seconds
[2019-11-27 23:53:09] XF\Job\Cron: Cron entry XF\Cron\EmailBounce::process executed in 0.00 seconds
[2019-11-27 23:53:09] XF\Job\Cron: Cron entry XF\Cron\Counters::rebuildForumStatistics executed in 0.02 seconds
[2019-11-27 23:53:09] XF\Job\Cron: Job executed in 0.20 seconds
No more runnable jobs pending
$ php cmd.php hg:run-jobs -vv
[2019-11-27 23:49:49] XF\Job\Cron: Cron entry Hampel\Slack\Cron\NotifyLogs::notify executed in 0.01 seconds {"entry_id":"slackNotifyServerErrors","cron_class":"Hampel\\Slack\\Cron\\NotifyLogs","cron_method":"notify","run_rules":{"day_type":"dom","dom":{"0":-1},"hours":{"0":-1},"minutes":{"0":-1}},"active":true,"next_run":1574898543,"addon_id":"Hampel\/Slack"}
[2019-11-27 23:49:49] XF\Job\Cron: Cron entry Hampel\SparkPost\Cron\MessageEvents::fetchMessageEvents executed in 0.00 seconds {"entry_id":"sparkpostMessageEvents","cron_class":"Hampel\\SparkPost\\Cron\\MessageEvents","cron_method":"fetchMessageEvents","run_rules":{"day_type":"dom","dom":{"0":-1},"hours":{"0":-1},"minutes":{"0":19,"1":49}},"active":true,"next_run":1574898543,"addon_id":"Hampel\/SparkPost"}
[2019-11-27 23:49:49] XF\Job\Cron: Job executed in 0.03 seconds {"completed":false,"jobId":2,"continueDate":1574898603,"continueDate_formatted":"2019-11-27 23:50:03 UTC","statusMessage":"Running... Cron entries"}
[2019-11-27 23:49:49] Hampel\SparkPost:MessageEvent: Job executed in 0.83 seconds {"completed":true,"jobId":12,"continueDate":null,"continueDate_formatted":"","statusMessage":""}
No more runnable jobs pending
$ php cmd.php hg:run-jobs -vvv
[2019-11-27 23:48:03] XF\Job\Cron: Cron entry XF\Cron\Feeder::importFeeds executed in 0.01 seconds {"entry_id":"feeder","cron_class":"XF\\Cron\\Feeder","cron_method":"importFeeds","run_rules":{"day_type":"dom","dom":{"0":-1},"hours":{"0":-1},"minutes":{"0":2,"1":12,"2":22,"3":32,"4":42,"5":52}},"active":true,"next_run":1574879524,"addon_id":"XF"} {}
[2019-11-27 23:48:03] XF\Job\Cron: Cron entry XF\Cron\Counters::rebuildForumStatistics executed in 0.02 seconds {"entry_id":"forumStatistics","cron_class":"XF\\Cron\\Counters","cron_method":"rebuildForumStatistics","run_rules":{"day_type":"dom","dom":{"0":-1},"hours":{"0":-1},"minutes":{"0":3,"1":13,"2":23,"3":33,"4":43,"5":53}},"active":true,"next_run":1574879584,"addon_id":"XF"} {}
[2019-11-27 23:48:03] XF\Job\Cron: Cron entry XF\Cron\MemberStats::rebuildMemberStatsCache executed in 0.03 seconds {"entry_id":"memberStatsCache","cron_class":"XF\\Cron\\MemberStats","cron_method":"rebuildMemberStatsCache","run_rules":{"day_type":"dom","dom":{"0":-1},"hours":{"0":-1},"minutes":{"0":0,"1":10,"2":20,"3":30,"4":40,"5":50}},"active":true,"next_run":1574880004,"addon_id":"XF"} {}
[2019-11-27 23:48:03] XF\Job\Cron: Cron entry XF\Cron\Trophy::runTrophyCheck executed in 0.00 seconds {"entry_id":"trophy","cron_class":"XF\\Cron\\Trophy","cron_method":"runTrophyCheck","run_rules":{"day_type":"dom","dom":{"0":-1},"hours":{"0":-1},"minutes":{"0":40}},"active":true,"next_run":1574880004,"addon_id":"XF"} {}
[2019-11-27 23:48:03] XF\Job\Cron: Cron entry XFMG\Cron\Statistics::cacheGalleryStatistics executed in 0.01 seconds {"entry_id":"xfmgCacheStats","cron_class":"XFMG\\Cron\\Statistics","cron_method":"cacheGalleryStatistics","run_rules":{"day_type":"dom","dom":{"0":-1},"hours":{"0":-1},"minutes":{"0":10,"1":40}},"active":true,"next_run":1574880004,"addon_id":"XFMG"} {}
[2019-11-27 23:48:03] XF\Job\Cron: Cron entry XF\Cron\CleanUp::expireTempUserChanges executed in 0.00 seconds {"entry_id":"expireTempUserChanges","cron_class":"XF\\Cron\\CleanUp","cron_method":"expireTempUserChanges","run_rules":{"day_type":"dom","dom":{"0":-1},"hours":{"0":-1},"minutes":{"0":42}},"active":true,"next_run":1574880124,"addon_id":"XF"} {}
[2019-11-27 23:48:03] XF\Job\Cron: Cron entry XFMG\Cron\RandomCache::generateRandomAlbumCache executed in 0.02 seconds {"entry_id":"xfmgGenerateRandomAlbum","cron_class":"XFMG\\Cron\\RandomCache","cron_method":"generateRandomAlbumCache","run_rules":{"day_type":"dom","dom":{"0":-1},"hours":{"0":-1},"minutes":{"0":12,"1":42}},"active":true,"next_run":1574880124,"addon_id":"XFMG"} {}
[2019-11-27 23:48:03] XF\Job\Cron: Cron entry XF\Cron\EmailUnsubscribe::process executed in 0.00 seconds {"entry_id":"emailUnsubscribe","cron_class":"XF\\Cron\\EmailUnsubscribe","cron_method":"process","run_rules":{"day_type":"dom","dom":{"0":-1},"hours":{"0":-1},"minutes":{"0":13,"1":43}},"active":true,"next_run":1574880184,"addon_id":"XF"} {}
[2019-11-27 23:48:03] XF\Job\Cron: Cron entry XF\Cron\Ban::deleteExpiredBans executed in 0.01 seconds {"entry_id":"deleteExpiredBans","cron_class":"XF\\Cron\\Ban","cron_method":"deleteExpiredBans","run_rules":{"day_type":"dom","dom":{"0":-1},"hours":{"0":-1},"minutes":{"0":45}},"active":true,"next_run":1574880304,"addon_id":"XF"} {}
[2019-11-27 23:48:03] XF\Job\Cron: Job executed in 0.32 seconds {"completed":false,"jobId":2,"continueDate":1574898543,"continueDate_formatted":"2019-11-27 23:49:03 UTC","statusMessage":"Running... Cron entries"} {"job_id":2,"unique_key":"cron","execute_class":"XF\\Job\\Cron","execute_data":{},"manual_execute":0,"trigger_date":1574879464,"last_run_date":1574879405,"trigger_date_formatted":"2019-11-27 18:31:04 UTC","last_run_date_formatted":"2019-11-27 18:30:05 UTC"}
[2019-11-27 23:48:03] Hampel\SparkPost:MessageEvent: Job executed in 0.90 seconds {"completed":true,"jobId":10,"continueDate":null,"continueDate_formatted":"","statusMessage":""} {"job_id":10,"unique_key":"SparkPostMessageEvents","execute_class":"Hampel\\SparkPost:MessageEvent","execute_data":{},"manual_execute":0,"trigger_date":1574898483,"last_run_date":null,"trigger_date_formatted":"2019-11-27 23:48:03 UTC","last_run_date_formatted":""}
[2019-11-27 23:48:03] Hampel\SparkPost:EmailBounce: Job executed in 0.02 seconds {"completed":true,"jobId":11,"continueDate":null,"continueDate_formatted":"","statusMessage":""} {"job_id":11,"unique_key":"SparkPostEmailBounce","execute_class":"Hampel\\SparkPost:EmailBounce","execute_data":{},"manual_execute":0,"trigger_date":1574898483,"last_run_date":null,"trigger_date_formatted":"2019-11-27 23:48:03 UTC","last_run_date_formatted":""}
No more runnable jobs pending
protected function log($message, array $context = [])
{
// check to see if we actually have a logger available and abort if not
if (!isset($this->app['cli.logger'])) return;
/** @var Logger $logger */
$logger = $this->app['cli.logger'];
$logger->logJobProgress($message, $context, $this);
}
public function run($maxRunTime)
{
$this->log("About to start test job", $this->data);
$mail = $this->app->mailer()->newMail();
$mail->setTo($this->data['email']);
$mail->setContent(
"Test job",
"This is an email sent from a test job"
);
$sent = $mail->send();
$this->log("Sent mail", ['sent' => $sent]);
return $this->complete();
}
$ php cmd.php hg:run-jobs -vvv
[2019-11-28 00:26:21] Hampel\JobRunner:TestJob: About to start test job {"email":"foo@example.com"} {"job_id":17,"class":"Hampel\\JobRunner\\Job\\TestJob","status_message":"Testing jobs","data":{"email":"foo@example.com"},"execution_time":"0.00"}
[2019-11-28 00:26:21] Hampel\JobRunner:TestJob: Sent mail {"sent":1} {"job_id":17,"class":"Hampel\\JobRunner\\Job\\TestJob","status_message":"Testing jobs","data":{"email":"foo@example.com"},"execution_time":"0.95"}
[2019-11-28 00:26:21] Hampel\JobRunner:TestJob: Job executed in 0.95 seconds {"completed":true,"jobId":17,"continueDate":null,"continueDate_formatted":"","statusMessage":""} {"job_id":17,"unique_key":null,"execute_class":"Hampel\\JobRunner:TestJob","execute_data":{"email":"foo@example.com"},"manual_execute":0,"trigger_date":1574900777,"last_run_date":null,"trigger_date_formatted":"2019-11-28 00:26:17 UTC","last_run_date_formatted":""}
No more runnable jobs pending
protected static function log($message, array $context = [])
{
// check to see if we actually have a logger available and abort if not
if (!isset(\XF::app['cli.logger'])) return;
/** @var Logger $logger */
$logger = \XF::app['cli.logger'];
$logger->log("XF\Job\Cron", $message, $context);
}
$ cmd.php hg:show-crons
19 active cron entries found
+---------------------------+----------------------+--------------------------+
| ID | Next Run (UTC+10:00) | Addon |
+---------------------------+----------------------+--------------------------+
| forumStatistics | 29-Sep-2020 06:53 | XF |
| emailBounce | 29-Sep-2020 06:53 | XF |
| warningExpiry | 29-Sep-2020 06:55 | XF |
| rebuildSearchForumCache | 29-Sep-2020 07:00 | XF |
| memberStatsCache | 29-Sep-2020 07:00 | XF |
| feeder | 29-Sep-2020 07:02 | XF |
| cleanUpHourly | 29-Sep-2020 07:10 | XF |
| emailUnsubscribe | 29-Sep-2020 07:13 | XF |
| userGroupPromotions | 29-Sep-2020 07:20 | XF |
| views | 29-Sep-2020 07:30 | XF |
| trophy | 29-Sep-2020 07:40 | XF |
| expireTempUserChanges | 29-Sep-2020 07:42 | XF |
| deleteExpiredBans | 29-Sep-2020 07:45 | XF |
| downgradeExpired | 29-Sep-2020 07:50 | XF |
| fileCheck | 29-Sep-2020 10:10 | XF |
| dailyStats | 29-Sep-2020 10:30 | XF |
| cleanUpDaily | 29-Sep-2020 13:00 | XF |
| activitySummaryEmail | 30-Sep-2020 00:20 | XF |
| sitemap | 30-Sep-2020 15:37 | XF |
+---------------------------+----------------------+--------------------------+
The current time is: 29-Sep-2020 06:52:05 (UTC+10:00)
<xf:if is="in_array($xf.reply.template, [
'thread_view',
'thread_view_type_article',
'thread_view_type_poll',
'thread_view_type_question',
'thread_view_type_suggestion'
]) && $xf.itemsThisPage <= 1">
<!-- show nothing -->
<xf:else />
<!-- show the item -->
</xf:if>
<xf:if is="$xf.reply.templateParent == 'thread_view' && $xf.itemsThisPage <= 1">
<!-- show nothing -->
<xf:else />
<!-- show the item -->
</xf:if>
<xf:if is="$xf.itemsThisPage === 0">
<!-- show nothing -->
<xf:else />
<!-- show the item -->
</xf:if>
Мы используем некоторые обязательные cookies для работы сайта, а также дополнительные cookies для обеспечения максимального удобства пользователя.