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
nier3 Offline
Member
***
Posts: 125
Joined: Jul 2012
Post: #811
RE: XThreads
Thank you very much Zinga, it works pertectly! Kiss
02-19-2015 02:34 AM
Find all posts by this user Quote this message in a reply
leefish Offline
Hamster
*****
Posts: 1,009
Joined: Apr 2010
Post: #812
RE: XThreads
Thanks for the fix; will it still work ok for those of us still on 1.6? I have a couple of sites not on 1.8 .


[Image: leelink.gif]
MYBB1.6 & XThreads
02-19-2015 04:43 AM
Visit this user's website Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #813
RE: XThreads
XThreads still supports MyBB 1.4.
Though if you're on 1.6, there's no much to gain from the update.

My Blog
02-19-2015 08:21 AM
Find all posts by this user Quote this message in a reply
Sama34 Offline
Senior Member
****
Posts: 490
Joined: May 2011
Post: #814
RE: XThreads
Hi Yumi, just found out that the forum list pagination for filtering threads based off xThread custom thread fields values no longer works in 1.8. The issue is in the following piece of code updated in 1.8 to take into account soft deleted posts in forumdisplay.php (deletedthreads field):

PHP Code:
1
2
3
4
5
6
7
		$query = $db->simple_select("forums", "threads, unapprovedthreads, deletedthreads", "fid = '{$fid}'", array('limit' => 1));
		$forum_threads = $db->fetch_array($query);
		$threadcount = $forum_threads['threads'];
		if($ismod == true)
		{
			$threadcount += $forum_threads['unapprovedthreads'] + $forum_threads['deletedthreads'];
		}


It is not as if the core fully works either anyways so not a big issue really at this point.


Support PM's will be ignored. Yipi
Plugins: Announcement Bars - Custom Reputation - Mark PM As Unread
03-12-2015 02:35 PM
Visit this user's website Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #815
RE: XThreads
I haven't looked at your link, but I know that pagination links are broken due to https://github.com/mybb/mybb/issues/1785

Is this something different?

My Blog
03-13-2015 11:02 AM
Find all posts by this user Quote this message in a reply
Sama34 Offline
Senior Member
****
Posts: 490
Joined: May 2011
Post: #816
RE: XThreads
Probably related but that is meant to be already fixed. The fix I provide for the issue linked seems to work for MyBB, but not for xThreads.

xThreads fails because, from what I can tell, the query patter it search for doesn't considers deletedthreads for 1.8

Support PM's will be ignored. Yipi
Plugins: Announcement Bars - Custom Reputation - Mark PM As Unread
03-14-2015 07:31 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Sama34 Offline
Senior Member
****
Posts: 490
Joined: May 2011
Post: #817
RE: XThreads
Hey, it is me again. Unrelated to the above.

It seems that when previewing a post edit (editpost.php) the post-bit first post templates are not successfully hijacked. So..
  • Edit Forum Y, set prefix to blog_
  • Create blog_postbit_first_classic & blog_postbit_classic & postbit_first_classic templates. Plus the existing postbit_classic one.
  • Edit a post in that forum which is the first post of a thread (edit a thread..).
  • Preview the post.
  • Everything fine. Post-bit template matches that of the first post.
  • Try to summit the post with errors (i.e: no subject).
  • In-line error will appear, wrong post-bit template is being used. It will ignore the blog_postbit_first_classic & postbit_first_classic templates and fallback to blog_postbit_classic->postbit_classic.

Support PM's will be ignored. Yipi
Plugins: Announcement Bars - Custom Reputation - Mark PM As Unread
(This post was last modified: 03-14-2015 09:08 PM by Sama34.)
03-14-2015 09:07 PM
Visit this user's website Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #818
RE: XThreads
(03-14-2015 07:31 AM)Sama34 Wrote:  xThreads fails because, from what I can tell, the query patter it search for doesn't considers deletedthreads for 1.8
Oh I see.
Thanks.

(03-14-2015 09:07 PM)Sama34 Wrote:  In-line error will appear, wrong post-bit template is being used. It will ignore the blog_postbit_first_classic & postbit_first_classic templates and fallback to blog_postbit_classic->postbit_classic.
Doesn't occur in MyBB 1.6x.  Looks like a bug in 1.8x - a preview shouldn't be generated for an invalid post.
The preview isn't even correct (lacks a post message if you just omit the subject).

PHP Code:
if(isset($mybb->input['previewpost']))

used to be (in 1.6)

PHP Code:
if($mybb->input['previewpost'])


The issue is that when the post is invalid, previewpost is explicitly set to 0 (making the isset check become true, but the old one false).


My Blog
03-15-2015 04:57 PM
Find all posts by this user Quote this message in a reply
Sama34 Offline
Senior Member
****
Posts: 490
Joined: May 2011
Post: #819
RE: XThreads
Oh for 1.8 it should probably be $mybb->gt_input('previewpost', 1) then. I suppose this was one of the mass edits to check for variables not set, one of 1.8 optimizations.

