Jump to content


The RSS Feed


7 replies to this topic

#1 JonnyBDead

  • Members
  • 10 posts

Posted 29 July 2008 - 05:21 AM

Hello,

I am using the RSS feed for my portal.
I would like to change the font-size of the heading and drop out the description. Is there a way i can choose more advanced what i want to include in the rss feed?
Ill be happy to provide URL's for the site and feed's if needed.
Thanks in advance.

#2 JonnyBDead

  • Members
  • 10 posts

Posted 29 July 2008 - 05:27 AM

Realized this is better put at http://www.mkportal....pport/index.php :P

#3 visiblesoul

  • Administrators
  • 551 posts
  • Location:Earth
  • Texas

Posted 29 July 2008 - 10:28 AM

JonnyBDead said:

Hello,

I am using the RSS feed for my portal.
I would like to change the font-size of the heading and drop out the description. Is there a way i can choose more advanced what i want to include in the rss feed?
Ill be happy to provide URL's for the site and feed's if needed.
Thanks in advance.

JonnyBDead said:

Realized this is better put at http://www.mkportal....pport/index.php :P
Hello JonnyBDead. Yes that is the official support site. If you do not receive a good answer in a timely manner over there let me know and I will be happy to help. But I will need to know what MKPortal version you are using and whether you are using the SimplePie feed reader or the old MKPortal reader.


Please note that I offer free support on this forum in my free time. Depending on how much work I have backlogged it may take me a week or more to answer questions. I am not ignoring you. I answer everyone but please be patient. Thanks.

Disclaimer: All forum posts, including code examples, on this forum are offered for free in the hope that they will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Use code examples at your own risk.

"If at first you don't succeed, keep on suckin' til you do succeed." -Curly Howard

#4 JonnyBDead

  • Members
  • 10 posts

Posted 30 July 2008 - 01:14 AM

I'm using MKPortal M1.1.1 and the MKPortal RSS Reader included.
This SimplePie RSS Feeder sounds like something i could try?

#5 visiblesoul

  • Administrators
  • 551 posts
  • Location:Earth
  • Texas

Posted 31 July 2008 - 09:13 AM

JonnyBDead said:

I'm using MKPortal M1.1.1 and the MKPortal RSS Reader included.
This SimplePie RSS Feeder sounds like something i could try?
I integrated SimplePie RSS in version C1.2.It is more full featured but may not work on all servers.

The old MKPortal RSS parser has many problems and may not display all feeds. But it is stillused by many people.

To modify the display of the RSS block look in mkportal/blocks/rss.php.

To change the heading font size in M1.1.1:

FIND:
		$content .= "<b><a href=\"".$regs[2][0]."\" target=\"_blank\" class=\"uno\" ><span style=\"font-size:11pt;\">".$regs[1][0]."</span></a></b><br /><i>".$regs[3][0]."</i><br /><br />";
Edit the formatting however you like. For example...

		$content .= "<h1><a href=\"".$regs[2][0]."\" target=\"_blank\" class=\"uno\" >".$regs[1][0]."</a></h1><h3>".$regs[3][0]."</h3>";
Do something similar with this line also...
		$content .= "<b><a href=\"".$matches[2]."\" target=\"_blank\" class=\"uno\" >".rss_clean_entry($matches[1])."</a></b><br />";
To remove the description in M1.1.1:

FIND:
		if ($mklib->config['rss_desc']) {
			preg_match("|<description>(.*)</description>|Uism",$items[1][$i], $matches);
			if (count($matches)) {
				$desc = rss_clean_entry($matches[1]);
				if (strlen($desc) > $mklib->config['rss_desc_length']) {
					$desc = substr($desc, 0, $mklib->config['rss_desc_length']);
					$desc = substr($desc, 0, strrpos($desc, " " ));
					$desc .= " ...";
				}
				$content .= $desc."<br /><br />\n";
			}
		}
Comment out like this...

/*
		if ($mklib->config['rss_desc']) {
			preg_match("|<description>(.*)</description>|Uism",$items[1][$i], $matches);
			if (count($matches)) {
				$desc = rss_clean_entry($matches[1]);
				if (strlen($desc) > $mklib->config['rss_desc_length']) {
					$desc = substr($desc, 0, $mklib->config['rss_desc_length']);
					$desc = substr($desc, 0, strrpos($desc, " " ));
					$desc .= " ...";
				}
				$content .= $desc."<br /><br />\n";
			}
		}
*/
Let me know if that's what you need.

-=DKC=-


Please note that I offer free support on this forum in my free time. Depending on how much work I have backlogged it may take me a week or more to answer questions. I am not ignoring you. I answer everyone but please be patient. Thanks.

Disclaimer: All forum posts, including code examples, on this forum are offered for free in the hope that they will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Use code examples at your own risk.

"If at first you don't succeed, keep on suckin' til you do succeed." -Curly Howard

#6 JonnyBDead

  • Members
  • 10 posts

Posted 05 August 2008 - 02:34 AM

This looks exacly like what I need - will test this now.
Thanks :P

#7 JonnyBDead

  • Members
  • 10 posts

Posted 05 August 2008 - 02:34 AM

Well - the RSS-commenting out didnt work. Had to remove <description>-parts from line 108 and now i dont have a description thanks to your help :P

Anyways, last q; How can i remove the date & time it lists?

#8 visiblesoul

  • Administrators
  • 551 posts
  • Location:Earth
  • Texas

Posted 07 August 2008 - 01:05 AM

View PostJonnyBDead, on Aug 5 2008, 04:34 AM, said:

Anyways, last q; How can i remove the date & time it lists?

You should be able to simply comment out this line like so...
//$content .= "<div class=\"tdblock\">".rss_clean_html($mklib->create_date(time(), "long"))."<br /><br /></div>\n";

However I have not tested these modifications since I haven't had M1.1.1 installed anywhere for a long time. :)


Please note that I offer free support on this forum in my free time. Depending on how much work I have backlogged it may take me a week or more to answer questions. I am not ignoring you. I answer everyone but please be patient. Thanks.

Disclaimer: All forum posts, including code examples, on this forum are offered for free in the hope that they will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Use code examples at your own risk.

"If at first you don't succeed, keep on suckin' til you do succeed." -Curly Howard





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users