diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..72ec4cb5 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,7 @@ +![K2](https://getk2.org/downloads/logo/k2_logo.png) +*** + +# Changelog + +### v2.11.20240609 - June 9th, 2024 +- Improved database performance for the K2 Content module. When selecting specific items, a single query will now be executed instead of distinct queries, as was done previously. diff --git a/docs/collection.xml b/docs/collection.xml new file mode 100644 index 00000000..f16e2dab --- /dev/null +++ b/docs/collection.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/docs/images/k2_logo.png b/docs/images/k2_logo.png new file mode 100644 index 00000000..263eeef7 Binary files /dev/null and b/docs/images/k2_logo.png differ diff --git a/docs/images/k2_logo.webp b/docs/images/k2_logo.webp new file mode 100644 index 00000000..23e389ce Binary files /dev/null and b/docs/images/k2_logo.webp differ diff --git a/docs/update.js b/docs/update.js new file mode 100644 index 00000000..a6681260 --- /dev/null +++ b/docs/update.js @@ -0,0 +1,97 @@ +/* === K2 Update Service === */ + +/* TO DO: +- Add cookie to hide notification +- Update styling to match the Joomla backend +*/ + +(function() { + + /* === Helpers === */ + + /** + * Simply compares two string version values. + * + * Example: + * versionCompare('1.1', '1.2') => -1 + * versionCompare('1.1', '1.1') => 0 + * versionCompare('1.2', '1.1') => 1 + * versionCompare('2.23.3', '2.22.3') => 1 + * + * Returns: + * -1 = left is LOWER than right + * 0 = they are equal + * 1 = left is GREATER = right is LOWER + * And FALSE if one of input versions are not valid + * + * @function + * @param {String} left Version #1 + * @param {String} right Version #2 + * @return {Integer|Boolean} + * @author Alexey Bass (albass) + * @since 2011-07-14 + */ + + var versionCompare = function(left, right) { + if (typeof left + typeof right != 'stringstring') return false; + var a = left.split('.'), + b = right.split('.'), + i = 0, + len = Math.max(a.length, b.length); + for (; i < len; i++) { + if ((a[i] && !b[i] && parseInt(a[i]) > 0) || (parseInt(a[i]) > parseInt(b[i]))) { + return 1; + } else if ((b[i] && !a[i] && parseInt(b[i]) > 0) || (parseInt(a[i]) < parseInt(b[i]))) { + return -1; + } + } + return 0; + }; + + var kookie = { + create: function(name, value, days) { + var expires = ""; + if (days) { + var date = new Date(); + date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000)); + expires = "; expires=" + date.toGMTString(); + } + document.cookie = name + "=" + value + expires + "; path=/"; + }, + read: function(name) { + var nameEQ = name + "="; + var ca = document.cookie.split(';'); + for (var i = 0; i < ca.length; i++) { + var c = ca[i]; + while (c.charAt(0) == ' ') c = c.substring(1, c.length); + if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length); + } + return null; + }, + erase: function(name) { + this.create(name, "", -1); + } + }; + + /* === K2 App === */ + var K2_LATEST_VERSION = '2.11.20240609'; + var K2_RELEASE_NOTES = 'https://github.com/getk2/k2/commits/master'; + + if (kookie.read('K2_hideUpdateMessage')) return; + + if (versionCompare(K2_LATEST_VERSION, K2_INSTALLED_VERSION) > 0) { + var b = document.getElementsByTagName('body')[0]; + var notice = '
A new version of K2 (v' + K2_LATEST_VERSION + ') is now available to download.
Check out the release notes.

[Dismiss this message for 1 week]
'; + var mountNotice = document.createElement('div'); + mountNotice.innerHTML = notice; + b.appendChild(mountNotice); + + var hideMsgLink = document.getElementById('k2UpdateService_HideMsg'); + hideMsgLink.onclick = function() { + kookie.create('K2_hideUpdateMessage', 'true', 7); + document.getElementById('k2UpdateService_Msg').setAttribute('style', 'display:none;'); + return false; + }; + } + +})(); diff --git a/docs/update.xml b/docs/update.xml new file mode 100644 index 00000000..096b4e34 --- /dev/null +++ b/docs/update.xml @@ -0,0 +1,41 @@ + + + + K2 + K2, the powerful content extension for Joomla (by JoomlaWorks) + com_k2 + component + 2.11.20240609 + https://github.com/getk2/k2/commits/master + + https://getk2.org/downloads/?f=K2_Rolling_Release.zip + + + stable + + JoomlaWorks Ltd. + https://getk2.org/ +
Updates
+ + 1 +
+ + K2 + K2, the powerful content extension for Joomla (by JoomlaWorks) + com_k2 + component + 2.11.20240609 + https://github.com/getk2/k2/commits/master + + http://getk2.org/downloads/?f=K2_Rolling_Release.zip + + + stable + + JoomlaWorks Ltd. + https://getk2.org/ +
Updates
+ + 1 +
+