All Questions

Filter by
Sorted by
Tagged with
2
votes
2answers
100 views

Why would my Views take longer to load when I'm logged in as a regular user than one I'm logged in as an administrator

I have a Views display that returns a 30 row table of node parameters that is taking about 16 seconds to load when I'm not logged in as either user 1 or one of the users with the administrator role. ...
8
votes
2answers
4k views

db_affected_rows in Drupal 7 for db_query

I just noticed that @Berdir was so nice to remove db_affected_rows from Drupal 7. I'm now wondering what the best practice is now to detect if the query you ran changed anything in the database. A ...
5
votes
2answers
2k views

Version Control of a Content Type

I'd like to create a content type. My problem is this content type will change frequently (every 6 months, I will add some fields and I will delete others). How would you do it? I had thought several ...
5
votes
2answers
701 views

Creating a View filter for a CCK field

I have created a custom filter which displays some select options to the user in order to filter a view. However, I am uncertain how to add this using the hook_views_data() hook, being that the table ...
2
votes
3answers
3k views

moving *.tpl into “templates” folder, but Drupal does not recognize them. How?

I am building a custom theme. Currently, I put all the overridden *.tpl files under the theme root folder; it would be more clean and meaningful to put those files under "mytheme/templates", but ...
1
vote
1answer
884 views

In which cases should hook_process() and hook_process_HOOK() be used?

Considering that some modules implement hook_process() to alter the content of some variables and replace their content with themed content, in which cases should a module implement hook_process() ...
8
votes
1answer
3k views

Custom module with its own menu?

I am in the process of writing my 3rd custom module and this one is my biggest challenge yet. I know how to use hook_menu to generate menu items, and depending on the path you choose determines where ...
3
votes
2answers
2k views

How to support legacy url alias' and/or support multiple url alias' (Conditional Pathauto?)

I am migrating a site from wordpress and need to preserve my url structure whilst supporting native pathauto urls in the future (for new content) Overall Drupal's clean url process is almost ...
7
votes
4answers
13k views

Is it possible to redirect after “pushing” a file to the user?

I've got a setup where a site generates internal analytics about site usage. Users are able to request a download of their personal analytics, and because this information is sensitive I do not create ...
1
vote
2answers
204 views

Ability to 'mark' nodes and build a book functionality

I am looking for ways to do the following: users (both anonymous and authenticated) 'mark' nodes in some fashion to say that they want paper copies sent to them users can set quantity of the paper ...
5
votes
2answers
2k views

Replace summary/description with another field in Views RSS output

I have a view for an RSS feed which uses the node output (only option it seems when RSS style is selected) so I cant choose custom fields. But, as the body field is 'text and summary' the RSS view ...
6
votes
2answers
8k views

How do I override a default view template from another module?

Drupal provides hook_theme(). But is there a hook_theme_alter()? I'm looking for something like hook_menu_link_alter(), which overrides hook menu entries, but for the theme. I want to modify a view ...
2
votes
1answer
646 views

Print module's default setting is annoying

We often use the print module to create PDF of nodes; most of the times, it works out-of-box. For our requirements, however, one thing that makes me very annoyed is its default settings. When the ...
2
votes
2answers
3k views

display all products in a single page (without using pager) ubercart

I'm trying to display all products on a single page without a pager. Some sites have this functionality where you can click from page to page, or you can choose 'show all'. Or there is a drop down box ...
9
votes
4answers
9k views

Update status behind a proxy

I'm running Drupal in an intranet which is behind a simple HTTP proxy. I'd like for the module and core update checks to actually work. I seem to remember there was a core hack to do this on Drupal 6,...
3
votes
2answers
3k views

Displaying SQL-table as a paginated list

I'm trying the following and it works: my.module: function my_menu() { $items['page_example'] = array( 'title' => 'Page Example', 'description' => 'Page Example', ...
5
votes
2answers
955 views

views with a SOAP back end

