-
☆ A M B ☆
- 24,524 Posts
I’m sure that I remember somebody giving me a shiny new DBAPI that could be used for external (AJAX) scripts. But now I can’t find it. The current one can’t be used for external scripts’ database access because it uses the modx object. Can whoever gave that to me please give it to me again (or point me to where I can get it)?
Was it index-ajax.php available in the trunk?
-
☆ A M B ☆
- 24,524 Posts
Where in the trunk? (never mind, I see it.) I’ll check it out. Thanks!
-
☆ A M B ☆
- 24,524 Posts
Ewww... that’s very cryptic.

I do hope there is some documentation for using it! Will go poking around.
-
☆ A M B ☆
- 24,524 Posts
No, that’s not what I had. The ajax processor is still using direct mysql functions. What I had was an actual dbapi, similar to the one in manager/includes/extenders. Only it could be used stand-alone; it didn’t need an instance of the parser object.
I believe the
MODxAPI Library be what ye seek. Arr.
-
☆ A M B ☆
- 24,524 Posts
-
☆ A M B ☆
- 24,524 Posts
Quote from: PaulGregory at Aug 06, 2006, 02:25 PM
I believe the MODxAPI Library be what ye seek. Arr.
No, this puppy includes, then extends, the existing parser. Way more overhead than what the average Ajax app needs. What I had was a replacement for the dbapi.mysql.class.inc.php file, basically a stand-alone wrapper for the php/mysql functions. Actually, I’m thinking that a back-end Ajax request processor needs to be fast and light, so maybe it’s better to use the raw php/mysql functions.
So you’re back to using index-ajax.php then, or is there another dbapi knocking around MODx island?
-
☆ A M B ☆
- 24,524 Posts
I’m not exactly sure how index-ajax.php works. I can see that it does validation checks on GET and POST values, and sets up the database access variables, and checks for the existance of a requested document, but I don’t understand how to use that.
Anyway, I can just make up my own external files to process the AJAX requests and return whatever is needed.