All Questions

Filter by
Sorted by
Tagged with
22
votes
1answer
13k views

Programmatically execute an action set (Rules module)

I want to use Rules UI to define some action sets, but want to execute those actions programmatically from a custom module. How to I execute the action by code and pass the needed arguments (just a ...
2
votes
3answers
1k views

Problem with creating own module Block with an SQL query

I’m trying to create a custom module that implements a block to display something I haven’t been able to do with the Views 2 module. I’ve tried to look at some guides and tutorials, but I haven’t got ...
1
vote
1answer
192 views

Checking two databases when logging in a user with a custom module

I am trying to create a module that will check for two databases when logging in a user to Drupal. If drupal's native login is a success but the external application does not have that account, then ...
0
votes
1answer
231 views

Show a dynamic text depending on the day

I'd like my Drupal website to show at the right top something like: ____ day (eg. Medicine day) and fill __________ dynamically depending on the current day. I will create a new content type ...
2
votes
2answers
5k views

Theme overrides for custom hook_theme() in Drupal 7

I have a custom D7 module which defines it's own hook_theme() which defines a few theme functions, of which they define their own template, for example: function foo_theme($existing, $type, $theme, $...
3
votes
3answers
510 views

How to display a block for pages that don't show nodes?

My Drupal 7 module creates a block, and then in admin I can make it available for the Article content type only. I would also like it to be available to the result page for a Product Search. This page ...
7
votes
1answer
4k views

Insert images with Media

I am using Media and Wysiwyg with CKEditor to insert images in the post editing field, and for some reasons I keep getting this code instead of my images. Does anyone know how to fix it? [[ { ...
2
votes
3answers
6k views

How do I implement hook_page_alter() in a module?

I'm trying to add a piece on content to the $page['content'] variable, but it's just not working and the examples are not helping me. My code is the following: function my_modulename_page_alter(&$...
10
votes
5answers
4k views

How do I remove the revision information from a node edit form?

I'm hoping someone can help a Drupal beginner removing a view from my page. The purpose of it is a for data collection. This is the section I am trying to remove:
0
votes
1answer
453 views

How do I prevent the feed aggregator creates blank nodes when cron is run?

I've recently taken over the management and development of a Drupal 6 site and one of the problems plaguing this installation is that blank nodes authored by "Visitor" keep popping up. I've narrowed ...
3
votes
1answer
119 views

How do I give the permission to add points, but not to moderate them?

When I give users the permission to administer user points, they can both add and moderate points. How do I give them only the permissions to add points, but give other users the permission to ...
1
vote
2answers
2k views

How do I override the taxonomy default content?

I'm coding a way to display the taxonomy terms, and I don't want some of the term pages to report "There is currently no content classified with this term." I need to remove that message form the term ...
6
votes
2answers
4k views

How To Set Node Path/Alias Programatically

I am creating some nodes in Drupal 6 programatically by creating an empty object, setting some properties and calling node_save() on the object. When I print out the object again, I see new ...
0
votes
1answer
422 views

Views pagers for anonymous users

I've been trying to figure out why the pager element for views won't show up for anon users in Drupal 7. The following are the things I've tried to get them to show, cache clear, mess with the access ...
10
votes
4answers
482 views

What does 'Drupal-friendly' hosting mean?

I'm new to Drupal and web-hosting generally. My question is what constitutes a totally Drupal-friendly host? I know that the installation is made easier by the host provider letting you have SSH ...
1
vote
2answers
2k views

301 redirect one site in multi-site installation

I have a drupal 6 installation that is hosting numerous sites. They're all located in the sites/ folder. Like: sites/site-1 sites/site-2, etc. One of these sites has been discontinued, and we need to ...
1
vote
1answer
800 views

Hierarchical select breaks custom js

I am building a case tracker on top of Open Atrium. My case node has some custom fields, and the "Case" category is a hierarchical select taxonomy field. I have another field called level which is ...
2
votes
1answer
389 views

Best way to update/upgrade things in the drupal database

I know this is a broad topic, but maybe there is a good way/module doing this. I want to make "automated" updates to a drupal installation. This includes updates of nearly everthing (contenttypes, ...
0
votes
4answers
196 views

Which backup system is good for my local project?

I'm using ubuntu, and I accidentally deleted my project last weak. I tried to recover it but no luck. Which is the best way to backup my project automatically including my Database (my database is ...
1
vote
2answers
342 views

Overhead of using Panels

Panels is one of the most useful modules for Drupal and many websites make use of it. However I always have been cautious using it because of its processing overheads. I want to know is there any ...
2
votes
2answers
2k views

Hook into node operation from theme template.php?

I have made a new content type in Drupal 7 in Drupal Admin (not via module). What I want to do is to add a Hook on the insert and update operation. How can this be done when my node type is not ...
0
votes
2answers
5k views

how to modify the confirmation email in Ubercart?

I'm trying to modify the format and text of the confirmation email in Ubercart and I don't know from where....can anyone give me hint? for example including some images or custom links in some parts ...
1
vote
1answer
2k views

Set dropdown list programmatically in exposed view filters

I have programmatically set a text CCK to a select and given a few choices: function mymodule_form_alter(&$form, $form_state, $form_id) { if ($form_id == 'views_exposed_form' && $...
4
votes
3answers
8k views

How do I replace the SQL query of a view?

I need to override an SQL query of a view. I'm using Drupal 7 and Views 3.x-7.x-alpha1. I understood I can write my own query with views_pre_execute. I followed the instructions mentioned here: http:/...
3
votes
5answers
10k views

How to hide drupal error message - one or more problems were detected with your drupal installation

On logging on to Drupal administration page, I get an error message: One or more problems were detected with your drupal installation. I've tried disabling modules. Is there a way to hide this ...
2
votes
1answer
165 views

How can I cascade field display formatters?

I need to display a thumbnail of my images and the count of its downloads below the thumbnail. I am using these modules: CCK FileField ImageField ImageCache DownloadCount and I think I need ...
0
votes
2answers
489 views

hook_help() argument

I don't see the second parameter $arg being use in the function. function hook_help($path, $arg) { // .... } Why should I declare it? What is its use?
0
votes
2answers
2k views

How do I add a form to the block?

I want to add a configuration form for a block. The form's style is the following: one year (label) input text box value eg:$10 two years input text box value ...
4
votes
1answer
497 views

Connecting to a database from another application

What is the proper way to do a remote connection to my Drupal database from a remote application? I am trying to integrate IPB with Drupal so I would like to modify my Drupal database from IPB.
8
votes
3answers
8k views

Node access-control modules for members-only pages

I am building a straightforward Drupal 7 site that has public pages and members-only pages. There is just one kind of member. Right now access control does not need to be finer than that. It seems my ...
9
votes
5answers
5k views

Disabling CKEditor in comments

Does anyone know of a way to force plain text mode in comments for all roles? Edit: is it in any way possible to do so through CSS? Thanks!
2
votes
3answers
4k views

CSS files defined in .info file are being ignored

Having followed a number of different guides to try and create a Bartik sub theme that allowed me to use the Color module, the following was the last one I attempted that worked: http://drupal.org/...
4
votes
3answers
6k views

Ajax form that changes a button value

When a user pushes a button element marked with ajax, I would like the callback to modify the button value (text shown on button), and have it updated both in the browser and the form state. Updating ...
1
vote
1answer
677 views

Registration full name

I would like to edit the registration fields, but I can't find where to do it. I want to replace the username field on the registration form with two fields for first name and last name, which are ...
0
votes
1answer
2k views

Creating folders for images using Tokens module

I have a node for a photo. I want to know what is the best why to define the file path for the images. The images will be user submitted. Ideally, I would have liked the path be sites/default/files/...
2
votes
2answers
1k views

Custom view filter

I need to add a custom (exposed?) filter to a view - it would query a large 'postcodes' table to find out coordidnates of postcodes accross the UK, and then perform a comparison of 2 postcodes (...
1
vote
2answers
1k views

What's the difference between “Contexts” in CTools/Panels and in Context module?

I've been wondering this for a while and always assumed they were different things, but the fact that the Context module uses CTools for its Plugin API kinda confuses me even more... Can someone ...
9
votes
1answer
5k views

The differences between date time zone handling

There are several options for time zone handling, Site's time zone, Date's time, User's time zone, UTC and no time zone conversion. What are the differences between them? One case would be a ...
0
votes
2answers
484 views

For an event node type, should I use Datetime or Datestamp?

I'm about to create a node type event and have to choose between three different date formats, Date, Datestamp and Datetime. I've read how they are stored differently in the database, but that doesn't ...
4
votes
3answers
2k views

Grouping fields together

Is it possible to generate fields which are "grouped" together when marked as Unlimited? For example, a select field with label "What time do you wake up?" lets the user select the day of the week (...
5
votes
8answers
7k views

Adding an 'All' option to a views exposed filter

I have a Views exposed filter, that allows multiple items to be selected. It's based on the 'Allowed values' for a multiselect CCK field. The exposed filter comes out looking like this: Option 1 ...
1
vote
2answers
220 views

Customizing a block

Is there a way to customize a block as follows? label input text box(the editor can input the content) label input text box(the editor can input the content) label input text box(the editor can ...
1
vote
1answer
1k views

Deleted content still in database?

I recently went through a Drupal site I'm helping manage, doing a batch delete on a bunch of spam tickets through Administer > Content > Edit. As it turns out, though, the data for this content seems ...
2
votes
1answer
609 views

Update node with services doesn't work for text_list widget

I'm setting up a REST server with Drupal 7 and Services 3.x. Everything work fine (authentication, node creation, etc..), except that I can't update a text_list field of a node. I've tried to use &...
19
votes
3answers
14k views

How to hide a custom user field in user profile?

In Drupal 7, what is the best way to prevent any non-administrative user from changing a custom user profile field? Use case: I've created a user field called "Customer ID" that I do not want the ...
3
votes
1answer
391 views

PHP XML parsing + daily authentication request

I have a news provider who sends me non-RSS XML feeds through HTTP requests that then need to be parsed to be used on my site. However, my first request to the external server always has to be an ...
1
vote
2answers
221 views

Migrating stories from Drupal 5 to Drupal 6

I am designing a Drupal 6 website from scratch, but I need to import about 5,000 story type nodes from a Drupal 5 website into the new one. What might be some of the ways to do that?
1
vote
2answers
2k views

Adding the button implemented from “Printer, e-mail and PDF versions” in node.tpl.php

I am using Printer, e-mail and PDF versions, and I was wondering if there were a way I could place the print button in node.tpl.php above the $content area, instead of through the Drupal ...
2
votes
5answers
4k views

How do I get the field label?

I added some fields to the "Article" content type. I want to output them in a page--front.tpl.php. How do I get the field label value? When I use the following code in page--front.tpl.php, it doesn't ...
2
votes
2answers
4k views

How do I create hierarchical select for state, district, city, and location using AHAH? [closed]

I have a site for Indian tour places where I need to add the information for the "Location" content type. For example, in http://www.indiantourplaces.com/andhra-pradesh/hyderabad/hyderabad/saroornagar-...

15 30 50 per page