/[drupal]/contributions/modules/teaserbytype/teaserbytype.install
ViewVC logotype

Contents of /contributions/modules/teaserbytype/teaserbytype.install

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download) (as text)
Sun Apr 13 13:36:19 2008 UTC (19 months, 2 weeks ago) by joachim
Branch: MAIN
CVS Tags: DRUPAL-6--1-0, HEAD
File MIME type: text/x-php
Initial commit to the repository.
1 <?php
2 // $Id$
3
4 /**
5 * Implementation of hook_install().
6 * Display a welcome message with link to get started.
7 */
8 function teaserbytype_install() {
9 drupal_set_message(t('Teaser by Content Type is now installed. Further information is on the <a href="@our-help-page">help page</a>.',
10 array( '@our-help-page' => url('admin/help/teaserbytype') )
11 ));
12 }
13
14 /**
15 * Implementation of hook_uninstall().
16 * Remove the persistent variables this module created.
17 */
18 function teaserbytype_uninstall() {
19 // remove all variables we created
20 // note: potential for cruft here,
21 // as if the user installs a content type-providing module,
22 // then sets the teaser length for it
23 // then uninstalls that module,
24 // then uninstalls this,
25 // the variable for that now defunct content type still exists here
26 // suggestions on how to cleanly fix this welcome
27 // as killing /teaser_length_.+/ seems overkill
28 $types = node_get_types();
29 foreach ($types as $type => $value) {
30 variable_del("teaser_length_$type");
31 }
32 }

  ViewVC Help
Powered by ViewVC 1.1.2