-
☆ A M B ☆
- 24,524 Posts
Couldn’t that be made into a plugin?
Quite possibly. I haven’t looked at what it would take to make a plugin. I’m not sure at what point the first part (the part that goes into the index.php file) stops working (all I know is it errored out in a snippet). I would be happy to check out the docs on writing a plugin and seeing what would be necessary. I’ll also look up what other Wordpress variables might need to be globalized and post them here.
-
☆ A M B ☆
- 24,524 Posts
It looks like you would just take those lines of code, put them in a plugin, and then choose the appropriate event to use (I still tend to end up with a lot of trial-and-error there, as I still haven’t totally gotten a handle on which event is activated where!); at least it would most definitely be one of the events in the first section, such as onDocumentLoad or something.
I do something similar for the (will be actually finished someday

) ShopX app; I use a plugin to grab all the GET and / or POST values from the page load and put them into arrays in the SESSION, just to be double-sure the values are all available in one place for the snippets to work with later in the document parsing process.
-
MODX Staff
- 12,272 Posts
Event documentation is definitely lacking and something that needs to be gone through with a fine-toothed comb to document all the various places events fire code.
Ryan Thrash, MODX Co-Founder
Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
I’m wondering if any headway has been made with this? I have a Wordpress blog that I have been running for 2 years and would like to either run it inside a new modx site or do a complete import of the wordpress data if that is possible.
This thread looked like the most promising but is also very old.
Hopefully hear from someone.
Alan
Loving modx but hating too... is that a love hate thing or what?
The stuff that I posted here was pretty much as far as I got. It should work for you for the most part. I walked away from MODx shortly after this. Its a really nice system but there were enough problems that I figured I’d let it mature a little before I used it any more. I wasn’t able to get any "good" integration, but if you do those includes you should have a functional loop (you can add to the include if you come up with more variables that you need access too, I think I had 3 or 4 when I was done).
I would also be willing to take a look at it again if I had someone to chat about it with.
Hi there, thanks for getting back to me.
This has been a bit of a back burner creeping up on me but is getting closer, I am up for looking into this with you if you like however I would have to admit that I am no expert when it comes to the *guts* of wordpress. Wordpress is a complex beast but beautiful at what it does, I just have a need for more which is why I am heading towards ModX.
Cheers... oh, and I will keep logging in now as I have plenty to be working on with ModX at the moment.
Loving modx but hating too... is that a love hate thing or what?
All this code does is allow you to use the loop to display posts in a MODx. Are you trying to do more than that? Do you have an example of where you’ve tried this and it hasn’t worked? Do you have test site setup? I can set one up otherwise.