Hacking the Com Newsfeeds Template

From ALSwiki
Jump to: navigation, search

This isn't recommended best practice. Better would be to create a new mod newsfeeds with additional parameters to enable more confguration options.

I want newsfeed summaries without any html tags.

So, I modified (aka hacked) the newsfeed template at:

 /components/com_newsfeeds/views/newsfeed/tmpl/default.php
 /modules/mod_feed/tmpl/default.php

Replacing lines:

 echo str_replace(''', "'", $text); */

With

 echo strip_tags(str_replace(''', "'", $text));

This should be moved up to do the word-count restriction after we've stripped the tags. ..and it would be better to modify the templates to make this a param-set option.