Hi! i would like to move checklist list to block, instead of display it in user profile tab.

is that possible? thanks

Comments

dgastudio’s picture

Status: Active » Closed (fixed)

sorry

print checklist_main_page($user, FALSE);
dgastudio’s picture

Status: Closed (fixed) » Active

at this way i can display checklist in block, but after press "continue"...

Fatal error: Call to undefined function checklist_main_page()

j_ten_man’s picture

global $user;
module_load_include('inc', 'checklist', 'includes/checklist.pages');
print checklist_main_page($user, FALSE);
dgastudio’s picture

yep, thanks!

dgastudio’s picture

Status: Active » Closed (fixed)

closing

dgastudio’s picture

Status: Closed (fixed) » Active

opening again.

after put this code in block, title CHECKLISTS is applied to every page where block is displayed.

j_ten_man’s picture

Just looked at the actual code. Here's a better idea:

global $user;
$lists = _checklist_get_user_lists($user, TRUE);
return theme('checklist_lists', array('lists' => $lists, 'account' => $user));
j_ten_man’s picture

Category: feature » support
Status: Active » Closed (fixed)
ybabel’s picture

worked fine for me. I tested with 1 user instance.

TheRealDeal’s picture

Issue summary: View changes

Sorry to dig up an old thread but where exactly should I post this php code? In my themes template or in the module folder etc? (I am a drupal newbie)

j_ten_man’s picture

This code was put into a block using the PHP filter (although it's not recommended to have this module turned on). You could also put this in a template file that is specific for the block.

You could also write a small module that implements the block hooks to accomplish this as well.

TheRealDeal’s picture

Thanks the code from post #3 worked for me, for some reason the code in #7 doesn't.