I want to use module_invoke on a custom front page to call "Top Downloaded Users" but don't know how to switch between the four blocks offered by the module. Delta 0 gives me top downloaded files. I've tried changing the delta number, but to no avail. Here's what gets me the "top downloaded file" block:

<?php $block = module_invoke('download_count' ,'block', 'view', 0); ?>

Comments

WorldFallz’s picture

Status: Active » Fixed

I'm not using integer block deltas. The deltas are: files, downloaders, users, nodes (you can always looks this up in the 'blocks' table).

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

j4’s picture

Try doing it this way:

$block = module_invoke('download_count' ,'block', 'view', 0); print $block['content'];

Sorry! I know that this issue is closed. But just in case somebody stumbles upon this, this may be helpful!

J

esllou’s picture

WF has already said he's not using integer block deltas.

WorldFallz’s picture

That would be she -- not every geek is male ;-)

And though I'm not using integer deltas I just tested it and that loc seems to work both ways (using integers and using the text).

WorldFallz’s picture

weird-- it only seems to work with 0 when using an integer, but the text deltas work fine.

esllou’s picture

yeah, I mentioned in the first post that 0 works...there must be some default behaviour at play.