07-03-2010, 06:57 PM
Updated to v1.20. I've changed quite a lot in this release, so hopefully I haven't stuffed anything up.
Thanks to everyone who have made suggestions or pointed out issues, resulting in these fixes.
Changes:
Note that this update fixes some possible ways to orphan xtattachments, however the upgrader doesn't check for invalid references (somewhat annoying to write); it shouldn't be a big issue, especially as no-one's reported anything.
Thanks to everyone who have made suggestions or pointed out issues, resulting in these fixes.
Changes:
- improve template caching (thanks to RateU for pointing that out) - all templates used by XThreads should now be cached
- sanitise evaluated variables during cache build - improves performance slightly; also slightly improve handling of these variables, also making it harder for evaluated variables to invoke the {VALUE} replacement code (may improve security)
- add {$forumurl}, {$threadurl}, {$forumurl_q} and {$threadurl_q} for templates. It does the same thing as {$threadurl$} and {$forumurl?} etc did in the v1.10 update, except these will work in templates. Although these also work in thread fields, the old format will still work. Note, {$threadurl}/{$threadurl_q} may not work in newthread (preview post), as there is no URL associated with a thread which doesn't exist.
- enable {$thread['threaddate']} and {$thread['threadtime']} template variables to search results (threads display only) as well showthread/forumdisplay (for those that didn't know, I guess this was a hidden variable that's existed in XThreads for a while - it formats the thread's creation time/date); this also does work with search results posts display with the $post variable instead of $thread (eg {$post['threaddate']}), however, despite what it looks like, it's for the post's date/time, rather than the thread's
- tweaks to XThreads attachment downloading - now will send proper HTTP 206 header for ranged requests, and will also fulfill If-Range requests
- defer MD5 hashing of larger files to a task (uses the xtattachment orphan cleanup task) - this improves XThreads' handling of larger attachments; size limit can be tweaked in inc/plugins/xthreads.php, but the default of 10MB should be fine for most servers
- add ability for admins to move files on the server to be used as attachments (rather than force them to upload it, or fetch by URL). This can make it easier for admins to attach very large (eg multi-gigabyte) attachments; files to be attached should be uploaded to the uploads/xthreads_ul/admindrop/ folder (and not in any further subforlder), and should be writable by the webserver. When specifying what to attach, select the URL option in the attachment input, and prefix the filename with "file://". For example, if an admin specifies "file://bigfile.iso" as the URL, the file uploads/xthreads_ul/admindrop/bigfile.iso will be MOVED (not copied) as an XThreads attachment. Note, you cannot move index.html, or capitalised variants of the name.
- add option to hide threadfields input from newthread/editpost - this can be useful if you wish to reposition the input field elsewhere (will require a manual template edit)
- add option to hide a forum from the index/forumdisplay pages; note that this is different from disabling the can view forum permission as it can allow users to view the forum, but simply just not list it on the index/forumdisplay pages (may be useful if you only want to link to it in the header)
- fix various forumdisplay URLs (paging, sorter links, sorter listboxes and inline search) when inline search or filters are used (thanks to leefish for pointing that out)
- add portal support - you can now call {$threadfields...} from portal templates, and portal_announcement* templates will be affected if template prefixes are used (thanks to leefish for the suggestion)
- fix bug which allowed some XThreads attachments to become orphaned
- identified and fixed a security issue in regards to incorrect permission checking with modifying xtattachments
- fix up some small issues specific to the MyBB 1.6 beta in regards to the version check
- some other minor bug fixes and tweaks
Note that this update fixes some possible ways to orphan xtattachments, however the upgrader doesn't check for invalid references (somewhat annoying to write); it shouldn't be a big issue, especially as no-one's reported anything.