1.9.11 diff and Patch Information
For XMB 1.9.10 - Advanced Webmasters Only
requirements: MySQL 4.1.7 or higher & PHP 4.3.0 or higher.
diff: Attached
lang (full diff): English
lang (replace new): Croatian, Dutch, French, Japanese, Portuguese, Spanish, and Russian
lang (in beta): Albanian, Arabic, Chinese, Czech, Estonian, Finnish, German, Hungarian, Indonesian, Italian, Norwegian, Polish,
Serbian, Swedish, Ukrainian, Vietnamese
templates: Included as templates.xmb in diff
sql: The version-specific upgrade script is included in the attached package.
Added 3 tables:
lang_base
lang_keys
lang_text
Added 19 columns:
attachments.img_size
attachments.parentid
attachments.subdir
attachments.uid
attachments.updatetime
members.u2ualert
settings.attach_remote_images
settings.captcha_search_status
settings.file_url_format
settings.files_min_disk_size
settings.files_storage_path
settings.files_subdir_format
settings.files_virtual_url
settings.filesperpost
settings.ip_banning
settings.max_image_size
settings.max_thumb_size
settings.schema_version
themes.admdir
Added 4 indexes:
attachments.parentid
attachments.uid
logs.date
logs.tid
Modified 3 columns:
members.postnum
ranks.posts
vote_desc.topic_id
Deleted 1 column:
Files with no substantial change:
include/smtp.inc.php
include/spelling.inc.php
js/admin.js
js/buddy.js
js/buddylistedit.js
js/popup.js
js/u2uheader.js
Files that should be replaced, if possible:
header.php
misc.php
post.php
stats.php
tools.php
topicadmin.php
db/mysql.php
include/admin.inc.php
include/captcha.inc.php
include/functions.inc.php
include/global.inc.php
include/u2u.inc.php
include/validate.inc.php
js/bbcodefns-ie.js
js/bbcodefns-mozilla.js
js/bbcodefns-opera.js
js/header.js
js/ticker.js
Files added in this version:
files.php
robots.txt
search.php
include/attach.inc.php
include/attach-admin.inc.php
include/debug.inc.php
include/translation.inc.php
include/validate-email.inc.php
Files deleted in this version:
lang/* except lang/English.lang.php
The expected impact on existing hacks and mods from version 1.9.10 is low. Adoption of the new translation API is optional, and most other changes
are compatible.
Modders and hackers should be aware of the following changes:
Deleted Code: The checkInput() function in functions.inc.php and the formArray() function in validate.inc.php had been deprecated in
the previous version and were removed in this version.
The getRequestVar() function in validate.inc.php was removed as a proactive security measure due to non-use.
The array_keys2keys() function in functions.inc.php was removed due to non-use.
The htmlentities_decode function in functions.inc.php was removed because it was not used, and it duplicated the html_entity_decode function provided
by PHP.
The page_token class in validate.inc.php and all references to it were removed because it was incomplete. The input elements in the templates remain
intact for future use.
All instances of the $lastvisit2 variable were removed due to non-use.
Style Changes: The forum permissions API has been expanded to provide functions that make more sense and help to eliminate
complicated and repetitive code. Some examples have been added in the new Programmer's Guide at xmbforum.com.
Global arrays $status_enum and $status_translate have been added in header.php to provide names and translations to the permission bits. Likewise,
the X_PERMS_RAW* constants have been added to differentiate between stored permissions and effective permissions. (Effective, meaning REPLY &=
VIEW)
The entire forums table is now globally cached to reduce XMB's query count. The new function getForum() is equivalent to querying a row from the table. The new permissions API functions all use this cache and provide relatively simple
ways to retrieve all forums as an array or list.
XMB has a new translation API that does not involve the /lang/ subdirectory. All of the $lang array assignments are now stored in the database as
string values. This has the following impacts on hacks and mods:
1. Editing *.lang.php files is no longer the preferred method of providing translation addons. New addons should
be pasted directly into header.php or provided in a separate file like myhack.inc.php or myhack.lang.php. This has the advantage of making
installation much easier on multi-language boards. Look in the Programmer's Guide for articles about these changes.
2. $lang array assignments are no longer evaluated as PHP code, even though we kept the same file format. This means that any
variables you put inside the $lang values must be deleted, eval'd, or parsed by your own hack.
3. All translation data can be retrieved and modified programmatically using new API functions or your own database queries.
All "multi-page" logic has been consolidated into a new function multipage() in functions.inc.php to eliminate a large amount of duplicated and buggy code. This has the following impacts on hacks and
mods:
1. Variables $page, $max_page, and $start_limit are essentially never used anymore. $start_limit is now part of the array returned
by multipage(). $page and $max_page are handled internally when multipage() is called. All you have to do is handle the return values.
2. function multi() has a different prototype that is not backward compatible, and it is almost never used anymore outside of functions.inc.php.
The header.php script has been significantly reorganized in this version, however its intended behavior and purpose have not changed in any way.
The viewthread.php script no longer contains any attachment ouput logic. That logic has been centralized. Attachment links are now provided by the bbcodeFileTags() function in functions.inc.php. Attachment blobs themselves are now provided by the files.php script. The viewthread.php
script is set up to emit status 301 on the old ?action=attachment query string.
I hope this is thorough and useful. 
Attachment: XMB-1.9.11-diff-and-patch.zip (189kB)
This file has been downloaded 278 times
|