All Questions

3
votes
1answer
608 views

The theme is broken when I enable the “Optimize CSS files” option

The theme I made is broken, when I enable the "Optimize CSS files" option. I have cleared the cache, but the theme still doesn't work. With Firefox and Internet Explorer it is OK, but with Google ...
7
votes
2answers
12k views

Why can't I disable or enable the block cache?

In the admin/settings/performance page, I (the administrator) cannot enable or disable the block cache. Why?
2
votes
1answer
76 views

How to write a view of a user signed up nodes?

There is a content-type (event) with signup enabled. I want to show, on a user profile, the events this user has already signed up. I am having several frustrations with the signup relations and ...
4
votes
2answers
424 views

Single SQL query to pull recent two nodes from each node type

As mentioned in the title, I was wondering how this can be achieved with single SQL query. All I need is the node ID from node table that matches the given criteria.
2
votes
1answer
1k views

Views2 Handlers: Fatal Error Class 'views_handler_field' not found

I am working on a module and want exposing some fields to Views and provide some custom filters. But I can't extend any Views classes without drawing a fatal error. My code looks something like this. ...
3
votes
2answers
555 views

usage of theme_more_link in zen template.php

I have tried to change the text in the 'Read more' link by putting: function myzen_more_link($url, $title) { watchdog("template.php","myzen_more_link"); return '<div class="more-link">' . ...
2
votes
2answers
1k views

Preprocessing a front page block causes errors on other pages: why?

I'm currently working through self-set tasks to learn Views and pre-processing in Drupal 7. I've created an unformatted view which creates a list of images (which are linked to a content-type but it ...
12
votes
4answers
2k views

How to speed up Batch API Operations?

I've run into this both with 3rd party contrib modules as well as some of my own operations. I'm curious at the various ways to speed up my/contrib batch operations? Assume they work with nodes (...
3
votes
1answer
225 views

Field api - taking responsibility over a field display

I am writing a Drupal module that deals with the taxonomy terms, which are (as I understand) fields, taxonomy vocabulary , which are as I understand entities. My module should take over the taxonomy ...
3
votes
1answer
123 views

Does drush fire hook_exit()

I am trying to write my own drush command. I have a hunch that something is not quite working right. I can't see documentation saying whether drush fires hook_exit() Anyone know this?
4
votes
2answers
2k views

MSSql or SQL Server Wrapper for custom module?

I'm writing a custom module and I need to access data that is currently stored in an MSSql database. It would be great if I could use the built-in database abstraction layer, but obviously that isn't ...
2
votes
1answer
321 views

Serving CSS, images and JavaScript in Drupal

Does the whole Drupal stack get fired up (bootstrapped) each time one of these static content types gets requested?
5
votes
2answers
4k views

Why does the page callback have two arguments?

function menufun_menu() { $items['menufun/%/bar/baz'] = array( 'title' => 'Hi', 'page callback' => 'menufun_hello', 'page arguments' => array(1), // The matched wildcard. '...
9
votes
3answers
6k views

Allow users to submit content that is approved before it is published

I want to allow users to submit the content to my site, but the content must be first approved, and then it can be published. Is there a module that do this? Which code should I write for such module,...
4
votes
1answer
2k views

How to test a MySQL connection

How can I test for active MySQL connections? I am trying to move one site to windows platform, and MySQL connections are failing; db_query() returns FALSE. I am not sure how to use drupal_test_mysqli()...
2
votes
3answers
479 views

Block that shows nodes based on node type

I want to create a module that displays nodes of a certain node type. Can this be done, and can anyone point me to a place where I can find how to do this?
2
votes
1answer
1k views

Altering the “Status report” page

The hosting provider I user for my site disabled the phpinfo() function and, as consequence, the link that would normally appear in the status report page is not anymore shown, replaced by a warning ...
2
votes
1answer
531 views

Is the “access” table removed during upgrade?

When a site is upgraded from Drupal 6 to Drupal 7 (or any higher version), do the update hooks remove the access table? I am developing a module that could import the content of that table, and I ...
4
votes
3answers
5k views

How do I hide the main menu items?

I have users who are the owners of some nodes, and each node has a menu link in the main menu. Users can only see the nodes they own, and they cannot see other user's nodes. The problem now is that ...
2
votes
2answers
2k views

Altering a URL alias without using a module

Is there a way to alter a URL alias without using a module? Somebody told me to write a record into database table, but I don't know how to do it.
2
votes
3answers
402 views

Alternative themed forms for a single custom content type

On a site I would like a "quick entry" form for a custom content type on the front page, while also keeping the "normal" non-customized "node/add/mycontenttype" form. I'm able to customize the "normal"...
7
votes
4answers
6k views

How to embed username and password in a URL?

We have a form that users need to fill out, but it is accessible only to authenticated users. We want to send a mass email to all users with an username and a password embedded in an URL, so that ...
8
votes
5answers
2k views

Restricting block changes

How can you let an editor edit the text in a block, but not make other configuration changes, as moving the block from one region to another?
2
votes
1answer
721 views

Dynamic ordering of views based on argument

I'm sure this is possible, I'm just looking for some advice on the best way to approach it. Here's the situation: We have some English content. If the user is in Australia, we want to show them all ...
1
vote
2answers
1k views

Email-only subscription form with mailchimp module?

I have a mailing list in MailChimp and I recently installed the mailchimp module in my Drupal 6.0 site. The subscribe form for anonymous users has first name and last name input elements, as well as ...
3
votes
2answers
2k views

Menu Management

I am trying to make menu management easy for my clients in Drupal 7. How can I make it so that clients can move links on the menu but cannot delete the top level menu? For example, if the top level ...
3
votes
6answers
2k views

Oauth and Facebook

Is there a way to make users auto register to a Drupal site if they are logged in to Facebook? I know Drupal for Facebook and Facebook - Auth but they are using tables, and not user profiles.
7
votes
1answer
165 views

When posting OG content, how to choose only from Content Author's Groups?

When a user is editing/creating a node, there is a field where the user can choose what groups to post the content to. I want this field to list only groups the user is actually a member of. Is there ...
3
votes
2answers
1k views

How to do taxonomy based css styling using template.php?

I'm looking forward to implement taxonomy terms based CSS styling; especially for the body tag which I want to add the current terms. Here is what I have so far: function _phptemplate_variables($...
8
votes
2answers
20k views

How to create node reference fields in Drupal 7?

I am puzzled. This was a very valuable option in D6 CCK, but since it moved into core, I can't find the option to create a noderef field (found a term reference field, though). I know it must be out ...
1
vote
2answers
3k views

Get content type with PHP from database

I have created a content Type Student, I have imported the list of student with node import. Now I want to get the name, location and other values of the content type Student from my database. How can ...
2
votes
1answer
144 views

Documentation for the API exposed from Pressflow

Reading How do Pressflow Drupal sites handle user Cookies? I discovered that Pressflow 6 has a function that is not present in Drupal 6, but that is defined in Drupal 7; although, the code used by ...
13
votes
5answers
10k views

Is it possible to dynamically set Views' pager settings?

Say for instance, you have a view that displays when viewing a certain node type, but you want the pager settings to be different for each individual node. I was thinking of making a CCK field like "...
4
votes
2answers
3k views

Multiple values in creating a new field instance

This is the code I actually have: $instance = array( 'field_name' => FIELD_PROJECT_TAGS, 'entity_type' => 'node', 'label' => $vocabulary->name, 'bundle' => '...
2
votes
1answer
2k views

Add comments to Webform Submission pages

We use webforms for a variety of purposes such as feedback questionnaires, contact forms and request forms. For the request forms we would like to attach comments on the submission page. This is so ...
41
votes
11answers
28k views

How to display a field before node title?

I'm looking to render a certain field before the node's title when displaying a teaser in D7. Effectively I want to go from this to this. I have looked into updating the node.tpl.php but I notice ...
3
votes
1answer
1k views

drush make and drupalcode patches

I would like to download the stable version of a project and apply a patch. This patch was not submitted but applied directly to the project. I have the following drush make file (just a test snippet) ...
2
votes
3answers
379 views

How can I make individual nodes fieldable?

One of the great things about the Entity and Field APIs is the ability to add fields to any entity (nodes, users, etc.) and subsequently any bundle (e.g. node content types). But is there a way, ...
3
votes
2answers
270 views

developing a site in drupal made a mess in modules .. is there better way?

When I develop a site in Drupal, I test a couple of modules to see what best suits my needs. The problem is that, if it is a large site, I find myself with a lot of modules and patches (disabled / ...
3
votes
2answers
2k views

What are the array keys of $content that can be hidden?

I see that with drupal 7 theming, we can mark elements of the $content array as hidden. From http://drupal.org/update/themes/6/7 : <?php // We hide the comments and links now so that we can ...
3
votes
2answers
3k views

Download Update's fail (Unix File Permissions on /tmp directory)

When I goto admin/reports/updates/update select all and then hit the "Download these updates" I get the following error message The specified file temporary://filewq3Nao could not be copied, ...
9
votes
2answers
6k views

views Relationships and argument?

What are the relationships and arguments in Views? How do I use them? I have read some tutorials, but still don't know how to use them. Can someone explain them more clearly? Thank you.
6
votes
2answers
472 views

Is Drupal 7 a good fit for my site?

I started creating my site in Wordpress 3.1, and I have hit a speed bump. I am considering switching to EE or Drupal 7, in hopes of achieving my vision of the site. The problem I am having is ...
3
votes
3answers
598 views

Can node reference be altered to include views pages?

I have a site where 'related pages' is a node reference CCK field for a node. Authors can add related pages (1 or more) to a node with the autocomplete functionality of node reference. My question is ...
1
vote
1answer
1k views

Set the reply address for the contact form to user's mail address

I have a Drupal 7 site with only few modifications and I have the /contact form enabled for anonymous and registered users, so that they can contact the admin (i.e. me) easily. What irritates me is ...
9
votes
5answers
7k views

Find out the user's IP address given their UID?

I'm running Drupal 7 web site with a Russian multiplayer card game and have to block some very annoying players every 4-5 days. Before Drupal I was using phpBB 3. When these persons would come from a ...
5
votes
4answers
3k views

How do Pressflow Drupal sites handle user Cookies?

Is this something handled by Drupal? What PHP, Apache, Varnish settings affect cookies? Additionally, what's the difference in cookie handling between plain-vanilla Drupal and Pressflow? I was ...
3
votes
2answers
430 views

Is it possible to make the Book Outline a mandatory field when creating a new book page?

I would like to make sure that certain content types always have a parent book/page. Is there a way to do this, by JavaScript, by modifying the book module or whatever?
5
votes
3answers
4k views

Embedding content in external website

I'm new to Drupal (and SE) and am looking for a way to embed Drupal 7 content in an external website. D6 had modules for that (web widget and embed widget). How can I do it in D7? Thank you!
4
votes
1answer
593 views

Pointing the Views handler for Node Body at another field handler

I want to be able to use a CCK field as my node body without affecting interoperability with Views generated by independent modules. Using hook_data_alter(), I have attempt to re-target the Views node ...

15 30 50 per page