announcements.install
Search API
- 7.x modules/announcements/announcements.install
- 6.x modules/announcements/announcements.install
- 4.x modules/announcements/announcements.install
- 5.x modules/announcements/announcements.install
File
modules/announcements/announcements.installView source
- <?php
-
- /**
- * This file should contain only hooks relating to installing, enabling, disabling, and uninstalling this module.
- *
- */
-
-
- /**
- * Hook install. Called when the module is installed on the admin modules page.
- */
- 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());
-
-
- }
-
Functions
Name | Description |
---|---|
announcements_install | Hook install. Called when the module is installed on the admin modules page. |