XThreads
Author Message
My Spiel
XThreads is one of my larger plugins which I have been working on for a while.  Originally planned to release it inline with MyBB 1.6, but who knows when that'll be out.  It perhaps doesn't include everything I wanted it to, but does have most of the things (plus I want to move onto other projects).

What does it do?
Take a look at RateU's forum for some nice ideas of what it can do.  I also have some more basic examples here of what can be done with XThreads.  I'm pretty sure there are many other applications of this plugin, but those examples just give you some simple ideas.

The basic idea is giving you the ability to define custom fields for your threads, and providing methods to give you a lot of flexibility with customising forums.

Warning: I'm not going to bother with "beta" labels and so on.  I've done some testing on this myself, but it's by no means extensive.  Use this at your own risk.

Installation Instructions: standard installation procedures apply - you can find them in the announcement here.
You may need to CHMOD the uploads/xthreads_ul/ folder to 0777 after uploading the files (probably won't though).

Upgrade Instructions: unless stated otherwise, the general procedure for upgrades is to simply upload the new files, then visit your AdminCP.  In there, you'll be presented with a notice to run the upgrade - just follow what it says from there on.

Usage Instructions: this is a complex plugin, and unfortunately, you're probably going to have to figure this out yourself, depending on what you want to achieve with this plugin.  HTML and CSS knowledge is strongly recommended; you should also be familiar with MyBB's template system.  Some demonstrations can be found here - hopefully these will give you a good idea of how things work.  I suggest looking at the thread descriptions example, as this is fairly easy to understand (IMO).  If you can understand how everything works, there, perhaps try out the gallery example.

Known conflicting plugins
- MyPlaza Turbo -
If you are using MyPlaza Turbo, note that the author decided to use a particularly odd method to implement certain functionality, practically destroying compatibility with any plugin which hooks into the forum add/edit routines.  I've included a patch to address this issue - you need to replace inc/myplaza/myplaza_admin_plugin.php with the following file (it's unlikely that this will be committed as the author has decided to discontinue development)

.php  myplaza_admin_plugin.php (Size: 56.27 KB / Downloads: 1293)

- PL9 Forum Icons -
Affects certain functionality.  See here for a solution.

- PHP in Templates, v1.4 or older -
Similar to PL9 Forum Icons - solution is just to update to the latest version.

- MyAdvertisements - (update: older versions only, later versions may not conflict)
Affects some thread functionality, see here for a solution.

- Group Post CSS -
See here http://mybbhacks.zingaburga.com/showthre...17#pid5917

All bug reports, suggestions, criticisms are appreciated (though I may not always implement suggestions) so please feel free to post them.
If you find this plugin useful, I would be grateful if you could give some token of appreciation for the work that has gone into this, and perhaps post some example usages you've come up with in the XThreads forum to help others get an idea of what can be achieve with this plugin (and for my own interest's sake Tongue).


Github: https://github.com/zingaburga/XThreads-MyBB-Plugin
Note: do NOT use the Github version, unless you know what you're doing
Changelogs: v1.10, v1.20, v1.21, v1.22, v1.23, v1.24, v1.25, v1.26, v1.27, v1.30, v1.31, v1.32, v1.337, v1.40, v1.41, v1.42, v1.43, v1.44, v1.45, v1.46, v1.47, v1.50, v1.51, v1.52, v1.53, v1.60, v1.61, v1.62, v1.63, v1.64, v1.65, v1.66, v1.67, v1.68
(This post was last modified: 12-25-2015 12:46 PM by ZiNgA BuRgA.)
Find all posts by this user
Quote this message in a reply
Download: xthreads-1.68.7z (114.53 KB)
Plugin Version: 1.68
Last Updated: 12-25-2015, 12:46 PM

Downloads: 7,012
MyBB Compatibility: 1.4.x, 1.6.x, 1.8.x
Plugin License: GPLv3
Uploader: ZiNgA BuRgA
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,338
Joined: Jan 2008
Post: #41
RE: XThreads
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:
  • 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.

My Blog
07-03-2010 06:57 PM
Find all posts by this user Quote this message in a reply
leefish Offline
Hamster
*******
Posts: 1,009
Joined: Apr 2010
Post: #42
RE: XThreads
Hi Zinga, Im getting an error message when I try to download the file... is it removed?

EDIT: I saw some odd formatting around the link as below.

Code:
http://mybbhacks.zingaburga.com\/"xthreads_attach.php/46_1278147498_c3bd6cd6/b9df54b755001a09848e1d0761e868a8/xthreads-1.2.7z\"


When I removed the extra " and the \ it worked. See below.

Code:
http://mybbhacks.zingaburga.com/xthreads_attach.php/46_1278147498_c3bd6cd6/b9df54b755001a09848e1d0761e868a8/xthreads-1.2.7z



[Image: leelink.gif]
MYBB1.6 & XThreads
(This post was last modified: 07-04-2010 08:41 AM by leefish.)
07-04-2010 08:24 AM
Visit this user's website Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,327
Joined: Mar 2010
Post: #43
RE: XThreads
I believe Yumi will fix it soon, Lee. It seems that we have some great new features Smile A huge change list there.

07-04-2010 08:39 AM
Find all posts by this user Quote this message in a reply
leefish Offline
Hamster
*******
Posts: 1,009
Joined: Apr 2010
Post: #44
RE: XThreads
Hi RateU - I have it in my grubby little hands but I'm scared to install it. :/  I fear the error may be in the Xthreads attachment code as this bug is true of all download links from the plug ins area.


[Image: leelink.gif]
MYBB1.6 & XThreads
(This post was last modified: 07-04-2010 08:44 AM by leefish.)
07-04-2010 08:42 AM
Visit this user's website Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,327
Joined: Mar 2010
Post: #45
RE: XThreads
Please don't install it first Smile

07-04-2010 08:58 AM
Find all posts by this user Quote this message in a reply
leefish Offline
Hamster
*******
Posts: 1,009
Joined: Apr 2010
Post: #46
RE: XThreads
RateU - I won't. Would be a SUPER STUPID thing to do


[Image: leelink.gif]
MYBB1.6 & XThreads
07-04-2010 09:13 AM
Visit this user's website Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,327
Joined: Mar 2010
Post: #47
RE: XThreads
Biggrin

Ah, yes, Lee, what about the Book Review tutorial? I believe it will be a great sample. Did you finish it?

07-04-2010 09:22 AM
Find all posts by this user Quote this message in a reply
leefish Offline
Hamster
*******
Posts: 1,009
Joined: Apr 2010
Post: #48
RE: XThreads
Well, its waiting for the filter issue to be fixed - which Zinga says it is. So then I can upload it. Im excited to be able to share it soon Smile


[Image: leelink.gif]
MYBB1.6 & XThreads
07-04-2010 09:34 AM
Visit this user's website Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,327
Joined: Mar 2010
Post: #49
RE: XThreads
Great! I've seen it in your forum. It looks great. Smile

07-04-2010 09:47 AM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,338
Joined: Jan 2008
Post: #50
RE: XThreads
Frown Very sorry guys, can't believe I missed that >_>

Yeah, please tell me if you find any more issues.

Updated to v1.21:
  • Fix regression in v1.20 with incorrect sanitisation of variables.

EDIT: urgh, didn't upload the right thing - if you downloaded the above before this edit, please download the file again.  Thanks.

My Blog
(This post was last modified: 07-04-2010 10:24 AM by ZiNgA BuRgA.)
07-04-2010 10:13 AM
Find all posts by this user Quote this message in a reply


Forum Jump: