All Questions

Filter by
Sorted by
Tagged with
6
votes
3answers
1k views

Disable the /blog route

I'm using Drupal 6.16. I would like to permanently disable the /blog path (and all its sub-paths, but not the Blog module. Is this possible?
4
votes
1answer
2k views

how to display the uploaded zip file content in drupal?

i created a cck file field and i uploaded zip file in that content type. Now i want to display the content of zip files after uploading the zip files. i don't know how to implement it?. can you tell ...
3
votes
2answers
660 views

Menus - hard coded primary nav with per-page sub nav

My primary navigation is hard coded (it has to be; graphical purposes). Firstly, how can I tell which one is "active" (current page)? Secondly, based upon which one is active, how can I show child ...
1
vote
1answer
126 views

Create an advanced and complete search

I want create an advanced and complete search, like the one on http://www.lib.muohio.edu. I want to enable search in my CCK fields. I don't know what module this site use; please help me to know that ...
1
vote
3answers
1k views

Caching Blocks with Context Module

I am using the Context module with the Block module disabled and noticed that blocks are not being stored in the cache. How do I get Context to cache blocks? Does it matter that much that blocks are ...
6
votes
1answer
8k views

Variable to check if the page is of some other Content Type

The variables $page and $teaser are very helpful but is there a way to check if I'm in a different kind of Content Type? For example, if I made a content type named Products, what can I type in my ...
5
votes
2answers
2k views

batch importing node data — via database?

I'm looking to migrate an existing site to Drupal. I have a a content type on the new Drupal site that will eventually hold some 1500 nodes. Of course, I don't want to enter each one in the form on ...
2
votes
1answer
259 views

views of node with weight [duplicate]

Possible Duplicate: How can I add a “weight” functionalitiy to nodes? I have views of node for example 10 last of news,I want when create a views of node , I can set this weight, ...
20
votes
5answers
17k views

How do I save session data for the anonymous users?

In my last project for Drupal 6, I did save the data using code similar to the following one: $_SESSION['xxx'] = serialize($data); In Drupal 7, it doesn't work. How should I save the session data ...
5
votes
3answers
4k views

Using Views “Rewrite the output of this field” tokens

I have a field which allows a user to upload 3 photos called field_prodshots. To any Views experts out there, is it possible to display just the first value of that field instead of all 3 while using "...
4
votes
3answers
270 views

How to keep content out of features?

I have plenty of Panels pages that I track using the Features module. Currently, if I create put a Custom Content pane inside of a page, all of the content that is inside that pane is then stored in ...
1
vote
1answer
379 views

CCK field in node template

If I have a custom CCK field, for example "temperature", is there any way I can directly call it from the node template? Like would there be a $temperature variable? Thanks!
3
votes
1answer
1k views

How do I tear out the existing menu in a theme and replace it with super-fish (v7.x)

I know this is similar to the Bartik/menu question but I do not believe it is the same, here is the requirement. I am using "the morning after" theme in Drupal 7. This theme looks the way the client ...
4
votes
2answers
931 views

Help with #text_format and field widgets

I'm struggling with #type 'text_format' for a widget form field as this field gets expanded two separate elements, one holding the orignal element and the other the format selector. The orignal ...
1
vote
1answer
3k views

Custom teaser text in Drupal 7

I have a custom field named "field_blurb." Is it possible to make this the text shown in a teaser instead of the default which is from the body field?
4
votes
2answers
161 views

Prevent “→” from being written in URL alias

When the post title contains "→," it will be written in the URL alias. When using Boost, an URL containing "→" will not be well cached; visitors will see the uncached node. How do I prevent the "→" ...
1
vote
1answer
157 views

Force redirect if a valid taxonomy term is not at the start of the URL?

As a follow on from this question I am trying to prepend all URLs on the site with a taxonomy term. The term itself is handled by a custom module for the most part, however elements of the site such ...
5
votes
2answers
7k views

