Home » MODX®

MODX Posts

Aug 25, 2010

WordPress to MODx Migration Part 3
Templates, Categories, and Postmeta

Alright, I'm back for part three of this action packed WordPress to MODx Migration mania. In part one I showed you how to use xPDO to connect to the WordPress database and import post content into MODx. In part two I demonstrated how xPDO handles table relationships by importing WordPress comments into MODx. In this part of the WordPress to MODx migration I'm going to show you how to create and assign templates, migrate categories and postmeta data. Before we start, …

Jul 06, 2010

WordPress to MODx Migration Part 2
Schema Relationships and Comments

In part 1 of this Wordpress to MODx migration I introduced you to xPDO's schema and model generators and started work on migrating wordpress post and page data into MODx. In this post I'm going to show you how I built the relationships in the wordpress schema file and how I pulled in all of wordpress's comments and kept the threading in tact. Plus the script has evolved to handle where to store pages vs posts, what to do with versions, keeping child/parent relationship…

May 20, 2010

WordPress to MODx Migration Part 1
First Impressions of xPDO

I wrote in my last post that I want to move this blog from WordPress to MODx and so I thought this would be a good real world lesson in using xPDO.  Rather than custom coding a database migration tool using plain old php like I've done in the past, I thought it would be cool to see what xPDO could do, how easy it would be, and how robust xPDO is.  I've spent 2 hours on the code below and have never used xPDO before, and so far I'm pretty impressed with what xPDO can do. …

May 13, 2010

MODxpo 2010

I feel fortunate to have spent the last two days in Dallas, TX with the greatest minds in the MODx world. MODxpo 2010 was so far above what I expected that I'm at a loss to capture everything that went on. The most awesome and most humbling aspect of the conference was the openness, honesty, and down-to-earthness of all of people that attended, including the core team. As I've written before, the MODx community is a big reason why I've stuck with it for the past 3 yea…

Dec 31, 2009

Book Review
MODx Web Development from Packt Publishing

I want to be honest with you, I've kind of been putting off writing my review of MODx Web Development from Packt Publishing. I actually finished the book about a week ago and just felt like I had to give it some distance so I didn't totally bash this book. It's not really fair to the author to just outright say that this book isn't good because they put some thought into it and worked hard. But if I would have written this post a week ago, that's all you would have he…

Oct 22, 2009

MODx Chunk Cache Plugin

I needed to cache a chunk as a file so that another application (an ecommerce store) could include that file as well. I wrote this plugin that does that: $chunks = array('StoreMenu'); // array of chunks that need to be cached foreach($chunks as $v) { $res = $modx->db->select("snippet","modx_site_htmlsnippets","name = '$v'"); if($modx->db->getRecordCount($res)) { $output = $modx->db->getValue($res); $fh = fopen($modx->config['base_path'].$v.'.html','w'); …

Oct 13, 2009

New Tool
MODx Snippet Call2PHP

I added a new tool today for MODx users that turns a MODx snippet call into a snippet call using the MODx API function runSnippet(). It's a pretty simple tool, but I made it because I hate doing this manually (it's just too tedious). Enjoy. MODx Snippet Call2PHP

Oct 12, 2009

MODx Sucks

So I was looking at my Google Webmaster Tools this morning for devtrench.com and I throught it was pretty funny to see that this site ranks #1 for "modx sucks". Just for clarity I wanted to write this post to let everyone know that my opinion is that MODx doesn't suck, but that there are few sucky aspects of MODx. In fact, I would say that MODx is the best CMS out there when you consider how easy it is for regular people (non-geeks) to use. If you've never used MODx and …

Feb 28, 2008

Things that Suck About MODx CMS

This post started out titled Pros and Cons of MODx CMS, but today I'm rewriting it because I'm really not in the mood to give you a bunch of fluff about why MODx is great and then give you the bad stuff. Flat out, I think MODx is the best CMS for my projects at this point in time. Now on with things that suck... <rant> It says its a Framework, but I use it as a CMS If you have used frameworks in the past, MODx is not going to feel like a true framework. My personal fa&#8230;

Jan 28, 2008

