Does it allow installation of custom Template Variables and Templates? The ability to create your own install that includes all the chunks, snippets, modules, and plugins you use was wonderful, but along with that are usually a bunch of template variables. For now we just upload a base database as it were that includes all of these.
Neither TVs nor site content are implemented as .tpl files on the FS. They likely won’t be for 1.0.3. Templates are now handled though.
Ryan Thrash, MODX Co-Founder
Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
I’m getting some odd configuration warnings in the latest:
Configuration warning: ’GD and/or Zip PHP extensions not found’
I have
’--with-gd’ ’--with-zlib’ ’--with-freetype’ ’--enable-gd-native-ttf’ ’--with-bz2’
What else does it want?
Turns out MAMP doesn’t come with zip; you have to recompile php with it.
Will have to try that. My MAMP loyalty only goes so far
How are you handling the assignment of the TVs to their respective templates? I just added this to SkinGraft, but that’s only with one template being installed:
$i_sql = "UPDATE $ttab SET templatename='$n',description='$d',content='$c',folder='$f',preview='$p' WHERE templatename='$n'";
}
$modx->db->query($i_sql) or die($modx->db->getLastError());
$tid = $modx->db->getInsertId(); //sottwell
...
$modx->db->query("INSERT INTO $tvtab $into VALUES $tvvals") or die($modx->db->getLastError()); //sottwell
$tvid = $modx->db->getInsertId();
$fields = array('tmplvarid'=>$tvid, 'templateid'=>$tid); //sottwell
$modx->db->insert($fields,$tvttab) or die($modx->db->getLastError()); //sottwell
Zip is for the file manager I believe.
Yeah, the unzip feature in the File Manager doesn’t work. I’m playing around with the notion of allowing gzip or bz2 instead; the snag I’ve run into is that these don’t appear to work recursively with directories; you have to combine them with tar, which is a system call and probably won’t work on most shared hosting. But I’ve only begun to research the question, and using PHP with zip enabled is a lot more likely Or just not use that feature of File Manager; a snippet/module writer can work around it. The SkinGraft module comes with its own copy of a PHP zip library.