Hi everyone,
We've finished development for Osclass 8.4.0 and beta testing is now opened!
Opt-in for beta testing.
This version is not ready for production use!
There is huge amount of updates, changes, improvements.
Osclass 8.4.0 - PART 1- IMPORTANT: Listing statistics now store daily measures on t_item_stats (views, premium views, and optional traffic, contact, commerce and lifecycle counters).
Collection defaults to standard views, premium views, phone clicks, engaged views, logged-in views, minutes viewed, alert emails, contact forms and reports. Other measures are enabled in Statistics settings (and Listing settings) with Essential, Engagement, Commerce and Full presets.
User summary and listing charts default to six measures. Statistics settings recommend 4 to 6 so the plot stays readable.
Chart colors use a 16-color Tableau 10/20 palette so default measures stay distinct. The same colors are used in user charts and admin Statistics. Plugins can change the palette with osc_item_stats_palette, remap keys with osc_item_stats_colors, or override one measure with osc_item_stats_color.
Front-office user summary charts and inline counters are added through configurable hooks (default user_items_top). An optional user listing chart uses item_top.
User summary and listing charts are HTML/SVG. Each has its own chart type (default line). Other types: bar, area, stacked bar or stacked area. Chart measures can include listings published and listings live, counted from listing records.
User summary chart: period tabs span the full width, the plot has a border, Y-axis ticks are whole numbers with no repeats, and the totals table under the chart is omitted. The views measure label is Standard views.
Admin Statistics starts on Overview. Listing details sits under Listings in the menu and replaces the old Reports stats page and plots listing measures with filters, totals, KPI cards for the selected measures, and CSV download. The CSV is written without fputcsv so PHP 8.4 does not add a deprecation notice to the file.
Statistics page gaps (cards, columns, chart boxes) are 16px.
Period buttons on admin Statistics are Last 30 days, Last 3 months, Last 12 months and All time. User summary and listing charts let the admin pick which tabs to show (Last 7 days, 14 days, 30 days, 90 days, 3 months, 6 months, 12 months, 24 months, All time). Install and upgrade preselect Last 30 days, Last 90 days, Last 12 months and All time. A period picked on a user chart is stored in the session and used on other user charts for that visit. It is not added to the page URL. Google Charts uses the current loader.
Dashboard listing charts use the last 30 days and the same Google Charts helper as Statistics pages. Statistics page charts can be added on the dashboard from Backoffice widget settings. Each chart on that page has a Hide checkbox and a column selector on the same row. Period charts (line, area, bar) default to column 2. Mix charts (pie, donut, stacked bar, ranked bars) default to column 3 and can be moved to column 1. Install and upgrade show five charts in column 2, with Listing views first (standard views, premium views and the other Listing details measures), then Listing statistics, Comments statistics, Report statistics and User statistics. Other charts start hidden. Listing views (Overview and dashboard) plots the Listing details measures and uses the same period heading as Statistics (Views in the last 30 days: n. Premium views: n). Other dashboard chart headings show the all-time total, then Last 30 days and the period count.
Plugins write counters with osc_increase_item_stat() from PHP. osc_increase_item_stats() updates the same measure for many listing ids in one query.
Do not send orders, favorites or similar through the public item_stats AJAX action.
Public item_stats AJAX requires the session CSRF token (octoken), accepts one measure per request, and ignores action counters even if a plugin filter lists them.
Item-page clicks can use data-osc-stat with phone_clicks, contactother_clicks, shares or custom1-3. Filter osc_item_stats_ajax_measures extends that public AJAX allowlist.
Phone and other-contact clicks use configurable CSS selectors. Engaged views use a configurable visible-time threshold (Statistics settings), default 15 seconds.
Item-page stats JS waits until the listing config is printed, then records engaged views and minutes viewed. The last tick uses sendBeacon when the tab is closed.
Minutes viewed count one full visible minute at a time. Alert-match and days-active counters were not added. Alert emails still increment i_num_alerts_sent.
Comment counters stay in sync with active comments (including rating > 0). Custom 1-3 stay disabled until enabled.
Daily cron can repair mismatched comment counters from t_item_comment (capped, does not scan all listings). Views, clicks and similar are event counters and are not recalculated.
Automatic purge of listing statistic rows older than a retention period (default 24 months) is configured in Statistics settings. Daily cron and Tools > Cleanup use the same setting.
One view per session uses a compact osc_seen session map (bucket => id => 1). osc_session_seen() and osc_is_item_viewed_in_session() share that store. Search, home and premium impressions, listing views and click measures use it. Minutes viewed uses osc_session_seen_inc() in the same map.
User summary and listing charts can be shown to all signed-in users or only company accounts (user.b_company). Plugins extend the audience list with osc_item_stats_chart_audience_options and the allow check with osc_item_stats_user_can_see_charts. - Statistics overview and listing, user, comment and alert pages use a 65/35 layout. Chart bands pair 2 main charts with 3 support charts, or 3 main with 2 support. In a band, the right stack (including 16px gaps) matches the left stack height. Latest listings, users, comments and alerts tables take two chart slots (two cards plus the 16px gap). Google Charts is drawn to the box size and redraws on window resize, zoom and orientation change. Overview keeps KPI cards, area charts for views and new listings, a bar of root categories, and pie/donut mix charts for status. Listings statistics (left column) and a dashboard chart in column 1 use a stacked bar of parent and child category counts.
- KPI summary cards are on Overview, Listings, Users, Comments, Alerts and Listing details. Tablets keep the 65/35 split; columns stack below 827px. Cards that count the selected period show percent change versus the previous window of the same length (Last 7 days versus the 7 days before that), always with a + or - sign. When the previous window is 0 the card shows +0%. Snapshot cards (Personal, Company) stay all-time totals with no comparison.
- Period charts show the selected-period total under the widget title (for example, New listings in the last 30 days: 34). Snapshot charts keep the widget title only.
- Collect from logged-in visitors only does not skip alert-email counters. User summary cards use the same measures as the chart. Admin and user-chart period values are checked against the period lists used on those pages.
Statistics settings use the same form layout and save flow as other admin settings pages. Chart type, measures, period tabs and CSS selectors stay as saved. If collect checkboxes do not match a named preset, the preset is stored as custom. Listing settings uses the same preset rule. - User statistics split new users, new listings and comments into three main charts, with type/status columns on the right and country/region charts in a later band.
- Alert statistics is a separate page: new alerts, new subscribers, emails sent, matched listings, active alerts by day with expired overlay, account type (guest, personal, company), frequency, status (active, inactive, expired), country and latest alerts. Unsubscribed alerts are not counted. Frequency uses Instant, Hourly, Daily, Weekly and Custom. Expired KPI and daily series count alerts that reached their expire date in the period.
- Listing statistics keep new listings and views in the first band (country, region and price on the right). Category, phone and latest listings sit in the second band. Alert totals on that page open the Alerts statistics page.
- Admin Statistics remembers the selected period the same way listing tables remember rows per page (cookie). It stays selected when you leave and come back, until you pick another period. A first visit uses the default period from Statistics settings.
- Time series: area for volume, line for trend, scatter for daily points, stepped area for comments, combo for two related series (columns plus a line, or area plus bars). Percent stacked area for composition over time (alert account type, comments from registered vs guest). Drag across a period chart to zoom; right-click to reset. Ranked country and region lists use horizontal bars colored by value. Listings by category uses a stacked bar: parent categories on the axis and child categories as stacks. Mixes with fewer than 8 values use pie or donut. Views and premium views stay overlaid, not stacked, because premium views are a subset.
- Comment statistics add pie and donut charts for rating (with vs without), comments vs replies, and status (pending validation, active, blocked). Blocked includes spam. Mix charts use the same period as the comments chart.
- Latest lists show an extra line: comments use the commenter name, comment text and a Rating: X of 5 label when a rating is set (not 0); listings show contact name and city; users show email, country and account type; alerts show expired, active or inactive, frequency and account type.
- Country and region support charts show the top 10 values and group the rest as Other. Listings by category is a stacked bar of parent and child counts; smaller groups are Other.
- Admin Statistics pages expose hooks so plugins can add charts: admin_stats_load (queue data with osc_admin_stats_add_chart), admin_stats_header, admin_stats_kpi, admin_stats_main, admin_stats_side, admin_stats_after, admin_stats_settings_form and admin_stats_settings_post.
Filters: admin_stats_charts, admin_stats_plugin_charts, admin_stats_details_data. Chart types: line, area, stacked area, percent stacked area, stepped area, scatter, combo, column, pie, donut, bar, stacked bar. - IMPORTANT: New Reports feature replaces legacy "Mark as" feature.
Logged in users can now report listings and users (from listing detail and public profile) with reason, comment and optional attachment (setting with allowed extensions, stored in oc-content/uploads/report/).
Report conversation: reporter, reported user (optional feedback) and admin can reply on report via front report page or backoffice.
Reported user can send one front reply when status is Awaiting feedback; status then changes to In progress.
New backoffice section Reports with manage reports data table (search, filters, bulk actions, row actions), report edit page with comments history and settings page.
New settings: enable/disable reports, daily reports limit per user, email notifications, reported user feedback, auto-close, retention and attachments.
New email templates: email_report_admin and email_report_user (variable event/message/comment placeholders).
New admin toolbar notifications for new reports and unseen replies, new dashboard widget with report statistics.
New friendly urls report/item/{id}, report/user/{id}, report/view/{id} with permalink settings.
New database tables t_report and t_report_comment created, report columns (spam, misclassified, duplicated, offensive, expired) dropped from t_item_stats.
Old "Mark as" pages, reported listings and stats columns have been removed. osc_item_mark_url, osc_item_mark_disable and ItemActions::mark() still exist so old themes do not break. Mark as urls now open the report form and select the matching reason.
Report reason select starts with an empty required "Select a reason..." option.
Report reasons can be listing-only, user-only or both (filters: osc_report_reason_types, osc_report_reason_applies, osc_report_reasons_for_type).
Report form field wrappers now include input-box class so theme form styles apply.
osc_report_item_url and osc_report_user_url accept optional item/user id and optional reason (current listing or profile user if omitted).
osc_can_report_item and osc_can_report_user hide the report link for own listing or profile (guests still see it).
osc_report_source_label returns the source label. osc_report_url accepts optional reason.
Website contact form can fully replace contact email with Contact form reports (type webcontact, no target id). Option is in General settings, disabled by default. Guests follow contact form rules, not report login or daily limits. Hooks: pre_contact_post, filter contact_send_mail.