NewsPilot
News Autopilot Script
- Created on: 30th October, 2015
- Updated on: 19th April, 2024
- Version: 3.5
- by: Webhelios
- email: webheliosteam@gmail.com
You can install Newspilot in following 4 easy step
1. Upload newspilot.zip to your server and extract it
2. Ceate a database and database user.
3. Now browse http://yourdomain.com and you will see an installation screen

4. Now provide your database settings

5. If provided database settings are ok , then you will be redirected to next step.Provide your administration setting here.

press save & next .If your account setting are ok then Newspilots will be installed and you can visit front end using
http://yourdomain.com
and admin panel using
http://yourdomain.com/index.php/admin
6) If you run your installation on server you have to work through one step of purchase verification. When you buy our product from Envato, envato will provide you with a Purchase Code & Item ID. Simply paste these in this page and your purchase will be automatically verified. When running on localhost the installation will skip this step. So install our product multiple time in localhost but server hosting needs verification.

Explanations :
- #1 : It’s the site logo. You can update it from Admin panel > system > default site settings
- #2 : It shows current logged in user info.
- #3 : Clicking this link will redirected to front end.
- #4 : This is basic user options. User can update his profile, change his password and logout from this menu
- #5 : It shows the version information
- #6 : clicking this will redirected to public documentation of newspilot
- #7 : This is the company name on footer. You can change it by editing ROOT/application/modules/admin/views/custom/template/footer.php
All News
Explanations :
- #1 : This table shows all news
- #2 : You can search news using this box
- #3 : Edit/Delete Action
Create News
Explanations :
- #1 : News source
- #2 : Category
- #3 : Sub Category
- #4 : Title
- #5 : Description
- #6 : External link
- #7 : Tags(separated by ,)
- #8 : Media Url. You can use any image url here
- #9 : You can upload images from here
Clear Old News
Explanations :
- #1 : Date. News before that date will be deleted
- #2 : News of that Category will be deleted
- #3 : News of that Sub Category will be deleted
- #4 : News of that Source will be deleted
- #5 : News with view count less that this will be deleted
- #6 : News with empty image field will be deleted
All Sources
Explanations :
- #1 : This table shows all news sources
- #2 : Edit/delete and Grabnow option
Create Source
Explanations :
- #1 : Name (Example: Goal.com, BBC News)
- #2 : Source type (RSS/Manual). Select manual if you want to create manual news using this source
- #3 : RSS or ATOM feed url
- #4 : News will be automatically assigned to this category by default
- #5 : News will be automatically assigned to this sub category by default
- #6 : Set this to yes if you want this source to be grabbed using cron
- #7 : Time from when the feed will be first pulled
- #8 : News will be pulled after this duration each day
- #9 : Number of news that will be pulled on each cron job
Site Settings
Explanations :
- #1 : Set this to yes if you want users to be able to signup
- #2 : If you want the moderator to be able to create news
- #3 : Turn on/off autocrawl
- #4 : If you want to pull and save images from feed url then set it to yes
- #5 : Enable/Disable image lazyloading
- #6 : Enable cookie policy popup. This option is helpful for buyers from EU
- #7 : Set cookie policy page url.
- #8 : Enable/Diable facebook login.
- #9 : Facebook app id. This same appid is used for facebook comment moderation.
- #10 : Facebook app secret.
- #11 : Enable/Disable disqus comment.
- #12 : Disqus short name
- #13 : These is the base url for your previous host
- #14 : New base url for current host
Explanations :
- You can create post categories from here.
- You can put title , font awsome icon for each category
- You can see a full list of font awsome icon from here
Explanations :
- From here user can edit his profile info.
- This link is the same link as on top bar
- You can promote a user to moderator from this page
- If you want to add/edit/delete any or more fields then you'll need customization
Explanations :
- From here admin can see all users.
- #1 : From this option admin can create new users
- #2 : From this option admin can export all user emails as csv file
- #3 : This is datatable search. Admin can search any user by visible columns.
- #3 : Admin can edit any user from this link.
- #3 : This link shows a summary for user.
- #3 : Admin can delete any user from this link.
- #3 : Admin can ban any user from this link.
Explanations :
- #1 : It shows the currently activated theme and it's basic options
- #2 : It shows all available themes and basic options
Explanations :
- Admin can upload and install future updates/themes/plugins from here.
Backup
Explanations :
- Admin can backup the datbase as sql and images as zip from here.
- We recommend to backup and restore database via phpmyadmin.
- Also we recommend not to store mysql backups on server due to security issues.
- So if you use this tool then remember to delete the zip from server after download.
SMTP email settings
Explanations :
- You can use this option if you want to use smtp email instead of default email server.
- Some hosting providers don't allow to connect to SMTP servers. In that case this option will not work
Auto translate
Explanations :
- This tool can be used to create new language files.
- It uses my memory api for translating
- Translations will not be accurate. But you can fine tune then by editing ROOT/dbc_config/locals/lang.yml file.
- #1 : The base lang file. Language keys defined within this file will be used for translationg.
- #2 : Target lang shot name or iso code. Example: for English the ISO code is en. Use lower can letter for this
- After creating a new language from here you can enable it for use by editing ROOT/application/config/webhelios.php file
Edit email text
Explanations :
- Admin can modify email texts send by system from here.
- You can select a email and change it's texts.
- Available variables will be replaced by original values upon email sending.
- Example: #username will be replaced by actual user name while sending the email .
Default site settings
Explanations :
- #1 : This is used for sites main title.
- #2 : You can modify the footer copyright text from here.
- #3 : You can change the site logo from here.
- #4 : You can define sites default language from here.
- #5 : This settings define sites default text direction.
- #6 : This option is used for pagination if specific settings was not found.
- #7 : This option is used for page layout if layout not found for any page.
- #8 : You can put your Google analytics code here.
- #9, #10, #11 : These settings are used for any page seo data if seo settings not found for any specific page.
Web admin settings
Explanations :
- These settings are used basically as email sender name and email.
- All system generated email will have these as sender name.
Sitemap
Explanations :
- You can use this tool for generating sitemap.
- Site map links are generated based on current using language. Means if you are using admin panel in English language then link will be generated for english language.
- Sitemap xml is saved on ROOT directory. You can later modify/fine tune it from there.
How to setup cron for grabbing news ?
Answer :

