Administrating NewsCloud

From Newscloud

Jump to: navigation, search

Please be patient as we expand the documentation for this area.

Administrative Page

Once you've installed the NewsCloud platform, it mostly runs itself but there are a number of administrative options and CRON tasks that you can customize. Support for these areas is pretty basic right now but will be improved over time.

There is a super user userlevel in the User table. The user with uid = 1 (newsmonkey@gmail.com in the default distribution, password NewsCloud) is a super user.

The super user can access the Administration Page which has a number of basic pages to manage the system:

  • Features: Set up the Must Read/Must Watch and Spotlight readers (spotlight is not fully configured yet)
  • Stories: Stories from non-news sites will appear here before going live to the site.
  • Comments: Non-verified comments will appear here and can be individually approved if desired.
  • Images: Images from non-news sites will appear here for approval before going live to the site.
  • Editors: Shows the most active editors and allows you to promote them to Moderator user level (currently only additional voting powers, but will be expanded later).
  • Bios: Allows you to review and approve new bios and video bios as they come in.
  • Feeds: Allows you to review and approve incoming RSS feeds as they come in. Don't want to waste bandwidth on spam blogs do you?
  • User: My favorite feature - purge spammer accounts. Everything they've submitted gets deleted immediately.
  • Statistics: Shows a number of statistics that NewsCloud tracks about usage levels.
  • Login As: Allows you to login as a specific user and manage their account.

CRON Tasks

In the cron directory of the source code, you'll find an example CRON file: newscloud.cron (shown below).

To prevent abuse of these files, they are protected by requiring a URL variable key be set to your API key (in apiKey.inc). Once you set your api key in that file, you should also put it in the URL arguments for your CRON calls.

NewsCloud's CRON tasks are organized for the most part by time increments allowing you to customize what gets called how frequently. e.g. hourlyCron.php runs hourly, weeklyCron.php runs weekly, etc. If you look at the source code for these files you can see what gets called during these periods.

  • BuildCovers populates the Cache* tables for the cover page. This optimizes performance of the cover page for the site.
  • CalcRatings does housekeeping to synchronize site voting. CleanHeadlines removes common artifacts from incoming submission titles.
  • ProcessFeeds can be called at different intervals with different arguments. This script reads RSS feeds of different kinds for the site.
  • SyncDelicious synchronizes the Del.icio.us accounts of users who have configured this.


  • Hourly, Daily and Weekly Processing

33 * * * * root /usr/bin/wget -t 2 http://www.newscloud.com/cron/hourlyCron.php?key=your-api-key >> /dev/null 2>&1

0 1 * * 0 root /usr/bin/wget -t 2 http://www.newscloud.com/cron/weeklyCron.php?key=your-api-key >> /dev/null 2>&1

0 2 * * * root /usr/bin/wget -t 2 http://www.newscloud.com/cron/dailyCron.php?key=your-api-key >> /dev/null 2>&1

0 3 * * * root /usr/bin/wget -t 2 http://www.newscloud.com/cron/calcRatings.php?mode=daily&key=your-api-key >> /dev/null 2>&1

0 0 1 * * root /usr/bin/wget -t 2 http://www.newscloud.com/cron/monthlyCron.php?key=your-api-key >> /dev/null 2>&1

  • Feed Processing

0,10,20,30,40,50 * * * * root /usr/bin/wget -t 2 http://www.newscloud.com/cron/calcRatings.php?mode=hourly&key=your-api-key >> /dev/null 2>&1

15 * * * * root /usr/bin/wget -t 2 http://www.newscloud.com/cron/clean_headlines.php?key=your-api-key >> /dev/null 2>&1

3 * * * * root /usr/bin/wget -t 2 http://www.newscloud.com/cron/processFeeds.php?freq=hourly&key=your-api-key >> /dev/null 2>&1

14,29,44,59 * * * * root /usr/bin/wget -t 2 http://www.newscloud.com/cron/processFeeds.php?freq=quarter&key=your-api-key >> /dev/null 2>&1

59 0 * * * root /usr/bin/wget -t 2 http://www.newscloud.com/cron/processFeeds.php?freq=daily&key=your-api-key >> /dev/null 2>&1

10 0,2,4,6,8,10,12,14,16,18,20,22 * * * root /usr/bin/wget -t 2 http://www.newscloud.com/cron/sync_delicious.php?key=your-api-key >> /dev/null 2>&1

0,5,10,15,20,25,30,35,40,45,50,55 * * * * root /usr/bin/wget -t 2 http://www.newscloud.com/cron/buildCovers.php?mode=front&key=your-api-key

Personal tools