How to pass a parameter/argument to webform using clean urls?

I've found a post which explains how to pass a parameter/argument/referer to webform. It works fine, but I get an ugly URL. Is there any way to do this using a clean URL? I mean without using GET ...
6
votes
3answers
9k views

Simple confirmation popup dialog box

How is it possible to create simple confirmation popup dialog boxes in Drupal 7? I've searched a lot, but I found tons of non-working suggestions and code.
2
votes
2answers
2k views

Views Slideshow only shows one static image and doesn't cycle in IE8

I have a slideshow that runs through numerous images on the homepage of a site. The slideshow works perfectly in Chrome and Firefox, but simply shows a static image in IE8. On IE8, a Javascript error ...
6
votes
1answer
343 views

Remember users Taxonomy choice, such as which city to filter the site by?

I want to convert an existing site to support the selection and association of Cities. Each node can be associated with a City, and the Cities will be selectable as tabs at the top of each page. Lets ...
5
votes
1answer
359 views

Site building process: what is the relationship between CCK, Views, Panels, Blocks and Taxonomy?

A beginner question. I need to understand the relationship between the top Drupal structure modules: CCK, Views, Panels, Blocks and Taxonomy, i.e., when building a website, what is the general steps ...
16
votes
1answer
24k views

How do I override the default page.tpl.php?

I have one page in my D7 website with significant deviation from the rest of my pages. In this page I will only display a limited number of regions and in a different layout. What is the best way to ...
3
votes
1answer
1k views

How to access User Picture field for a comment in Views?

I have a Views table with each row showing the node title, node author, and node author picture. I am also adding the last comment title and last comment author to each table row. I would like to add ...
3
votes
3answers
126 views

How do I better play nice with weights, when overriding a form?

I'm attempting to use the Constant Contact module. One of the features of this module is that it inserts a check-box into the user registration form. The problem is that it seems to set weights in a ...
5
votes
2answers
1k views

Comments - Allow deletion of comments on your content without Administer Comments permission?

Is there a way to allow users to delete comments that are on their own content without giving access to Administer Comments? Example: Authenticated user makes a blog post (or some node content) ...
3
votes
1answer
227 views

Get the “href” attribute of an image

I created a new content type in Drupal 7, and added an image field named "field_photo." Can anyone tell me how I can extract the "href" attribute of that photo? Is there a short code I can use?
6
votes
2answers
6k views

How can I add a “weight” functionality to nodes?

I would like to be able to specify a "weight" for the article nodes published in the homepage. What is the best way to do this?
2
votes
1answer
874 views

A whole view disappears

I have deployed user generated views to a production site using Views (6.x-2.12) bulk export feature; that is, views are saved in the code as mymodule.module and mymodule.views_default.inc, the latter ...
4
votes
1answer
304 views

Setting up permissions for non-registered users

How do I set permissions for non-register users? Step 1: I registered Drupal 7 in my system. Step 2: I wrote a module for user_register(). Step 3: When I call the menu callback an access denied ...
6
votes
1answer
398 views

Dynamic menu linking to the forum associated with the current Organic Group

I've got two groups. I've got two forums belonging to each group. I've got a panel set up to display a custom view of forum topics that are defaulted to the group id, so that when given the group id ...
2
votes
2answers
849 views

Theming html output of privatemsg 6.x-2.x module

How can I theme the output of Privatemsg? I took look at http://api.worldempire.ch/api/privatemsg/privatemsg.theme.inc/group/theming/1, but I didn't understood how to use that. I want to totally ...
5
votes
2answers
4k views

How do I get the current year in the footer?

I want to put a copyright notice in the footer of my posts, and I want the year always to be current. I've tried adding <?php echo date("Y"); ?> to the Footer, but the actual code shows up; ...
12
votes
2answers
4k views

Is adding indexes to a Drupal database safe?

I have been searching and reading about this, but I have not seen anything definitive about the topic of adding indexes to Drupal tables (both core and contrib). My main concern is what happens with ...
4
votes
1answer
651 views

How can I have multiple versions of the same form, in different pages?

There is a default Drupal 7 form called "user_profile_form". I would like to show certain elements of this form on one page of my website, and then a different set of elements from this same form on ...
2
votes
2answers
3k views

How do I call an implementation of hook_form_alter()?

I have a function in my module that implements hook_form_alter(): function getuserform_form_alter(&$form, $form_state, $form_id). How do I call it? How do I pass it the required parameters?
4
votes
1answer
1k views

How to build a newsletter template

I'm creating a content type specifically for email newsletters, which will be sent using phplist (client prefers phplist to using a Drupal newsletter module such as Simplenews). So I'm planning to ...
2
votes
1answer
178 views

how to print login_days with user_stats module?

<?php print format_date(user_stats_get_stats('login_days', $node->uid), 'custom', 'j'); ?> Returns "1" always, how to use user_stats - login_days correctly?
6
votes
1answer
6k views

Update query with a dynamic expression in Drupal 7?

db_update('warrior_members') ->fields(array('points' => 'points' +1))//This is not working ->condition('uid', $liv_user) ->execute(); How to increase the ...
7
votes
2answers
3k views

Inserting search terms into a search input in Drupal 7

When using Drupal 7, how do I print the current search terms into a search form in a block? In Drupal 6, I used something like this in my template.php: $vars['search_keys'] = search_get_keys(); ...
1
vote
2answers
395 views

Drupal 6: only displaying select vocabularies?

I use two vocabularies, one for tags and one which determines where a view will be displayed. Can anyone tell me how I could output the terms of my former category while hiding the ones in my latter ...
33
votes
3answers
20k views

How do I group elements in a view?

I have 8 articles: Article 1 (Gaming), Article 2 (Local News), Article 3 (World News), Article 4 (World News), Article 5 (Gaming), Article 6, Article 7, Article 8. In a view I would like to group the ...
9
votes
2answers
7k views

How do I convert a database from MyISAM to InnoDB?

I am going to convert all the tables of 500MB database from MyISAM to InnoDB to see whether it will improve the overall performance of a busy Drupal 6 site. I am wondering what is the best (i.e. ...
1
vote
1answer
521 views

Is this the correct way of iterating through users and check if they have a determined permission?

I'm developing a module where I need to retrieve all users of a website and check if they have a specific permission. <?php $reviewers = array(); $result = db_query('SELECT uid, name FROM {users} ...
9
votes
2answers
4k views

How do I consume JSON data via a hook_menu callback?

I'm trying to set up Tropo's WebAPI with a Drupal site, and I thought I'd just create a hook_menu() callback for example.com/tropo, then use the hook_menu callback I just created to consume the API ...
3
votes
1answer
394 views

How can I point to a site in a not common directory path?

Normally when adding a new Drupal site I just put the sites root folder in /var/www/ and then edit the hosts file for that address and then edit the httpd.conf file to point to that site. The ...
3
votes
1answer
418 views

How to add term description to view?

I have a list of nodes (ubercart products) filtered by taxonomy term. How can I attach a term description to the view?
8
votes
3answers
5k views

How do I add a block of JavaScript to the home page only?

I have a block of JavaScript I need to add to my homepage (and only my homepage) to enable the logging of clicks via a heat mapping service I signed up for. They specified the code needed to be ...
1
vote
2answers
185 views

Where can I see the options accepted by the field API for the widget type?

Where can I see the options accepted by the field API for the widget type? $instance = array( 'field_name' => $field_name, 'label' => 'Demofield Demo', 'description' => 'This is a ...
2
votes
0answers
91 views

Blocks that control other areas?

I'm looking at migrating a site to Drupal. This site is an interactive site where selector controls in two side bars control the content in the main content area. So there's flash games in the main ...

15 30 50 per page