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

- 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,437
MyBB Compatibility: 1.4.x, 1.6.x, 1.8.x
Plugin License: GPLv3
Uploader: ZiNgA BuRgA
TheStoryteller Offline
Junior Member
**
Posts: 4
Joined: May 2021
Post: #971
RE: XThreads
(05-13-2021 05:36 AM)TheStoryteller Wrote:  Hello all,

I have a question regarding xThread prefixes.

I have a code to randomly show me the mybb prefixes, title, description and author of a topic in a specific forum.

Because I do not want to use the mybb prefix function but xThreads prefix, I want to amend the code accordingly, so my 3 xThread prefixes (which are displayed as fontawesom icons) are displayed in a div container on the welcome_block templates.

I also have „php in templates“ active.

Could somebody tell me, how do I get the correct data from the database? I am absolutely new to php…

The Code I have is this:

PHP Code:
 <?php
$query = $db->query("SELECT *, t.description FROM ".TABLE_PREFIX."posts p LEFT JOIN ".TABLE_PREFIX."threads t ON (p.tid=t.tid) LEFT JOIN ".TABLE_PREFIX."forums f ON (p.fid=f.fid) LEFT JOIN ".TABLE_PREFIX."threadprefixes ON (t.pid=t.prefix) WHERE f.fid IN (27, 28, 29) AND t.visible = '1' ORDER BY RAND() LIMIT 6");
while($data = $db->fetch_array($query))
echo etc. etc.


Thank you very much and cool plugin btw Wink



EDIT: found it. it was

PHP Code:
1
2
3
4
5
6
7
<?php
$query = $db->query("SELECT *, t.description FROM ".TABLE_PREFIX."posts p LEFT JOIN ".TABLE_PREFIX."threads t ON (p.tid=t.tid) LEFT JOIN ".TABLE_PREFIX."forums f ON (p.fid=f.fid) LEFT JOIN ".TABLE_PREFIX."threadfields_data td ON (td.tid=t.tid) WHERE t.visible=1 AND f.fid IN ('27', '28','29','30') ORDER BY RAND() LIMIT 1");
while($data = $db->fetch_array($query))
            {
$prefix = $data['prefix']; 
 echo "etc. etc.";}
?>

(This post was last modified: 05-16-2021 09:24 PM by TheStoryteller.)
05-16-2021 09:24 PM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #972
RE: XThreads
(04-10-2021 04:51 PM)Sama34 Wrote:  Btw, your board doesn't support unicode emojis, I had to remove my awesome finger pointing at my awesome eagle, :cryingface:
Database encoding is still utf8 instead of utf8_mb4.
I might switch it over if I'm bored some day, but as you can probably guess, it's very low on the priority list.

(04-11-2021 08:03 AM)Sama34 Wrote:  Ugh, forgot the main point I was going to make yesterday.

Could you perhaps add support (hooks) for the attachment upload process? I would like to be able to store attachments over at some cloud service, I think some hooks around the following line should work:
https://github.com/zingaburga/XThreads-M...https://github.com/zingaburga/XThreads-MyBB-Plugin/blob/2fd64cd0e12054684a0e03ef10c8c0ec5487e3fa/Upload/inc/xthreads/xt_uploa
https://github.com/zingaburga/XThreads-M...https://github.com/zingaburga/XThreads-MyBB-Plugin/blob/2fd64cd0e12054684a0e03ef10c8c0ec5487e3fa/Upload/xthreads_attac
The system wasn't really designed for external storage in mind, but if you can get it working, feel free to submit a pull request.

(04-18-2021 04:36 PM)Sama34 Wrote:  

Code:
Fatal error: Uncaught Exception: Serialization of 'PDO' is not allowed in


I think the following affects your control_object() function.
https://github.com/mybb/mybb/pull/4193

Urgh, that's a bit ugly to deal with...
Thanks for letting me know.

My Blog
06-28-2021 04:01 PM
Find all posts by this user Quote this message in a reply
firekid Offline
Junior Member
**
Posts: 3
Joined: Jun 2021
Post: #973
RE: XThreads
using Xthread i created thread description. is it possible that some user who don't want to see thread description, can disable that xthread field?

