Osclass 8.3.1 2026-01-13
------------------------
- IMPORTANT: Osclass now fully supports PHP 8.5 version.
  This includes update of all major libraries used by Osclass - incl. PHP mailer.
- Fixed backoffice bug with search items (by item id).
- Enhanced curl with headers and descriptive information.
- Enhancements in Debug/Error log section in backoffice:
  It is now possible to select any file ending with .log located in oc-content folder (also osclass pay logs).
  UI improvements.
- Major rework on Session and Cookie classes and way how these are defined and stored in browser. 
  Update may cause users & admins to be logged out from Osclass.
  All cookies are now stored with "httponly" set to True, means they cannot be read by Javascript.
  In order to be able to read Cookie in Javascript, it's key must contain one of following: "_unsercure", "_unsec", "_js" or start with "ocjs_" and cannot start with "oc_", example: my_id_unsercure, secret_key_unsecure.
  Besides that, all cookies, when SSL is used, has "secure" set to True, so they can only be transmitted over HTTPS.
  These changes will significantly increase Osclass security and protects the cookie from being exposed to man-in-the-middle attacks on unencrypted connections, as well as cross-site scripting.
  New standardized functions created to manage cookies: _get, _set, _drop.
  This fix specific issues when non-friendly urls are stored into cookies causing problems to persist stable cookies like Saved Items Plugin.
  Cookies are now by default encoded, to avoid issues with mod_security and WAF (Access denied with code 403, ... Cookie outside range: 1-255, ...Invalid character in request).
  Cookies key (name) is sanitized and unsupported characters are removed from key.
- Emoji update: Osclass will try to convert whole database into utf8mb4 for better compatiblity.
  This includes change in connection, database and table charset & collate (utf8mb4 / utf8mb4_unicode_ci). All these are changed by Osclass upgrade, but this process may be extensive!
  By default Osclass convert everything in upgrade process. If you getting errors for any reason, set constant UPGRADE_UTF8MB4_SOFT to do just soft charset/collate upgrade.
  In that case only some tables are converted and others may require manual upgrage in PhpMyAdmin.
  Use function osc_utf8mb4_sqls() to see list of remaining SQLs or just execute these directly on database (may take a while).
- New helper functions osc_{get/set/drop}_{view/cookie/session/param}.
- Improved management and work with sorting types on search page.
- Search controller now use "iPerPage" param instead of "iPagesize", besides that allows logged admin to set also higher values (beyond general setting).
- Added new functions osc_get_prev_url() and osc_get_next_url() to be able to generate prev/next meta tags (head).
- Correction of osc_search_url() to no include iPage into URL in case it's <= 1.
- Fixed possible incorrect redirects after user login, caused by invalid URLs being saved into user navigation history.
- Comment settings link is now visible in Settings menu.
- Fixed bug with cache and search page, where cache cause pagination not to work. 
  Improved cache key generation on search page, added fix to mask dynamic time & timestamp values.
  Added more conditions, filters and hooks included in key generation (does not apply to alerts).
- New feature in backoffice - Email templates, that checks and removes duplicated email templates created as mistake (usually failed plugin uninstall/reinstall).
- It is now possible to create theme routes, where file points to theme directory, or to file in "custom" or "plugins" folder in theme directory.
- Fixed bug with user stats calculation (item counts) those now only include active listings and active comments.
- Fixed bug that incorrectly shown if email is visible on item page or not (in item form).
- New dedicated function osc_static_page_url_from_page($page, $locale = '') for static page URL generation created, that works in similar way as function for item URLs
- New layout for locations management in backoffice to improve user experience.
- Fixed bug on Sigma theme, when posting of comments for unregistered was disabled, whole comment section was hidden. Now only form to post comment is hidden.
- Fixed bug when it was possible to post comment using different email then email of logged user.
- When subdomain type is enabled/disabled, frontend cookies are dropped to avoid problems with duplicated cookies (different cookie domains). Users may also need to clean browser cookies.
- Fixed bug when user items url was returning 404 page after upgrade to Osclass 8.3.0.
- New warnings and checks added into Osclass core those will notify admin on home page e.g. about hourly cron not running properly or having built-in cron enabled.
- Added 2 new functions to help quickly add/drop email templates: osc_email_template_create($internal_name, $title, $text), osc_email_template_delete($internal_name).
- Fixed & improved feature that enable users to resend validation (activation) link. Link can be sent just once a 5 minutes.
- Comment reply email notification will now be sent to author of comment that user is replying to - if it's not identical email.
- Added support for routes super parameter "sParams", where value of 1 merged sParams are exploded into separate params.
  sParams=param1,value1/param2,value2/param3,value3/... ==> param1=value1, param2=value2, param3,value3...
  This helps to easily create and support versatile URLs like custom plugin search, where there are multiple optional parameters and creating many routes does not make sense.
- Added support for routes query parameters, those are correctly stored as param values.
  If there are params at the end of url in form: ?param1=value1&param2=value2&... these are stored as param1=value1, param2=value2, etc.
  Before, this query string would likely be attached to last specified route param, if exists.
- Improved cleaning of static files cache (css, js) when optimization is enabled.
- Improved API key validation and other features related to external URL response.
- Added extra action buttons to user profile edit in backoffice.
- When searching plugin in backoffice, search term is persistent (stored in session) and not automatically cleaned. This helps to search & manage plugins, so after plugin action same selection of plugins is shown.
- Added option to block site indexing by search engines in Backoffice > Settings > Block indexing.
- Implemented order by "relevance" on search page, when search pattern is not empty.
- Fixed pagination problem with custom search rules.
- Added option to manually sync languages added into Osclass with file system (po files).
- Upgrade process (automated from osclass-classifieds.com) will now handle if oc-admin or oc-content folder is renamed. For manual upgrades (by uploading & extracting zip), manual folder name change is required.
- Improved TinyMCE editor on mobile devices.
- Temp folder (oc-content/uploads/temp) is now regularly cleaned using daily cron.
- Action logs improvements.
- Alerts are not send to banned email address anymore.
- Fixed issue with sending alert emails to non-registered users.

Osclass 8.3.0
------------------------
- IMPORTANT: Osclass now fully supports PHP 8.3 & PHP 8.4 version.
- IMPORTANT: Many core osclass functions has been rewritten and optimized in order to reduce loops and unnecessary database queries.
  Osclass preload categories, cities, regions and countries to session and search directly here instead of doing extra DB calls (only if amount of data is acceptable).
  Massive optimization of functions and queries to preserve results in session & cache and reduce amount of database queries.
- IMPORTANT: Added brand new feature that allows users to filter items on their user items page & user public profile page.
  Majority of standard search parameters are supported.
  Comes with friendly canonical URL features.
  Set of new functions has been added into models, helpers and controllers to support this feature.
- IMPORTANT: Optimization of search URL and osc_search_url() function:
  Order column dt_pub_date will not be included in url anymore as it's default order column.
  Order type DESC will not be included in url anymore as it's default sort.
- IMPORTANT: Major feature "Custom search rules" has been added into Settings > Permalinks.
  It is now possible to create 26 custom search rules based on params those are active in search. 
  These rules can be strict or fuzzy - accepting also params not specified in rule settings.
  There is full support for plugin/theme custom parameters and custom field parameters (meta) as well.
  Custom search rules are fully compatible with subdomains.
  Custom rules has top priority above canonical rules. Rules are prioritized (Z - top priority, A - lowest priority)
  Examples:
    > {sCity}/{sCategory} -> /a/bremen/for-sale
    > {sRegion}/{sCity}/{sCategory} -> /b/alabama/bremen/for-sale
    > cat:{sCategory}/city:{sCity}/min-{sPriceMin}-eur -> /c/category:for-sale/city:bremen/min-55-eur
  Examples with fuzzy logic, where extra params are enabled:
    > {sCity}/{sCategory} with {sRegion} -> /a/bremen/for-sale/region,alabama
    > {sRegion}/{sCity} with {sCategory} and {sShowAs} -> /b/alabama/bremen/category,for-sale/view,grid
  This feature is for advanced users and improper setup can cause unexpected behaviour!
- IMPORTANT: Osclass now supports EMOJI! 
  This includes change in connection, database and table charset. All these are changed by Osclass upgrade, but read carefuly!
  Some tables those has foreign key to table t_locale cannot be automatically converted and must be done manually by user that is looking for Emoji support.
  These are for example pages, category and user description tables and keywords table (Item description is converted by Osclass).
  For new installations, everything is created in charset utf8mb4, collate utf8mb4_unicode_ci.
  In case your DB would not support this charset/collate, you must migrate to one that supports it!
- Canonical search URL as combination of category_city and category_region, that has been using underscore as delimiter, is now configurable via SEARCH_URL_CANONICAL_DELIMITER constant.
  Default value of SEARCH_URL_CANONICAL_DELIMITER has been changed to ":".
- Added option on search page to apply pattern in search without locale restriction.
  Means search works on all item title & descriptions no matter what is user locale.
- IMPORTANT: New interface to browse, search and manage logs has been added into Backoffice > Tools > Action logs.
  Note that Osclass was always collecting logs and if logs are collected or not and if logs are automatically cleaned or not, was never available in Osclass.
  Admin is now able to enable/disable logging in Settings > General, setup automatic cleanup by daily cron and define retention policy (ie remove logs after 24 months).
  It is possible to remove single log, cleanup all old logs (in Tools > Data Cleanup) and search in action logs.
  Logs were also enriched with comment and detail fields those will be populated in future, when needed.
  We strongly recommend to every admin, check your logs, update settings and drop old logs those are not required at all - it may lot of database space and optimize performance.
- IMPORTANT: Alerts - subscriptions major improvements.
  Users can now change alerts frequency in user account area. 
  Added extra fields like params, sql and trigger count, in general more options and details in backoffice. 
  Improved trigerring of alerts, statistics capturing, search page url for alert, search title and more.
- Improvements to cron commands and it's parameters. You can now define following params:
  force - to run cron even it's not right time yet - for easier debugging. In this case type of cron must be specified! It will accept &type=all as well. Only available for logged-in admin.
  print - to print summary of cron to see if everything was OK. Only available for logged-in admin.
  type - or cron-type - both params are OK to specify which type of cron to run. New type "all" is supported if force=1.
  Sample URL: https://yourpage.com/index.php?page=cron&type=daily&force=1&print=1
- Enhanced search features in Backoffice > Users.
  Added search by phone and ZIP, by default search is now wildcard and supports exact match by using double quotes.
- Enhancements with TinyMCE in backoffice + design updates especially for fullscreen mode.
  Refactor of image uploader script.
  Images from clipboard can now be added for items as well now (same as for static pages & widgets) - only from backoffice!
- New features for Ban Rules:
  Hits - show number of hits for each ban rule. Each time ban rule is triggered, +1 hit is counted.
  Expire date - it is now possible to set expiration date for bans. Once expired, it is not applied anymore.
- Widget will now be wrapped into div with class widget and additional html attributes.
  To support widget customizations, new filter widget_content and widget_content_wrap has been added as well.
  Widgets now support paste image from clipboard.
- Enhanced category record management on listing & search page - reusing one from model instead of quering category table multiple times.
- Enhancements to osc_item_category_price_enabled function, besides that new functions created: osc_item_category_row, osc_premium_category_row, osc_premium_category_price_enabled.
- Added new filters for canonical URLs for easier support and customizations.
- New option to Enhance canonical tags, by using default language code in canonical URLs, removing pagination parameter, sorting parameters etc.
  With enhance canonical url disabled: https://website.com/de-DE/search/sOrder,i_price/iOrderType,asc/category,1
  With enhance canonical url enabled: https://website.com/en-US/category-one-slug
- Sigma theme: Sort option dt_pub_date desc (default) will now not be included in search filters.
  This change means that for default sort type, search URL get nicer without redundant parameters.
  Numerous design improvements and fixed.
  When price is disabled in category, price will be hidden everywhere in theme.
  Enhanced design for header - my account & logout, added user profile image as well.
- Function osc_user_public_profile_url() got 2 updates:
  Added 2nd parameter $user where is possible to pass user array and avoid extra database call.
  Added 3rd parameter $mode that supports "username" and "id" values. "username" is default, means that username will be used in public profile URL.
- Item views (stats) can now be set to count 1 view per page load or 1 view per session.
  Added item views into Sigma item page (below description).
- Expiration date of listing in backoffice has been moved below category and is now much easier to manage.
  Besides that, it is now possible to update item publish date as well.
- New function osc_get_theme_hook_compatibility() to get hooks compatibility from theme.
- New set of functions for Search model to easily remove location from search conditions. Added new function addZip to search by ZIP code.
- New hooks for structured data.
  Default structured data rating value (in case no comments exists) is now set to 3 instead of 0.
- User public profile page - it is now possible to enable public profile just for company users or all registered users.
  Added new configuration parameter to user settings to set minimum number of items, that users must have published to have public profile enabled.
  If user does not meet requirements on public profile page, it shows 404 page instead.
- New features in Appearance > Customization:
  Added new customization field "Custom Javascript", where customized javascript functions and codes can be placed. Content is placed between script tags.
  It is now possible to select hook to be used to show content in front office.
