Submitted by loloyd on Mon, 03/14/2016 - 06:44
Submitted by loloyd on Wed, 01/13/2016 - 07:14
- For checking a session user's role in an access-controlled data
-
//$roles_allowed_access = array("authenticated user", "administrator", "supervising manager");
$roles_allowed_access = array("administrator", "supervising manager"); //for production
//$roles_allowed_access = array("administrator"); //for debugging and testing
if (count(array_intersect($roles_allowed_access, $GLOBALS['user']->roles)) > 0 ) {
//role has passed access-control checking
} else {
//role has NOT passed access-control checking
}
- For collapsible pieces of text. Needs collapsible text module https://www.drupal.org/project/collapse_text
-
<form name="Form_Name"><fieldset class='collapse-text-fieldset collapsible collapsed'><legend><span class='fieldset-legend'>Title For Collapsible Text</span></legend><div class='fieldset-wrapper'><div class='collapse-text-text'>
Collapsible text.
</div></div></fieldset></form>
Submitted by loloyd on Tue, 10/27/2015 - 15:21
Submitted by loloyd on Tue, 10/27/2015 - 15:04
Hi and welcome to Loloy D on Drupal 7. My Internet name is Loloy D and I have set up this website to talk about my exploits and discoveries on Drupal 7. This site has been set up with the target audience of technical Drupal 7 site builders in mind. Feel free to browse around and contribute.