The phpns documentation aims to help you accomplish certain tasks with the phpns software. Click a task below for additional information.
You have successfully completed the action you were trying to accomplish. If it doesn't appear to be successful, please let us know at our bug tracking system (Launchpad).
The action we attempted failed. Usually, the administration interface will give you a reason for the error. If it doesn't make sense, or you think it's a bug, please let us know.
phpns and it's features are worthless if you can't display your work to the world. You can "include" your news on any php document throughout the server, in all different forms. Phpns includes an integration wizard in the preferences section, however, if you wish to do it by hand, we'll help you here.
The easiest and quickest way to display your news on your website is to follow these steps:
<?php
include('path/to/shownews.php');
?>
You will need to modify the code above to reflect the actual path of the shownews.php file.
This method will give you the default settings, specified in the preferences of the administration panel. If this is fine for you, then you're done. However, if you want additional customization, continue reading.
Phpns will allow you to specify additional variables, for more advanced generation.
<?php
$phpns['limit'] = 5;
$phpns['category'] = '1,4,5,6,7';
$phpns['template'] = 4;
$phpns['offset'] = 2;
$phpns['mode'] = 'RSS';
include('path/to/shownews.php');
?>
The phpns index is the main page which you are directed to after logging in. At the top of the page, you'll find multiple links to post a new item, manage current items, manage the phpns users, modify your preferences, and read the phpns about page.
Displayed below the page description, you'll find an information section, which contains two different sections: statistics, and recent articles. Both are pretty straight forward. You will notice the help hyperlink at the bottom right area of the page, which can be clicked to view certain help topics (the guide you are viewing now!).
posting a new item is fairly straightforward with phpns. Click the 'new article' link in the admin navigation. Once you are at the page, you should see a short description, along with an HTML form. A list of the fields are below:
the title can contain any character, and has a limit of 100 characters. Example: My first post!
the sub-title can contain any character, and has a limit of 100 characters. Example: and why I love this cms...
the article category is very important, and currently you can only have one (1) category per article. We plan to change this in a future release...
the main article is the most important element in article items. Limit of 20,000 characters.
the rest of the article. this is optional! Limit of 20,000 characters.
100px by 100px image representing the article content. optional. Accepts jpg, png, gif, and bmp.
A more obscure feature of phpns. You can specify when a date will become visable on your website. The format must be in the following order: "MM/DD/YYYY". The date is converted to a Unix timestamp, and stored in the database. Leave this field blank if you wish to start the article immediately.
A more obscure feature of phpns. You can specify when a date will stop being visable on your website. The format must be in the following order: "MM/DD/YYYY". The date is converted to a Unix timestamp, and stored in the database. Leave this field blank if you wish to never end the article.
Check this box if you wish to disallow comments for this specific article. THIS WILL ONLY affect this article, it will not affect any other item.
Check this box if you don't want the article to appear publicly. This is a useful feature if you are working on a long post, or if you want other people to modify the article before it goes live.
article management allows you to view the articles you have posted in different ways, orders, and with conditions. By default, articles are listed in a descending date order. That means, the latest article that has been created will be shown at the TOP of the news management table. Although this might suite you, sometimes you may require ordering in a different way, scroll down to sorting options.
Searching is really easy with phpns. At the top of article management, you will see a hyperlink named 'search' (with an expand/collapse option). Expand the search section, and you're presented with 2 fields: your query, and category. Whatever text you enter in the query box (the box with the text 'click here to start your search'), is the text we'll search for in every active article to date. The system will scan the title, subtitle, main article, and full story for that query entered. You also have the option to narrow your search by category. By default, it will search in all categories.
The article list can be sorted in various ways, so you can walk through your database articles easily. You have the following sorting options, which you can activate by clicking at the top of each column of the table.
This will allow you to sort the articles based on the time they were posted. Descending is the default sorting order, however, you may also set this to ascending.
This will allow you to sort the articles based on the articles' title. Ascending will order it from 0-9,A-Z. Descending will reverse the order.
This will allow you to sort the articles based on the author of the article. Ascending will sort the articles based on the name of the author, in alphabetical order. Therefore, ascending would present: Alan, Billy, Caty, George, Veronica, Zack. Descending would reverse the order.
This will allow you to sort the articles based on their status as active or unactive. This is very useful for weeding out articles that have been dormant for a long time.
You can view all the articles posted by a specific user. While viewing articles, you can simply click on the username in the column "Author", and it will load up a selection of articles by that selected author.
You can do the same thing with the author, except clicking on the category next to any article. It will bring up a list of articles posted in that category.
User management is a tool which lets you control and see various users on your installation, like creating new users, editing users, deleting users, and viewing different aspects of users.
By default, the user management page will show a list of options, and a list of users with their information. The table which lists users has the following information:
Each user must have a unique username. A full list of required and optional fields are listed below:
The preferences area will give you the ability to modify many different aspects of your phpns system. The different tasks you can accomplish are listed below:
Here, you can set the 'default' values for how your news is displayed to your visitors/viewers. You can set the following:
Category management will let you create categories and sub-categories in which to file your articles in. You can think of categories like 'folders' in a file system. When you create a new article, you will choose a category in which to place the article into, and later, you can 'filter' the articles (by category) to the end-user.
Templates let you control how your articles are displayed to the end-user. Your template will have 5 fields; a title/name, description, article template, comment template, and comment form. You can set a default template (set at 'Default' during installation) which will appear to the user. You can have multiple templates, and you can use multiple templates at the same time by using extra variables while including your news.
There are multiple variables that you can use in the templates, specified by using {}s. There is a list of them below:
Please include ALL of the data in the form, or else things won't work.
The rss management lets you set different aspects on the RSS feed phpns generates. You can set the title, description, online status, item limit and order.
SEF URLs are goverened by an apache module known as 'mod_rewrite'. Phpns takes advantage of this module, however, it's still very limited. If you want to activate SEF urls, you will need to copy and paste the .htaccess code (found in preferences > search engine friendly urls) into your website directory. If it's not working, we don't recommend messing with the files or the .htaccess file, as it might break the system.
If you're having troubles, or you need help, please visit the IRC (irc.freednode.net / #phpns).
You can set several default options here: If (by default) users can post comments, the order of the comments, and the comment character limit.
You can ban (IP ban) users who you don't want viewing your articles or posting comments by banning their IP address. In this section, you can provide their IP address, and a reason for the ban. When that user/IP visits your website, they will be presented a message with a reason for their ban.
The integration wizard will let you (easily) generate 'code' for you to copy/paste into your website. It should be good to go, you shouldn't have to modify anything.
The system log will log (almost) every action taken by any user. All the information collected will be stored in this page, so you can view it, and see what users have been doing on your system.
This feature is not functional yet, wait until alpha 2.
This feature will let you backup the data in your database to a file. Just click the backup button, and wait until the file is processed by the server. Once it's done, the server will send you the .sql file that can be downloaded. Once you're done, and navigate to another page on phpns, you will see a notice at the top of the administration panel asking you to delete the file asap. PLEASE DO SO, it's a hazard to leave it untouched. Phpns will *try* to delete the file every time you visit the index.php page. If it works, you won't see the message anymore. Upload the file later, to replace the old database and replace it with the downloaded file.
Phpns can turn the whole news system on or off for the end-user. If this is set to offline, the user will not be able to see any article/category/comment in the system.
Themes let you customize how the phpns is presented to adminstrators. You can have as many themes as you want available, but only one theme (or skin, if you would prefer) can remain active. We will provide additional help on the phpns website.
Phpns uses a WYSIWYG editor to replace all textareas on the system to a customizeable, active and complete editor. Phpns uses the TinyMCE wysiwyg editor released under the Lesser GPL as published by the Free Software Foudation.
The system timestamp format will be used on every timestamp recorderd by phpns on the administration panel. You can see the php date function.
Note: This does not affect the shownews.php file.
Deletes all login records in user management.
You can manage/create/delete ranks created.
The global message is used to notify fellow administrators of any important messages... or announcements that login to the administration panel. You can leave the global message blank to nullify the message.
The about page lists many pieces of information that you will find helpful in regards to the phpns project. Please look through the page, and if you feel like it's missing vital information, please tell us!
The latest articles and version check require you to be connected to the internet, so it can access the phpns website. It's provided purely for your convienence.