how to increase the textbox height. there is only wide available
(This post was last modified: 06-29-2021 06:28 PM by firekid.)
06-29-2021 06:24 PM
Find all posts by this user Quote this message in a reply
Keaton Offline
Junior Member
**
Posts: 1
Joined: Jun 2021
Post: #974
RE: XThreads
Hi Zinga, everyone —

I just updated to MyBB 1.8.27. All of my custom thread fields came through without a hitch, but postbit_first is no longer replacing the first posts in my threads. I deactivated and reactivated XThreads 1.68.

I've been combing the internet for several hours now and haven't found any reference to this. Any idea of what could be happening here?

Thanks for any help!

ETA: I just previewed a first post and postbit_first loaded for that, but still isn't loading on the published page.
(This post was last modified: 06-30-2021 06:16 PM by Keaton.)
06-30-2021 05:57 PM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #975
RE: XThreads
(06-29-2021 06:24 PM)firekid Wrote:  using Xthread i created thread description. is it possible that some user who don't want to see thread description, can disable that xthread field?
XThreads doesn't provide user options - you'll need a custom modification for that.

(06-29-2021 06:24 PM)firekid Wrote:  how to increase the textbox height. there is only wide available
Field Input Height option.

(06-30-2021 05:57 PM)Keaton Wrote:  I just updated to MyBB 1.8.27. All of my custom thread fields came through without a hitch, but postbit_first is no longer replacing the first posts in my threads. I deactivated and reactivated XThreads 1.68.
There's a fix here https://github.com/zingaburga/XThreads-M...https://github.com/zingaburga/XThreads-MyBB-Plugin

My Blog
06-30-2021 10:55 PM
Find all posts by this user Quote this message in a reply
TheStoryteller Offline
Junior Member
**
Posts: 4
Joined: May 2021
Post: #976
RE: XThreads
Okay, now I have another question.
In Formatting Map List I can style my prefixes. But when I make the database query with

PHP Code:
".htmlspecialchars_uni($data['key'])."

  it shows me the plain text.

What do I need to enter instead, so my html style for the prefixes is also caught.

Thx Wink

07-18-2021 12:21 AM
Find all posts by this user Quote this message in a reply
phorumws Offline
Junior Member
**
Posts: 2
Joined: Sep 2021
Post: #977
RE: XThreads
Is this the plugin to make the 'Important' section above 'Normal' forums like on myBB.com Forum?

I'm trying to add 'Forum Rules' sticky threads that show above all other Threads in a Forum Section (these Forum Rules are different for each section), then a Have a Site Rules which  also need to be 'Global'.... and I want to add my 'Donate' thread to 'Important' also!

Will xThreads alo me to do the above, I heard somewhere this is the Plugin to setup my Forum like this...

Cheers Guys!
09-25-2021 02:46 PM
Find all posts by this user Quote this message in a reply
WINBOY Offline
Member
***
Posts: 71
Joined: Nov 2012
Post: #978
RE: XThreads
After upgrading from 1.8.24 to 1.8.29, custom thread fields disappear from thread display even all variables are present in all dld_ templates and postbit_first and postbit_first_classic templates. I had compared all templates related to xthreads with the 1.8.24 board, all are the same
On edit of the first post, there are all custom thread fields shown but on the thread, it's not shown.
Please help to fix this.
(This post was last modified: 12-12-2021 11:38 PM by WINBOY.)
12-10-2021 01:26 AM
Find all posts by this user Quote this message in a reply
WINBOY Offline
Member
***
Posts: 71
Joined: Nov 2012
Post: #979
RE: XThreads
Thanks Zinga Burga and Sama for fix.
12-15-2021 04:24 AM
Find all posts by this user Quote this message in a reply
mariusmu Offline
Junior Member
**
Posts: 1
Joined: Feb 2022
Post: #980
RE: XThreads
Dear Zinga Burga and MyBBHacks team,

I am probably one of your biggest fans, and the "XThreads" plugin is one of the most important parts of my own MyBB.

[Edit] I wanted to ask for PHP8 support, because the regular 1.68 xThreads version crashes my forum when I activate PHP8.... but now I used the GitHub version and nearly anything seems to run perfectly. Thanks so much you guys!

Do you have a donation link so I can support your amazing work, Zinga?
(This post was last modified: 01-06-2023 07:05 AM by mariusmu.)
01-06-2023 06:53 AM
Find all posts by this user Quote this message in a reply


Forum Jump: