| 1 |
<?php // $Id: mlm.module,v 1.51 2009/08/10 01:57:46 vauxia Exp $ |
<?php // $Id: mlm.module,v 1.52 2009/08/23 23:06:27 vauxia Exp $ |
| 2 |
|
|
| 3 |
/** |
/** |
| 4 |
* @file |
* @file |
| 109 |
'#input' => TRUE, |
'#input' => TRUE, |
| 110 |
'#process' => array('mlm_element_process'), |
'#process' => array('mlm_element_process'), |
| 111 |
'#mlm_lists' => array(), |
'#mlm_lists' => array(), |
| 112 |
'#mlm_options' => array(), |
'#mlm_settings' => array(), |
| 113 |
), |
), |
| 114 |
); |
); |
| 115 |
} |
} |
| 254 |
} |
} |
| 255 |
|
|
| 256 |
/** |
/** |
| 257 |
|
* Form handler for a list you're viewing. |
| 258 |
|
*/ |
| 259 |
|
function mlm_view_form($form_state, $mlm) { |
| 260 |
|
$form['mlm'] = array( |
| 261 |
|
'#type' => 'mlm_subscription', |
| 262 |
|
'#mlm_lists' => array($mlm), |
| 263 |
|
'#mlm_settings' => array( |
| 264 |
|
'show_mail' => FALSE, |
| 265 |
|
'single' => TRUE, |
| 266 |
|
), |
| 267 |
|
); |
| 268 |
|
$form['submit'] = array( |
| 269 |
|
'#type' => 'submit', |
| 270 |
|
'#value' => $mlm->_is_subscribed() ? t('unsubscribe') : t('subscribe'), |
| 271 |
|
); |
| 272 |
|
return $form; |
| 273 |
|
} |
| 274 |
|
|
| 275 |
|
/** |
| 276 |
* Implementation of hook_theme(). |
* Implementation of hook_theme(). |
| 277 |
*/ |
*/ |
| 278 |
function mlm_theme() { |
function mlm_theme() { |