function filter_install() db_sqlapi_install('filter') -- Add input formats. db_query("INSERT INTO {filter_formats} (name, roles, cache) VALUES ('Filtered HTML', ',1,2,', 1)"); db_query("INSERT INTO {filter_formats} (name, roles, cache) VALUES ('Full HTML', '', 1)"); -- Filtered HTML: -- URL filter. db_query("INSERT INTO {filters} (format, module, delta, weight) VALUES (1, 'filter', 2, 0)"); -- HTML filter. db_query("INSERT INTO {filters} (format, module, delta, weight) VALUES (1, 'filter', 0, 1)"); -- Line break filter. db_query("INSERT INTO {filters} (format, module, delta, weight) VALUES (1, 'filter', 1, 2)"); -- HTML corrector filter. db_query("INSERT INTO {filters} (format, module, delta, weight) VALUES (1, 'filter', 3, 10)"); -- Full HTML: -- URL filter. db_query("INSERT INTO {filters} (format, module, delta, weight) VALUES (2, 'filter', 2, 0)"); -- Line break filter. db_query("INSERT INTO {filters} (format, module, delta, weight) VALUES (2, 'filter', 1, 1)"); -- HTML corrector filter. db_query("INSERT INTO {filters} (format, module, delta, weight) VALUES (1, 'filter', 3, 10)"); end function filter_schema() return { ['filters'] = { ['fields'] = { ['fid'] = {['type'] = 'serial', ['not null'] = true}, ['format'] = {['type'] = 'int', ['not null'] = true, ['default'] = 0}, ['module'] = {['type'] = 'varchar', ['length'] = 64, ['not null'] = true, ['default'] = ''}, ['delta'] = {['type'] = 'int', ['not null'] = true, ['default'] = 0, ['size'] = 'tiny'}, ['weight'] = {['type'] = 'int', ['not null'] = true, ['default'] = 0, ['size'] = 'tiny'}}, ['primary key'] = {'fid'}, ['indexes'] = { ['weight'] = {'weight'}}}, ['filter_formats'] = { ['fields'] = { ['format'] = {['type'] = 'serial', ['not null'] = true}, ['name'] = {['type'] = 'varchar', ['length'] = 255, ['not null'] = true, ['default'] = ''}, ['roles'] = {['type'] = 'varchar', ['length'] = 255, ['not null'] = true, ['default'] = ''}, ['cache'] = {['type'] = 'int', ['not null'] = true, ['default'] = 0, ['size'] = 'tiny'}}, ['unique keys'] = { ['name'] = {'name'}}, ['primary key'] = {'format'}}, ['cache_filter'] = { ['fields'] = { ['cid'] = {['type'] = 'varchar', ['length'] = 255, ['not null'] = true, ['default'] = ''}, ['data'] = {['type'] = 'text', ['not null'] = '', ['size'] = 'big'}, ['expire'] = {['type'] = 'int', ['not null'] = true, ['default'] = 0}, ['created'] = {['type'] = 'int', ['not null'] = true, ['default'] = 0}, ['headers'] = {['type'] = 'text', ['not null'] = ''}, ['serialized'] = {['type'] = 'int', ['size'] = 'small', ['not null'] = true, ['default'] = 0}}, ['indexes'] = { ['expire'] = {'expire'}}, ['primary key'] = {'cid'}}} end