MyBB Hacks

Full Version: XThreads
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Thank you very much Zinga, it works pertectly! Kiss
Thanks for the fix; will it still work ok for those of us still on 1.6? I have a couple of sites not on 1.8 .
XThreads still supports MyBB 1.4.
Though if you're on 1.6, there's no much to gain from the update.
Hi Yumi, just found out that the forum list pagination for filtering threads based off xThread custom thread fields values no longer works in 1.8. The issue is in the following piece of code updated in 1.8 to take into account soft deleted posts in forumdisplay.php (deletedthreads field):

PHP Code:
		$query = $db->simple_select("forums", "threads, unapprovedthreads, deletedthreads", "fid = '{$fid}'", array('limit' => 1));
		$forum_threads = $db->fetch_array($query);
		$threadcount = $forum_threads['threads'];
		if($ismod == true)
		{
			$threadcount += $forum_threads['unapprovedthreads'] + $forum_threads['deletedthreads'];
		}


It is not as if the core fully works either anyways so not a big issue really at this point.

I haven't looked at your link, but I know that pagination links are broken due to https://github.com/mybb/mybb/issues/1785

Is this something different?
Probably related but that is meant to be already fixed. The fix I provide for the issue linked seems to work for MyBB, but not for xThreads.

xThreads fails because, from what I can tell, the query patter it search for doesn't considers deletedthreads for 1.8
Hey, it is me again. Unrelated to the above.

It seems that when previewing a post edit (editpost.php) the post-bit first post templates are not successfully hijacked. So..
  • Edit Forum Y, set prefix to blog_
  • Create blog_postbit_first_classic & blog_postbit_classic & postbit_first_classic templates. Plus the existing postbit_classic one.
  • Edit a post in that forum which is the first post of a thread (edit a thread..).
  • Preview the post.
  • Everything fine. Post-bit template matches that of the first post.
  • Try to summit the post with errors (i.e: no subject).
  • In-line error will appear, wrong post-bit template is being used. It will ignore the blog_postbit_first_classic & postbit_first_classic templates and fallback to blog_postbit_classic->postbit_classic.
(03-14-2015 07:31 AM)Sama34 Wrote: [ -> ]xThreads fails because, from what I can tell, the query patter it search for doesn't considers deletedthreads for 1.8
Oh I see.
Thanks.

(03-14-2015 09:07 PM)Sama34 Wrote: [ -> ]In-line error will appear, wrong post-bit template is being used. It will ignore the blog_postbit_first_classic & postbit_first_classic templates and fallback to blog_postbit_classic->postbit_classic.
Doesn't occur in MyBB 1.6x.  Looks like a bug in 1.8x - a preview shouldn't be generated for an invalid post.
The preview isn't even correct (lacks a post message if you just omit the subject).

PHP Code:
if(isset($mybb->input['previewpost']))

used to be (in 1.6)

PHP Code:
if($mybb->input['previewpost'])


The issue is that when the post is invalid, previewpost is explicitly set to 0 (making the isset check become true, but the old one false).

Oh for 1.8 it should probably be $mybb->gt_input('previewpost', 1) then. I suppose this was one of the mass edits to check for variables not set, one of 1.8 optimizations.
Hi, I don't know if this is a problem with Xthreads or other, but in logs of server I have often these errors:

