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

- 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
leefish Offline
Hamster
*****
Posts: 1,009
Joined: Apr 2010
Post: #651
RE: XThreads
Thanks Firefox Wins - I should explain what my setup on leefish IS perhaps: I have a friend with a huge VBulletin site who took pity on me whining about my crappy host and gave me some space on the dedicated server that his site runs on. He set me up a very basic access using WebMin and I have no idea how any of it works - it is not a server I would EVER practice on as it is not mine and hosts the biggest site of it's type in the world. I am terrified that I might "break" the real site.

However, I also discussed this with Pavemen and he agreed I definitely needed a staging area - FIRST upload then MOVE to forum x and on move activate the MyBB publisher activities. It was just too much happening all at once.

BUT - none of this is actually happening on leefish.nl - it is happening on blackcanvas.net which is hosted on a shared hosting plan at HawkHost.

Right now I am trying to work out how to get a user with no mod powers to set a post to unapproved via button in postbit. That will make my plan for my staging area complete.


[Image: leelink.gif]
MYBB1.6 & XThreads
(This post was last modified: 12-27-2012 01:11 PM by leefish.)
12-27-2012 01:08 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: #652
RE: XThreads
(12-27-2012 01:08 PM)leefish Wrote:  However, I also discussed this with Pavemen and he agreed I definitely needed a staging area - FIRST upload then MOVE to forum x and on move activate the MyBB publisher activities. It was just too much happening all at once.
Sounds like a horrible fudge fix which really doesn't address the underlying problem.
I see it getting tiring real fast, assuming you manage to set it up all correctly.

My Blog
12-27-2012 05:21 PM
Find all posts by this user Quote this message in a reply
leefish Offline
Hamster
*****
Posts: 1,009
Joined: Apr 2010
Post: #653
RE: XThreads
Well, I already made it for leefish (a forum where members upload their files to) - that acts as a staging area. I made it so that users could upload files and images and make their posts look pretty without having to make the forum moderated. That way they can submit the post and still edit it if they like. I don't want a load of pr0n on my board you see. They can view only their own threads and then I have the option to EITHER move the post myself or I have some users who are section moderators who still can only see their own posts and they hit a button (APPROVE ME) that moves it for them. Of course, my users on leefish are all part of another very big forum with a moderation queue that they are not allowed to bypass and so they see being able to approve it themselves as a privilege not a chore.

I made all this using XThreads and Custom Moderation Tools. MyBB Publisher has an option that it will publish on MOVE - so when it gets moved by hitting the "APPROVE ME" button then it goes live on my downloads forum and on Tumblr/Facebook but the other files etc are already loaded so no peaks. The only time I have a problem is knowing if the uploader is ready to move the files. That is why I made a plugin that sets the post to unapproved, but it stuffs up all my forum counters (my plugin). The reason I made it so that it sets things to unapproved is that I have a sort of dashboard counter thing in my header that tells me I have unapproved threads in that forum so I don't need to go check it everyday.

The thing IS - my plugin sucks (counters stuffed) and so to reset it I have to run a recount and rebuild on forum counters. That is ok on leefish as I am the only admin - but there is another admin on this board I am on, and him whining every day that the counter is bust and needs a rerun WOULD get tiring real fast. So right now, my point of delay is the informing me that the item is ready to move - the rest is done already on leefish.


[Image: leelink.gif]
MYBB1.6 & XThreads
(This post was last modified: 12-27-2012 06:33 PM by leefish.)
12-27-2012 06:33 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: #654
RE: XThreads
I wasn't aware that you actually wanted a staging area.  IMO MyBB should make it so that moderated threads are viewable to the creator, but I suppose your solution is sufficient for what you have.

My Blog
12-27-2012 07:10 PM
Find all posts by this user Quote this message in a reply
leefish Offline
Hamster
*****
Posts: 1,009
Joined: Apr 2010
Post: #655
RE: XThreads
(12-27-2012 07:10 PM)ZiNgA BuRgA Wrote:  I wasn't aware that you actually wanted a staging area.  IMO MyBB should make it so that moderated threads are viewable to the creator, but I suppose your solution is sufficient for what you have.

That would certainly help. I think there is a plugin for this - I will look for that.


[Image: leelink.gif]
MYBB1.6 & XThreads
12-27-2012 07:29 PM
Visit this user's website Find all posts by this user Quote this message in a reply
brad-t Offline
Member
***
Posts: 120
Joined: Apr 2011
Post: #656
RE: XThreads
Thanks for the great update Zinga.

I'm trying to set up a filter chain, but I'm unsure how to accomplish exactly what I would like to do.

Essentially, I want to take images of variable size and make them all fit into 150x200 thumbnails. I think that what I need to do is resize and then crop, e.g.

Take an 800x600 image and resize it to 267x200, then crop to 150x200.
In the case of a 600x1000 image, I'd resize it to 150x250, then crop it to 150x200.

Am I on the right track here? Which command should I use to resize the image at first? I'm thinking scale, but I'm not sure.
12-30-2012 06:35 AM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #657
RE: XThreads

Code:
scale_min(150,200)->crop(150,200)


My Blog
12-30-2012 08:53 AM
Find all posts by this user Quote this message in a reply
brad-t Offline
Member
***
Posts: 120
Joined: Apr 2011
Post: #658
RE: XThreads
Thanks!

So I've done this:

indexthumb=scale_min(150,200)->crop(150,200)

So this should work, yes?

Code:
<img src="{$GLOBALS['threadfields']['looks_image']['thumbs']['indexthumb']['url']}">

(This post was last modified: 12-30-2012 02:08 PM by brad-t.)
12-30-2012 01:46 PM
Find all posts by this user Quote this message in a reply
brad-t Offline
Member
***
Posts: 120
Joined: Apr 2011
Post: #659
RE: XThreads
When I submit custom thread field changes, I see this flash on the screen quickly as the page refreshes. managed to snap a pic in time.

[Image: vju81.png]

Also, is there a way to control the compression on an image when it is cropped/scaled?
(This post was last modified: 12-31-2012 04:21 PM by brad-t.)
12-31-2012 02:48 PM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #660
RE: XThreads
(12-30-2012 01:46 PM)brad-t Wrote:  So this should work, yes?
Yes.

(12-31-2012 02:48 PM)brad-t Wrote:  When I submit custom thread field changes, I see this flash on the screen quickly as the page refreshes. managed to snap a pic in time.
Thanks for finding that!
I've fixed it, although it shouldn't actually affect anything - ie everything should work as expected regardless of the error.

(12-31-2012 02:48 PM)brad-t Wrote:  Also, is there a way to control the compression on an image when it is cropped/scaled?
What do you mean by compression?

If you're referring to the JPEG compression level (this thread you made) you can append "->jpeg(0, 75)" to the chain, where 75 means 75% quality, or force a PNG conversion by appending "->png()", eg

indexthumb=scale_min(150,200)->crop(150,200)->png()

See Documentation\undoc.html for a full list of available filter functions.

My Blog
(This post was last modified: 12-31-2012 07:40 PM by ZiNgA BuRgA.)
12-31-2012 07:39 PM
Find all posts by this user Quote this message in a reply


Forum Jump: