Tags give the ability to mark specific points in history as being important
-
1.3.0
46d9a372 · ·basic_ads 1.3.0 Schedule fields are now date-only and existing data is migrated. Behavior changes - field_ad_start_date and field_ad_end_date use datetime_type: date. The form widget renders Month/Day/Year dropdowns; no Hour/Minute/AM-PM. Stored values are 'YYYY-MM-DD' strings. - View query, cron, and the block's eligibility check now compare against a date-only `now`, giving "valid all day on the end_date" semantics. Update hooks - 8004 migrates legacy string-typed schedule field storage to datetime via direct config-storage editing. No-op on fresh installs. - 8005 flips datetime_type from datetime to date, truncates stored values to their date prefix (DESTRUCTIVE on the time portion only), and rewrites the form-display widget settings. Migration notes - Sites that arrived via a simpleads migration: 8004 will fix the string-typed storage that 1.2.0's widgets and filters couldn't handle. - All sites: 8005 truncates 'YYYY-MM-DDTHH:MM:SS' rows to 'YYYY-MM-DD'. The date portion is preserved; time-of-day is discarded. Back up before running if you depended on time-of-day precision. See CHANGELOG.md for the full notes.
-
1.2.0
982ba697 · ·basic_ads 1.2.0 A bigger release than 1.1.x patch tags: new branch (1.2.x), architectural overhaul, new features, and a public-API break. Bug fixes - Date filtering now works for both `datetime` and legacy `string` field storage via hook_views_query_alter(); the old datetime-on-string filters silently excluded any ad with a real date. - The duplicate Views block from the basic_ads_advertisements view's block_1 display is hidden via hook_block_alter(). New features - Block has a new "Number of ads to display" setting (1-50, default 1). - Weighted random rotation (Efraimidis-Spirakis). Lower field_ad_weight = higher priority; each 10 units halves/doubles the relative odds. Selection is seeded by the current 60-second time bucket so all viewers in a window see the same set (cacheable) and a fresh selection rotates in the next minute. - Placed blocks auto-label as "Basic Ad: {placement name}". - Friendlier date widgets: datetime_datelist (MDY, 12-hour, 15-minute increments). - field_ad_weight is bounded to (-50, 50). Architecture / refactoring (BREAKING) - All procedural hooks moved from basic_ads.module into Drupal\basic_ads\Hook\BasicAdsHooks via #[Hook] attributes; the .module file is deleted. - New basic_ads.ad_tracker service owns impression/click recording, count/CTR aggregation, and old-data pruning. The previous basic_ads_*() global helpers (basic_ads_track_impression, basic_ads_track_click, basic_ads_get_*, _basic_ads_anonymize_ip, basic_ads_is_user_excluded) are gone. External callers must migrate to \Drupal::service('basic_ads.ad_tracker') or the Drupal\basic_ads\Service\AdTracker alias. - Logger DI throughout via LoggerChannelFactoryInterface; exception handlers in AdvertisementBlock now log warnings instead of swallowing errors. - Library renamed basic_ads/ad_tracking -> basic_ads/basic_ads, with new css/basic-ads.css component CSS. Update hooks - 8001 reloads the basic_ads_advertisements view config from the install template. Sites that customised the View should export their config first; this overwrites it. - 8002 sets min: -50 / max: 50 on field_ad_weight and refreshes the description. - 8003 switches the date form-display widgets to datetime_datelist. Migration notes - Existing placed blocks default to count = 1 (previous view behaviour was 5). Bump the new setting on /admin/structure/block as needed. - field_ad_weight = 0 for everyone by default = uniform random; set negative weights on priority ads. - If migrating from another bundle, stale node-access grants may hide ads from anon visitors; resolve with node_access_rebuild(). See CHANGELOG.md for the full notes. -
1.1.5
19d0902e · ·Basic Ads 1.1.5 - Fix "Cannot redirect to an empty URL" crash on /ad/click/{nid} when an ad's link field resolves to an empty URL (e.g. route:<nolink>). The controller now logs a warning and returns 404 instead of 500, and skips click tracking for ads with a broken destination. - Null-check loaded node in the click controller. - README rewritten in drupal.org contrib style. -
-