drupal-themes

How to modify the drupal search templates?

Hiya, I'm attempting to create my own templates for the search pages using drupal 6. When creating these template pages i usually use Drupal Template Suggests but for some reason when creating the files: search-block-form.tpl.php search-result.tpl.php search-results.tpl.php search-theme-form.tpl.php None of them seem to override the ...

Attach class to menu item based on content type in Drupal

I have seen a few functions that allow one to attach classes/ID's to menu items; unfortunately, none of them apply to my use case. What I want to do is assign a class/ID to any menu item based on the content type of the linked item. For example, I have a content type called "Internal" which is only displayed if the viewer is within the ...

Drupal6: Removing template files

I have been using a custom template file called user-profile.tpl.php for a while. But wanted to explore the CCK Content Profile abilities. I renamed the template file to something arbitrary, but instead of drupal defaulting to using the standard profile view it is complaining that it can't find the user-profile.tpl.php file. So either ...

Drupal Batch operation page fails with my theme.

I have created a theme for Drupal, everything works fine, except for the Batch operations page. Even the progess bar is not displayed. Do I need to include any special tags in my theme to make the the Drupal Batch operations work. ...

How to theme language translation links in Drupal?

In my Drupal 6 installation, using the standard Content Translation module, links to translated versions of a node is added below the content. How do I output those links another place in my theme? To be more precise, I would like to output the links (if there are any) in my right toolbar. Thanks, Egil. ...

How to get rid of Drupal CSS stylesheets?

I am trying to accomplish the following. I need to use Drupal 6 as a project requirement, but I want to use it with my own HTML and CSS stylesheets for each node/view/panel etc. The problem is, whatever the theme, I always found that Drupal applies to my HTML content both my CSS stylesheets and the CSS related to the theme chosen. I hav...

Loading users from an SQL query - the correct way

I have an SQL query that lists the uid of all users who have a certain role: SELECT u.uid FROM {users} as u, {users_roles} as ur WHERE u.uid = ur.uid AND ur.rid = 10 ORDER BY u.uid DESC I need to load them all in an array as objects for listing. I asked a question previously that left me only with the answer that what I wanted to d...

How to add theme settings to Zen-based themes?

I'm trying to place my own theme settings into a drupal subtheme. i've used the forms API in theme-settings.php but they are not showing up in admin/build/themes/settings/$mytheme. my theme-settings.php is uploaded here in case you'd like to see it. what it does is choose vocabularies for categories and tags, making it easier to port wor...

Drupal: How do I have a module enabled for one theme, but not another?

Hello all I have installed the LogoTool module, but I only want it enabled in the custom theme used for the front end site, not for the Garland theme used in the administrative back end. How do I do that? Best regards, Egil. ...

Drupal theme code to work out if you are editing a node

Does anyone know the php code to check if you are in edit mode? I want to edit how my theme looks when in edit mode so need to work out if I am or not. ...

Remove the red outline on form elements that fail validation in drupal

When a drupal form fails validation, it is redrawn with the elements that failed validation surrounded in a red border. Drupal does this by adding the error class to the input elements, and specifing a 2px red border on input.error elements in system.css. Without modifying this stylesheet, how can I remove the red border on a specifi...

How to Translate Template Strings in Drupal 6

I have some strings in my theme/template and I was hoping to translate them with t(), but they don't appear in /admin/build/translate/search. I could do it in PHP code and make my own function, but is this "the right way"? ...

How do I use a custom #theme function to a fieldset in a drupal module?

I have a module that builds a form that includes a fieldset. Instead of using the <legend> element to render the fieldset title, I want to place this content in a <div> element instead. But I want to change the behavior only for the form returned by my module, so I don't want to place any new functionality into my theme's template.php ...

Are Drupal theme settings cached?

i want to change theme_username, a core theme function that outputs that dreadful "not verified" string on users who are not logged in (when they comment, for example). i want a checkbox in admin/build/themes/settings/MYTHEME to change that. but since that theme function gets called a lot, will it hurt the performance of any site using m...

Drupal. Use AJAX to update view's content

Hi, I've created a view in Drupal that retrieves a list of nodes. The display of this view is a page and it works perfectly well. It does even allow me to filter its content by argument. See the current's view configuration (click to enlarge): I want to use AJAX to use the filter (by parameter) functionality without reloading the pa...

Theming a field in Drupal-6

I have a custom content (using cck) namely thewittyshit and it has a field namely field_thewittyshit . I want to theme field_thewittyshit field for all the views. I wrote the following code and saved it in a new file namely views-view-field--default--field-thewittyshit-value.tpl.php . But still no change is reflected in any of my views o...

dragging the content instead of the image in "drag to share"

I have enabled the drag to share module and it is successfully working the way it is designed to be. But, instead of image, I plan to drag the content and share it. Is their any way to do that? I have one way: Drag to share uses the html tags (like img) to get the input of the object to be drag(ed). Can we use put tags by default in all...

Custom theming for content type in Drupal

Hi, I can apply a custom theme to a certain content type in Drupal by copying the node.tpl.php file and placing the name of my content type right after the "node" in the file name and appending an hyphen. Ok, the new name is: node-page_two_columns_images.tpl.php. But that won't give me much flexibility if I am not able to edit the way e...

Drupal 6: Theme Developer gives too common candidate name, nothing specific.

Hi friends, I'm working on a restaurant directory site. I have restaurant details page that I need to implement gmap, slideshow, etc. So I need a specific page.tpl and Theme Developer gives the info as below but site's about us, contact us, faq, etc pages has same candidate name as page-node.tpl.php . So I can't use that :/ Why isn...

Drupal 6.17 just showing admin blocks

Hi ! I am using Drupal version 6.17 with RootCandy Dark 6.x-1.8 as the administration theme what happens is that Drupal shows the rootcandy regions on the blocks page even if I click on the site's theme. If I disable the administration theme everything works. I already tried to clear all the caches and nothing changes. Any ideas ? Tha...