Mercurial > defr > drupal > ad
diff ad.admin.inc @ 3:416ea999ed76 ad
maj ad version rc1
author | sly |
---|---|
date | Mon, 20 Apr 2009 09:49:37 +0000 |
parents | 948362c2a207 |
children | 6aeff3329e01 |
line wrap: on
line diff
--- a/ad.admin.inc Wed Apr 15 07:58:32 2009 +0000 +++ b/ad.admin.inc Mon Apr 20 09:49:37 2009 +0000 @@ -1,5 +1,5 @@ <?php -// $Id: ad.admin.inc,v 1.1.2.9.2.2 2009/03/02 07:31:23 jeremy Exp $ +// $Id: ad.admin.inc,v 1.1.2.9.2.5 2009/04/16 14:24:53 jeremy Exp $ /** * @file @@ -550,6 +550,26 @@ '#description' => t('If enabled, any destination URLs entered in ads will be required to be complete URLs (including http:// or https:// at the beginning). If you wish to include internal urls, you will need to disable this option.'), ); + $form['search'] = array( + '#type' => 'fieldset', + '#title' => t('Search'), + '#collapsible' => TRUE, + ); + + $form['search']['ad_no_search'] = array( + '#type' => 'checkbox', + '#title' => t('Remove ads from local search results'), + '#default_value' => variable_get('ad_no_search', 1), + '#description' => t('If enabled, all advertisements will be removed from local search results. Users with %perm1 or %perm2 permissions will still see advertisements in the search results.', array('%perm1' => t('administer advertisements'), '%perm2' => t('edit any advertisement'))), + ); + + $form['search']['ad_meta_noindex'] = array( + '#type' => 'checkbox', + '#title' => t('Remove ads from remote search engines'), + '#default_value' => variable_get('ad_meta_noindex', 1), + '#description' => t('If enabled, advertisement nodes will include the !noindex, telling remote search engines to not include these nodes in their search index. This meta tag will appear on any page that an advertisement node is displayed on, even if a page is comprised of both ad nodes and other site content. It will not be displayed when advertisements are displayed via blocks, calls to ad(), or other display methods when the page is comprised of non-ad content.', array('!noindex' => l(t('noindex meta tag'), 'http://en.wikipedia.org/wiki/Noindex'))), + ); + $form['iframe'] = array( '#type' => 'fieldset', '#title' => t('IFrame'), @@ -646,6 +666,8 @@ variable_set('ad_cache', $form_state['values']['ad_cache']); variable_set('ad_display', $form_state['values']['ad_display']); variable_set('ad_validate_url', $form_state['values']['ad_validate_url']); + variable_set('ad_no_search', $form_state['values']['ad_no_search']); + variable_set('ad_meta_noindex', $form_state['values']['ad_meta_noindex']); variable_set('ad_iframe_frameborder', $form_state['values']['ad_iframe_frameborder']); variable_set('ad_iframe_scroll', $form_state['values']['ad_iframe_scroll']); variable_set('ad_iframe_width', $form_state['values']['ad_iframe_width']);