Its easy
This is remote headlines
Now see werePHP Code:<?PHP
// ********************************************************************************
// Remote Show Headlines by Georgi Avramov
// ----------------------------------------
// How to use this module:
// | put this code: <SCRIPT language=javascript src="http://mysite.com/cutenews/remote_headlines"></SCRIPT>
// | on the page where you want to display the headlines
// | you can use and http://mysite.com/cutenews/remote_headlines.php?number=NUMBER_OF_NEWS
// | you can use and http://mysite.com/cutenews/remote_headlines.php?number=NUMBER_OF_NEWS&category=CAT_ID
// | to show exact number of news
// ********************************************************************************
//----------------------
// CONFIGURATION
//----------------------
$template = "[link]{title}[/link]<br>Posted On: {date}<br>"; //: you can use {date}, {title}, {author} and
$date_format = "d M Y"; //: for help on date format go here: http://www.php.net/manual/en/function.date.php
$local_news_page = "http://simplyhabbo.com/news/show_news.php"; //: URL to page where you include your news eg. http://mysite.com/index.php
$remote_target = "_self"; //: _blank = open in new window; _top = open in same window;
//----------------------
// END CONFIGURATION
//----------------------
if(!$PHP_SELF){
if($HTTP_POST_VARS) {extract($HTTP_POST_VARS, EXTR_PREFIX_SAME, "post_");}
if($HTTP_GET_VARS) {extract($HTTP_GET_VARS, EXTR_PREFIX_SAME, "get_");}
if($HTTP_COOKIE_VARS) {extract($HTTP_COOKIE_VARS, EXTR_PREFIX_SAME, "cookie_");}
if($HTTP_ENV_VARS) {extract($HTTP_ENV_VARS, EXTR_PREFIX_SAME, "env_");}
}
if($PHP_SELF == ""){ $PHP_SELF = $HTTP_SERVER_VARS[PHP_SELF]; }
$all_news = file("./data/news.txt");
$i = 0;
echo"<!-----\n";
echo"//News powered by CuteNews: http://cutephp.com\n";
foreach($all_news as $single_news){
$news_arr = explode("|", $single_news);
if($category != "" and $category != $news_arr[6]){ continue; }
$output = $template;
$output = str_replace("{title}", "$news_arr[2]", $output);
$output = str_replace("[link]", "<a href='http://www.simplyhabbo.com/news/show_news.php?subaction=showfull&id=$news_arr[0]' target='$remote_target'>", $output);
$output = str_replace("[/link]", "</a>", $output);
$output = str_replace("{author}", "$news_arr[1]", $output);
$output = str_replace("{date}", date($date_format ,"$news_arr[0]"), $output);
echo"document.write(\"$output\");\n";
$i++;
if($number != "" and $i == $number){ break; }
}
echo"//----->\n";
?>
I replaced that toPHP Code:$output = str_replace("[link]", "<a href='http://www.simplyhabbo.com/news/show_news.php?subaction=showfull&id=$news_arr[0]'
and in myphpfilename.php i have:PHP Code:$output = str_replace("[link]", "<a href='http://www.simplyhabbo.com/MYPHPFILENAME.php?subaction=showfull&id=$news_arr[0]'
So basicly just make a Habbo template and put that include in where u want the news to show xdPHP Code:"Template"
<?
include("news/show_news.php");
?>
Then we end up with (myphpfilename.php)
PHP Code:<table width="552" height="50" border="0" cellspacing="1" bgcolor="#000000">
<tr>
<td height="14" background="head.gif"><div align="center">
<font color="#FFFFFF" face="Verdana" size="1">News</font></div></td>
</tr>
<tr>
<td bgcolor="#598CC5"><div align="center"><?
include("news/show_news.php");
?></div></td>
</tr>
</table>






Reply With Quote