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

- 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,448
MyBB Compatibility: 1.4.x, 1.6.x, 1.8.x
Plugin License: GPLv3
Uploader: ZiNgA BuRgA
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #381
RE: XThreads
(04-28-2011 02:09 PM)jim7777 Wrote:  those images that are uploaded via xthreads (the file upload type which only allows images)
XThreads does send cache headers.  MyBB's attachment system sends no-cache headers.  So I'm not too sure what your tool is saying.
Does it appear cached?  For example, try a big image which would take a while to load - after it's loaded, when you reload the page, does it load faster?

(04-28-2011 02:09 PM)jim7777 Wrote:  oh 1 question, if a thread is deleted, is the Xthread files included in that thread will be deleted too??
The additional thread field data is deleted when the thread is deleted, yes.

My Blog
04-28-2011 04:29 PM
Find all posts by this user Quote this message in a reply
jim7777 Offline
Junior Member
**
Posts: 41
Joined: Nov 2010
Post: #382
RE: XThreads
for now it loads faster 'cause i set a cache in the htaccess, but before that, it just reloads again

oh is there any problem with the new file?
'cause some files are giving 404 errors D:
well i only found 2 files in my forum sending 404 errors, the others doesn't give 404 errors though

EDit:
i found the problem
the plugin parses the link's %20 instead of changing those "%20"s to underscores Frown which will result the file not being found even though the file exists in the directory and in the database
Shikamaru%20Nara%20by%20NeilC%20?%20Shin-Orojin.rar
would parse
Shikamaru Nara by NeilC ? Shin-Orojin.rar.upload
instead of
Shikamaru_Nara_by_NeilC__Shin-Orojin.rar.upload

i hope you got me xD

edit:
i think its not about the file you have given to me earlier 'cause i try reverting it to the one included (1.42) seems still the same, disabling each and every plugin 1 by 1, still the same

what is happening Oh

OK I FOUND IT OUT
XThreads is giving error when the file name has the "&" char on it Frown please fix that 'cause instead of parsing that char, it returns the "?" char
wherein the upload filename doesn't contain any "&" sign which will return 404 D:, i suggest removing the "&" sign when looking for the upload file name or include it in the upload file name D:
(This post was last modified: 04-28-2011 08:53 PM by jim7777.)
04-28-2011 05:36 PM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #383
RE: XThreads
(04-28-2011 05:36 PM)jim7777 Wrote:  EDit:
i found the problem
the plugin parses the link's %20 instead of changing those "%20"s to underscores Frown which will result the file not being found even though the file exists in the directory and in the database
Shikamaru%20Nara%20by%20NeilC%20?%20Shin-Orojin.rar
would parse
Shikamaru Nara by NeilC ? Shin-Orojin.rar.upload
instead of
Shikamaru_Nara_by_NeilC__Shin-Orojin.rar.upload

i hope you got me xD
%20 should never become an underscore.
Are you trying to manually place files on the server?

(04-28-2011 05:36 PM)jim7777 Wrote:  OK I FOUND IT OUT
XThreads is giving error when the file name has the "&" char on it Frown please fix that 'cause instead of parsing that char, it returns the "?" char
wherein the upload filename doesn't contain any "&" sign which will return 404 D:, i suggest removing the "&" sign when looking for the upload file name or include it in the upload file name D:
I have a suspicion that it isn't a & char.
Files with & in them work fine here - example: http://mybbhacks.zingaburga.com/showthread.php?tid=825
My guess is:
1. You're trying to manually place files on the server?  (if so, I recommend using the admindrop feature of XThreads instead)
2. It's not a &, but a unicode variant of it.  You're copy+pasting it somewhere which doesn't support unicode, which converts it to a ? character.  BTW, unicode characters seem to work fine too.  I can only really say this with the UTF-8 encoding (MyBB is screwy without it anyway)

My Blog
04-28-2011 09:31 PM
Find all posts by this user Quote this message in a reply
jim7777 Offline
Junior Member
**
Posts: 41
Joined: Nov 2010
Post: #384
RE: XThreads
oh yeah i'm bad at explaining

well, it isn't uploaded manually
from the database, the upload filename is "SomeIdHere_Shikamaru_Nara_by_NeilC__Shin-Orojin.rar.upload" the same what is uploaded in the FTP which is "SomeIdHere_Shikamaru_Nara_by_NeilC__Shin-Orojin.rar.upload" still without &
without the char "&"
but the filename does contain the ampersand sign (&) in the database too, i manually edited the filename in the database and i remove the ampersand and it works now..
i don't know why i know what %20 are spaces ryt?
i really wonder, i try uploading the file here and it works, but it doesn't work on my forum Frown
and another note, i notice that here, you can upload from a URL, but from my forum, i can't do that D:

