Archive for the 'Programming' Category

March 6th 2008

How To Mass Create Email Addresses In cPanel

Creating a lot of email address in cPanel can be a real pain the neck considering that there is no way to create multiple email addresses at once. However, this task can be accomplished with iMacros, a macro plugin for Firefox, and a bit of php.

If you don’t have iMacros installed, get it here. Once you get that installed, here are the steps.

Create your iMacros Script

Here is where you need some php skills. You’ll need a list of your email addresses (username only), and passwords. These should be in a comma separated list like this:

jamese,sup3rs3cr3t
maxp,sh0p3rs7ar
jeremys,madsk1llz

Read on to get the php script…

Pages: 1 2 3

3 Comments »

February 28th 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 fav framework is CodeIgniter and there is just no comparison between the two. The MODx API is very poorly documented, small, and weak compared to all of the functionality included in CodeIgniter, and CodeIgniter is a simple framework. I just don’t see the structure there to really call it a framework, and I would prefer to call it a CMS with an open or pluggable architecture. When I need extensive custom database functionality I bring in CodeIgniter to do it because MODx lacks features that would make it easy (CRUD tools, a data editor, dynamic data module, etc).

Membership Management sucks
This is probably the thing I hate most about MODx. The Membership Management for Web Users and Manager Users is really difficult to work with, doesn’t fit most workflows, and is counter to how easy the rest of the system is to use. I need a member management system that allows for one manager user to manage one page if need be, and this is just a nightmare to set up with the groups and document groups system. What I really want is a system that allows me to set up roles (controls what they can do), create a user with that role, and then select individually what pages that user can edit, or what group of pages they can edit. I also want the functionality to make all pages have some kind of default level of security, like all pages can only be seen by the administrator, who can then give users permission to see specific pages (MODx is works pretty much opposite to this). IMO this has to be totally rewritten to function better.

Continue Reading »

9 Comments »

January 28th 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:

  1. create a chunk. Leave it empty. Name it whatever you want, e.g. testMenu

  2. create a plugin. Enter this:

    $myChunk = 'testMenu'; // your chunk name
    $params['startId'] = ‘0′;
    $params['level'] = ‘4′;
    $html = addslashes($modx->runSnippet(’Wayfinder’, $params));
    $sql= “UPDATE ” . $modx->getFullTableName(”site_htmlsnippets”) . ” SET snippet=’$html’ WHERE name=’$myChunk’”;
    $result= $modx->dbQuery($sql);

  3. Check the system event OnDocFormSave + save the plugin.
  4. Change your template: Replace your Wayfinder call with your chunk: {{testMenu}}

Now, every time you edit a doc, the Menu code is being regenerated and stored in your chunk. This should speed up things quite a bit..

This is really cool since it means that you can cache snippet output and give php and mysql a break on processing your code. Like I said, all the credit goes to ganeshXL :) If you’re interested in the context that this was created in, you can read the full post here.

2 Comments »

« Prev - Next »