Code:
[27-Mar-2015 12:33:41 UTC] PHP Fatal error:  Interface 'DB_Base' not found in /srv/users/serverpilot/apps/mysite/public/forum/inc/db_mysqli.php on line 12
[27-Mar-2015 12:37:24 UTC] PHP Fatal error:  Interface 'DB_Base' not found in /srv/users/serverpilot/apps/mysite/public/forum/inc/db_mysqli.php on line 12
[27-Mar-2015 12:38:49 UTC] PHP Fatal error:  Interface 'DB_Base' not found in /srv/users/serverpilot/apps/mysite/public/forum/inc/db_mysqli.php on line 12
[27-Mar-2015 12:42:21 UTC] PHP Fatal error:  Interface 'DB_Base' not found in /srv/users/serverpilot/apps/mysite/public/forum/inc/db_mysqli.php on line 12
[27-Mar-2015 12:42:59 UTC] PHP Warning:  Unknown: failed to open stream: Permission denied in Unknown on line 0
[27-Mar-2015 12:43:00 UTC] PHP Warning:  Unknown: failed to open stream: Permission denied in Unknown on line 0
[27-Mar-2015 12:47:19 UTC] PHP Warning:  Unknown: failed to open stream: Permission denied in Unknown on line 0
[27-Mar-2015 12:48:00 UTC] PHP Fatal error:  Interface 'DB_Base' not found in /srv/users/serverpilot/apps/mysite/public/forum/inc/db_mysqli.php on line 12
[27-Mar-2015 12:54:07 UTC] PHP Fatal error:  Interface 'DB_Base' not found in /srv/users/serverpilot/apps/mysite/public/forum/inc/db_mysqli.php on line 12
[27-Mar-2015 12:55:07 UTC] PHP Fatal error:  Interface 'DB_Base' not found in /srv/users/serverpilot/apps/mysite/public/forum/inc/db_mysqli.php on line 12
[27-Mar-2015 12:56:10 UTC] PHP Warning:  Unknown: failed to open stream: Permission denied in Unknown on line 0
[27-Mar-2015 12:57:18 UTC] PHP Fatal error:  Interface 'DB_Base' not found in /srv/users/serverpilot/apps/mysite/public/forum/inc/db_mysqli.php on line 12
[27-Mar-2015 12:58:48 UTC] PHP Warning:  Unknown: failed to open stream: Permission denied in Unknown on line 0
[27-Mar-2015 12:59:18 UTC] PHP Fatal error:  Interface 'DB_Base' not found in /srv/users/serverpilot/apps/mysite/public/forum/inc/db_mysqli.php on line 12
[27-Mar-2015 13:13:13 UTC] PHP Warning:  Unknown: failed to open stream: Permission denied in Unknown on line 0
[27-Mar-2015 13:13:14 UTC] PHP Warning:  Unknown: failed to open stream: Permission denied in Unknown on line 0
[27-Mar-2015 13:16:15 UTC] PHP Fatal error:  Interface 'DB_Base' not found in /srv/users/serverpilot/apps/mysite/public/forum/inc/db_mysqli.php on line 12
[27-Mar-2015 13:17:10 UTC] PHP Fatal error:  Interface 'DB_Base' not found in /srv/users/serverpilot/apps/mysite/public/forum/inc/db_mysqli.php on line 12
[27-Mar-2015 13:19:17 UTC] PHP Fatal error:  Interface 'DB_Base' not found in /srv/users/serverpilot/apps/mysite/public/forum/inc/db_mysqli.php on line 12
[27-Mar-2015 13:20:38 UTC] PHP Fatal error:  Interface 'DB_Base' not found in /srv/users/serverpilot/apps/mysite/public/forum/inc/db_mysqli.php on line 12
[27-Mar-2015 13:20:38 UTC] PHP Fatal error:  Interface 'DB_Base' not found in /srv/users/serverpilot/apps/mysite/public/forum/inc/db_mysqli.php on line 12
[27-Mar-2015 13:27:25 UTC] PHP Fatal error:  Interface 'DB_Base' not found in /srv/users/serverpilot/apps/mysite/public/forum/inc/db_mysqli.php on line 12
[27-Mar-2015 13:29:37 UTC] PHP Fatal error:  Interface 'DB_Base' not found in /srv/users/serverpilot/apps/mysite/public/forum/inc/db_mysqli.php on line 12
[27-Mar-2015 13:32:58 UTC] PHP Fatal error:  Interface 'DB_Base' not found in /srv/users/serverpilot/apps/mysite/public/forum/inc/db_mysqli.php on line 12


Xthreads is upgraded to 1.65, when I had the problem with format_time_duration($time) (resolved with the upgrade), but now I have the problem with this Interface 'DB_Base' Frown

Reference URL's