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 Hamster.
possible bug with xthreads 1.6.4, zinga:

http://community.mybb.com/thread-161129.html

I compared some error IP addresses and times with my access logs and they seem to go back to when users hit xthreads_attach.php as noted here: http://community.mybb.com/thread-161129-...http://community.mybb.com/thread-161129-post-1134616.html#
Thanks for finding that!

Try changing xthreads_attach.php:

Find:

PHP Code:
// required by MyBB >= 1.7

Add after:

PHP Code:
		function format_time_duration($time) {
			if(!is_numeric($time)) return '-';
			// drop microseconds case - no-one really cares
			if($time < 1)
				return number_format(round((1000 * $time), 2)).' ms';
			else
				return round($time, 3).' seconds';
		}

(01-26-2015 04:11 PM)ZiNgA BuRgA Wrote: [ -> ]Thanks for finding that!

Try changing xthreads_attach.php:

Find:

PHP Code:
// required by MyBB >= 1.7

Add after:

PHP Code:
		function format_time_duration($time) {
			if(!is_numeric($time)) return '-';
			// drop microseconds case - no-one really cares
			if($time < 1)
				return number_format(round((1000 * $time), 2)).' ms';
			else
				return round($time, 3).' seconds';
		}


no problem.  I'll keep an eye on my logs and let you know if that did indeed fix the issue.
I applied this fix like 12 hours ago or so and haven't seen any errors since.

thanks again, zinga.
Next version of MyBB (1.8.4) will modify the fetch_array DB method:
https://github.com/mybb/mybb/blob/featur...https://github.com/mybb/mybb/blob/feature/inc/db_mysql

So calls of control_object that try to extend this class will need to be updated.
Zinga -- when I try to add a custom mod tool, and set it to modify a certain threadfield, the changes do not save.

ie: I have a tool. I notice I forgot to add the action (Modify custom thread field(s)), so I use that textbox to add it in. I enter the correct field and a valid value. I click "Save Changes". The text appears in the textarea. I hit "Save" at the bottom. It does not save.

I will admit, I have done some tinkering with xThreads, but I reverted all changes before this issue appeared (my code didn't work Frown ).

Edit: Redownloaded the plugin from here. Replaced all folders in the inc/xthreads directory, plus inc/plugins/xthreads.php (the only files I modified, all others are originals). No change.
http://mybbhacks.zingaburga.com/showthread.php?tid=4959

I haven't been able to reproduce the issue.  If you can figure out how from a clean install, it would be helpful.
I am sorry to have not been back to you on this; installing a clean MyBB is proving problematic right now.

I will try to get a board set up. Sorry for the delay.
I replaced all the files with fresh unaltered ones, the issue persisted. I am using 1.64 on MyBB 1.8.3.

The odd thing is, this issue was not a problem on the first installation. I set at least one custom mod tool successfully. Something -- I don't know what -- happened and now it's unable to save.

I'm using Cool Codes, NewPoints, vB Styled Quotes, xThreads, a custom plugin of mine (I know the code, it can't be conflicting), a custom plugin enabling the theme I used to use. I uninstalled/deactivated all of those plugins, no change. I deactivated and reactivated xThreads, no change. I don't think there's an option to export thread fields, so I haven't uninstalled it yet. I backed up the threadfields/threadfields_data tables, uninstalled, reinstalled, imported. No change.
Reference URL's