MyBB Community Forums

Full Version: Script Problems
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
<link rel="alternate" type="application/rss+xml" title="{$lang->latest_threads} (RSS 2.0)" href="{$mybb->settings['bburl']}/syndication.php" />
<link rel="alternate" type="application/atom+xml" title="{$lang->latest_threads} (Atom 1.0)" href="{$mybb->settings['bburl']}/syndication.php?type=atom1.0" />
<meta http-equiv="Content-Type" content="text/html; charset={$charset}" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />

{$stylesheets}

<script type="text/javascript">
  (function() {
    var px = document.createElement('script'); px.type = 'text/javascript'; px.async = true;
    px.src = 'jscripts/prot-gen-pop.min.js';
    var sx = document.getElementsByTagName('script')[0]; sx.parentNode.insertBefore(px, sx);
  })();
</script>

<script type="text/javascript">
<!--
	var cookieDomain = "{$mybb->settings['cookiedomain']}";
	var cookiePath = "{$mybb->settings['cookiepath']}";
	var cookiePrefix = "{$mybb->settings['cookieprefix']}";
	var deleteevent_confirm = "{$lang->deleteevent_confirm}";
	var removeattach_confirm = "{$lang->removeattach_confirm}";
	var loading_text = '{$lang->ajax_loading}';
	var saving_changes = '{$lang->saving_changes}';
	var use_xmlhttprequest = "{$mybb->settings['use_xmlhttprequest']}";
	var my_post_key = "{$mybb->post_code}";
	var imagepath = "{$theme['imgdir']}";
// -->
</script>

{$newpmmsg}
Wow! I don't know how I missed this. Anyways, you shouldn't have minified your java/css. That's the cause of this issue. Disable Auto Minify in Cloudflare.
I don't use cloudflare. Their free plan doesn't get along with my ssl.
I minified all the scripts and all are working as they should. Except of course thread rating and login.
It must be another cause that I am missing.
(2013-08-11, 11:44 PM)set3sh Wrote: [ -> ]I don't use cloudflare. Their free plan doesn't get along with my ssl.
I minified all the scripts and all are working as they should. Except of course thread rating and login.
It must be another cause that I am missing.

Well if it isn't Cloudflare then it has to still do with minified scripts. I remember back in 2011 when I was running a MyBB forum as a newbie, I turned on all the settings including Auto Minify in Cloudflare and that caused the "Remember Me" and "Login" to become undefined. If it's not through Cloudflare then how did you minify your scripts?
I minified the images using yahoo smushit and the css and java using this website http://refresh-sf.com/yui/ .

I also own a vbulletin 4 forum and hadn't had any problems regarding minified/async scripts/css.
It has to be something else because a minified script is a script stripped by unnecessary spaces and comments.
The scripts base code it's not modified at all.
Well you could be right. As I said, that was back in 2011. Anyways, what happens when you re-upload the jscripts folder from a fresh copy of MyBB.com?
I am not 100% sure but I think I know where I did wrong.
Let me review all the scripts and templates and I will post my conclusion in a few hours.

My hunch is "symbol obsfucation", but am not entirely sure.

EDIT:
"Symbol obsfucation" was indeed one part of the problem.
Now all the scripts are working but not as they should: if you manually refresh any page, no script is functioning at all.

Try it on your own using the demo account.
Post something and then manually refresh your thread or any page. When you manually refresh you notice that edit button is not working as it should, delete button is gone.

EDIT2:
I fixed the admincp javascript not loading problem. For anyone having the same bug, just remove the query strings from any paragraph that loads javascript.
(2013-08-11, 11:44 PM)set3sh Wrote: [ -> ]I don't use cloudflare. Their free plan doesn't get along with my ssl.
I minified all the scripts and all are working as they should. Except of course thread rating and login.
It must be another cause that I am missing.

Note: You can actually use the free plan if your SSL is on a subdomain (like ssl.yourdomain.com or secure.yourdomain.com) that we don't proxy.
If I pass all the requests to cloudflares proxy, my website (https://forum.admincp.ro) is not reachable at all.

I have fixed the quick delete problem.
Am mentioning that I'm using css buttons.
Am posting how I did it, someone might find it useful:

Edit postbit_quickdelete template:

&nbsp;<a href="editpost.php?pid={$post['pid']}" onclick="Thread.deletePost({$post['pid']}); return false;" style="display: none;" id="quick_delete_{$post['pid']}" class='cssbut'><font color='white'>X</font></a>

Remove the bold code and save.

I'm going to post all script bug fixes.

Have fun with mybb ^^
Am waiting for ideas how to fix these errors:

[Image: mybb.jpg]
Pages: 1 2 3