drupal

Using a Drupal variable in SQL query

I'm trying to stuff a variable into a SQL query to return a value to a page. $sql = 'SELECT account FROM users WHERE uid = arg(1)'; Where arg(1) = the user currently being viewed. I am outputting arg(1) at the top of the page, so I know it's there, but Drupal doesn't seem to want to take it. I've tried escaping several different ways....

Creating a custom content type in drupal

hi!! i tried to create a custom content type in drupal but unnecessary features like Title, Menu settings, and Revision Information, URL aliases come with it which i don't really want ..coz it doesn't mean anything to the user.. how can i hide all those things, just preserving the fields(say only 3 fields from CCK) that i want only for t...

adding id to unordered list in views

hi!! i've created a view with all the recent node titles and styled them as an HTML unordered list .. it generates the list but, the ul tag doesn't have an id :( how can i add that? thanks.. ...

tracking download completions from a website/cdn

I have a Drupal website where users are clicking on a link that initiates a file download from a content delivery network (CDN). A script is tracking the number of users who click the link to begin the download process. I'm looking for suggestions on how I might track the number of users who successfully complete the download process. ...

How can Android connect to Drupal service?

Dear all, I am writing an android program and I need to connect to the Drupal service to fretch the data or submit data. How can I do that? Thank you very much!!! ...

"context" on a drupal page

This question is a general one, and I've already posted a version of it here. I'm hoping, though, that I'll have a better chance of getting a response, and of being useful to more people, by asking in this forum. Associating content together when it all loads on a drupal page is tricky business. In drupal, each page, no matter the site,...

Theming the default search results page in Drupal

I'm trying to customise the mark-up of the default search results page in Drupal 6. Specifically I'd like to remove the search box and the title from the page - I know I can hide it with CSS, but I'd rather it wasn't rendered in the first place. Ideally, in the same why that you theme a particular content type node by copying the node....

Drupal not printing view inside panel

I inherited a D5 site with Printer, e-mail and PDF versions module enabled that is used for printing. I have a Country page which contains a view with most recent country news inserted in a panel for placement purposes. When I print the page, the view is absent from both screen and source code. One thing I noticed is that each content...

BlueHost vs. VNhosting for Drupal

I'm dropping Godaddy, and moving my drupal websites to a new host. The word seems to be that bluehost and VNhosting architecture is best suited for MySQL intense Drupal. I've heard a lot of people on the drupal forums say that VNhosting is faster than Bluehost, almost unanimously. After some investigating, I learned that VNhosting doesn...

How to delete terms within Drupal taxonomy module?

If terms (admin OR user created) are duplicates, I don't see a way to delete them from within the Drupal browser interface. This becomes a problem during, say, adding products to an ecommerce site that breaks their products up into categories. The person adding the product sees multiple duplicate categories (which are terms within a Voc...

Connecting nodes to multiple dates

I have company website, with many offices around the world (around 50 offices). The company want to create a gift giveaway with the employees in a specific company each specific day. For example: Office 1: will do the giveaway the days: 1/1/2010, 7/1/2010, 15/1/2010, etc... Office 2: the days: 2/1/2010, 9/1/2010, 19/1/2010, etc... Offi...

How to enable node-type based custom menu in drupal?

i'm looking for a way to display a menu block with a custom selected trail for each node-type. for example, i want all nodes of type 'story' to display the primary-link menu with the menu trail set to any specific menu item. ...

Add email field to comment drupal

I want to add an email field to submit new comment form in Drupal 6. I tried to use CCK, but I couldn't find a node type 'comment'. ...

Drupal: add contact form as field to user profile

Drupal allows you to create additional fields for user profile pages that can be publically accessible (anonymous user). I would like to add a contact form on each user´s profile page. I know that each user already has a contact page, but I want to have a contact form that´s embedded on the http://localhost/users/foobar page. Maybe ther...

Drupal performance: separate sites vs multisite configuration on single host?

Does anyone have performance data on running several separate Drupal sites (on a single host) vs using Drupal's multisite configuration? I face a choice: configure several Apache virtual hosts with completely separate codebases, vs a shared multisite instance of Drupal core with site directories sites/www.example.com, sites/www.example1...

MySQL query to get top 10 point-earners in last week?

I'm trying to write a query that returns the user ID's of the top 10 users who gained the most points in the last 7 days on my web app. I have three tables that, together, have the info I need. votingapi_votes table. It has a record for every up/down vote on a comment or node. node table. It can associate a node ID with a user ID so...

Removing <ul> bullets via CSS

I am using jQuery for the first time via the Views Cycle module for Drupal. I am not a CSS pro, but I am pulling my hair out trying to remove the bullets from the rotating images on this page: http://shoshannabauer.com/ What am I missing? Does the list-style go on the <li> or on the <ul> class? ...

using BC dates in Drupal date field

Hi I am trying to input BC dates in Drupal 6.15 using the Date module. If I enter "old" dates (less than 1000 AD) I get an error. How can I go about this? I cannot revert to text because I need to order things by their date. I need to be able to input really ancient dates like 300 BC. The date is the most important data point in this pa...

Adding sorting to a view on Drupal?

I used to know how to do this, but I can't seem to get sorting to work on a view where filters are exposed in a block. I want to be able to filter by, for example, type, price etc, but then also have sorting options to sort by these items. How do I get sorting to work like this? ...

Can I Omit <?php drupal_render($form); ?>

I have noticed that in your form theme file, whatever-form.tpl.php , when you omit <?php drupal_render($form); ?> the only parts of the form that are rendered is what you specified - so I can also omit all of these lines: <?php $form['title']['#access'] = FALSE; ?> <?php $form['body']['#access'] = FALSE; ?> <?php $form['menu']['#acc...