views3 supports plugable backends rather than a RDBMS, there are backends for solr, sparql, mongodb. Is there such a plug in to enable views to be a front end for a SOAP api? I have found a number ...
19
votes
2answers
8k views

How can I tell Drush in which folder should a module be copied?

Is there a way to make Drush download modules into a specified folder besides sites/all/modules (e.g. sites/all/contrib, sites/all/core)? If this makes a difference, I am using Drush 4.4.
-1
votes
1answer
1k views

When should the “translatable” tag be added to a query?

I noticed that a Drupal core function is using the following code: $categories = db_select('contact', 'c') ->addTag('translatable') ->fields('c', array('cid', 'category', 'recipients', '...
4
votes
1answer
2k views

Lots of 500.shtml page not found errors in logs

I've been getting lots of page not found errors for 500.shtml in my logs. A lot of them seem to be originating from search spider and ho I might be able to fix these, I'm curious to why 500.shtml is ...
3
votes
2answers
244 views

Can solr point into a certain point in a document?

I have very long documents (around 100 pages when printed) that I need to index with Apache Solr Search. Is it possible to index the pages with solr in such a way that clicking the result from the ...
5
votes
1answer
11k views

drupal_add_js best practice to include inline code or script file

While reading the API page for drupal_add_js, I kept wondering what is the best practice to include inline JavaScript or a JS file. It seems like it works exactly the same even if you omit 'file', '...
69
votes
3answers
12k views

Given that db_select is much slower than db_query, why would I want to use it?

For the background on this, please see http://drupal.org/node/1067802. Given all that, what situations exists where I might want to use db_select(), or should I be relying solely on db_query?
11
votes
4answers
3k views

Using a newer JQuery version

The Drupal 6 version of jQuery is too old (1.26). Could I delete, and replace it with a newer version?
0
votes
2answers
1k views

drupal cache_page

My site is on drupal 6.19, but it always shows some "page not found" to anonymous users. Now I want to write code to examine the cache_page table to know which pages are cached as "page not found", ...
4
votes
2answers
704 views

How to invalidate a views cache based on custom criteria?

I have a custom content type (story) with a datetime field which determines if a story shows up in a the views that list the nodes of that content type; if the datetime defined for a node is newer ...
2
votes
2answers
233 views

Where to modify the logic that calculates the height of a collapsible fieldset?

I'm not sure if this is a theme issue, but I continually get my collapsible fieldsets being 1-2 scanlines too short, causing scroll bars to appear. This project has heavy use of FAPI, sometimes with ...
2
votes
3answers
2k views

Can views pages be indexed and be searchable by apachesolr?

By default drupal will only send nodes to apachesolr, is there a way to send views pages to solr, so that they may show in the search index? I know this question seems a little out there, just ...
3
votes
1answer
270 views

What is the purpose of the PHP class FileTransfer?

What is the purpose of the PHP class FileTransfer? In which cases, should a module deal with that class or one of its child classes?
1
vote
1answer
187 views

What is the difference between the classes ArchiverTar and Archive_Tar?

What is the difference between the classes ArchiverTar and Archive_Tar? Which one is a Drupal module supposed to use?
1
vote
1answer
195 views

Grant access to CCK referenced nodes

I have one content type 'object' that references one or more nodes of content type 'image'. I'm granting access to nodes with TAC Lite: a user can view only content with a particular term. Since the ...
4
votes
2answers
648 views

drupal_to_js() and anonymous functions

I'm using the flot module to create some graphs in Drupal. Generally, it is working pretty well. However, I have come across an issue which is more general. I am defining a settings array, which ...
0
votes
2answers
562 views

Panels call custom function

Is it possible to call custom code from a panel? My custom module has a function which returns some content. I wish to call this from my panel.
1
vote
1answer
270 views

What is the access record “content_access: all”? This is overriding my taxonomy access module

I have had problems with my permissions ever since I last rebuilt my permissions. (I did this after working on user reference permissions. This field has no user reference on it) The taxonomy ...
1
vote
1answer
733 views

File/image upload via CCK and Nginx + FastCGI

I am using the ImageField module with Pressflow, Nginx, and FastCGI. When I go to add a file via the standard ImageField CCK upload widget on a node, the Upload "throbber" does its thing, Drupal does ...
2
votes
1answer
379 views

Is there any security consideration with webform and Salesforce API?

We are implementing the Salesforce webform module for our client and they are asking us if there are any security issues to consider by having SOAP installed on their server. (The Salesforce API ...
1
vote
1answer
320 views

Is there an easy way to display Atlassian Gadgets within a Drupal node?

We are looking into a way to display information from Jira in Drupal. Using Drupal 6, is there an easy way to display Jira/Atlassian Gadgets within a Drupal node? I have looked into a few things, ...
5
votes
2answers
1k views

Cache field / entity / node

I have a custom field/widget that has a format view function that is highly resource intensive. I currently am caching the result using cache_set()/cache_get() inside the hook_field_formatter_view ...
2
votes
2answers
659 views

Aegir / drush alias issue: profiles specified at command line get forgotten

Note: Aegir is an installation / site management tool for drupal sites & platforms. See http://community.aegirproject.org/ for details. This question may be down to an Aegir issue or a drush one; ...
5
votes
4answers
896 views

How to get the content owned by the currently logged-in user?

A user is the owner of only one node, and I want to redirect the user, at login time, to his only owned node. How can I get the node content if I know only the logged-in user?
2
votes
3answers
13k views

What is your recommended Banner/Slider module for D7?

I am searching for module that create banner/slider effect for D7. Have a check on this page: http://drupal.org/node/418616 Mostly not yet port to D7. What are your recommend modules?
3
votes
2answers
3k views

How to change default registration form?

By default, user registration form in Drupal 7 takes 2 fields: "Username" and "Email." I want users to set their password directly upon Registration. Take 4 fields: - Username - Password - Confirm ...
3
votes
3answers
2k views

Get the title of the active tab

Is it possible to get the title of the currently active secondary tab? I'd like to re-use the the title of this tab later on in the content. I found menu_local_tasks(1) which comes close, but this ...
9
votes
3answers
20k views

Form Api File upload

I have the following code in my form. $form['new']['upload'] = array( '#type' => 'file', '#title' => t(''), '#size' => 40, ); On the submission handler, it returns the file name but ...
2
votes
1answer
265 views

CCK field value count is never less than 1

I have got a CCK field set up so that unlimited values can be entered upon node creation (number of values: unlimited). When I try to print values in a node with the following code if ($node->...
2
votes
3answers
155 views

Best practice to have a 'category' fields where admin can choose wich voices the user can choose

I have a content type that needs a 'category' field; this can both be a taxonomy vocabulary or a text field (with the select widget), it doesn't really matter. (I won't have more then 5-6 voices at ...
16
votes
3answers
19k views

Removing main content block on frontpage

I'm new to Drupal 7 and I'm looking to replace the frontpage's default main content block with an equivalent block generated from Views (gaining more control over the block in doing so). I have ...
1
vote
3answers
2k views

“focusout” jQuery event

I am using Drupal 6 and, therefore, jQuery 1.2.6. When a user clicks inside my text, there is a pop-up that comes up with a few more options in it. I would like this pop up to disappear when the ...
10
votes
4answers
3k views

What happened to array-shift.com (Drupal Stackoverflow Clone)

It's interesting that there is no (recent) Drupal implementation of SO-like features. I (and others) have a need to have an SO clone that has areas for private data (corporate owned), so we cannot ...
22
votes
14answers
12k views

How do I hide the default page /node?

Drupal out of the box comes with a page (which is the default homepage) that is assigned to the node path. How do I avoid users reach it, and redirect them to the actual homepage of the site?

15 30 50 per page