MyBB Hacks

Full Version: Custom Moderation Tools
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
MyBB version:1.8.3   Xthreads version :1.6.3

I am trying to add a custom moderation tool that sets a custom thread value.

I am able to make the thread tool, but the value for the XThreads field does not "stick".

What I do:

I make a custom tool.
I go to Modify Custom Thread Field(s)
I click on the area and get a popup.
I select the field from the list and enter my values i
   in this case it is

xtfeature_threads=1

Press save, the tool says saved successfully. Go to edit tool and Modify Custom Thread Field(s) area is empty.

This custom thread field  is set up so:

Title: Display To Portal?
Key: xtfeature_threads
Applicable Forums: some forums
Input Field Type: Listbox
Field Input Height: 1
Values List :
Code:
1{|}Yes
2{|}No
Editable by / Required Field? : Administrators
Allow Filtering: Yes

The field works as intended if I edit from inside the post, but the custom mod tool does not. Is this a bug or am I doing something wrong?
offtopic but i have to say this
Leefish you are awesome!!!
Try XThreads 1.6.4

It seems to work here on that.
Ok, I did that. I did not get the notice in the plugins area to upgrade my XThreads though, and I still cant make it stick. It isn't a clean install though, and its not a possibility right now to run a clean install.

EDIT:  Something odd in that set up - not sure what. I tested on another forum (that one was upgraded from 1.6) and it works. On my other forum (installed as 1.8.1) it doesn't. They all have pretty much the same plugins as well.
Okay, you mention that when you modify the moderator tool, it doesn't seem to save?
Do you get any Javascript errors on the edit modtool page?  Maybe try a Ctrl+F5.
It saves fine when I press save (if you see what I mean) - its just when I return to the mod thread tool page the value is empty. I do have that advanced reply plugin enabled on that board. I shall try without that being on.

No difference. Its just absurd Frown
Update: It seems - and this is really odd - that the FIRST custom thread tool the xthreads info saves and is there when you reopen it. Those made after it - it does not stick. I just tested this on a clean install.
Dunno, you might need to debug the xthreads_admin_modtool_commit function (in inc/xthreads/xt_admin.php) to see if it's committing changes on your install.
I shall try. Are you saying that you don't see this issue on the mod tools?

What I see:

First mod tool - the xthreads info is added and saved - when reopening the custom thread tools info from Xthreads is there.

Additional mod tools - the info is added - seems to save - but when the thread tool is reopened the custom info is not there.
(01-14-2015 03:31 PM)leefish Wrote: [ -> ]Are you saying that you don't see this issue on the mod tools?
I can't reproduce, and I can't really see a likely case in the code where this would occur.
The closest I could think of is that your second modtool might be saving stuff to the first one (ie overwriting whatever's there).

If you could post a step by step guide from a clean installation, I could try following it to see what you see.

Sorry for the late response by the way.
Reference URL's