MyBB Community Forums

Full Version: Hide to Guests - Javascript/Query conflict?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi there. I saw there were similar threads back in the archives, but none of them were resolved so I thought I'd attempt to get an answer myself.

http://community.mybb.com/mods.php?action=view&pid=572

I'm attempting to use this plugin for the purpose of hiding content from anyone except someone in a staff user group. For context, it's to allow members to post private information in their character profiles that's not visible to anyone except staff so that staff can approve whatever is secret but it still remains a surprise for other members.

It works perfectly, but I'm running into a bug. Unlike the issue some other members were having my quick reply works fine - I was repeatedly posting from the quick reply from both an account that can see the hidden content and one that could not with no problems.

However, I ran into issues when trying to utilize the multiquote buttons (when trying to input the quotes into the quick reply I just got an endless loading circle) and the quick edit (the content of the quick edit just shows "loading...").

I'm assuming it's a conflict somewhere seeing I'm pretty sure both those processes run on Jquery/Javascript, but does anyone have any idea where the conflict is? I'm trying to look at the code myself, but I'm not seeing any Jquery/Javascript calls at all. It may be because I'm inexperienced still with coding though.

Thank you for any help. Or if anyone can direct me to a working plugin that does what I need it to, I'd appreciate it.

EDIT: When I view the Chrome console while attempting to open quick edit, I get this notice:

Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check http://xhr.spec.whatwg.org/. jquery.js?ver=1806
I think try another plugin. That was "converted" to 1.8, but I think that the main functions from the original plugin to do with multiquote etc were untouched. and those were lifted straight from 1.6.
@Leefish

Do you happen to know of any that do roughly the same thing? The only other ones I've found were one that hides the complete forum or thread from a usergroup (which doesn't work for what I'm trying), one that hides an entire post from guests (which I may fiddle with to see if I can get what I need), or the one that you can set a newpoint price and if the price isn't set it's hidden until the thread is replied to, which I suppose I can just make it so other members can't reply to character profiles.

I'll fiddle around, but if you have any other ideas I'd definitely appreciate them!

EDIT: It seems like the lock/sell content plugin may work pretty well seeing I can set the usergroups I need to be exempt from paying/replying. I may just have members either set stupidly high costs, or prevent people from replying to character threads.
I am afraid i dont know of another plugin for this Sad