The Most Emailed block didn't work for me, so I went through the module file with coder module, cleaned up everything it found (just to make sure), and then fixed the form so it will load and the type of block can be selected. There's also a bit of sql in the query for "most emailed all time" so if nothing has yet been emailed, the block doesn't appear.

It still doesn't work correctly for the daily and weekly versions because the queries are wrong for the (apparently) new schema in the Drupal 6 version, but this is a start.

CommentFileSizeAuthor
forward.patch24.68 KBchellman

Comments

seanr’s picture

Status: Needs review » Fixed

This has been updated in CVS. Your code had one minor bug, replacing the 6.x $form_state['values'][...] with 5.x $edit[...] code - I omitted that change from the update. As for the two non-working block queries, I've actually got no idea how to fix those now - they resulted from the changes allowing non-node pages to be forwarded. The log table therefore logs paths now rather than node IDs so the joins are no longer relevant, and there is no way to get a title from a path now. I think the best solution may be to just eliminate those two blocks, which I have now done temporarily until I can come up with a better solution.

chellman’s picture

Before I replaced the form_state bit, it didn't actually work — the value getting stored was NULL. I thought that was weird given the changes to formapi, but if you check out the parameters for hook_block in the API, you'll see it specifically refers to $edit:

http://api.drupal.org/api/function/hook_block/6

As far as the type of blocks goes, I know I'm mostly interested in the all-time variety anyway, so losing the other ones is not a big loss to me. Thanks!

Anonymous’s picture

Status: Fixed » Closed (fixed)

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

kyle.vh’s picture

I just turned on this block. It doesn't appear, even though I've forwarded some content.
Also, when I use the radio button to select the type of block I want (all time vs. recent), hit save, and hit edit again, the radio button is unselected....
Has this patch been put in the current Dev?
Thanks for any tips.