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

- 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: 8,028
MyBB Compatibility: 1.4.x, 1.6.x, 1.8.x
Plugin License: GPLv3
Uploader: ZiNgA BuRgA
Patrick_ Offline
Junior Member
**
Posts: 27
Joined: Oct 2011
Post: #791
RE: XThreads
Thank you Hamster.
01-19-2015 10:40 PM
Find all posts by this user Quote this message in a reply
Shemo Offline
Member
***
Posts: 184
Joined: Jan 2008
Post: #792
RE: XThreads
possible bug with xthreads 1.6.4, zinga:

http://community.mybb.com/thread-161129.html

I compared some error IP addresses and times with my access logs and they seem to go back to when users hit xthreads_attach.php as noted here: http://community.mybb.com/thread-161129-...pid1134616
01-24-2015 04:47 PM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #793
RE: XThreads
Thanks for finding that!

Try changing xthreads_attach.php:

Find:

PHP Code:
// required by MyBB >= 1.7

Add after:

PHP Code:
1
2
3
4
5
6
7
8
		function format_time_duration($time) {
			if(!is_numeric($time)) return '-';
			// drop microseconds case - no-one really cares
			if($time < 1)
				return number_format(round((1000 * $time), 2)).' ms';
			else
				return round($time, 3).' seconds';
		}


My Blog
01-26-2015 04:11 PM
Find all posts by this user Quote this message in a reply
Shemo Offline
Member
***
Posts: 184
Joined: Jan 2008
Post: #794
RE: XThreads
(01-26-2015 04:11 PM)ZiNgA BuRgA Wrote:  Thanks for finding that!

Try changing xthreads_attach.php:

Find:

PHP Code:
// required by MyBB >= 1.7

Add after:

PHP Code:
1
2
3
4
5
6
7
8
		function format_time_duration($time) {
			if(!is_numeric($time)) return '-';
			// drop microseconds case - no-one really cares
			if($time < 1)
				return number_format(round((1000 * $time), 2)).' ms';
			else
				return round($time, 3).' seconds';
		}


no problem.  I'll keep an eye on my logs and let you know if that did indeed fix the issue.
01-26-2015 04:52 PM
Find all posts by this user Quote this message in a reply
Shemo Offline
Member
***
Posts: 184
Joined: Jan 2008
Post: #795
RE: XThreads
I applied this fix like 12 hours ago or so and haven't seen any errors since.

thanks again, zinga.
01-27-2015 06:30 AM
Find all posts by this user Quote this message in a reply
Sama34 Offline
Senior Member
****
Posts: 490
Joined: May 2011
Post: #796
RE: XThreads
Next version of MyBB (1.8.4) will modify the fetch_array DB method:
https://github.com/mybb/mybb/blob/featur...i.php#L450

So calls of control_object that try to extend this class will need to be updated.

Support PM's will be ignored. Yipi
Plugins: Announcement Bars - Custom Reputation - Mark PM As Unread
02-06-2015 11:27 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Seabody Offline
Member
***
Posts: 54
Joined: Aug 2012
Post: #797
RE: XThreads
Zinga -- when I try to add a custom mod tool, and set it to modify a certain threadfield, the changes do not save.

ie: I have a tool. I notice I forgot to add the action (Modify custom thread field(s)), so I use that textbox to add it in. I enter the correct field and a valid value. I click "Save Changes". The text appears in the textarea. I hit "Save" at the bottom. It does not save.

I will admit, I have done some tinkering with xThreads, but I reverted all changes before this issue appeared (my code didn't work Frown ).

Edit: Redownloaded the plugin from here. Replaced all folders in the inc/xthreads directory, plus inc/plugins/xthreads.php (the only files I modified, all others are originals). No change.
(This post was last modified: 02-08-2015 02:16 PM by Seabody.)
02-08-2015 01:32 PM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #798
RE: XThreads
http://mybbhacks.zingaburga.com/showthread.php?tid=4959

I haven't been able to reproduce the issue.  If you can figure out how from a clean install, it would be helpful.

My Blog
02-09-2015 09:34 AM
Find all posts by this user Quote this message in a reply
leefish Offline
Hamster
*****
Posts: 1,009
Joined: Apr 2010
Post: #799
RE: XThreads
I am sorry to have not been back to you on this; installing a clean MyBB is proving problematic right now.

I will try to get a board set up. Sorry for the delay.


[Image: leelink.gif]
MYBB1.6 & XThreads
02-09-2015 01:01 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Seabody Offline
Member
***
Posts: 54
Joined: Aug 2012
Post: #800
RE: XThreads
I replaced all the files with fresh unaltered ones, the issue persisted. I am using 1.64 on MyBB 1.8.3.

The odd thing is, this issue was not a problem on the first installation. I set at least one custom mod tool successfully. Something -- I don't know what -- happened and now it's unable to save.

I'm using Cool Codes, NewPoints, vB Styled Quotes, xThreads, a custom plugin of mine (I know the code, it can't be conflicting), a custom plugin enabling the theme I used to use. I uninstalled/deactivated all of those plugins, no change. I deactivated and reactivated xThreads, no change. I don't think there's an option to export thread fields, so I haven't uninstalled it yet. I backed up the threadfields/threadfields_data tables, uninstalled, reinstalled, imported. No change.
(This post was last modified: 02-09-2015 04:12 PM by Seabody.)
02-09-2015 04:06 PM
Find all posts by this user Quote this message in a reply


Forum Jump: