<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"><channel><title>sNews</title><description>sNews</description><link>http://snewscms.com/</link><copyright>Copyright sNews</copyright><generator>sNews</generator><item><title>Languages</title><description>sNews has a very international following, and since people wish to use sNews in their language, some have translated the language component of sNews, and posted it back to the community.
A full (although not complete) list of translations for the current version of sNews can be found on our forum. If you do not find a translation for your language, and are able to translate the language section, there are many who would appreciate it being posted in the forum.

sNews Language Translations

How to install a language to your sNews.

A few simple steps will enable you to install a suitable language for your sNews site.

1) Locate the translation in the forum and copy the text.
2) Paste the text into a new file (using notepad or similar) and save as  snews_LA.php where LA is the 2 character code for your language. For example, Esperanto => snews_EO.php
3) Upload this file to your site, in the same directory as snews.php.
4) log in to your site admin, and browse to the Site ->Settings -> Time and Locale settings, and insert the language code. Save
5) Refresh your browser

</description><pubDate>Sat, 14 Apr 2007 03:47:22 +0000</pubDate><link>http://snewscms.com/home/languages/</link><guid>http://snewscms.com/home/languages/</guid></item><item><title>Add-ons</title><description>Add-ons are seperate mini applications that can be made to work in the sNews environment.Here are add-ons found in our forum.


Article rating
Color picker utility


Whizzywig editor
Social bookmarking


Add-ons are currently few, compared to Mods, and reside in the same forum.</description><pubDate>Sun, 01 Apr 2007 07:12:21 +0000</pubDate><link>http://snewscms.com/home/addons/</link><guid>http://snewscms.com/home/addons/</guid></item><item><title>Ready to Start Developing?</title><description>Perhaps you would like your sNews CMS website to have more features than it comes with. Maybe you have some basic to intermediate XHTML, CSS and PHP skills... and you want to learn more and share your improvements. Good, because sNews is intentionally built as a developers' tool and it's an excellent learning toy for those who want to dig in and work with the code. sNews is not an average out-of-the-box product with a surplus set of things you won't need or use for your site, but is the base upon which to build the CMS that you want.

A couple of notes before you start:
- All the routines are nicely separated into several functions, and a beginner's knowledge level should be sufficient enough to understand what's really going on under the hood;
- sNews is still the smallest publicly available CMS because we wanted to provide the core essentials required to produce and maintain dynamically managed website content;
- As a minimum, the system requires PHP version 4.0 in order to cover the majority of server setups. Note - you are free to use later versions as well, but please make your coding backward compatible if you can;
- The forum is a good place to start digging for answers not covered in our function reference FAQ.</description><pubDate>Mon, 19 Feb 2007 23:12:16 +0000</pubDate><link>http://snewscms.com/developers-guide/ready-to-start-developing/</link><guid>http://snewscms.com/developers-guide/ready-to-start-developing/</guid></item><item><title>Popular Articles</title><description>Popular Articles mod by Mika
Mandatory Requirement: Page View Counter

1. Language variables (snews.php)
$l = 'Posted in';
$l = 'Views';
2. New function (snews.php)

// POPULAR ARTICLES
function popular_articles($size) {
# select all published articles ordered by view column and limiting the output with numeric $size variable
$query = "SELECT * FROM ".db('prefix')."articles WHERE position = 1 AND published = 1 ORDER BY views DESC LIMIT $size";
$result = mysql_query($query);
# "home" title defined outside while-loop
$home = s('home_sef');
#optional formatting (uncomment if needed)
//echo '';
while ($r = mysql_fetch_array($result)) {
# find category SEF title (used to build links)
$categorySEF = find_cat_sef($r);
# defining category name: if zero, we're at home, else retrieve category name
$categoryName = $r == 0 ? $home : retrieve('name', 'categories', 'seftitle', $categorySEF);
echo ''.$r.' '.$r.' '.l('views').'';
}
#optional formatting (uncomment if needed)
//echo '';
}

Usage (index.php)





</description><pubDate>Mon, 19 Feb 2007 18:25:25 +0000</pubDate><link>http://snewscms.com/home/popular-articles/</link><guid>http://snewscms.com/home/popular-articles/</guid></item><item><title>Page View Counter</title><description>Page View Counter mod by Mika
(version 0.1, tested in 1.5.31)

1. database change
- add the following line in your phpmyadmin SQL view and run it
- it will create a new numeric column named views with zero as a default value

--standard mysql query
ALTER TABLE `articles` ADD `views` INT( 11 ) NOT NULL DEFAULT '0';


--mysql query using table PREFIX_
ALTER TABLE `PREFIX_articles` ADD `views` INT( 11 ) NOT NULL DEFAULT '0';

2. language variable (snews.php)
- add it somewhere in your language variables section
- it will be used inside article's infoline
$l = 'Views';
3. function tags() (snews.php)
- edit function tags() by adding a new element views in the array
function tags($tag) {
$tags = array();
$tags = ',readmore,comments,views,date,edit,';
4. function center() (snews.php)
- around line 512 find this snippet and add the blue part
if ($infoline == true) {
foreach ($tag as $tag) {
switch (true) {
case ($tag == 'date'): echo $a_date_format; break;
case ($tag == 'views'): echo ' '.$r.' '.l('views').' '; break;
5. function center() (snews.php)
- a couple of lines below find this snippet and add the blue part
- this will increment view counter every time visitor hits full article view
- when logged in, view counter is disabled (otherwise all admin views/edits would be counted as well, but that would make the counter even less precise*)
else if (substr($position, 0, 1) != '2' && empty($currentPage)) {


if ($_SESSION != token()) {
$views = $r; $views++;
$queryUpdate = "UPDATE ".db('prefix')."articles SET views = $views WHERE id = $r";
mysql_query($queryUpdate);
}</description><pubDate>Mon, 19 Feb 2007 17:13:54 +0000</pubDate><link>http://snewscms.com/home/page-view-counter/</link><guid>http://snewscms.com/home/page-view-counter/</guid></item></channel></rss>