MyBB Community Forums

Full Version: Spinner popup hardcoded #851
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
The location of the spinner image is hardcoded in thread.js (line 168), inline_edit.js (line 20). Build image url from theme image location variable set in templates instead.
I can confirm it.
I don't understand. There's no variable for the spinner in the templates (unless you're suggesting one). And the modal class uses the same image path as the JS files.

If you're suggesting a global variable, it's alright, we can do that.
I'm talking about the ones like this:
// thread.js:165
			$('#pid_' + pid).editable("xmlhttp.php?action=edit_post&do=update_post&pid=" + pid + '&my_post_key=' + my_post_key,
			{
				indicator: "<img src='images/spinner.gif'>", // <== This
				loadurl: "xmlhttp.php?action=edit_post&do=get_post&pid=" + pid,
				type: "textarea",

Which should probably be something like this:
// thread.js:165
			$('#pid_' + pid).editable("xmlhttp.php?action=edit_post&do=update_post&pid=" + pid + '&my_post_key=' + my_post_key,
			{
				indicator: "<img src='" + imagepath + "/spinner.gif'>", // <== This
				loadurl: "xmlhttp.php?action=edit_post&do=get_post&pid=" + pid,
				type: "textarea",

There are a couple of other places that kind of thing shows up, but I don't know if they're actually used (I'm on a localhost so there's nothing that takes long enough for the spinner to show).

Of course I found this on 1.7.0 so IDK if it's already been fixed.
I was thinking more of using a variable named spinnerimage which would be defined in 'headerinclude' so theme authors could change that to whatever they want.
Why cant we use the css based spinners. Most of trend now continues to be css spinners and its easy too Smile
@envira it doesn't work on all browsers AFAIK.
Hi,

Thank you for your report. We have pushed this issue to our Github repository for further analysis where you can track our commits and progress with fixing this bug. Discussions regarding this bug may also take place there too.

Follow this link to visit the issue on Github: https://github.com/mybb/mybb/issues/1012

Thanks for contributing to MyBB!

Regards,
The MyBB Group