- Added new options to manage and clean latest searches. Besides hourly, daily and weekly, it's possible to purge latest searches also monthly and yearly.
- Created new function osc_get_user_row($id), osc_get_item_row($id), osc_get_category_row($id), osc_get_country_row($code), osc_get_region_row($id), osc_get_city_row($id), osc_get_locale_row($code), osc_get_currency_row($id) that retrieve object from database and save it into session to reduce number of DB queries.
- Improvements in Tools > Import Data:
  Now error message with code is shown in case import to database fail.
  Added support for variables /*TABLE_PREFIX*/ and /*LOCALE_CODE*/.
- TinyMCE editors has now much more features & options in backoffice that can be especially useful on static pages (no change in front-office).
- It is possible now to change user registration date from backoffice.
- It is now possible to stop mail sending via pre_send_mail_filter filter (if returns array('stop' => true)). Besides that function osc_sendMail now has 2nd optional parameter $type.
- Improvements to various functions & design across Osclass.
- Permalinks configuration page in backoffice has been redesign and is now much more intuitive.
- Major enhancements to installation process especially in case something is not supported or installation is failing.
  Improved installation error messages - from database - to provide more details.
- Default jQuery version is now 3.x (does not impact existing installations - only new).
- Fixed alerts bulk actions functionality.
- Fixed bulk action translations in backoffice.
- Function osc_query_items() now supports much more custom parameters and conditions.
- Added hooks user_recover_form and user_forgot_password_form.
- Added "Lookup IP" link into backoffice. It's possible to configure lookup IP service in config.php as constant IP_LOOKUP_SERVICE.
  By default IP_LOOKUP_SERVICE = https://whatismyipaddress.com/ip/{IP_ADDRESS}, where {IP_ADDRESS} is variable replaced by Osclass.
- Fixes and improvements to latest search functions.
- Fixed bug on search page, pagination, RLT (Arabic) languages, category search page - page 2 and higher was returning 404. This is now resolved.
- Fixed bug with category cascading drop downs, when there was more than 4 levels, it might result in incorrect behaviour when chaning categories.
- Fixed bug when native location names were not applied on regions/cities loaded via ajax.
- Fixed bug with latest searches purge by number of queries.
- Created new helper file for currency functions.
- AjaxUploader was updated to be able to work with it from plugins/themes side not just to upload item images.
- Cache features (memcache, memcached, redis, ...) are now completely disabled in backoffice.
- Improvements to backoffice top toolbar design.
- Added more options to work and control flash messages. New filters enables full control over adding and showing flash messages. Now messages has also keys and raw text.
- Improvements of market section in backoffice. It is now possible to filter products with expired support. These also get red background. Besides that expired products show price for extension, not full price.
- Instant alerts (subscriptions) are now executed with minutely cron (before not executed at all).
- Improvements to Uppy.io image uploader and it's compressor plugin. It is now possible to enable "optimize uploaded images" in media settings to compress original uploaded images (temp folder) and reduce it's dimension.
- Search page no longer use noindex,nofollow tags as canonical URL should always be provided.
- Refactor of breadcrumbs code, fixing bug with possibly wrong region and added country to search page breadcrumbs.
- Improved checks (for view counts and "mark item as") if visitor is real user or bot. Introduced new function osc_visitor_is_real_user() that unify checks.
- Change in Search class for subdomains - by default, if not explicitely disabled in constructor, every Search class object will get subdomain conditions & filters auto-applied.
  Means, if you are on country-based subdomain, Search class by default filter listings for this country only. Same for Region, City, User and Category.
- Redesigned function osc_subdomains_filter_conditions($item_table = '') to simplify it's usage in order to apply subdomain conditions and filters.
  New functions create to support this:
  > osc_subdomains_filter_to_search($mSearch, $item_table = '') - use on Search object to instantly apply correct conditions.
  > osc_subdomains_filter_to_dao($object, $item_table = '') - use on DAO object to instantly apply correct conditions.
  It is possible to apply subdomain filters on listing search just by running 'custom_item_query' hook on specific DAO query.
- Premium views (stats) are now not counted only if user is not admin, is real visitor and is not owner of premium listing.
- Added support for attachments in web contact form of Sigma theme.
- Enhanced attachment check when uploading files to contact form. Added file validation to item contact form attachments (mime type).
- Item expiration notification has been enhanced. It is now possible to set notification 0 days before expiration (-1 to disable). Query getting expiring items has been optimized and redesigned.
- Sigma theme function osc_uploads_url defined in functions.php must be removed or renamed! It is clashing with core Osclass function and might cause logo not to be correctly displayed. Rename it or update Sigma manually.
- Remember me checkboxes in front & back office login are now checked by default.
- Added plugins integrity check that identify plugins those are in incorrect state.
- Improvements to item url generation when subdomains are enabled.
- Child themes are no longer considered for update (based on parent theme).