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
Greig Offline
Junior Member
**
Posts: 16
Joined: Nov 2015
Post: #881
RE: XThreads
Is there a way to stop new replies having the custom thread field? I only want it for the first post.

EDIT: I installed Template Conditionals and used this:

Code:
<if $postcounter == 1 then>
{$GLOBALS['threadfields']['forum_link']}
</if>


It seems to be working, but just wondering if it's ok to use?


Forum Lair: http://www.forumlair.com
The exciting hybrid community!
(This post was last modified: 11-20-2015 12:29 PM by Greig.)
11-20-2015 12:09 PM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #882
RE: XThreads
It should be OK.
Note that you can use conditionals in the Display Format setting of each custom thread fields.
Also XThreads supports for creating postbit_first_* if you want the first post to be styled in a very different style.
Based on the Display Order of each custom thread fields applied in a forum, you can put the thread fields value to other thread fields that has higher display order.

For example:

Thread Fields 1 (Display Order: 1):
Title: Website Name
Key: wn
Display Format:

Code:
{VALUE}


Thread Fields 2 (Display Order: 2):
Title: Website URL
Key: wurl
Display Format:

HTML Code
<a href="{VALUE}" target="_blank" title="{$GLOBALS['threadfields']['wn']}">{$GLOBALS['threadfields']['wn']}</a>

{VALUE} refers to the Website URL (wurl) and {$GLOBALS['threadfields']['wn']} refers to the Website Name (wn -the value of the first thread field).


11-21-2015 01:37 AM
Find all posts by this user Quote this message in a reply
Gstone Offline
Member
***
Posts: 55
Joined: May 2012
Post: #883
RE: XThreads
Just wanted to thank you guys again for providing all this stuff. I just upgraded my server from PHP 5.3 (I know, it took a while) to 5.5 and am still on MyBB 1.6.8. All I needed to do to get everything working again was download the latest versions of the plugins here and upload them. Smooth! I don't really plan on updating MyBB any time soon, so being able to still use these plugins on older versions and newer alike is like a godsend.
12-05-2015 07:45 AM
Find all posts by this user Quote this message in a reply
Sama34 Offline
Senior Member
****
Posts: 490
Joined: May 2011
Post: #884
RE: XThreads
Hi, I created a file field that allows images only, set the following as the Image Thumbnail Generation value:

Code:
88x66|160x120|320x240=scale_max(320,240)->copy(newXTImg()->loadimage('images/playfulland_v3/pixel-logo.png')->scale(120,90),-2,-2)


Files are correctly uploaded to the server with the following names:
file_2_eaecba45_monster_jpg.160x120.thumb
file_2_eaecba45_monster_jpg.320x240.thumb
file_2_eaecba45_monster_jpg.88x66.thumb
file_2_eaecba45_monster_jpg.upload

Though the image link is correctly generated as ./xthreads_attach.php?file=2_1449778966_5258e46e/44833aea44667d56d5969d30c23d6b60/monster.jpg the image is not visible anyways.


Support PM's will be ignored. Yipi
Plugins: Announcement Bars - Custom Reputation - Mark PM As Unread
12-11-2015 04:19 PM
Visit this user's website Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #885
RE: XThreads
Similar to this?
http://mybbhacks.zingaburga.com/showthre...http://mybbhacks.zingaburga.com/showthread.php?tid=372&pid=87
http://mybbhacks.zingaburga.com/showthre...http://mybbhacks.zingaburga.com/showthread.php?tid=372&pid=87

12-12-2015 12:55 AM
Find all posts by this user Quote this message in a reply
Sama34 Offline
Senior Member
****
Posts: 490
Joined: May 2011
Post: #886
RE: XThreads
I don't believe that is the issue, as at least modifying those values doesn't helps. I did modify the XTHREADS_ATTACH_USE_QUERY value with and without ARCHIVE_QUERY_STRINGS defined and it did not help.

Support PM's will be ignored. Yipi
Plugins: Announcement Bars - Custom Reputation - Mark PM As Unread
12-12-2015 06:17 AM
Visit this user's website Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #887
RE: XThreads
Is it even not displayed by using this direct URL?
(12-11-2015 04:19 PM)Sama34 Wrote:  ./xthreads_attach.php?file=2_1449778966_5258e46e/44833aea44667d56d5969d30c23d6b60/monster.jpg

12-12-2015 06:54 AM
Find all posts by this user Quote this message in a reply
Sama34 Offline
Senior Member
****
Posts: 490
Joined: May 2011
Post: #888
RE: XThreads
It is not. Not either directly accessing any of the other generated links modifying the settings mentioned previously. A blank page is displayed in all cases.

Support PM's will be ignored. Yipi
Plugins: Announcement Bars - Custom Reputation - Mark PM As Unread
(This post was last modified: 12-12-2015 08:08 AM by Sama34.)
12-12-2015 08:07 AM
Visit this user's website Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #889
RE: XThreads
Did you try to rebuild the xtattachments? Does it happen to all XThreads attachments? Match the generated URL to values saved on your xtattachments table.

12-13-2015 01:50 AM
Find all posts by this user Quote this message in a reply
Sama34 Offline
Senior Member
****
Posts: 490
Joined: May 2011
Post: #890
RE: XThreads
This is the data in the DB:

Code:
aid	downloads	tid	uid	field		posthash				filename		uploadmime	filesize	attachname				indir		md5hash					uploadtime	updatetime	thumbs	
1		0	228	1	review_cover	901bbe38be5f48fdefb735aee2128a43	review_movie_madmax.jpg	image/jpeg	389597		16b96aa8_review_movie_madmax_jpg.upload	ts_1434/	028b459df8314833b2f2d278662b0920	1434415750	1434415750	a:4:{s:4:"orig";a:3:{s:1:"w";i:1100;s:1:"h";i:1630;s:4:"type";i:2;}s:5:"88x66";a:4:{s:1:"w";d:45;s:1:"h";i:66;s:4:"type";i:2;s:4:"file";s:59:"ts_1434/file_1_16b96aa8_review_movie_madmax_jpg.88x66.thumb";}s:7:"160x120";a:4:{s:1:"w";d:81;s:1:"h";i:120;s:4:"type";i:2;s:4:"file";s:61:"ts_1434/file_1_16b96aa8_review_movie_madmax_jpg.160x120.thumb";}s:7:"320x240";a:4:{s:1:"w";d:162;s:1:"h";i:240;s:4:"type";i:2;s:4:"file";s:61:"ts_1434/file_1_16b96aa8_review_movie_madmax_jpg.320x240.thumb";}}


And this is the full link path:

Code:
./xthreads_attach.php?file=1_1434415750_1b61bce3|028b459df8314833b2f2d278662b0920|review_movie_madmax.jpg


Everything seems correct to me and yes I did rebuild the attachments after every try.

I have two boards, script versions seem to vary so I will try to figure out if this is a script issue.


Support PM's will be ignored. Yipi
Plugins: Announcement Bars - Custom Reputation - Mark PM As Unread
(This post was last modified: 12-13-2015 07:53 AM by Sama34.)
12-13-2015 07:27 AM
Visit this user's website Find all posts by this user Quote this message in a reply


Forum Jump: