function ed_readmore_install in Read More Link (Drupal 6 and earlier) 6.5
Same name and namespace in other branches
- 5 ed_readmore.install \ed_readmore_install()
- 6.2 ed_readmore.install \ed_readmore_install()
- 6.3 ed_readmore.install \ed_readmore_install()
Implementation of hook_install().
Sets the module weight to make ed_readmore run later than most other modules. This prevents a conflict over the value of $node->readmore when used together with excerpt.module.
File
- ./
ed_readmore.install, line 15 - Install file.
Code
function ed_readmore_install() {
$ret = db_query("UPDATE {system} SET weight = 5 WHERE name = 'ed_readmore'");
if ($ret) {
drupal_set_message(t('Read More link module installed successfully.'));
}
else {
drupal_set_message(t('Read More link module installation was unsuccessful. Could not update module weight in database.'), 'error');
}
}