function ad_remote_form in Advertisement 5.2
Same name and namespace in other branches
- 5 remote/ad_remote.module \ad_remote_form()
- 6.3 remote/ad_remote.module \ad_remote_form()
- 6 remote/ad_remote.module \ad_remote_form()
- 6.2 remote/ad_remote.module \ad_remote_form()
- 7 remote/ad_remote.module \ad_remote_form()
A simple page providing source snippets for displaying ads on remote websites.
1 string reference to 'ad_remote_form'
- ad_remote_menu in remote/
ad_remote.module - Drupal _menu hook.
File
- remote/
ad_remote.module, line 43 - Enhances the ad module to providing cut-and-paste source snippets allowing ads to be easily displayed on remote websites. This module is a proof of concept.
Code
function ad_remote_form() {
global $user;
$form = array();
$form['overview'] = array(
'#type' => 'markup',
'#value' => t('Use the following options to build a source snippet for displaying ads on your website.'),
'#weight' => -16,
);
$form['group'] = taxonomy_form(_ad_get_vid(), 0, t('Select one or more groups to display ads from.'));
$form['quantity'] = array(
'#type' => 'select',
'#title' => t('Quantity'),
'#options' => drupal_map_assoc(array(
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
15,
20,
25,
50,
)),
'#default_value' => isset($_POST['quantity']) ? $_POST['quantity'] : 1,
'#description' => t('Select the maximum number of unique ads that should be displayed together.'),
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Generate code snippet'),
);
return $form;
}