MyBB Community Forums

Full Version: Editing Javascript doesn't work?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm attempting to customize the reputation system to work with another system but when I attempt to edit the javascript file for the rep it doesn't seem to update on the forum even If i restart apache.

general.js file; error seems to be somewhere here.
	reputation: function(uid, pid, blog)
	{

		if(!pid)
		{
			var pid = 0;
		}

		if(!blog)
		{
			var blog = 0;
		}

		MyBB.popupWindow("/reputation.php?action=add&uid="+uid+"&pid="+pid+"&blog="+blog+"&modal=1");
	},

reputation.php
	if( $mybb->get_input( 'blog', MyBB::INPUT_INT ) ) {

		$mybb->input['pid'] = $mybb->get_input('pid', MyBB::INPUT_INT);

	} else {

		$mybb->input['pid'] = 0;

	}

The reputation file always returns pid of 0 even if the blog variable to correctly set in the url.
Moved to Plugin Support.
Restarting Apache won't do anything as javascript is all client side, either the javascript is cached or you're doing something wrong - your best bet would be to console.log out the data before you send it in the AJAX call, and print_r($_POST) in the PHP, and see which one has the incorrect value.