MyBB Community Forums

Full Version: RSS feed changing
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Can anybody tell me where or how I can change the RSS feed? I want that the Subject, and a part of the message will be displayed (Like the first 20 letters, and than ...). Right now it shows the subject, the posted forum, the the creation date (and time) and the Author. Too much useless information for my side Smile
Ok, I figured out where to change it (the rss.php file, how unexpexted Smile ) . So I could delte the infos like time, date and author. Does now anybody has an idea how the biginning of the text could be shown?
In rss.php:
FIND:

require "./global.php";

AFTER, ADD:


require "./inc/functions_post.php";

FIND:

$query = $db->query("SELECT t.*, f.name

AFTER, ADD:

, p.message

FIND:

LEFT JOIN ".TABLE_PREFIX."forums f ON (f.fid=t.fid)

AFTER, ADD:

 LEFT JOIN ".TABLE_PREFIX."posts p ON(p.pid=t.lastpost)

FIND:

while($thread = $db->fetch_array($query))
{

AFTER, ADD:

	$query = $db->query("SELECT * FROM ".TABLE_PREFIX."forums WHERE fid='$thread[fid]' AND active!='no'");
	$forum = $db->fetch_array($query);
	if($post['smilieoff'] == "yes")
	{
		$allowsmilies = "no";
	}
	else
	{
		$allowsmilies = $forum['allowsmilies'];
	}
	$message = postify(substr($post['message'], 0, 20), $forum['allowhtml'], $forum['allowmycode'], $allowsmilies, $forum['allowimgcode']);

FIND:

			echo "\t\t\t<guid>".$settings['bburl']."/showthread.php?tid=".$thread['tid']."&amp;action=newpost</guid>\n";
			echo "\t\t\t<title>".$thread['subject']."</title>\n";
			echo "\t\t\t<author>".$thread['username']."</author>\n";
			echo "\t\t\t<description>".$lang->forum." ".$thread['forumname']."\r\n".$lang->posted_by." ".$thread['username']." ".$lang->on." ".$postdate." ".$posttime."

AFTER, ADD:

<br />$message ...

FIND:

			echo "\t\t\t<title>".$thread['subject']."</title>\n";
			echo "\t\t\t<author>".$thread['username']."</author>\n";
			echo "\t\t\t<description>".$lang->forum." ".$thread['forumname']."\r\n".$lang->posted_by." ".$thread['username']." ".$lang->on." ".$postdate." ".$posttime."

AFTER, ADD:

<br />$message ...

That's a rough guide... you probably need to have a rough idea of what you're doing to follow it but it looks like you do from the fact that you figured out the first bit. I expect the creation of $message is a little crude as well... you may have problems with bbcode or smilies getting cut off - but you can work on that to make it a litte neater if need be.
Do you mind speaking English? It's kind of rude to speak another language on an English dominant board. For all I know you were talking about me Toungue
rough translation I think (google german is bad)

"Hmmmm, first off, thanks for the help/assistance. However, it doesn't work so well. Followed your advice, and altered the file (attached), but did not turn out as I had hoped. Sad (*some bit I could understand here*) Have any more tips??

Thank you"
First of all I have to appologize, it was 2am in Germany when I was writng the massage after a pretty hard day Rolleyes. The translation of k776 is correct. I tried to implement the code, but my knowldegde is unfurtunately not that good, so attached the php file to the massage. I am not sure if I put it in at the correct spot. For the startpage I used another PHP script which changes RSS to HTML, and I made the changes at this one (much easier to understand for me). So again no offense Smile, and help is aprechiated Cool