- First login to your admin pane and go to dashboard.
- You'll see there is a cron command showing just under the statistics.
- Copy that command
- Now login to your cpanel

- Type "Cron" on your search box and you'll find the cron setup option
- Click that link
- From the new page select everything like the following image.

- Click Save
- Rememeber cron may not work in local copies
- You've to put the directory path with the cron command perfectly
- Cron will grab news based on the settings you set from newspilot > content > sources
How to create new language ?
Answer :
- You can create new language by using autotranslator functionality or manually.
- #using auto translator
- 1. Go to admin panel > system > auto translator option
- 2. Select a base lang.
- 3. Put target lang ISO code. For more information check "Auto translate" section under System of this documentation
- #using manual way
- 1. Go to ROOT/dbc_config/locals directory
- 2. Copy en.yml and rename it to new_lang_ISO_code.yml. Example for Spanish rename it to es.yml
- 3. Now edit this new file and translate the string after :
- Follwoing any of these will create a new lang file. Now the most important part you have to enable it from config file
- Go to ROOT/application/config directory and open webhelios.php file
- You'll see there is a line "$config['active_languages'] = array('en'=>'English','ru'=>'Russian','ar'=>'Arabic');"
- Now add your new language to this line like "$config['active_languages'] = array('en'=>'English','ru'=>'Russian','ar'=>'Arabic','es'=>'Spanish');"
How to change logo or increase size ?
Answer :
- You can change logo from admin panel > system > default site settings menu.
- The logo is rendered from ROOT/application/modules/themes/views/THEME_NAME/header.php file.
- Find "<h3><a href="">
" this line
- You can change the logo or logo site manually from here using css.
How to hide signin signup menu ?
Answer :
- You can turn off signin and signup from admin panel > business directory > site settings > Enable signup option.
- Or you can edit ROOT/application/modules/themes/views/THEME_NAME/header.php file manually to hide any of them.
How to modify home page content ?
Answer :
- Home page is rendered from ROOT/application/modules/themes/views/THEME_NAME/home_view.php file.
- You can change it from here.
- Also home page is rendered using widget position "Home page".
- So you can change the content order or add new content using widgets from Admin panel > widgets > widget positions
How to modify sidebar content ?
Answer :
- Sidebar is rendered using widget position "RightBar*".
- So you can change sidebar contents from Admin panel > widgets > widget positions
- If you want to add new content then you can create a new widget and place it to your desired position.
- See widget section of this doc for more information.
How to place adsense ?
Answer :
- There are two default widgets "Adsense full width" and "Adsense side bar".
- You can modify them or also can create new widgets.
- Place your adsense code on widgets and place your widget to your desired position.
- See widget section of this doc for more information.
How to add google analytics ?
Answer :
- You can add this from admin panel > system > default site settings.
- Some servers doen't permit to add scripts via form due to security reason.
- In that case you can edit ROOT/application/modules/themes/views/THEME_NAME/footer.php file and place your embed code there.
How to modify top bar ?
Answer :
- There are two widgets "Top bar" and "Top bar social".
- You can edit them.
How to modify menu color ?
Answer :
- You can do this by editing ROOT/application/modules/themes/views/default/assets/css/custom-style.css
How to modify footer links ?
Answer :
- There is a widget "Footer links" for this.
How to change favicon ?
Answer :
- Replace ROOT/application/modules/themes/views/THEME_NAME/assets/img/favicon.jpg with your own image.
How to change fb like box ?
Answer :
- There is a widget "Facebook Like Box" for this.
Where the css, js and images located ?
Answer :
- For front end all the css,js and images are located within "THEME/assets/" directory. For admin panel all these are located under "ROOT/assets/admin" directory.
How to extend helpers ?
Answer :
- All the helpers are located under "ROOT/system/helpers" directory.
- Please don't update these files if you need any changes. Extending a helper file is very much simple.
- Suppose you want to extend is_installed() function on dbcbase_helper.php, then make another file named as "MY_dbcbase_helper.php" under "ROOT/application/helpers" directory and write the function with same name there.
- This will override the original helper file. We will update the helpers under "ROOT/system/helpers" for future updates.
How to extend controllers or models ?
Answer :
- You'll see for each controller and models there are two different files. One is core file and another is normal.
- Example : There are two files for show controller. You can go to ROOT/application/modules/show/controllers and see there are two controllers
show.php and show_core.php
- If you need to modify the home() function of taht controller then extend that function on show.php
How to create a new theme or modify front end views ?
Answer :
- Front end views are rendered using theme
- If you want to modify any front end view then first creare a new theme.
- New theme creation is very easy. For this follow the steps below
- 1. Go to ROOT/application/modules/themes/views directory
- 2. Copy "default" directory and rename it. Example : copy default directory and rename it to custom
- 3. Now edit ROOT/application/modules/themes/views/custom/config.xml file and put your theme name there
- 4. Go to admin panel > themes and you'll see there is a new theme names as custom. You can activate this theme now
- So if you want to change any front end view then first create a new theme and then edit it.
How to modify admin panel views ?
Answer :
- All admin views are under ROOT/application/modules/admin/views directory.
- You'll see there is two directory "Default" and "Custom".
- All admin views are loaded using load_admin_view(VIEW_NAME,PARAMETERS,OUTPUT) function.
- This function first looks for the view on custom directory. If not found then it looks for the same view file on default directory
- So if you want to extend or modify any admin view file then copy it on "custom" directory and then edit it.
We've used codeigniter version 2.0.3 as framework. As you know codeigniter basically is a MVC frame work. For newspilot we have used the HMVC version of Codeigniter. The H of HMVC stands for Hierarchical. In normal MVC model controllers, models and views are organized under ROOT/application directory. But in HMVC, there is one more level "Modules" under ROOT/application directory.
Suppose you have a module "admin" under this modules directory. Now controllers, models and views for this module can be placed under "ROOT/application/modules/admin/controllers","ROOT/application/modules/admin/models" and "ROOT/application/modules/admin/views" directory.
Now suppose there is a controller named as "test" under this controller directory and there is a function called "hello" in this controller. From browser you can access this function like site_url.'/admin/test/hello'. Here admin is the module name, test is the controller name and hello is the function name. If the controller and module name are the same then it can be typed once. Like if the controller name is "admin" then you can access this hello function like site_url.'/admin/hello'. Read more about HMVC form here https://bitbucket.org/wiredesignz/codeigniter-modular-extensions-hmvc
Language Routing:
For passing selected lang with the url we've modified codeigniters default routing. Now the first segment after index.php represents the selected lang key. Like for a sample url "http://newspilot.webhelios.com/index.php/en/show/cat/1" there "http://newspilot.webhelios.com/index.php" is the site url and "en" is the language key. "en" stands for English language. You can use any two character ISO code for any language. If this segement is empty then default language selected from admin panel will be used. For changing the basic routing rule we've modified "ROOT/application/third_party/MX/Router.php".
We have also override the site_url() function on URL helper. You can find this extended function on the helper file "ROOT/application/helpers/MY_url_helper.php".
Helpers:
All the helpers used in newspilot are placed under "ROOT/system/helpers" directory with the prefix "dbc". If you see any function in any controller or models or views which is called without through object then it's a helper function. You can then find that function in any of these helpers files.
Extending newspilot or writing custom codes:
How to extend controllers?
For any controllers you will see there is two files under controllers directory. Like for admin controller there will be two files named as
- admin.php
- admin_core.php
under the controllers directory. All the core functions are written on this "_core.php" files. If you need to change any function please extend the same function on the other file. For next version updates we will update only these "_core.php" file. So if you write any code or make any changes to these files, they will be loast upon update. So please write your custom codes on normal files.
How to extend the models?
These is same as the controllers.
How to extend views:
All the views for front end is managed as themes. Themes are located under "ROOT/application/modules/themes/views/" directory. If you want to change any view or want to make custom theme, then follow the below procedures.
- Copy the default directory under "ROOT/application/modules/themes/views/"
- Rename it like as you wish.(No spaces)
- Edit the NEW_DIR/assets/config.xml file and change the text within <name></name> tag
- Now from admin panel > menu > themes , you can find the new theme you just make. Click the active button and activate the theme.
- Now you can change any views like you wish.
We will update only default theme codes for future updates. So if you make any changes to these views under default directory, they will be lost. So please follow the above process to make a theme and update the views.
How to extend helpers?
As said before all the helpers for newspilot located under "ROOT/system/helpers" directory. But please don't update these files if you need any changes. Extending a helper file is very much simple. Suppose you want to extend is_installed() function on dbcbase_helper.php, then make another file named as "MY_dbcbase_helper.php" under "ROOT/application/helpers" directory and write the function with same name there. This will override the original helper file. We will update the helpers under "ROOT/system/helpers" for future updates.
Where the css, js and images located?
For front end all the css,js and images are located within "THEME/assets/" directory. For admin panel all these are located under "ROOT/assets/admin" directory.
If you have any question or need any support contact with us on
webheliosteam@gmail.com
You can also like our page on Faceboook