Coomie
  • Member for 9 years, 11 months
  • Last seen more than a month ago
Blocks display in the wrong place and can't be turned off
2 votes

After nearly going insane I noticed that the module, "Context", was overriding my blocks.

View answer
Admin user can't manage fields on custom content type
Accepted answer
26 votes

I feel so stupid. But I'm leaving this answer so that the next person to have this same problem will save 3 days of development time: The module that allows fields to be created on entities (nodes, ...

View answer
Problems with Clean URLs
2 votes

Ok, alright. I'm not going to kill anyone. Turns out there was a line in my settings.php file: $GLOBALS['conf']['clean_url'] = 0; Commented it and everything worked just fine. That was 2 hours ...

View answer
How to use Form_submit hook?
3 votes

The FORM_FUNCTION_submit() function fires automatically when the form with the prefix generator function is submitted: function generate_special_form(){ // this function name is "FORM_FUNCTION" above ...

View answer
Disable Taxonomy Generated Teaser List Pages
0 votes

This is how I did it in my own module called super_security: function super_security_init(){ GLOBAL $user; if (!isset($user->roles[1])){// I want the admin to be able to see everything if (...

View answer
How do I apply different css files to different viewports with Omega subthemes?
Accepted answer
1 votes

The way I see it you've got 2 options: Option 1: Don't use multiple style sheets. You can have conditional elements in a single CSS file using CSS media queries like this: // Default styles .content ...

View answer
How can I add code that will call the javascript within a block every minute?
0 votes

Using an iframe isn't "the drupal way". The drupal way is using AJAX to reload only the block. This is the same thing that Block Refresh does. BUT... if you don't want the overhead of another ...

View answer
Dont want to redirect after registration, possible?
0 votes

If you're trying to do this in your own custom module in Drupal 7: function mymodulename_form_user_register_form_alter(){ $_REQUEST['destination'] = 'anywhere_you_want_to_go_to'; } ...

View answer
Programmatically assign user role
5 votes

This will make the default roles 4,5 and 6: function mymodule_form_user_register_form_alter(&$form, &$form_state, $form_id){ $form['account']['roles']['#default_value'][] = '4'; $form[...

View answer
Problem with jquery or jquery ui (animating color)
0 votes

It sounds like you're having a problem with your jQuery selector. Are you using changing the properties for all paragraphs? Or just a particular one? Or a class? Below are the selectors for each ...

View answer
Redirect form out of modal window after submit
0 votes

Just had the same problem, here's how I got around it. First I add a trigger in the $GLOBAL array like this: function my_module_node_presave($node){ if ($node->type == 'product'){ $GLOBALS[...

View answer
Count of nodes by type
7 votes

I did this using EntityFieldQuery. $query = new EntityFieldQuery(); $query->entityCondition('entity_type', 'node') /* this is the content type machine name */ ->entityCondition('bundle',...

View answer
Custom Fonts in Drupal
8 votes

I highly recommend Google Webfonts, as @dibs suggested. Here's the code to include the webfont into your Omega subtheme: function omega_preprocess_html(&$variables) { drupal_add_css('http://...

View answer
How to stop redirecting to newest URL after updating a node
0 votes

There's no easy way. You might have to make your own module with code something like this: function mymodule_node_presave(){ $GLOBAL['dont_redirect']=true; } function mymodule_drupal_goto_alter(&...

View answer
drupal_goto ignored in custom form submit handler
1 votes

Dave's answer works, but it just felt wrong, like wasn't "the Drupal way"... function mymodule_user_login(&$edit, $account) { $GLOBALS['reasons_to_h8_drupal']='this'; } function ...

View answer
Call to undefined function field_attach_load() on a newly migrated site
Accepted answer
1 votes

I had this same problem today and I fixed it by simply running the update script: The update script is located in the root folder of your Drupal 7 install. eg. www.mynewlymigratedtoserver.com/...

View answer