Support forum
Welcome Guest   [Register]  [Login]
 Subject :JuliaRssToArticle problem with menu and same change.. 2010-01-14 20:38:07 
riforme
Asking around
Joined: 2010-01-12 16:11:25
Posts: 1
Location

Hi,

at the first: very good job.

But I have problem with component's Menu, because it does not work and I used normal way for have a page with all articles (www.riforme.info/rss)

For other problem i solved with little change in the controller.php, but I think you can do better.

I did change this part for cut the $articleBody, because some time in the feed there is full text.

// Parse the articles in the feed
$articles = $rssDoc->get_items();
$titles = $model->getArticleTitles($channel->category);            
foreach($articles as $article)
{                     
$articleTitle =& $article->get_title();

//        $articleBody =& $article->get_description();

$descrizione =& $article->get_description();
$numwords = 80;
preg_match("/([\S]+\s*){0,$numwords}/", $descrizione, $desc);
$articleBody = trim($desc[0]);

 

Other change for don' show the sorce and put Read all in my language. Sometime the sourse is too long and there are problem with the template:

// Add the source at the end of intro text
'introtext' => $articleBody . '<p>'
//    . JText::_('SOURCE') . ': '
. '<a href="' . $article->get_link() . '" target="_blank">' 
. JText::_('Leggi Tutto') . '  '
. '</a></p>',

 

Best Reagards

IP Logged
Last Edited On: 2010-01-14 20:38:07 By riforme for the Reason
 Subject :Re:JuliaRssToArticle problem with menu and same change.. 2010-01-16 03:01:57 
adrianrosian
Board admin
Joined: 2009-07-07 13:09:30
Posts: 69
Location
 

Hello

You shouldn't have a front-end menu linking to the component, because, first of all, the component doesn't have a front'end part. Plus the fact that the component imports the feed into com_content articles (that is why you choose category and section). This is a means of improving the number of pages on a website with good content.

You can modify the component to your will. Indeed, there is no "Read more " link to break the article in two, but you can modify the controller to insert a <hr class="redamore" .. (joomla's default separator) after a specified number of words, if you need it. I just thought that usually rss feeds aren't that long, but the next version will have this as a parameter.

About translating the "Source" text into your language, there is a language file for this.

Thanks for using the component. Please review it on JED if you like it.

IP Logged
Google it first
Page # 


Powered by ccBoard