currently invite shows up as a menu item.

so, now the user must see the invite link no matter what. but then, once (s)he's invited all his/her friends. the link stays.

if this was shown in a block, the administrator could make it an option for the user to opt in/out to the block and at the same time remove the menu link or even make it show up on certain pages.

thanks

CommentFileSizeAuthor
#6 invite-block_0.patch11.43 KBsmk-ka
#2 invite-block.patch8.46 KBsmk-ka

Comments

AjK’s picture

Version: 4.7.x-1.x-dev » master
Status: Active » Postponed
smk-ka’s picture

Title: give invite the ability to show up as a block » Show up as a block
Version: master » 5.x-1.6
Assigned: Unassigned » smk-ka
Status: Postponed » Needs review
StatusFileSize
new8.46 KB

Please do some testing and comment back.
--
Stefan Kudwien
www.unleashedmind.com

smk-ka’s picture

Note: the current implementation hides the block, if the maximum number of invites is reached. Although I'm exceptionally proud of finding out how to do this using Forms API, this functionality is slightly different from what marafa had requested: to be able to deactivate the menu item and to show only the block.

knseibert’s picture

Hi Stefan,
wanted to test your patch. Unfortunately it does not apply to the current cvs.

smk-ka’s picture

Thanks for taking the time, but I'm really busy at the moment... and due to the committed multiple invites patch the re-rolling naturally will require larger changes. Hopefully, I will get back to this next week.

smk-ka’s picture

Version: 5.x-1.6 » 5.x-1.x-dev
Component: User interface » Code
StatusFileSize
new11.43 KB

My second take on this, and almost in time! ;)

Since the wording of the block is 100% stolen from G..., I'd be thankful if someone comes up with a better idea. Thanks for testing.

smk-ka’s picture

Status: Needs review » Fixed

Committed exclusively to DRUPAL-5 branch.
--
Stefan Kudwien
unleashed mind

Anonymous’s picture

Status: Fixed » Closed (fixed)
kenorb’s picture

user/%/invites page should be as block as well

kenorb’s picture

function hook_block($op = 'list', $delta = 0, $edit = array()) {
  switch ($op) {
    case 'list':
      $blocks[0]['info'] = t('Invites');
      return $blocks;
    case 'view': default:
      $block = array();
      switch ($delta) {
        case 0:
          $block['subject'] = t('Invites');
          module_load_include('inc', 'invite', 'invite_admin');
          $block['content'] = invite_user_overview('pending'); // override theme_invite_user_overview to theme it
          break;
      }
      return $block;
  }
}