function announcements_install

7.x announcements.install announcements_install()
6.x announcements.install announcements_install()
4.x announcements.install announcements_install()
5.x announcements.install announcements_install()

Hook install. Called when the module is installed on the admin modules page.

File

modules/announcements/announcements.install, line 12

Code

function announcements_install() {
  // Install a default announcement when first run.
  $body = '<p>This is a sample announcement! You may add new announcements (or delete this one) from the Admin Console, then Content.</p>';
  db_query("INSERT INTO content (user_id, type, title, body, settings, posted, updated)
            VALUES ('1', 'announcement', 'Sample Announcement', '?', '?', '?', '?') 
            ", $body, 'a:1:{s:10:"visibility";s:6:"public";}', time(), time());


}