Hi Genmac,
Ajax can be done easliy, but you'd need response files like the mailinfo_*.php I placed in the root dir... those get called by xajax, and the reason is, as you indicated, that they need to be done by
define("OVERRIDE_FORCED_NAV",true);
require_once("common.php");
in that order to not break the page navigation with an update -> badnav
I have yet worked on the commentary system for that reason (thinking required)
To get xajax working, you need to do only
97 //add XAJAX mail stuff
98 if ($session['user']['prefs']['ajax']) {
99 require("mailinfo_common.php");
100 $xajax->printJavascript("lib/xajax");
101 addnav("","mailinfo_server.php");
102 }
103 //END XAJAX
this.
I assume you have.
I don't know what exactly you want to update/handle by request with xajax. So I don't know where you need to place things.
Common.php is okay, but think that some browsers (I had it) along with "parenteral guidance" stuff and/or "internet security packages" block Ajax requests - I have had ~4% of my players complaining, so I turned "auto refresh the mail counter" into a preference defaulting to 0.
Putting the require of the Ajax functions in a separate file would be a good thing =)
and then one file to handle the request, I would rather not do it in runmodule directly.
If you want to fetch new information without causing the rest of the site to change -> Ajax is a good thing to do.