Installing CuteNews

The installation of CuteNews is really easy and you should do it without any problems if you fallow these steps:

Create a directory on your server (e.g. cutenews);
Upload the content of the cutenews.1.5.0.zip to the directory you created in step 1;
Finally, go to http://yoursite.com/cutenews/index.php with you favorite browser and follow the instructions.

Getting The News On Your Page...

You can show the news, archives on your page by using some of the following php codes in your page. The page where you include news, should be with extension *.php.

If you want these codes to be auto-generated for you, login into CuteNews and go to Options > Integration Wizards.

When showing news, archives you can use $number = x; to limit the to x the number of maximum showed news on one page. If you use $number, "next >>" link to remaining news will be displayed.

if you want to show news, archives from certain category you can use $category = "ID"; where ID is the id of the category, you can choose and more that one category like this: $category = "id1,id2,id3";

When you want to display news and headlines on one page for example, and want when a headline is clicked,

the article to be displayed on the place of the news you must use $static = true; before including headlines.


EXAMPLES

Showing Active News

<?php
  include("path/to/show_news.php");
?>

Showing with Different Template
<?php
  $template = "YOUR_TEMPLATE_NAME";   include("path/to/show_news.php");
?>

Showing Archives
<?php
  include("path/to/show_archives.php");
?>

Showing 5 Latest News
<?php
  $number = "5";
  include("path/to/show_news.php");
?>

Showing 5 News from Category with ID 2
<?php
  $number = "5";
  $category = "2";
  include("path/to/show_news.php");
?>

Showing All Headlines And The 1 Latest News Article On One Page
<?php
  $static = true;
  $template = "Headlines";
  include("path/to/show_news.php");

  $number = "1";
  include("path/to/show_news.php");
?>

Remember that:
in all of the above examples you must replace path/to/... to with your path where you installed CuteNews
and not to use the URL but the path

* WRONG: include("http://site.com/cutenews/show_news.php);
* CORRECT: include("cutenews/show_news.php);

in most cases when you include news and headlines in one page, you must use $static = TRUE;
when you use $number, $category, $template or any other variable, it must be BEFORE include("show_news.php");
if you have any problems, you can always go to our support forums and we'll be more than glad to help you.

Last edited Jan 25, 2013 at 6:41 AM by CutePHP, version 4

Comments

No comments yet.