MyBB Hacks

Full Version: XThreads
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Alright got it working, thanks.
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)
Thank you very much for the update, Yumi Smile
Thank you for the update Smile
Thank you for updating this fantastic plugin Wink
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.
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
Thank you very much for the update, Yumi. Amazing!
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.
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
Reference URL's