Support PM's will be ignored. Yipi
Plugins: Announcement Bars - Custom Reputation - Mark PM As Unread
03-16-2015 11:10 AM
Visit this user's website Find all posts by this user Quote this message in a reply
nier3 Offline
Member
***
Posts: 125
Joined: Jul 2012
Post: #820
RE: XThreads
Hi, I don't know if this is a problem with Xthreads or other, but in logs of server I have often these errors:

Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
[27-Mar-2015 12:33:41 UTC] PHP Fatal error:  Interface 'DB_Base' not found in /srv/users/serverpilot/apps/mysite/public/forum/inc/db_mysqli.php on line 12
[27-Mar-2015 12:37:24 UTC] PHP Fatal error:  Interface 'DB_Base' not found in /srv/users/serverpilot/apps/mysite/public/forum/inc/db_mysqli.php on line 12
[27-Mar-2015 12:38:49 UTC] PHP Fatal error:  Interface 'DB_Base' not found in /srv/users/serverpilot/apps/mysite/public/forum/inc/db_mysqli.php on line 12
[27-Mar-2015 12:42:21 UTC] PHP Fatal error:  Interface 'DB_Base' not found in /srv/users/serverpilot/apps/mysite/public/forum/inc/db_mysqli.php on line 12
[27-Mar-2015 12:42:59 UTC] PHP Warning:  Unknown: failed to open stream: Permission denied in Unknown on line 0
[27-Mar-2015 12:43:00 UTC] PHP Warning:  Unknown: failed to open stream: Permission denied in Unknown on line 0
[27-Mar-2015 12:47:19 UTC] PHP Warning:  Unknown: failed to open stream: Permission denied in Unknown on line 0
[27-Mar-2015 12:48:00 UTC] PHP Fatal error:  Interface 'DB_Base' not found in /srv/users/serverpilot/apps/mysite/public/forum/inc/db_mysqli.php on line 12
[27-Mar-2015 12:54:07 UTC] PHP Fatal error:  Interface 'DB_Base' not found in /srv/users/serverpilot/apps/mysite/public/forum/inc/db_mysqli.php on line 12
[27-Mar-2015 12:55:07 UTC] PHP Fatal error:  Interface 'DB_Base' not found in /srv/users/serverpilot/apps/mysite/public/forum/inc/db_mysqli.php on line 12
[27-Mar-2015 12:56:10 UTC] PHP Warning:  Unknown: failed to open stream: Permission denied in Unknown on line 0
[27-Mar-2015 12:57:18 UTC] PHP Fatal error:  Interface 'DB_Base' not found in /srv/users/serverpilot/apps/mysite/public/forum/inc/db_mysqli.php on line 12
[27-Mar-2015 12:58:48 UTC] PHP Warning:  Unknown: failed to open stream: Permission denied in Unknown on line 0
[27-Mar-2015 12:59:18 UTC] PHP Fatal error:  Interface 'DB_Base' not found in /srv/users/serverpilot/apps/mysite/public/forum/inc/db_mysqli.php on line 12
[27-Mar-2015 13:13:13 UTC] PHP Warning:  Unknown: failed to open stream: Permission denied in Unknown on line 0
[27-Mar-2015 13:13:14 UTC] PHP Warning:  Unknown: failed to open stream: Permission denied in Unknown on line 0
[27-Mar-2015 13:16:15 UTC] PHP Fatal error:  Interface 'DB_Base' not found in /srv/users/serverpilot/apps/mysite/public/forum/inc/db_mysqli.php on line 12
[27-Mar-2015 13:17:10 UTC] PHP Fatal error:  Interface 'DB_Base' not found in /srv/users/serverpilot/apps/mysite/public/forum/inc/db_mysqli.php on line 12
[27-Mar-2015 13:19:17 UTC] PHP Fatal error:  Interface 'DB_Base' not found in /srv/users/serverpilot/apps/mysite/public/forum/inc/db_mysqli.php on line 12
[27-Mar-2015 13:20:38 UTC] PHP Fatal error:  Interface 'DB_Base' not found in /srv/users/serverpilot/apps/mysite/public/forum/inc/db_mysqli.php on line 12
[27-Mar-2015 13:20:38 UTC] PHP Fatal error:  Interface 'DB_Base' not found in /srv/users/serverpilot/apps/mysite/public/forum/inc/db_mysqli.php on line 12
[27-Mar-2015 13:27:25 UTC] PHP Fatal error:  Interface 'DB_Base' not found in /srv/users/serverpilot/apps/mysite/public/forum/inc/db_mysqli.php on line 12
[27-Mar-2015 13:29:37 UTC] PHP Fatal error:  Interface 'DB_Base' not found in /srv/users/serverpilot/apps/mysite/public/forum/inc/db_mysqli.php on line 12
[27-Mar-2015 13:32:58 UTC] PHP Fatal error:  Interface 'DB_Base' not found in /srv/users/serverpilot/apps/mysite/public/forum/inc/db_mysqli.php on line 12


Xthreads is upgraded to 1.65, when I had the problem with format_time_duration($time) (resolved with the upgrade), but now I have the problem with this Interface 'DB_Base' Frown

03-28-2015 06:19 AM
Find all posts by this user Quote this message in a reply


Forum Jump: