Create a new account
The easiest way to do what you want is to check out the CVS code, then make your template customizations directly to the checked-out files, not using the template editing tools on the website.
If you then do a "cvs update", our fixes and improvements will be added to your checked-out files, but your changes will remain intact.
(If one of our changes and your changes should happen to affect the same lines of code, CVS will warn you with a "C" in the left margin. You can grep the codebase on "<<<<" to find any conflicts that do arise, then edit the files manually and do a "cvs diff" on the edited files to make sure your final changes are sane. To give you an idea, my sites mccarthy.vg and censorware.net have a few custom templates each, and they get a conflict once every few months maybe.)
After you do a "cvs update" to get more recent CVS code, a "make install" will copy your modified templates into place in /usr/local/slash. Once that's done, run "/usr/local/slash/bin/template-tool -u yourvirtuser -tU". That will compare what's in your DB to what's on disk -- the script knows which plugins and theme your site has, and how to find the right files on disk, to do a proper comparison. It will tell you what changes it sees like this:
id 209 users;menu;default is different (template)
If that list of changes looks right, take out the "-t" option, just run it with "-U", and it will automatically apply what's on disk to your DB. Then restart slashd and apache and your changes are live.
Just for reference, here's the script I use on my test sites to copy my changes from the template files on disk, to the templates in the DB (and code changes too) (but don't just run this willy-nilly if you don't understand it, or don't have a backup :)
/bin/rm -rf /usr/local/src/slash
/bin/cp -rH $MY_SRC /usr/local/src/slash
make GROUP=nogroup && make install GROUP=nogroup
If you want to get really fancy, you can just "cp -a themes/slashcode themes/yourtheme", and then make your changes in the yourtheme directory (making sure to edit the THEME file to give it a new name)... then edit the site_info table to assign that theme to your site... CVS will be smart enough to recurse both into the themes/slashcode directory and into the themes/yourtheme directory... this not only gives you a quick way to use diff to tell what changes you've made to the stock theme, but if you are running multiple sites with custom templates, you can define a new theme for each one. Someday we'll have good documentation for all this :)
Get More Comments