# HG changeset patch
# User sly
# Date 1252667420 0
# Node ID 32c1a7d9e1fa4d8daca77c3f420311dc3065701a
# Parent 6aeff3329e01342a8e43006fc79ea91eabc3da74
maj module ad en 2.1
diff -r 6aeff3329e01 -r 32c1a7d9e1fa ad.info
--- a/ad.info Mon Jul 20 13:54:40 2009 +0000
+++ b/ad.info Fri Sep 11 11:10:20 2009 +0000
@@ -4,9 +4,9 @@
dependencies[] = taxonomy
description = An advertising system for Drupal powered websites.
core = 6.x
-; Information added by drupal.org packaging script on 2009-07-17
-version = "6.x-2.1-rc1"
+; Information added by drupal.org packaging script on 2009-08-05
+version = "6.x-2.1"
core = "6.x"
project = "ad"
-datestamp = "1247867595"
+datestamp = "1249431906"
diff -r 6aeff3329e01 -r 32c1a7d9e1fa ad.module
--- a/ad.module Mon Jul 20 13:54:40 2009 +0000
+++ b/ad.module Fri Sep 11 11:10:20 2009 +0000
@@ -1,5 +1,5 @@
");
@@ -599,27 +594,30 @@
'#required' => TRUE,
'#default_value' => isset($node->title) ? $node->title : '',
);
- $form['body_filter']['body'] = array(
- '#type' => 'textarea',
- '#title' => t('Description'),
- '#default_value' => isset($node->body) ? $node->body : '',
- '#rows' => 3
- );
+ if ($type->has_body) {
+ $form['body_filter']['body'] = array(
+ '#type' => 'textarea',
+ '#title' => t('Description'),
+ '#default_value' => isset($node->body) ? $node->body : '',
+ '#rows' => 3
+ );
+ }
$form['body_filter']['format'] = filter_form($node->format);
// determine the current ad type
if (!isset($adtype)) {
$adtypes = ad_get_types();
- if (sizeof($adtypes) == 1) {
+ if (count($adtypes) == 1) {
$adtype = key($adtypes);
}
- else if (!sizeof($adtypes)) {
+ else if (!count($adtypes)) {
drupal_set_message(t('At least one ad type module must be enabled before you can create advertisements. For example, try enabling the ad_text or ad_image module.', array('!url' => url('admin/build/modules'))), 'error');
}
}
// display ad type switch
- if (!isset($node->adtype) || isset($node->adtype_select)) {
+ if ((!isset($node->adtype) || isset($node->adtype_select)) &&
+ count($adtypes) >1) {
$adtypes = array(0 => '---');
$adtypes += ad_get_types('name');
$form['select'] = array(
@@ -646,10 +644,13 @@
);
}
// display type-specific options
- if (isset($node->adtype) && $node->adtype) {
+ if ((isset($node->adtype) && $node->adtype) || count($adtypes) == 1) {
if (isset($node->adtype_select) && $node->adtype_select && ($node->adtype_select != $node->adtype)) {
$node->adtype = $node->adtype_select;
}
+ if (count($adtypes) == 1) {
+ $node->adtype = $adtype;
+ }
ad_form_add_adtype_elements($form, $node->adtype, $node);
// add ahah wrapper
$form['adtype_elements']['#prefix'] = '
';
diff -r 6aeff3329e01 -r 32c1a7d9e1fa ad_flash-5.x-1.x-dev.tar.gz
Binary file ad_flash-5.x-1.x-dev.tar.gz has changed
diff -r 6aeff3329e01 -r 32c1a7d9e1fa cache/file/ad_cache_file.info
--- a/cache/file/ad_cache_file.info Mon Jul 20 13:54:40 2009 +0000
+++ b/cache/file/ad_cache_file.info Fri Sep 11 11:10:20 2009 +0000
@@ -5,9 +5,9 @@
description = Provides a file-caching mechanism to improve ad serving performance.
core = 6.x
-; Information added by drupal.org packaging script on 2009-07-17
-version = "6.x-2.1-rc1"
+; Information added by drupal.org packaging script on 2009-08-05
+version = "6.x-2.1"
core = "6.x"
project = "ad"
-datestamp = "1247867595"
+datestamp = "1249431906"
diff -r 6aeff3329e01 -r 32c1a7d9e1fa channel/ad_channel.info
--- a/channel/ad_channel.info Mon Jul 20 13:54:40 2009 +0000
+++ b/channel/ad_channel.info Fri Sep 11 11:10:20 2009 +0000
@@ -5,9 +5,9 @@
description = Provides the ability to create advertisement channels, about which rules can be defined.
core = 6.x
-; Information added by drupal.org packaging script on 2009-07-17
-version = "6.x-2.1-rc1"
+; Information added by drupal.org packaging script on 2009-08-05
+version = "6.x-2.1"
core = "6.x"
project = "ad"
-datestamp = "1247867595"
+datestamp = "1249431906"
diff -r 6aeff3329e01 -r 32c1a7d9e1fa channel/ad_channel.install
--- a/channel/ad_channel.install Mon Jul 20 13:54:40 2009 +0000
+++ b/channel/ad_channel.install Fri Sep 11 11:10:20 2009 +0000
@@ -1,5 +1,5 @@
'The ad_channel table allows advertisements to be organized into channels against which rules can be applied.',
+ 'fields' => array(
+ 'chid' => array(
+ 'type' => 'serial',
+ 'not null' => TRUE,
+ 'unsigned' => TRUE,
+ 'description' => 'Unique channel ID.',
+ ),
+ 'name' => array(
+ 'type' => 'varchar',
+ 'length' => 64,
+ 'not null' => TRUE,
+ 'default' => '',
+ 'description' => 'The name of the channel.',
+ ),
+ 'description' => array(
+ 'type' => 'text',
+ 'size' => 'big',
+ 'not null' => FALSE,
+ 'description' => 'A description of the channel.',
+ ),
+ 'conid' => array(
+ 'type' => 'int',
+ 'not null' => TRUE,
+ 'unsigned' => TRUE,
+ 'default' => 0,
+ 'description' => 'ID of the container the channel is in.',
+ ),
+ 'weight' => array(
+ 'type' => 'int',
+ 'size' => 'medium',
+ 'not null' => TRUE,
+ 'unsigned' => TRUE,
+ 'default' => 0,
+ 'description' => 'Used when displaying channels to admins, heavier weights sink to the bottom.',
+ ),
+ 'display' => array(
+ 'type' => 'int',
+ 'size' => 'tiny',
+ 'not null' => TRUE,
+ 'unsigned' => TRUE,
+ 'default' => 0,
+ ),
+ 'no_channel_percent' => array(
+ 'type' => 'int',
+ 'size' => 'medium',
+ 'not null' => TRUE,
+ 'unsigned' => TRUE,
+ 'default' => 0,
+ ),
+ 'inventory' => array(
+ 'type' => 'int',
+ 'not null' => TRUE,
+ 'unsigned' => TRUE,
+ 'default' => 0,
+ ),
+ 'urls' => array(
+ 'type' => 'text',
+ ),
+ 'groups' => array(
+ 'type' => 'text',
+ ),
+ ),
+ 'primary key' => array('chid'),
+ 'indexes' => array(
+ 'name' => array('name'),
+ ),
+ );
+ $schema['ad_channel_remnant'] = array(
+ 'fields' => array(
+ 'aid' => array(
+ 'type' => 'int',
+ 'not null' => TRUE,
+ 'unsigned' => TRUE,
+ 'default' => 0,
+ ),
+ 'remnant' => array(
+ 'type' => 'int',
+ 'size' => 'tiny',
+ 'not null' => TRUE,
+ 'unsigned' => TRUE,
+ 'default' => 0,
+ ),
+ ),
+ 'primary key' => array('aid', 'remnant'),
+ );
+ $schema['ad_channel_container'] = array(
+ 'description' => 'The ad_channel_container table stores channel container definitions.',
+ 'fields' => array(
+ 'conid' => array(
+ 'type' => 'serial',
+ 'not null' => TRUE,
+ 'unsigned' => TRUE,
+ 'description' => 'Unique container ID.',
+ ),
+ 'name' => array(
+ 'type' => 'varchar',
+ 'length' => 64,
+ 'not null' => TRUE,
+ 'default' => '',
+ 'description' => 'The name of the container.',
+ ),
+ 'description' => array(
+ 'type' => 'text',
+ 'size' => 'big',
+ 'not null' => FALSE,
+ 'description' => 'A description of the container.',
+ ),
+ 'weight' => array(
+ 'type' => 'int',
+ 'size' => 'medium',
+ 'not null' => TRUE,
+ 'unsigned' => TRUE,
+ 'default' => 0,
+ 'description' => 'Used when displaying channels to admins, heavier weights sink to the bottom.',
+ ),
+ ),
+ 'primary key' => array('conid'),
+ );
+ $schema['ad_channel_node'] = array(
+ 'description' => 'The ad_channel_node table stores per node channel information.',
+ 'fields' => array(
+ 'chid' => array(
+ 'type' => 'int',
+ 'not null' => TRUE,
+ 'unsigned' => TRUE,
+ 'default' => 0,
+ ),
+ 'nid' => array(
+ 'type' => 'int',
+ 'not null' => TRUE,
+ 'unsigned' => TRUE,
+ 'default' => 0,
+ ),
+ ),
+ 'primary key' => array('chid', 'nid'),
+ 'indexes' => array(
+ 'nid_chid' => array('nid', 'chid'),
+ ),
+ );
+ $schema['ad_priority'] = array(
+ 'fields' => array(
+ 'aid' => array(
+ 'type' => 'int',
+ 'not null' => TRUE,
+ 'unsigned' => TRUE,
+ 'default' => 0,
+ ),
+ 'priority' => array(
+ 'type' => 'int',
+ 'size' => 'tiny',
+ 'not null' => TRUE,
+ 'unsigned' => TRUE,
+ 'default' => 0,
+ ),
+ ),
+ 'primary key' => array('aid', 'priority'),
+ );
+ return $schema;
+}
+
function ad_channel_install() {
- switch ($GLOBALS['db_type']) {
- case 'mysql':
- case 'mysqli':
- default:
- // TODO: PostgreSQL support. Patches welcome.
- /* The ad_channel table stores channel definitions and rules.
- */
- db_query("CREATE TABLE {ad_channel} (
- chid INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
- name VARCHAR(64) NOT NULL DEFAULT '',
- description LONGTEXT NULL,
- conid INT(11) UNSIGNED NOT NULL DEFAULT '0',
- weight TINYINT(4) SIGNED NOT NULL DEFAULT '0',
- display TINYINT(1) UNSIGNED NOT NULL DEFAULT '0',
- no_channel_percent INT(3) NOT NULL DEFAULT '0',
- urls TEXT NULL,
- groups TEXT NULL,
- PRIMARY KEY (chid),
- KEY (name)
- );");
- /* The ad_channel_container table stores channel container definitions.
- */
- db_query("CREATE TABLE {ad_channel_container} (
- conid INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
- name VARCHAR(64) NOT NULL DEFAULT '',
- description LONGTEXT NULL,
- weight TINYINT(4) SIGNED NOT NULL DEFAULT '0',
- PRIMARY KEY (conid)
- );");
- /* The ad_channel_node table stores per node channel information.
- */
- db_query("CREATE TABLE {ad_channel_node} (
- chid INT(11) UNSIGNED NOT NULL DEFAULT '0',
- nid INT(11) UNSIGNED NOT NULL DEFAULT '0',
- PRIMARY KEY (chid, nid),
- KEY (nid, chid)
- );");
- /* The ad_channel_node table stores per node channel information.
- */
- db_query("CREATE TABLE {ad_priority} (
- aid INT(11) UNSIGNED NOT NULL DEFAULT '0',
- priority TINYINT UNSIGNED NOT NULL DEFAULT '0',
- PRIMARY KEY (aid, priority)
- );");
- }
+ // Create tables
+ drupal_install_schema('ad_channel');
}
/**
* Completely uninstall the ad channel module.
*/
function ad_channel_uninstall() {
- switch ($GLOBALS['db_type']) {
- case 'mysql':
- case 'mysqli':
- default:
- // TODO: PostgreSQL support. Patches welcome.
- db_query('DROP TABLE {ad_channel}');
- db_query('DROP TABLE {ad_channel_container}');
- db_query('DROP TABLE {ad_channel_node}');
- }
+ // Drop tables
+ drupal_uninstall_schema('ad_channel');
}
/**
diff -r 6aeff3329e01 -r 32c1a7d9e1fa channel/ad_channel.module
--- a/channel/ad_channel.module Mon Jul 20 13:54:40 2009 +0000
+++ b/channel/ad_channel.module Fri Sep 11 11:10:20 2009 +0000
@@ -1,5 +1,5 @@
'textarea',
'#title' => t('Paths'),
- '#description' => t("Enter one URL per line. If serving ads locally use Drupal relative paths. If serving ads remotely include the 'http://' or 'https:/'. Use '<front>' to specify the front page. The '*' character is a wildcard. Example URLs are blog for the blog page and blog/* for every personal blog on your local website."),
+ '#description' => t("Enter one URL per line. If serving ads locally use Drupal relative paths. If serving ads remotely include the 'http://' or 'https:/'. Use '<front>' to specify the front page. The '*' character is a wildcard. Example URLs are blog for the blog page and blog/* for every personal blog on your local website. When specifying local paths you must enter the raw path (ie 'node/123') and not the url alias (ie 'my/custom/path'), if any."),
'#default_value' => $chid ? unserialize($channel->urls) : '',
);
diff -r 6aeff3329e01 -r 32c1a7d9e1fa documentation/CHANGELOG.txt
--- a/documentation/CHANGELOG.txt Mon Jul 20 13:54:40 2009 +0000
+++ b/documentation/CHANGELOG.txt Fri Sep 11 11:10:20 2009 +0000
@@ -1,4 +1,26 @@
-$Id: CHANGELOG.txt,v 1.2.2.40.2.176.2.41.2.94 2009/07/17 21:29:38 jeremy Exp $
+$Id: CHANGELOG.txt,v 1.2.2.40.2.176.2.41.2.101 2009/08/05 00:13:37 jeremy Exp $
+
+August 4th, 2009
+ - ad.module
+ o bug #527658: don't require user to choose ad type if only one is available
+ o bug #445264: fix jQuery display method
+
+July 29th, 2009
+ - click_filter.module
+ o bug #433432: only query ad_owners table if the ad_owners module is enabled
+ Patch thanks to mehmeta
+ o feature #519784: consider user agents with 'spider' or 'crawl' to be bots
+ Patch thanks to pebosi
+ - ad_channel.module
+ o bug #511762: properly document accepted paths for configuring channels
+ o bug #499522: document shortcoming regarding url aliases
+ - ad.module
+ o bug #496406: don't display body field if disabled
+ Patch thanks to perarnet
+
+July 28th, 2009
+ - ad_channel.install
+ o bug #532262: add missing ad_channel_remnant table definition
July 17th, 2009
- ad_channel.module
diff -r 6aeff3329e01 -r 32c1a7d9e1fa documentation/README.txt
--- a/documentation/README.txt Mon Jul 20 13:54:40 2009 +0000
+++ b/documentation/README.txt Fri Sep 11 11:10:20 2009 +0000
@@ -72,7 +72,9 @@
text will be displayed when people hover their mouse pointer over the
advertisement. Finally, you need to scroll down to the File attachements
section of the page and click the Browser button to select your image, then
- click Attach to upload the image.
+ click Attach to upload the image. If you upload multiple images, the first
+ image with "List" checked will be displayed. If no images have "List" checked
+ then no images will be displayed.
HTML ads:
---------
diff -r 6aeff3329e01 -r 32c1a7d9e1fa embed/ad_embed.info
--- a/embed/ad_embed.info Mon Jul 20 13:54:40 2009 +0000
+++ b/embed/ad_embed.info Fri Sep 11 11:10:20 2009 +0000
@@ -5,9 +5,9 @@
description = Embed ads in content.
core = 6.x
-; Information added by drupal.org packaging script on 2009-07-17
-version = "6.x-2.1-rc1"
+; Information added by drupal.org packaging script on 2009-08-05
+version = "6.x-2.1"
core = "6.x"
project = "ad"
-datestamp = "1247867595"
+datestamp = "1249431906"
diff -r 6aeff3329e01 -r 32c1a7d9e1fa external/ad_external.info
--- a/external/ad_external.info Mon Jul 20 13:54:40 2009 +0000
+++ b/external/ad_external.info Fri Sep 11 11:10:20 2009 +0000
@@ -4,9 +4,9 @@
dependencies[] = ad
description = Enhances the ad module to support externally hosted ads. Typically combined with IFrames.
core = 6.x
-; Information added by drupal.org packaging script on 2009-07-17
-version = "6.x-2.1-rc1"
+; Information added by drupal.org packaging script on 2009-08-05
+version = "6.x-2.1"
core = "6.x"
project = "ad"
-datestamp = "1247867595"
+datestamp = "1249431906"
diff -r 6aeff3329e01 -r 32c1a7d9e1fa html/ad_html.info
--- a/html/ad_html.info Mon Jul 20 13:54:40 2009 +0000
+++ b/html/ad_html.info Fri Sep 11 11:10:20 2009 +0000
@@ -4,9 +4,9 @@
dependencies[] = ad
description = Enhances the ad module to support html-based ads, such as those defined by many advertising affiliate websites.
core = 6.x
-; Information added by drupal.org packaging script on 2009-07-17
-version = "6.x-2.1-rc1"
+; Information added by drupal.org packaging script on 2009-08-05
+version = "6.x-2.1"
core = "6.x"
project = "ad"
-datestamp = "1247867595"
+datestamp = "1249431906"
diff -r 6aeff3329e01 -r 32c1a7d9e1fa image/ad_image.info
--- a/image/ad_image.info Mon Jul 20 13:54:40 2009 +0000
+++ b/image/ad_image.info Fri Sep 11 11:10:20 2009 +0000
@@ -5,9 +5,9 @@
dependencies[] = upload
description = Enhances the ad module to support banner ads.
core = 6.x
-; Information added by drupal.org packaging script on 2009-07-17
-version = "6.x-2.1-rc1"
+; Information added by drupal.org packaging script on 2009-08-05
+version = "6.x-2.1"
core = "6.x"
project = "ad"
-datestamp = "1247867595"
+datestamp = "1249431906"
diff -r 6aeff3329e01 -r 32c1a7d9e1fa notify/ad_notify.info
--- a/notify/ad_notify.info Mon Jul 20 13:54:40 2009 +0000
+++ b/notify/ad_notify.info Fri Sep 11 11:10:20 2009 +0000
@@ -6,9 +6,9 @@
description = Receive email notifications regarding ads.
core = 6.x
-; Information added by drupal.org packaging script on 2009-07-17
-version = "6.x-2.1-rc1"
+; Information added by drupal.org packaging script on 2009-08-05
+version = "6.x-2.1"
core = "6.x"
project = "ad"
-datestamp = "1247867595"
+datestamp = "1249431906"
diff -r 6aeff3329e01 -r 32c1a7d9e1fa owners/ad_owners.info
--- a/owners/ad_owners.info Mon Jul 20 13:54:40 2009 +0000
+++ b/owners/ad_owners.info Fri Sep 11 11:10:20 2009 +0000
@@ -5,9 +5,9 @@
description = Enhances the ad module to support ad owners.
core = 6.x
-; Information added by drupal.org packaging script on 2009-07-17
-version = "6.x-2.1-rc1"
+; Information added by drupal.org packaging script on 2009-08-05
+version = "6.x-2.1"
core = "6.x"
project = "ad"
-datestamp = "1247867595"
+datestamp = "1249431906"
diff -r 6aeff3329e01 -r 32c1a7d9e1fa remote/ad_remote.info
--- a/remote/ad_remote.info Mon Jul 20 13:54:40 2009 +0000
+++ b/remote/ad_remote.info Fri Sep 11 11:10:20 2009 +0000
@@ -5,9 +5,9 @@
description = Generates cut-and-paste source snippets allowing ads to be easily displayed on remote websites.
core = 6.x
-; Information added by drupal.org packaging script on 2009-07-17
-version = "6.x-2.1-rc1"
+; Information added by drupal.org packaging script on 2009-08-05
+version = "6.x-2.1"
core = "6.x"
project = "ad"
-datestamp = "1247867595"
+datestamp = "1249431906"
diff -r 6aeff3329e01 -r 32c1a7d9e1fa remote/ad_remote.module
--- a/remote/ad_remote.module Mon Jul 20 13:54:40 2009 +0000
+++ b/remote/ad_remote.module Fri Sep 11 11:10:20 2009 +0000
@@ -1,5 +1,5 @@
';
// build a wrapper script which collects the url the ad is displayed on
$output .= "\n', 'u=admin/content/ad/ad_remote'), array('""', 'u="+adurl+"'), $url);
$output .= "document.write($url)\n\n";
diff -r 6aeff3329e01 -r 32c1a7d9e1fa report/ad_report.info
--- a/report/ad_report.info Mon Jul 20 13:54:40 2009 +0000
+++ b/report/ad_report.info Fri Sep 11 11:10:20 2009 +0000
@@ -5,9 +5,9 @@
description = Provides comprehensive charts and reports about advertising statistics.
core = 6.x
-; Information added by drupal.org packaging script on 2009-07-17
-version = "6.x-2.1-rc1"
+; Information added by drupal.org packaging script on 2009-08-05
+version = "6.x-2.1"
core = "6.x"
project = "ad"
-datestamp = "1247867595"
+datestamp = "1249431906"
diff -r 6aeff3329e01 -r 32c1a7d9e1fa statistics/click_filter/click_filter.info
--- a/statistics/click_filter/click_filter.info Mon Jul 20 13:54:40 2009 +0000
+++ b/statistics/click_filter/click_filter.info Fri Sep 11 11:10:20 2009 +0000
@@ -5,9 +5,9 @@
description = Filter duplicate click statistics.
core = 6.x
-; Information added by drupal.org packaging script on 2009-07-17
-version = "6.x-2.1-rc1"
+; Information added by drupal.org packaging script on 2009-08-05
+version = "6.x-2.1"
core = "6.x"
project = "ad"
-datestamp = "1247867595"
+datestamp = "1249431906"
diff -r 6aeff3329e01 -r 32c1a7d9e1fa statistics/click_filter/click_filter.module
--- a/statistics/click_filter/click_filter.module Mon Jul 20 13:54:40 2009 +0000
+++ b/statistics/click_filter/click_filter.module Fri Sep 11 11:10:20 2009 +0000
@@ -1,5 +1,5 @@
uid);
- if (db_result($result)) {
- return CLICK_OWNER;
+ if (module_exists('ad_owners')) {
+ $result = db_query('SELECT oid FROM {ad_owners} WHERE aid = %d AND uid = %d', $aid, $user->uid);
+ if (db_result($result)) {
+ return CLICK_OWNER;
+ }
}
// See if the click came from a duplicate uid or ip address.
if ($user->uid) {
diff -r 6aeff3329e01 -r 32c1a7d9e1fa text/ad_text.info
--- a/text/ad_text.info Mon Jul 20 13:54:40 2009 +0000
+++ b/text/ad_text.info Fri Sep 11 11:10:20 2009 +0000
@@ -4,9 +4,9 @@
dependencies[] = ad
description = Enhances the ad module to support static text ads.
core = 6.x
-; Information added by drupal.org packaging script on 2009-07-17
-version = "6.x-2.1-rc1"
+; Information added by drupal.org packaging script on 2009-08-05
+version = "6.x-2.1"
core = "6.x"
project = "ad"
-datestamp = "1247867595"
+datestamp = "1249431906"
diff -r 6aeff3329e01 -r 32c1a7d9e1fa weight/probability/ad_weight_probability.info
--- a/weight/probability/ad_weight_probability.info Mon Jul 20 13:54:40 2009 +0000
+++ b/weight/probability/ad_weight_probability.info Fri Sep 11 11:10:20 2009 +0000
@@ -5,9 +5,9 @@
description = Allow admin to adjust the probability that an ad will be displayed.
core = 6.x
-; Information added by drupal.org packaging script on 2009-07-17
-version = "6.x-2.1-rc1"
+; Information added by drupal.org packaging script on 2009-08-05
+version = "6.x-2.1"
core = "6.x"
project = "ad"
-datestamp = "1247867595"
+datestamp = "1249431906"