Source of file DisqusTask.php
Size: 1,051 Bytes - Last Modified: 2021-12-23T10:36:37+00:00
/var/www/docs.ssmods.com/process/src/code/DisqusTask.php
1234567891011121314151617181920212223242526272829303132333435363738 | <?php /** * Disqus - hourly task * * @package silverstripe-disqus-module * @author Pavol Ondráš <admin_silverstripe.sk> * @notice SilverStripe.sk is not affiliated with the company SilverStripe Ltd. * @date April 2011 */ /* class DisqusTask extends HourlyTask { function process() { //$pages = DataObject::get("Page","provideComments = 1 AND status = 'Published'"); $pages = Page::get()->filter(array( 'ProvideComments'=>'1' //@todo remove this as param no longer returned on ss3.0 sitetree 'isPublished'=>'1' )); if ($pages) { echo "<ul>"; foreach ($pages as $page) { // this doesnt sync anything, response from disqus server is empty // dont know the reason for now // setup hourly tasks as cron job: sapphire/cli-script.php /HourlyTask // for testing purposes available via URL http://yoursite/HourlyTask (admin must be logged in) echo "<li>"; echo $page->Title . ": "; echo DisqusSync::sync($page->disqusIdentifier(),true); echo "</li>"; } echo "</ul>"; } } } */ // EOF |