Easy. Add this to the webpage that is displaying CuteNews.
require_once 'yourcutenewsfoldername/cn_api.php';
$entry = cn_api_get_entry();
if ($entry['t'])
{
// ........
$header_title = $entry['t'];
$str = $entry['s'];
$rawdesc = $entry['f'];
function get_string_between($string, $start, $end){
$string = " ".$string;
$ini = strpos($string,$start);
if ($ini == 0) return "";
$ini += strlen($start);
$len = strpos($string,$end,$ini) - $ini;
return substr($string,$ini,$len);
}
function stripBBCode($text_to_search) {
$pattern = '|[[\/\!]*?[^\[\]]*?]|si';
$replace = '';
return preg_replace($pattern, $replace, $text_to_search);
}
$rawdesc2 = stripBBCode($rawdesc);
$pattern = "/[a-zA-Z]*[:\/\/]*[A-Za-z0-9\-_]+\.+[A-Za-z0-9\.\/%&=\?\-_]+/i";
$replacement = "";
$sdesc = preg_replace($pattern, $replacement, $rawdesc2);
$fdesc = strip_tags($sdesc);
$image = get_string_between($str, "[img]", "[/img]");
echo "<title>".$header_title."</title>\n";
} else {
echo "<title>Your Website Title</title>\n";
}
Your final code should be something like this,
<?php
$number="4";
$template = "default";
$PHP_SELF = "thepagewhereyoupost.php";
include("yourcutenewspath/show_news.php");
require_once 'yourcutenewsfolder/cn_api.php';
$entry = cn_api_get_entry();
if ($entry['t'])
{
// ........
$header_title = $entry['t'];
$str = $entry['s'];
$rawdesc = $entry['f'];
function get_string_between($string, $start, $end){
$string = " ".$string;
$ini = strpos($string,$start);
if ($ini == 0) return "";
$ini += strlen($start);
$len = strpos($string,$end,$ini) - $ini;
return substr($string,$ini,$len);
}
function stripBBCode($text_to_search) {
$pattern = '|[[\/\!]*?[^\[\]]*?]|si';
$replace = '';
return preg_replace($pattern, $replace, $text_to_search);
}
$rawdesc2 = stripBBCode($rawdesc);
$pattern = "/[a-zA-Z]*[:\/\/]*[A-Za-z0-9\-_]+\.+[A-Za-z0-9\.\/%&=\?\-_]+/i";
$replacement = "";
$sdesc = preg_replace($pattern, $replacement, $rawdesc2);
$fdesc = strip_tags($sdesc);
$image = get_string_between($str, "[img]", "[/img]");
echo "<title>".$header_title."</title>\n";
} else {
echo "<title>Your Website Title</title>\n";
}
?>
Change require_once 'yourcutenewsfolder/cn_api.php'; and <title>Your Website Title</title> to the correct path and name.