Jump to content

[SOLVED] rss ok, unless i hook it in home


Recommended Posts

Hi everyone,

I'm trying to show some site's rss feed in my home (center) block, but it doesn't work.

The rss block works fine when the hook is in the left bar, but in the center it only says "no rss feed".
Anybody any ideas of what the heck i'm overseeing here?

Link to comment
Share on other sites

That's because the RSS module was designed only to be placed in the left or right column. It wasn't designed to be placed in the center column on the homepage. To add this capability, you'll need to add the following before the last } in modules/blockrss/blockrss.php:

function hookHome($params)
{
   return $this->hookLeftColumn($params);
}



You'll need to modify modules/blockrss/blockrss.tpl and the /* Block RSS */ section of global.css to get it to appear how you like.

Link to comment
Share on other sites

thnx for your reaction.

no changes further to the function install()?

I'm having difficulties with the install() function grammer, all blocks have a different lingo so it's a bit confusing how to do it right. (constructions with and without '!')

i'm at the point of a reinstall, cuz changing back doesn't work either. probably f^%$#ked up mysql...

anyhoo...

i'll be back.

Link to comment
Share on other sites

You don't need to change the install function, unless you want the module to automatically install itself on the homepage instead of the left column. To do this, change line 27 of modules/blockrss/blockrss.php from:

if (parent::install() == false OR $this->registerHook('leftColumn') == false)



to:

if (parent::install() == false OR $this->registerHook('home') == false)



This will call the Module class's install function, then register the module into the 'home' hook. If either of these fail, the function returns false and an error message is displayed.

Link to comment
Share on other sites

that's allmost exactly what i did, with the only difference being, that i had changed 'rightColumn' to 'home' allong with the install().
but somewhere allong the line i must have scr%$ed something else or what ever...

what works in case of the rssblock (literaly)=

change in install()

if (parent::install() == false OR $this->registerHook('home') == false) 


add to bottom

function hookHome($params)
{
   return $this->hookLeftColumn($params);
}


exactly like you pointed out,

I offer my humble thanx for your help!!

Link to comment
Share on other sites

×
×
  • Create New...