i tried it again and it seems its really 404 on my forum D:
http://wc3gv.tk/boards/Thread-test-resource here's the link
i pm'ed you a test account, you could try to dl from there

yeah, i checked it again closely and it seems the "&" sign in the link is being changed with "?" sign or being redirected to the link with the changed "&" sign

edit:
i tried re-downloading 1.42 version and nothing happen >.>
(This post was last modified: 04-29-2011 04:24 PM by jim7777.)
04-29-2011 04:07 PM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #385
RE: XThreads
Thanks for the test account.

(04-29-2011 04:07 PM)jim7777 Wrote:  well, it isn't uploaded manually
Ah, okay.

(04-29-2011 04:07 PM)jim7777 Wrote:  yeah, i checked it again closely and it seems the "&" sign in the link is being changed with "?" sign or being redirected to the link with the changed "&" sign
That's what appears to be happening.
Possibly something to do with your nginx/.htaccess setup, because XThreads does not send 301 redirects.

Request:

Code:
GET /boards/xthreads_attach.php/647_1304057989_03ccd888/647b083c283c917d0ce8348cfd6e3b32/Name%20%26%20Name.rar HTTP/1.1
Host: wc3gv.tk
...

Response:

Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
HTTP/1.1 301 Moved Permanently
Server: nginx/0.7.67
Date: Fri, 29 Apr 2011 08:49:52 GMT
Content-Type: text/html; charset=iso-8859-1
Connection: keep-alive
Location: http://wc3gv.tk/boards/xthreads_attach.php/647_1304057989_03ccd888/647b083c283c917d0ce8348cfd6e3b32/Name%20?%20Name.rar
Cache-Control: max-age=1
Expires: Fri, 29 Apr 2011 08:49:53 GMT
Content-Length: 327

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="http://wc3gv.tk/boards/xthreads_attach.php/647_1304057989_03ccd888/647b083c283c917d0ce8348cfd6e3b32/Name%20?%20Name.rar">here</a>.</p>
</body></html>

Note the "Location:" header above - your webserver is redirecting the user to a URL with a ? in it.
I'm not sure why nginx would do that - possibly check your configuration.

Alternatively, XThreads has an "internal" workaround for servers that don't handle these well - open your cache/xthreads.php, find:

PHP Code:
define('XTHREADS_ATTACH_USE_QUERY', 0);

In the above line, change the 0 to a 1.

Thanks again for the login details - that really helped Smile

(04-29-2011 04:07 PM)jim7777 Wrote:  i really wonder, i try uploading the file here and it works, but it doesn't work on my forum Frown
and another note, i notice that here, you can upload from a URL, but from my forum, i can't do that D:
Does the MyBB version check feature in the AdminCP work?
Also try using a remote (URL) avatar and see if it checks the size/dimensions of it properly.
Maybe your server config has remote fetching disabled.


Hope that helps.

My Blog
04-29-2011 06:48 PM
Find all posts by this user Quote this message in a reply
jim7777 Offline
Junior Member
**
Posts: 41
Joined: Nov 2010
Post: #386
RE: XThreads
(04-29-2011 06:48 PM)ZiNgA BuRgA Wrote:  Does the MyBB version check feature in the AdminCP work?
Also try using a remote (URL) avatar and see if it checks the size/dimensions of it properly.
Maybe your server config has remote fetching disabled.

Hope that helps.

everything you said works D:

ok i think the 301 is with google seo again .. DAMN EPIC
here's what is written on my htaccess

Code:
# Google SEO workaround for search.php highlights:
# Make this rule the first rewrite rule in your .htaccess!
RewriteRule ^([^&]*)&(.*)$ http://wc3gv.tk/boards/$1?$2 [L,QSA,R=301]

i comment it out and it superbly duper works xD

well i think xthreads is having a great problem with google seo xD,even though the plugin is disabled, htaccess edits are still working

thanks for the help

edit:
oh can i suggest that xthreads_attach.php can be served from a subdomain? like changing the path/location of the file to another folder?
i checked the file and it seems that i only need to target it to global.php and edit some lines in the plugin file D:
well i haven't tested it out though 'cause i like the images to be served from a cookie less domain/subdomain , yeah, its also from google's page speed plugin D:, i'm really into my web's speed ryt nao

(This post was last modified: 04-29-2011 08:23 PM by jim7777.)
04-29-2011 08:14 PM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #387
RE: XThreads
(04-29-2011 08:14 PM)jim7777 Wrote:  ok i think the 301 is with google seo again .. DAMN EPIC
here's what is written on my htaccess

Code:
# Google SEO workaround for search.php highlights:
# Make this rule the first rewrite rule in your .htaccess!
RewriteRule ^([^&]*)&(.*)$ http://wc3gv.tk/boards/$1?$2 [L,QSA,R=301]

i comment it out and it superbly duper works xD

well i think xthreads is having a great problem with google seo xD,even though the plugin is disabled, htaccess edits are still working

Thanks for finding the source.
I'm not too sure what the above line is trying to achieve, but I haven't really used Google SEO.
There's something I could investigate on a little though.

(04-29-2011 08:14 PM)jim7777 Wrote:  edit:
oh can i suggest that xthreads_attach.php can be served from a subdomain? like changing the path/location of the file to another folder?
i checked the file and it seems that i only need to target it to global.php and edit some lines in the plugin file D:
well i haven't tested it out though 'cause i like the images to be served from a cookie less domain/subdomain , yeah, its also from google's page speed plugin D:, i'm really into my web's speed ryt nao
Serving from a subdomain will actually make things slower - it's only useful for sites receiving lots of traffic, where you'd offload static content to a separate server to take some load off the primary server.  If you don't have multiple servers, then this really doesn't apply to you - rather, you'll get all the negative aspects of a separate domain (additional DNS request required, and possibility on not being able to reuse the keep-alive connection).

Anyway, to answer your question, the file doesn't refer to global.php unless you've enabled LOAD_SESSION.  You'll need to edit MYBB_ROOT to point to the correct folder.  You also may need to double check that it can find where the uploads are stored (check your "uploads directory" MyBB setting and consider setting it to an absolute path if it isn't already).

My Blog
04-30-2011 04:51 PM
Find all posts by this user Quote this message in a reply
leefish Offline
Hamster
*****
Posts: 1,009
Joined: Apr 2010
Post: #388
RE: XThreads
Hi ZingaBurga,

I am busy making a set of plugins etc for my downloads system (it runs on XThreads) and I am still stumped on how to use the tf_filter options on a custom page.

My plan was set up a page and call the images and threadfields from all my various downloads forums (I have 5) so they could be on one page(s). I originally was going to use a modified portal and call the downloads as portal announcements but hit a bit of a block for using the filters.

You did mention the possibility of extending the portal functionality to allow the use of the tf_filters on the portal and I wondered if that was something you would add to Xthreads? Or advise me how to go about it using the tf_filters in a custom page set up.

I did ask RateU on this topic as well, his answer (and it was very close to what I wanted) was here:

http://mybbhacks.zingaburga.com/showthre...http://mybbhacks.zingaburga.com/showthread.php?tid=615&pid=50

Also, here is a vid of the latest stages of my stats set up with graphs :  http://screencast.com/t/nXEXWbiJ


[Image: leelink.gif]
MYBB1.6 & XThreads
(This post was last modified: 05-12-2011 09:49 AM by leefish.)
05-12-2011 09:47 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: #389
RE: XThreads
I did say that, but I don't think I'll do it any more.
There's a slight difficulty with forums with different sets of thread fields.

But if you want to do it yourself, it's just a matter of modifying the query which pulls all the threads.  Add to the WHERE clause your additional filters.

My Blog
05-12-2011 11:21 AM
Find all posts by this user Quote this message in a reply
leefish Offline
Hamster
*****
Posts: 1,009
Joined: Apr 2010
Post: #390
RE: XThreads
Ok, thank you. I will have a go at that, see what I come up with. Will I still be able to use the filters like in the forum display or would that require more files to be included? If so, which ones?

Example of what I mean:  http://www.leefish.nl/mybb/forum-7.html

All my download forums are using the same set of fields - its just the themes and so on that they keep separate. All the download forums are pretty much on one template set.


[Image: leelink.gif]
MYBB1.6 & XThreads
(This post was last modified: 05-12-2011 01:20 PM by leefish.)
05-12-2011 01:18 PM
Visit this user's website Find all posts by this user Quote this message in a reply


Forum Jump: