Skip to content

Instantly share code, notes, and snippets.

@timkelty
Created June 7, 2009 19:49
Show Gist options
  • Save timkelty/125457 to your computer and use it in GitHub Desktop.
Save timkelty/125457 to your computer and use it in GitHub Desktop.
# get rid of template groups
TRUNCATE TABLE exp_template_groups;
INSERT INTO exp_template_groups
(group_name, group_order, is_site_default)
VALUES
('pages', '1', 'y'),
('global', '2', 'n'),
('forms', '3', 'n');
# get rid of templates
TRUNCATE TABLE exp_templates;
INSERT INTO exp_templates
(group_id, template_name)
VALUES
('1', 'index'),
('1', '404'),
('2', 'index'),
('2', '_snippet'),
('2', '_admin_bar'),
('2', '_header_top'),
('2', '_header_bottom'),
('2', '_footer'),
('3', 'index');
# better html buttons
TRUNCATE TABLE exp_html_buttons;
INSERT INTO exp_html_buttons
(tag_name, tag_open, tag_close, accesskey, tag_order)
VALUES
('h2', '<h2>', '</h2>', '2', 1),
('h3', '<h3>', '</h3>', '3', 2),
('em', '<em>', '</em>', 'i', 3),
('strong', '<strong>', '</strong>', 'b', 4);
# no categories please
TRUNCATE TABLE exp_category_posts;
TRUNCATE TABLE exp_categories;
TRUNCATE TABLE exp_category_groups;
TRUNCATE TABLE exp_category_field_data;
# no weblog entries please
TRUNCATE TABLE exp_weblog_titles;
TRUNCATE TABLE exp_weblog_data;
TRUNCATE TABLE exp_weblog_fields;
# default field grouos
TRUNCATE TABLE exp_field_groups;
INSERT INTO exp_field_groups
(group_id, site_id, group_name)
VALUES
('1', '1', 'Gypsy Fields'),
('2', '1', 'Pages'),
('3', '1', 'Snippets');
# default fields
ALTER TABLE exp_weblog_data DROP field_id_2, DROP field_ft_2, DROP field_id_3, DROP field_ft_3;
INSERT INTO exp_weblog_fields
(group_id, field_name, field_label, field_instructions, field_type, field_ta_rows, field_required, field_search, field_fmt, field_show_fmt, field_order)
VALUES
(1, 'cf_gypsy_order', 'Order', '','text', 6, 'n', 'n', 'none', 'n', 100),
(2, 'cf_pages_title', 'Page Title', 'The title that will be displayed on the site.', 'text', 6, 'y', 'y', 'none', 'y', 10),
(2, 'cf_pages_content', 'Page Content', '','textarea', 30, 'n', 'y', 'textile', 'y', 20),
(2, 'cf_pages_html_head', 'Code for HTML &lt;head&gt;', '','textarea', 6, 'n', 'n', 'none', 'n', 30),
(3, 'cf_snippet_content', 'Snippet Content', '', 'textarea', 30, 'y', 'y', 'textile', 'y', 10);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment