Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Plugins] The News Feed System
Already integrated to THT, there is a RSS Reader Class made specially to read the THT Community's news items and show it in the THT AdminCP. But you can use it also, if you create a new page in the system using this code, you will get a news feed! (Made using MyBB)

Remember to edit $url to make it to work.

PHP Code:
$url "";
$rss fetch_rss($url);
    foreach (
$rss->items as $item) {
$author $item['dc:creator']; //Post Author
$subject $item['title']; //Topic Title
$href $item['link']; //Topic Link
$pubdate $item['pubDate']; //Topic Publication Date

$description substr($item['description'], 0strrpos(substr($item['description'], 0250), ' ')) . '...
<a href='
.$href.'  target="_blank" title="This post is cut to 250 characters. To read the rest of this post, click Read More." class="tooltip">
[Read More]</a>'
/* Above is the post content */
echo "<strong><a href='".$href."' target='_blank'>".$subject."</a></strong> - Posted by ".$author."<br />
$description<br /><br />"//tpl: rss feed

Explore the code by yourself, you will find out more.
Jimmie Lin - Community Manager & THT.Next Developer

Forum Jump:

Users browsing this thread: 1 Guest(s)