CuteNews.RU readme |
Informations about the scriptCuteNews.RU - is a powerfull and simple news script that allows you to publish your news and any content that you wish. The script is built on the core of CuteNews by the CutePHP Team, and it borrows ideas from AJ-Fork, another system that is based on CuteNews. Cutenews.RU uses either textfiles (txtSQL) or MySQL to store its data. The system requirements are minimal but the possibilities to use the script are vast. You can use CuteNews.Ru to publish your private home page, start blogging, use it as a content management system or anything that is on your mind. More information about how to use this script can be found on the official website of CuteNews.RU ( only available in Russian )! You can support this project by linking to the official site ( CuteNews.ru ), or by donating on the WebMoney account: $ - Z584423619010, - E489862997841, R - R435030808543 System requirements
As you can see all you need to run CuteNews.RU is PHP. Take it, use it, love it :). Installation of CuteNews.RUAttention! path/to is the path to your CuteNews.RU installation Installing CuteNews.RU is very simple. Just proceed with the following instructions:
Upgrade from 02x, CuteNews and AJ-ForkUpgrade for 024, 025, 026, 027, 028, 029, original CuteNews and AJ-Fork. If you're using AJ-Fork v.168, you need to go to tools/anticonvert.php (inside your AJ-Fork installation) and then use our upgrade.
Upgrade
Update from txtSQL (text version) to MySQL
BackUpYou can make a backup of your MySQL database and/or your data folder. Open your browser and go to http://yoursite.com/path/to/backup and choose what to backup. We recommend to do a backup at least once a month. VariablesThere are several important variables that you should know of. $static['variable'] = VALUE; // tells the script that you dont want to show entire news. This is very, very useful for several cases ( eg. Guestbook ). $template = 'TEMPLATE'; tells the script which template you want to use. For example if you write: $template = "Headlines" all news in that php include will be displayed as headlines. If you want to use template Default, then you dont have to declare this variable because it is used by default. $category = 'ID CATEGORIES;' // tells the script that you want to show news from different categories. You can show several categories, just write: $category = '1,4,7'. This will show only news from category 1, 4 and 7. You can go to Control panel to create, delete and edit your categories. $number = NUMBER; // tells the script the number of news to be displayed on one page. For example: $number = 7; will show 7 news per page. $year, $month, $day, $user (or $author) are similar to $category. Those variables serve for sorting news. For example if you write: $month="12"; $user="odin", you will see news only from december and only posted by user "odin" . Of course, everything can be used "together". $skip = SKIP; // use this variable only when using $number. $skip tells the script how many news you want to leave out. For example: $skip = 4; shows your news starting with the fourth news. $user_query = URL; // adds a query to the URL. You find an example of using it in search.php . $ucat // It's analog to $category but only works with full news. See the example below to understand its use $sort = array('field', 'order'); // tells the script to sort the news by "field" in "order". $PHP_SELF = file; // if rUFUs is turned off you can tell the script where to open the news Variables you can use when using $sort: Two possibilities to sort: For example, if you declare $sort = array('comments', 'DESC') - you will see news sorted from least to largest amount of comments. Show newsIt's very easy to show the news on your page. Simply put this code to the file which will show the news: include 'path/to/head.php'; Attention. path/to/ is the path to your CuteNews.RU directory. And where you want to show the news you must add this code: include $cutepath.'/show_news.php'; You have to include all the variable mentioned above before you include the show_news.php: $number = 7; You may include show_news.php several times, simply don't forget to use $static. ExamplesPlease go to path/to/example/index.php and take a look at the example file. You will soon understand how everything is working. Normal including. It will show all news from all categories, with default sorting (newest on top): include $cutepath.'/show_news.php'; If you want to show 5 news from category "News" (for example this category's ID is 1) and from category "Articles" (ID 4) as headlines, use this code: $number = 5; A more advanced example: if somebody has opened the full-story, you can show a few (7) headlines from that category below the full story: $number = 5; Script optimizationTo accelerate the speed of the script and to decrease the server usage it is necessary to activate caching. It is activated by default. To turn it off go to head.php and set cache to false at the beginning of the file. It is not recommanded to turn it off as some plugins and functions (especially functions involving categories) query the database and cause unnecessary server traffic. You can set global_cache to true if your server is really busy. rUFUs / URL managementThis part of the script will allow you to change the URLs in whatever way you want. The "heart" of rUFUs is the file urls.ini in the data folder. You can edit this file directly or by going to "Options -> User Friendly Urls" in admin panel. It is very difficult to understand the way it is working so have a look at an example: [home] [home] is the file which shows your news. You can change it in Options -> System settings -> "Path to page". [Something] is the file's name, for example [rss] controls rss.php, [print] controls print.php and so on. If you set rUFUs to yes in Options -> System settings -> you are able to generate a .htaccess file and use search engine friendly urls. Pay attention! Only set rUFUs to "yes" if your server allows .htaccess files and supports mod_rewrite. Otherwise you will get an error 404. When using rUFUs avoid having "foreign" characters in your categories as this will cause errors. You can add new {tags} which create new rules in the .htaccess file. For example we create the tag {user}: user = "users/{user:do=users}.html" After that you can use links like: http://yoursite.com/users/USER.html (if rufus = no, then links like http://yoursite.com/page.php/users/USER.html), instead of http://yoursite.com/page.php?do=users&user=USER The tag {add} is really usefull too. You can create any condition you like. For example, if we use ?do=users in a link to show a list of users (as in example.php) and the link should be like /users/user.html, and in /users/ is the list. Then we can write something like this: dousers = "users{add:do=users}" This would result in a link like http://yoursite.com/users/ (if rufus = no, then like http://yoursite.com/page.php/users/), instead of http://yoursite.com/page.php?do=users After that you can show the users in your short or full story template like this: {link=home/dousers} So, you may use {link=file/type} in the templates. List of global types: post - news link List of tags: {id} - news ID rUFUs: search engine friendly linksAdvice: follow this hierarchy: [home] If you want to have links the old style use something like this: [home] PluginsSome words about the plugin "Calendar/Archives/Categories/Title". There are four features available: cn_calendar(), cn_archives(), cn_category() and cn_title. The first one displays a calendar with your news, the second one lists your archives, the third one lists your categories and the fourth one the "path" of the news in the browser's title. Pay attention! These are PHP functions. You have to call them like this: <?=cn_category(); ?> Or with the proper variables like this: <?=cn_category('variable1', 'variable2'); ?> cn_archives(): cn_archives([template [, sort [, id]]]) cn_category(): cn_category([prefix [, template [, no_prefix [, level
[, id]]]]]) 近期下载者:
相关文件:
收藏者:
|