- Accessing Oracle from PHP
- CSS tricks explained
- Conditional fields
- Drupal tips
- Installing Drupal
- Autologout when closing browser
- Block visibility depending on node type
- Editor instead of a text box
- Event calendar
- Hosting provider requirements
- Images
- Increasing upload and memory limit
- Meta tags
- Modifying the maintenance page
- Other fields besides title and body
- Permissions
- Second level primary links block
- Signup form using CCK
- Sticky table header
- Theme issues
- Translations
- Upload progress
- Useful modules
- Video uploads
- HTML / XML code
- PNG hack for IE5/6
To add permissions, use hook_perm() in your module:
function mymodule_perm() {
return array('access something special');
}
This will appear in Drupal's permissions list, so you can specify which roles should have this permission. You can check if the current user has this permission like this:
if (user_access('access something special')) {
// Do something special
}
|
|||