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: 2297)

- 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...http://mybbhacks.zingaburga.com/showthread.php?tid=378&pid=59

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: 8,327
MyBB Compatibility: 1.4.x, 1.6.x, 1.8.x
Plugin License: GPLv3
Uploader: ZiNgA BuRgA
JonP Offline
Junior Member
**
Posts: 6
Joined: Jun 2010
Post: #131
RE: XThreads
Alright got it working, thanks.
09-01-2010 01:10 AM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #132
RE: XThreads
Updated to v1.31, changes:
  • add an 'active' element to the $filters_set array added in v1.30.  This acts like the 'selected' or 'checked' elements, except it sets the text to "filtertf_active" if the filter is set to the specific value.  This may be useful for defining active CSS classes to signify a selected filter
  • also fix a bug with 'selected' and 'checked' elements with fields allowing multiple values
  • fix rare query bug with filtering on multiple values
  • make thread filter a bit smarter by ignoring blank filters in some situations where it would _probably_ result in no threads being shown; it will ignore blank filters if the field is required (note that there are situations which may allow a thread to exist without the required field filled in), for required select/checkbox/optionbox inputs, it will ignore blank filters if there is no "empty" value defined in the valid values list
  • fix displaying threadfields on various search/portal templates with forumurl/threadurl variables (thanks to Jumper for finding the bug and RateU for his explanation)
  • add 'allow [video] code' to MyBB parser options (MyBB 1.6 only)
  • check for empty value list for select/checkbox/radiobutton input types (AdminCP validation)
  • remove "custom" field type for custom thread fields - don't think anyone uses it and fairly useless - I might make something better in its stead
  • attempt to use long varchars (up limit to 1KB) if the DBMS supports it (hopefully this won't push towards MySQL's 64KB row size limit)
  • remove setting default field value in DB - caused issues and I don't really see why it's needed (thanks RateU for reporting the issue)

My Blog
(This post was last modified: 09-01-2010 10:29 PM by ZiNgA BuRgA.)
09-01-2010 10:27 PM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #133
RE: XThreads
Thank you very much for the update, Yumi Smile

(This post was last modified: 09-02-2010 08:59 AM by RateU.)
09-02-2010 08:45 AM
Find all posts by this user Quote this message in a reply
Pirata Nervo Offline
Member
***
Posts: 235
Joined: Jan 2008
Post: #134
RE: XThreads
Thank you for the update Smile
09-04-2010 06:43 AM
Find all posts by this user Quote this message in a reply
Jumper Offline
Member
***
Posts: 75
Joined: Aug 2010
Post: #135
RE: XThreads
Thank you for updating this fantastic plugin Wink
09-09-2010 06:45 AM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #136
RE: XThreads
Thanks.

Although anyone actually getting this is rare, I did find something (maybe) interesting which stumped me for a while.
Couldn't figure out why the picture in this thread never showed up for me in Firefox.
Eventually managed to track it down to AdBlock blocking the image because it had "720x90" in the URL.

My Blog
(This post was last modified: 09-09-2010 09:14 PM by ZiNgA BuRgA.)
09-09-2010 09:14 PM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #137
RE: XThreads
Updated to v1.32:
  • run captured patterns (added in v1.30) from text mask through sanitiser too
  • also add ability to use {RAWVALUE$1}, {RAWVALUE$2} etc for capturing patterns which don't go through the sanitiser
  • fix displaying some error messages with threadfield editing in MyBB 1.6
  • use proper DB charset collations (MySQL/i)
  • accept conditionals in evaluated threadfield attributes (display format, unviewable value etc); it's the same as the Template Conditionals plugin, except that <template ...> calls are not supported.  {VALUE}, {RAWVALUE$1} etc are treated as string values in statements, eg <?={VALUE}.'a'?> is valid.  $$var and ${$var} type syntax is currently not "correctly" handled (not auto-global'd).  Note that using conditionals won't incur the same speed penalty as Template Conditionals since XThreads pre-evaulates and caches expressions
  • if PHP in Templates plugin is active, will also enable PHP and disable safe expression checking in above, in the same way that the plugin works
  • textual fields now default to TEXT datatype, will only use varchar if filtering is enabled
  • for filtered fields, reduce long varchars' length for radio and non-multi selectbox input types from 1024 to 255; textbox inputs are still 1024 long
  • add 'nullselected', 'nullchecked' and 'nullactive' elements to $filters_set array (includes '__search' and '__all' elements); these values will be set to ' selected="selected"', ' checked="checked"' and 'filtertf_active', respectively, only if the filter has not been set
  • above will also work for $filters_set['field']['selected'][''] for fields which can never have blank values, including '__search' (see change in v1.31 about "make thread filter a bit smarter")
  • threadfield data is now duplicated for Copy Thread moderation action; xtattachments are hard linked across if possible, or copied otherwise
  • for image uploads, will now only accept GIF, JPEG and PNG image types as MyBB's thumbnail generator doesn't seem to support any other image types

My Blog
09-22-2010 07:31 PM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #138
RE: XThreads
Thank you very much for the update, Yumi. Amazing!

09-23-2010 04:49 AM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #139
RE: XThreads
I don't think anyone cares (and neither do I, to be really honest Tongue), but I've decided to start a git repository on this.
Note that this is actually really only for my own learning experience, and I may end up trashing the repo, abandoning it or whatever.  I never really thought this plugin was big enough to warrant a version control system, but as I've never actually used git before, I've decided to use this plugin to gain some experience.

I don't suggest anyone actually use the versions here as I mostly won't even bother testing them, and upgrade scripts certainly won't take them into account, but anyway, for anyone interested:
http://github.com/zingaburga/XThreads-MyBB-Plugin
Note that you shouldn't use the page to report issues etc - just keeping them here is fine.

My Blog
(This post was last modified: 10-07-2010 10:19 PM by ZiNgA BuRgA.)
10-07-2010 10:18 PM
Find all posts by this user Quote this message in a reply
Flabaliki Offline
Junior Member
**
Posts: 16
Joined: Jul 2010
Post: #140
RE: XThreads
So, I just updated my forum from v1.4.10 to v1.6 and Xthreads is working fine. But the ACP settings have a really annoying issue. It has changed all the links to: config-threadfields instead of config/threadfields. So every time I try to go to it, change settings, add a new field it just takes me to either a blank page or the ACP home page. Now I only have this issue with the Xthread links, no other plugin or default link has change the / to a -.

Also, if I manually type in the / it still works, but all the links have changed themselves for some reason Ouch

http://youtube.com/Flabaliki
10-19-2010 01:03 PM
Visit this user's website Find all posts by this user Quote this message in a reply


Forum Jump: