MyBB Community Forums

Full Version: xThreads & MentionMe connect?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

I'd love to know if its possible to link MentionMe and xThreads; I have a field where the poster can write the names of other members, to 'tag' them in the thread. At the moment, this doesn't do anything except list their name.

I would really love it if it would use the MentionMe, to cause an @Name link

Is this possible without too much hassle?

Thank you kindly!



Some images, to show what I'm trying to say:

[Image: 60b05e8dfe1e4f3a15e547fabb628987.png]
[Image: ad3405397804ec73a2b71142a00999d7.png]
[Image: 4cc4edb2dc7ed1f6269fa7b1ad2690fe.png]
The participants field is the “thread tags” label? Doesn’t parsing the field work?

Which plugin are you using for tagging? Do you have PHP or enabled in xThreads?
I didn't even think to look at the various custom settings in the xThreads -__-' Thanks for waking me up!

It works perfectly for parsing once I enabled the MyBB Parser (MyCodes) option. Though it doesn't auto populate or offer suggestions, which would be very nifty if it did.

I'm using MentionMe which offers suggestions when the @ symbol is used. Just not in the participants input section.
Does MentionMe offers auto complete feature or do you use a plugin for it?
https://community.mybb.com/thread-173199.html
Hi Omar, it completes automatically without needing an additional plugin
Open file /mybb/jscripts/MentionMe/autocomplete.js.

Find:
			$shoutbox = $('.panel > form > input[class="text"]');

Replace to ("users" here is your custom thread field key, "'.xthreads_inputrow input[name="xthreads_users"]' is based on a fresh install of both MyBB and xThreads"):
			$shoutbox = $('.panel > form > input[class="text"]'),
			$xt_custom_field = $('.xthreads_inputrow input[name="xthreads_users"]');

Find:
		if ($shoutbox.length) {
			$shoutbox.prop("id", "dvz_shoutbox_input");
			new TextareaInterface("dvz_shoutbox_input");
		}

Add after:
		if ($xt_custom_field.length) {
			$xt_custom_field.prop("id", "xthreads_mentions_input");
			new TextareaInterface("xthreads_mentions_input");
		}

Also, note that you might need to apply almost identical but probably slightly different changes if you are using the minified version of the JavaScript file.
Hi Omar!

Thanks for the response; for some reason, its not working for me. I've tried hard refreshing etc but its not auto completing.

I didn't think the xThreads have been modified, but I guess perhaps they have been somewhere?

You did help me out with the xThreads and Threadlog over here but I didn't think any of that touched the actual xthread files.
I would need access to an account which can create threads using that thread field.
One alternative would be the following (very similar to the above).

Edit the custom thread field. Locate the Use Custom Input HTML setting and set to Yes.

In the new text area add an ID element to the HTML <input /> tag. Like so:
<input type="text" class="textbox"{NAME_PROP}{MAXLEN_PROP}{WIDTH_PROP_SIZE}{TABINDEX_PROP}{REQUIRED_PROP} value="{VALUE}" id="xthreads_custom_field_mentions" />

Open file /mybb/jscripts/MentionMe/autocomplete.js.

Find:
			$shoutbox = $('.panel > form > input[class="text"]');

Replace to:
			$shoutbox = $('.panel > form > input[class="text"]'),
			$xt_custom_field = $('#xthreads_custom_field_mentions');

Find:
		if ($shoutbox.length) {
			$shoutbox.prop("id", "dvz_shoutbox_input");
			new TextareaInterface("dvz_shoutbox_input");
		}

Add after:
		if ($xt_custom_field.length) {
			new TextareaInterface("xthreads_custom_field_mentions");
		}

Basically we are directly assigning an ID, instead of a more dynamic select of the element which probably failed for you.
Hi Omar!

Thanks! It works now! Big Grin

[Image: a8c3b7ad1aa6c73e3e08b9e9915360e9.png]