function ad_html_node_form in Advertisement 5
Same name and namespace in other branches
- 5.2 html/ad_html.module \ad_html_node_form()
- 6.3 html/ad_html.module \ad_html_node_form()
- 6 html/ad_html.module \ad_html_node_form()
- 6.2 html/ad_html.module \ad_html_node_form()
Adapi helper function for displaying a node form.
1 call to ad_html_node_form()
- ad_html_adapi in html/
ad_html.module - Implementation of the ad module's _adapi hook.
File
- html/
ad_html.module, line 71 - Enhances the ad module to support html ads.
Code
function ad_html_node_form(&$node) {
$form = array();
$form['ad_html'] = array(
'#type' => 'fieldset',
'#title' => t('HTML'),
'#collapsible' => TRUE,
);
$form['ad_html']['display'] = array(
'#type' => 'markup',
'#value' => ad_html_display_ad($node),
);
if (ad_adaccess($node->nid, 'manage ad html') || arg(1) == 'add' && user_access('create advertisements')) {
$form['ad_html']['html'] = array(
'#type' => 'textarea',
'#title' => t('Ad HTML'),
'#required' => TRUE,
'#default_value' => $node->html,
'#description' => t('Paste the complete HTML provided by your advertising affiliate.'),
);
}
return $form;
}