Искать  
 
   
 
чистим чистую инсталляцию ExpressionEngine
Отправлено: 20 Март 2008 12:44 P.M.   [ Игнорировать ]
Администратор
RankRankRankRank
Всего сообщений:  1354
Зарегистрирован  2008-01-02

Во время инсталляции EE,  создаются веблоги по умолчанию, темплейты, категории и множество другого, в чем многие, создающие проект с 0 вовсе не нуждаются.  Ниже приведена sql код, который позволит:

  * Удалит все группы шаблонов и создать только одну - home
  * Удалить все шаблоны и создать только один для группы Home - index
  * Удалить все html кнопки и создать h2, h3, strong and em;
  * Удалить все категории и группы категорий
  * Удалить все weblog записи
  * Удалить все поля weblog (за исключением одного)

# get rid of template groups
TRUNCATE TABLE exp_template_groups;
INSERT INTO exp_template_groups (group_id,site_id,group_name,group_order,is_site_default,is_user_blogVALUES (NULL,'1','home','1','y','n');

# get rid of templates
TRUNCATE TABLE exp_templates;
INSERT INTO exp_templates (template_id,site_id,group_id,template_name,save_template_file,template_type,template_data,template_notes,edit_date,cache,refresh,no_auth_bounce,enable_http_auth,allow_php,php_parse_location,hitsVALUES (NULL,'1','1','index','n','webpage','','','0','n','','','n','n','o','');

# better html buttons
TRUNCATE TABLE exp_html_buttons;
INSERT INTO exp_html_buttons VALUES (110'strong''<strong>''</strong>''b'4'1');
INSERT INTO exp_html_buttons VALUES (210'em''<em>''</em>''i'3'1');
INSERT INTO exp_html_buttons VALUES (310'h3''<h3>''</h3>''3'2'1');
INSERT INTO exp_html_buttons VALUES (410'h2''<h2>''</h2>''2'1'1');

# 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;

# just one weblog field
INSERT INTO exp_weblog_fields VALUES (111'body''Body''''textarea''''n'00'blog'0'date''desc'0100'n''ltr''y''n''xhtml''y'1);
ALTER TABLE exp_weblog_data DROP field_id_2DROP field_ft_2DROP field_id_3DROP field_ft_3

оригинал

 Подпись 

booooring…

Профиль