MyBB Hacks

Full Version: XThreads
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
(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.
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:
(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)
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 >.>
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:
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.
(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

(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).
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
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.
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.
Reference URL's