-
MODX Staff
- 12,272 Posts
What type of feedback are you looking for?
Ryan Thrash, MODX Co-Founder
Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
I haven’t test the code yet, so anybody willing to do this for me will be great. There might be some problem with the code as well, because I haven’t run this yet, but if someone could point that out for me, that will save me a lot of time.
Right now I’m working on having a user interface for this, build on top of this class. So before using the API, if it’s being improved, it will be a lot faster for me to do the rest of the front user interface administration page.
Thanks Ryan
-
MODX Staff
- 12,272 Posts
Ehhh... what all spefically should it allow us to do?
Ryan Thrash, MODX Co-Founder
Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
Excuse my lack of knowledge on this, but could you extend the document parser class (at least that’s where I think those functions are) and use the insert, update, delete etc. within a user management class?
### Sorry Wendy, I just started reading the class file, you are using $modx->dbquery etc. I wasn’t sure if that would work without extending the class... (just learning php).
"Adversus solem ne loquitor." -don’t speak against the sun (don’t waste your time arguing the obvious) Something I sometimes need to be reminded of.
Yep, good guess. You won’t be able to use this class without running it inside MODx system.Basically $modx is a public variable, it’s not declared inside a class or function I believe. So if you call this as a snippet/module/plugin inside MODx, then global $modx will actually return the one from modx. So this class can be use on those three form.
FYI, I might need to start creating my library classes, but for this class I do really need to use the invoke event to enabled plugin compatibility on MODx. (Time to take a note on that)
Thanks for clarifying it for other users zatoichi. (are you from Japan?)
Quote from: Djamoer at Feb 07, 2006, 08:27 AM
Thanks for clarifying it for other users zatoichi. (are you from Japan?)
Nope. I just really like Shintarô Katsu as the Blind Swordsman, Zatoichi.
http://www.imdb.com/title/tt0202152/
"Adversus solem ne loquitor." -don’t speak against the sun (don’t waste your time arguing the obvious) Something I sometimes need to be reminded of.
-
☆ A M B ☆
- 24,524 Posts
If you want to use it in an external script, you just need to define the mode, include the /manager/includes/config.inc.php file, then the manager/includes/document.parser.class.inc.php file, then create a new instance of $modx, $modx = new DocumentParser(). See the root index.php file for an example of this. Then you have access to all of the $modx variables and functions, as well as the SESSION variable..
define("IN_PARSER_MODE", "true"); // or IN_MANAGER MODE if it's an addon for the manager
include_once "manager/includes/config.inc.php";
startCMSSession();
include_once($base_path."/manager/includes/document.parser.class.inc.php");
$modx = new DocumentParser;