MyBB Hacks

Full Version: XThreads
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
:/
Okay, try this, in xthreads_attach.php, find:

PHP Code:
$dbclass = 'db_'.$config['database']['type'];

add before:

PHP Code:
@include_once MYBB_ROOT.'inc/db_base.php'; // MyBB >= 1.8.4

(03-28-2015 11:09 AM)ZiNgA BuRgA Wrote: [ -> ]:/
Okay, try this, in xthreads_attach.php, find:

PHP Code:
$dbclass = 'db_'.$config['database']['type'];

add before:

PHP Code:
@include_once MYBB_ROOT.'inc/db_base.php'; // MyBB >= 1.8.4


Thank you very much!

3 days and I haven't "PHP Fatal error:  Interface 'DB_Base' not found in /inc/db_mysqli.php on line 12" error Biggrin

I have still "Unknown: failed to open stream: Permission denied in Unknown on line 0" but I think it is about another file, maybe wrong permissions.

Anyway thank you very much Yipi
Hi, I'm having another issue. Frown

I am using a textarea to accept a list of usernames in a forum. My display item format is set to the following:

PHP Code:
<setvar user>get_user_by_username({VALUE})</setvar>
<func htmlspecialchars_uni>{$tplvars['user']['username']}</func>


However, this isn't working. Nothing is displayed. I made sure to whitelist the function get_user_by_username too. Any thoughts? Smile

EDIT: Fixed.

PHP Code:
<?php

$user = get_user({VALUE});

?>

{$user['username']}

There's a problem: the whole forum will become completely blank (white) leaving no traces on what causes the error (to the viewers) when hyphens are added to the Key. Everything work again when replaced with an underscore instead.
Hello guys, thank you for this great plugin.

I instaleld 2 plugins and i don't know which one is really the culprit, the other plugin is called view unread post and my board version is upto date which is 1.8.5.

Problem is after i activated both plugin this particular piece of code  

Code:
<option value="numratings" {$sortsel['numratings']}>{$lang->sort_by_numratings}</option>


Automatically added into all my Global Templates, and because of that my forum got a little bit messed up , actually it's just the spacing.

I right clicked my main index and saw like 10instaces of the code above, ive checked index template i didnt the code there but found them alll on global templates.


So my question is does xthread has something to do with this?

<option value="numratings" {$sortsel['numratings']}>{$lang->sort_by_numratings}</option>

Thank You

(05-31-2015 04:11 PM)Seabody Wrote: [ -> ]

PHP Code:
<setvar user>get_user_by_username({VALUE})</setvar>
<func htmlspecialchars_uni>{$tplvars['user']['username']}</func>


However, this isn't working. Nothing is displayed. I made sure to whitelist the function get_user_by_username too. Any thoughts? Smile

Should be

Code:
<setvar user>get_user_by_username({VALUE}, array('fields'=>array('username')))</setvar>
<func htmlspecialchars_uni>{$tplvars['user']['username']}</func>


Your updated method also works if PHP is enabled.

(06-05-2015 10:25 AM)XPMai Wrote: [ -> ]There's a problem: the whole forum will become completely blank (white) leaving no traces on what causes the error (to the viewers) when hyphens are added to the Key. Everything work again when replaced with an underscore instead.
Gah, good catch!  Will disable hyphens in the next version.

(06-07-2015 05:22 AM)xboris2010 Wrote: [ -> ]So my question is does xthread has something to do with this?

<option value="numratings" {$sortsel['numratings']}>{$lang->sort_by_numratings}</option>

Thank You
XThreads does add that.  See here for a list of modified templates.
It adds that to the end of the template(s) on install; it doesn't bother checking what's actually in the template before doing so, so if your template is very different to what MyBB has by default, it could mess things up (such is the case with template edits in general).
It shouldn't add it multiple times though - I can't explain that unfortunately.
Updated to v1.66 - mostly just bug fixes:
  • disallow hyphens in keys as it causes a parse error (thanks to XPMai for finding)
  • implemented work around for bug in Permissions Viewer plugin (thanks to steezy for reporting)
  • fix issue with MyBB 1.8.4 and xtattachment downloads not being counted (thanks to nier3 for finding)
  • fix some issues with displaying xtattachment upload errors on MyBB 1.8
  • fix some issues with forumdisplay pagination with filtering enabled on MyBB 1.8 (thanks to Sama34 for finding)
  • removed support for the {ICON} variable for a file threadfield in the display format / templates etc.  If you still need it, it can be replicated via <?=get_attachment_icon(get_extension({FILENAME}))?>.  Its removal saves a query in MyBB 1.8x.
(06-16-2015 12:37 PM)ZiNgA BuRgA Wrote: [ -> ]Updated to v1.66 - mostly just bug fixes:
  • disallow hyphens in keys as it causes a parse error (thanks to XPMai for finding)
  • implemented work around for bug in Permissions Viewer plugin (thanks to steezy for reporting)
  • fix issue with MyBB 1.8.4 and xtattachment downloads not being counted (thanks to nier3 for finding)
  • fix some issues with displaying xtattachment upload errors on MyBB 1.8
  • fix some issues with forumdisplay pagination with filtering enabled on MyBB 1.8 (thanks to Sama34 for finding)
  • removed support for the {ICON} variable for a file threadfield in the display format / templates etc.  If you still need it, it can be replicated via <?=get_attachment_icon(get_extension({FILENAME}))?>.  Its removal saves a query in MyBB 1.8x.

thanks for the update.  is it possible to sort the forums based on a thread prefixes name rather than pid?
Unfortunately no, you'll need to adjust the prefixes so that they match the ID order.

Interestingly it looks like the way prefixes are ordered was changed in MyBB 1.8.  In 1.6, it would be ordered by ID everywhere, whilst in 1.8, it's ordered by the plaintext name.  I won't be adding support for the latter - XThreads will always order by ID regardless of the MyBB version installed.
(06-17-2015 07:05 PM)ZiNgA BuRgA Wrote: [ -> ]Unfortunately no, you'll need to adjust the prefixes so that they match the ID order.

Interestingly it looks like the way prefixes are ordered was changed in MyBB 1.8.  In 1.6, it would be ordered by ID everywhere, whilst in 1.8, it's ordered by the plaintext name.  I won't be adding support for the latter - XThreads will always order by ID regardless of the MyBB version installed.

thanks for the reply.  I'm trying to get the mybb team to add thread prefix sorting to the core system.
Reference URL's