How To Use a MODx Plugin to Cache Snippets

I don't want to take credit for this, but I definitely wanted to blog about it because I think it is a big deal. In a forum post I made on modxcms.com, ganeshXL came up with an awesome way to cache snippet output with a MODx plugin. Here is what ganeshXL wrote: create a chunk. Leave it empty. Name it whatever you want, e.g. testMenu create a plugin. Enter this: $myChunk = 'testMenu'; // your chunk name $params['startId'] = '0'; $params['level'] = '4'; $html = addslas&#8230;

Jan 11, 2008

Automation Tip
How To Auto Set Copyright Years*

Now that it's January 2008 some of my clients are noticing that the year in their copyright statements don't reflect 2008. Now, I always set this to drop in a dynamic value, but that wasn't the case before I was hired. This is such an easy thing to set up when you are developing a site so I suggest you do it right from the start. I use 3 main types of copyright year automation... Javascript <script> <!-- y = new Date(); year = y.getFullYear(); CopyrightLine = "&#8230;

Sep 28, 2007

Never write an email form report from scratch again!

If you're a programmer you probably get the request to create a form that sends an email somewhere. Writing forms is probably the task I hate doing the most because it can be so tedious. There's the initial form creation, the validation, and finally the email template to stick the data into and send off. With MODx and eForm, the first two steps are made easier, but the last step still took me forever if the form was really long or complex. Well, on the last form I cr&#8230;

Sep 12, 2007

Auto Site Start MODx Resource Install Script

A while back I posted an sql install script that I use for MODx that I called ResourceInstaller. My plans of creating a module based around this script haven't materialized into anything yet, but the script has evolved a bit. I've renamed the sql script to AutoSiteStart because there was another project named similar to ResourceInstaller, and this script now installs more than resources. I wanted to take the time to post the sql script I'm using now since I think it s&#8230;

Jul 20, 2007

MODx "Invalid XML response from connector" error

This is an annoying error that you can get in MODx when uploading new files via the FCK Image Browser, and I've only ever seen it in the Internet Explorer browser. The fix for it is quite simple though... Open manager/media/browser/mcpuk/connectors/php/Commands/GetFileUploadProgress.php After //Progresshandler not specified, return generic response (mine is line 46) insert: header ("content-type: text/xml"); echo "< ?xml version=\"1.0\" encoding=\"utf-8\" ?>\n"; See i&#8230;

Jul 13, 2007

DynamicDescription
Brand New Meta Description Snippet for MODx

I'm releasing the first version of my new Meta Description Snippet for MODx tonight: DynamicDescription. I got this idea from the All-in-one SEO plugin for WordPress that creates a dynamic meta description for your blog posts. I just thought this would be a great addition to MODx since this is one of the hardest things to get my clients to do (no one wants to take the time to write meta data). Download the file and unzip to find the README file for instructions Please &#8230;

Jun 27, 2007

Why MODx is my CMS of choice...

I wrote a post today about why I love MODx for a web development platform, but when I finished it I thought it would be more appropriate to post it in the MODx forums rather than here. It has all of the reasons why I use MODx, and a special thanks to the developers. Please check out the full post and read about why I think MODx is the best CMS to date. If you want to try MODx out for yourself, then you can download it for free :) It's the best thing I've ever done (wel&#8230;

May 27, 2007

Better Veriword Captcha Display

Just posted this over in the MODx forum and I wanted to cross post it here too. Just for fun :) Here is the forum post: http://modxcms.com/forums/index.php/topic,15225.0.html I really like MODx I especially like how accessible the core code is when you want to make a modification. One of the things that really bugged me about MODx is how the Veriword Captcha is displayed - both the look of it and the default words used for the captcha. I really didn't want my clients&#8230;

May 25, 2007

MODx SQL template, chunk, snippet, category install script

I really needed a script that would work like a resource installer to install some basic templates, chunks, snippets, and categories that I always use when developing in MODx. This SQL script will install home page and inside page templates, a head, banner, content, and footer chunk to be used with those templates, some snippets, and some categories. This works with MODx 0.9.5. I plan on taking this basic SQL script and creating some kind of module with it in the futu&#8230;