drupal

Adding <span> tags around each primary item in Drupal

I'd like my primary links in Drupal to look like this in code: <a class="active" title="Go to the Foo Homepage" href="/"><span>Home</span></a> Rather than: <a class="active" title="Go to the Foo Homepage" href="/">Home</a> So I can then style the span separately from the a. (I know that sounds like a slightly strange thing to do, ...

Drupal Form-API: #field_prefix doesn't work on textfield

I'm trying to implement #field_prefix on a text field so I can add some extra UI to my form. I have a module where I'm doing other overrides like this, with a function that basically looks like this: function modulename_form_alter(&$form, $form_state, $form_id){ if ($form_id == "contenttype_node_form"){ $form['field_content...

Drupal, Translating menu PATHS

Is it possible to translate a menu path in Drupal using i18n? In other words, basically creating two different links, namely: www.mysite.com/english -- www.mysite.com/german In other words, not just altering the paths, but supporting external links for translation. And if so... how? ...

My under development local drupal site become very slow, how to solve?

Hello, I am developing locally a site with drupal and suddenly it became very slow. The last thing I made was installing the internationalization module. Now when I try to reach administration panel I receive: Fatal error: Maximum execution time of 60 seconds exceeded... What to do now? Should I increase the maximum execution time...

passing information from a Drupal Forms API validation function to a submit function

In my validation function for a Drupal Forms API form, I attempt to charge the user's credit card. If it succeeds, I'd like to pass the reference number to the submit function so it can be used there. What's the best way of doing this? ...

Create multiple CCK nodes with single custom form in Drupal

I need a form which will allow creation of several related nodes at the same time. All of the nodes involve CCK fields. I would like to use as much of CCK's built-in validation, submission, input widget, and security functionality as possible/practical. What is the best way to accomplish this in Drupal 6? Are there 'best practices' or ...

Multi-lingual Drupal Site

This is my situation: I have two languages, namely English and German. However, I have several countries that should have different content. E.g. US, UK etc. Now, with i18n you can only have ONE english translation and one german translation. What is the best way to handle translating nodes in this scenario? More info: Location is nec...

Dynamic links in Drupal

This must be an easy one but I can't find documentation for it online. I'm trying to use the l() function in Drupal to create a dynamic link. What's the syntax? At the moment I have: l('Destination',"path/$user->uid/category") which points to: path/%2Fcategory ...

General Quesion Regarding File Downloads using Drupal

Dear Stack overflow, I would like to know the best way of going about getting Drupal to provide a site with the following functionality: UPLOADS 1. User Uploads a File (jpg, .cr2) through a simple file field form 2. If user is not anonymous they need control to specifiy if file is available for public, private or for a group of buddy'...

How to show full nodes in views in Drupal 6?

Using Views module in Drupal 6 I wish to not only to show differents fields of the nodes, as one usually does. I wish to show all the nodes (matching criteria) in their complete form. Anyone know how to do this? ...

How do I rank nodes based on user-rating, number of comments etc. in Drupal 6

I wish all nodes of a certain type to have a rank (or at least be sortable in Views by this rank). This rank is a score based on different criteria: Voting API (5-star rating) average, Voting API number of votes, number of comments etc. Any suggestions on how to achive this? ...

How do I 'unhide' menu links to unauthorized content in Drupal 6?

The Drupal 6 menu module hides links to content that the current user does not have permission to access. This makes sense, but there are times when you may want links to be shown and go to a 'you are not authorized to view this content' page (e.g. for marketing purposes). Is there an easy way to get these links to show? I understand t...

Searching RSS feeds in Drupal...

I build a site on Drupal CMS and added some external RSS feeds. The search block works fine when i publish node, means it can search the nodes. But feeds are not stored as nodes so how do search the feed ? ...

Drupal: Views: grouping relationship in block list

I have a question about views, specifically about grouping a relationship. I have a "partner" node that has many "docs", I want to list the name of the "partner" along with its corresponding "docs" below. I have the relationship set up correctly(I think) but can't figure out how or where to group it correctly. I get this: partner name ...

Drupal site front page

I've assigned a page from Pages module as home page. And now the main menu shows the menu item called 'Main' which leads to '/main' page. How can I change that to make the 'Main' menu item link to really '/' of the site ? Updated: Sorry if it is not clear, the 'page' i mean is really a page - ( Site building -> Pages ). ...

Drupal Views combine 2 columns into 1?

I've got two content types, both have a node title and a document attachment, the doc attachment fields are different names (being from two different content types). In my view, I'm displaying the node title and the file name in a table. The node titles are great all in one column, but the two content typed attachment fields are display...

best way to give editors ability to assign background images in drupal 6

I've got a design in drupal that calls for a different background image on different pages. I'd like to make it easy for the site editors to assign the image. My first thought was adding a cck field to the Page type where they could assign the image. That will work nicely for node pages, but won't work for views pages. I guess instead of...

How do I empty Drupal Cache (without Devel)

Okay... Seems i can't find it with google... so here you go SO ;) How do i empty the drupal caches: without the Devel module without running some PHP Statement in a new node etc. without going into the database itself Effectively, how do you instruct a luser to clear his caches ...

Drupal - Relationship of CCK fields and content types to performance?

Hello, I am helping someone with a Drupal 6 installation, and they are very distressed by the performance of the site, even though they are only in the phase of defining content types. Just loading the Modules list can take over 30 seconds, and importing a content type took close to 3 minutes. This is installed on a large shared UNIX s...

Private Video using YouTube API - Drupal

I want to set up my Drupal site to embed private videos from YouTube. I am the owner of these videos, and I have marked them as private to protect them from the general public. From the documentation, I have seen how to do an authentication where the user is taken to youtube, has to log in to his account, and consent to give my web app...