All Questions

Filter by
Sorted by
Tagged with
7 votes
1 answer
4k views

Do we need PHPMailer?

We are building our website in Drupal 7. However, I wonder whether we need to configure and setup the PHPMailer module. We are designing an ecommerce website that will send an email upon ...
Kayote's user avatar
  • 331
3 votes
1 answer
1k views

How do I hide the body field in a node using hide()?

I'm using the following code, and it simply does not work: <?php hide($content['body']); print render($page['content']); ?> I would like to hide the body field to show it elsewehere.
jive's user avatar
  • 435
4 votes
3 answers
5k views

Form API to Database

I have been reading Form API Quickstart Guide. I understand how it all works, but I don't understand how to save the data entered into the forms into my own database Drupal style. Or am I supposed to ...
oshirowanen's user avatar
2 votes
2 answers
2k views

Add an extra delivery address

I'm a Drupal novice and struggling to build a webshop with Drupal Commerce. It's really starting to work out, but I've still have some problems regarding overriding and restyling themes. Is it ...
JurgenR's user avatar
  • 2,183
0 votes
1 answer
268 views

Block showing users of a specific role is only showing up for the administrator

I have a view/block that is shown to all the users who have a specific role (RoleX, member and administrator), and I set the view to a specific page. Whenever I look at the page as an administrator, I ...
Kyra's user avatar
  • 319
0 votes
2 answers
700 views

How do I show the image in a node enlarged?

I use the TinyMCE editor as site's editor. When I publish an image, I want the users click the image to view it enlarged. How can I do this? The image is not a field; it is an image in the node.
enjoylife's user avatar
  • 3,788
0 votes
1 answer
89 views

How do I alter a way node is rendered so I can add custom links/buttons?

Sometimes I want to add custom links/buttons specific to a content type to a node when the page for that node is rendered, how would you achieve this when you write a module? An example code to ...
Ken Li's user avatar
  • 173
3 votes
2 answers
1k views

taxonomy-term at the automatic creation of url alias of a content path

In Drupal 7, how i can use the taxonomy-term at the automatic creation of url alias of a content path?
john p's user avatar
  • 31
2 votes
3 answers
3k views

Views slideshow numbered pager

Im using Drupal 7, and I am trying to make a slide show with a numbered pager like the one shown in this page. I added PHP code in Views, thinking I could simple put PHP code, but the problem is that ...
Jeremy Love's user avatar
6 votes
2 answers
5k views

Is there any way to reorder the nodes in a View?

I have a complicated View containing many pages and attachments. When I built the View, I didn't think much about the order of the pages and attachments, but now I would like to change the ordering ...
Joe Corkery's user avatar
1 vote
2 answers
446 views

How do I output the entire page template?

I've created a custom module that defines a menu callback; that menu path will call a function which performs some actions and once it's finished, it needs to display the theme with a message as the ...
Camsoft's user avatar
  • 3,139
4 votes
4 answers
900 views

How to write a module that provides its own content-type using CCK?

I have to write a module that provides its own content type. In the drupal-documentation there is a guide for that; yet, I would have to deal with the CRUD logic inside of my module. I thought I could ...
nocksock's user avatar
  • 689
2 votes
1 answer
387 views

How do I create a catalogue list that links through to my individual product nodes?

I have taken Ryan Szrama's advice from a question I asked on how to display products and have now got that working. I have also built a catalogue list of all my products using views. I now need to ...
Martin Duys's user avatar
2 votes
2 answers
2k views

theme("pager") returns NULL

I am trying to use theme_pager to create pagination as below, but pagination does not appear. I have tried using var_dump(theme('pager', NULL, 10)) and the result is NULL. $q="SELECT DISTINCT(node....
Alaa's user avatar
  • 397
1 vote
1 answer
206 views

Grouped gallery content with Views

I have an gallery content type with a title-, image-, and text select list field. This content type is used for a gallery where the select list values works as a kind of category for the gallery(a bit ...
user1034's user avatar
4 votes
1 answer
359 views

Javascript code appears in search results

I use JavaScript in the body of a node with some PHP code. After I run cron.php and search on the site, I can see Drupal indexes the JavaScript code contained in a node. How do I avoid Drupal indexes ...
user780's user avatar
  • 1,029
0 votes
2 answers
619 views

How do I overwrite the text value?

I want to overwrite the $link['text'] value in theme('rate_button', $link['text'], $link['href'], 'rate-btn'), a theme function defined from the Rate module, under a specific content type in template....
enjoylife's user avatar
  • 3,788
4 votes
1 answer
2k views

is there a way to overwrite the views Sort criteria?

i have overwritten a field's output, and want to use it as the Sort criteria. so i must overwrite the Sort criteria? is there a way to overwrite the views module Sort criteria? the sort criteria is: ...
enjoylife's user avatar
  • 3,788
2 votes
2 answers
2k views

how to show node title when mouseover on image in the node by drupal views?

I have a content type in which there is a cck image field and now I have listed the images with the node title as a block by views. Now I want to show the node title when user mouseovers the image. I ...
Moorthy's user avatar
  • 585
1 vote
1 answer
1k views

File upload and file access

I should upload an Excel file to a site that define a content type with a file CCK field; the download method is public. How do I set the permissions for the upload folder, if I would like to allow ...
user780's user avatar
  • 1,029
12 votes
1 answer
1k views

Best way to benchmark Drupal stack performance

I recently asked a question regarding Drupal performance and got some great replies. This got me thinking, what is a reliable/meaningful way to benchmark Drupal? It's easy to say "install APC, ...
Alex Weber's user avatar
  • 5,086
1 vote
1 answer
115 views

could i overwrite the array value by the preprocess function?

a module that have an array,which value are $links[0]['text']="hello" and $links[2]['text']="world". could i overwrite them value by the mytheme_preprocess_node function in template.php. if can., how ...
enjoylife's user avatar
  • 3,788
3 votes
1 answer
692 views

How to show "incoming search terms"

a lot of blogs have a feature to show the "incoming search terms" - it's great for SEO. I looked up and down drupal.org but couldn't find a module. Any recommendations on how to tackle this (I'm new ...
uwe's user avatar
  • 12k
7 votes
2 answers
828 views

How to deal with module conflicts ("anti-dependencies")?

I have a module that specifically doesn't work with another module. I want to know if there is a way to check if that module is enabled and abort installation for example or gray out the installation ...
Alex Weber's user avatar
  • 5,086
7 votes
3 answers
7k views

Why does not hook_menu_link_alter() work?

i want to expand my theme's primary links, so I put the following code in my custom module. function mymodulename_menu_link_alter(&$item, $menu) { if ($item['menu_name'] == 'primary-links') { ...
enjoylife's user avatar
  • 3,788
3 votes
0 answers
624 views

When paging through a block, another block on the page disappears

I am using Drupal 7 with Organic Groups and Views. Currently within my team node I have 2 blocks appearing with the proper filters in place. The first block is configured to only appear only on pages ...
Kyra's user avatar
  • 319
3 votes
2 answers
5k views

View PDF as "node"/content

I'm working on updating our current intranet to Drupal. What I need to be able to do is take a PDF and load it in an iframe/node via Adobe Reader (or similar). I can get something similar using (I ...
WernerCD's user avatar
  • 784
2 votes
1 answer
829 views

Table with sqlsrv driver is not showing headers or pagination

I just wanted to practice doing the table "header sorting" and pagination to display a Drupal 6 table using a simple MSSQL query. At the moment, the table headers are not showing and there is no ...
happyneil's user avatar
4 votes
1 answer
2k views

File upload field in CCK field settings

Is there a difference in Drupal 7 to add a file-upload field on a "normal" form (i.e. a separate page for a modules' configuration) as opposed to the small settings area for a CCK field (the one that ...
Joe's user avatar
  • 61
4 votes
2 answers
4k views

File field label

I have created a custom content type that has a file field. When I upload a file the node displays the complete file name, test_file.pdf. I would rather display its file name as clickable link. I ...
LandonAB's user avatar
3 votes
2 answers
1k views

How to remove height and width attributes from CCK ImageField tags?

I am using Drupal 6 with the CCK ImageField module. By default, it outputs the height and width of the image as attributes of the tag. For my current project, I'd like to be able to override those ...
acrosman's user avatar
  • 2,728
2 votes
1 answer
1k views

Show empty fields

I've created a custom node (node--CONTENT_TYPE.tpl.php) where I print the fields my way. For example, <div class="test"> <?PHP echo $content['field_tipsol']['#title'].":".$content['...
user709's user avatar
  • 165
98 votes
7 answers
15k views

What are the downsides of using PHP Filter code in blocks, nodes, views-args, etc?

I have seen many times people saying not to use custom PHP/PHP filter (from the Drupal UI) in blocks, nodes, views-args, rules, etc. I have searched around a bit and haven't found much, it seems like ...
Laxman13's user avatar
  • 6,815
18 votes
2 answers
29k views

Do you have an example of hook_menu() access callback?

I have downloaded the examples project, but in the menu_example module all the access callback are set to true.. hard to understand how it works. In my example, my meno entry should be visible on ...
Strae's user avatar
  • 890
3 votes
5 answers
5k views

Avoid access to profiles (user/%user/view)

I want to avoid access to user/%user/view, so only admins can see profiles. At first I tried with changing the permission user_view_access without any luck. I tried to use the hook hook_menu_alter: ...
penyaskito's user avatar
2 votes
1 answer
5k views

Drupal as a simple file manager

I'm wondering how easily it would be to achieve the following. I want to create a Drupal site where users have a small "file area" to upload files. I would like to be able to take those files and ...
Disco's user avatar
  • 431
8 votes
3 answers
2k views

Drush Scripting? Or Batch API?

We have an Ubercart website that handles large volumes of orders daily, processes them and runs other tasks like billing, delivery routing, and future order creation. Some of these tasks are heavy ...
Kevin's user avatar
  • 27.9k
4 votes
2 answers
239 views

Is there a module that creates a jquery-like bar that displays system messages at the top of the page? [closed]

Is there a module that creates a jquery-like bar that displays system messages at the top of the page. (exactly like the large, red bar on this site (stack exchange)?
user avatar
1 vote
1 answer
162 views

What's the best way to implement a system to allow the end-user to download and buy documents?

I need some advise on how to build a system to allow users to download and purchase pdf files. A purchase option is a one time only thing and no order history of login is required. The end user just ...
Camsoft's user avatar
  • 3,139
0 votes
2 answers
1k views

Add a file-download widget on a form

I have a file field called "contracts" between my user fields. What I want is that in the user-profile form this field would come up as a file-download widget. Does anyone have an idea how to show a ...
ayush's user avatar
  • 552
2 votes
2 answers
457 views

Code for page access

I would like to use PHP code in nodes of a specific content type. I can check the user's permission with the global $user if the user can access the node. Is there any module to set view for created ...
user780's user avatar
  • 1,029
3 votes
1 answer
177 views

How do I filter the user who have logged in once in a view?

I need to create a view that shows the users who have logged in once to my site. How can I implement this with Views?
Moorthy's user avatar
  • 585
0 votes
2 answers
129 views

Need a list of third party video services that i can offload the conversion and serving up of my private videos? [closed]

Can anyone help me to narrow down a list of third party video services that i can offload the conversion and serving up of my private videos? Requirements are: Already have a Drupal 6 module that ...
user avatar
5 votes
1 answer
2k views

How does one create terms on hook_install if hook_taxonomy_default_vocabularies is used in the same module?

I'm attempting to create taxonomy terms in a module that provides the vocabulary needed to create these terms. The issue I'm having is the vocabulary is not available upon install. My module ...
troynt's user avatar
  • 183
5 votes
2 answers
4k views

Getting the role ID from the global $user

I'm very new to Drupal, so please bear with me if this is a dumb question. According to the globals API, the global $user object returns roles as an array: [roles] => Array( [rid] => name ) ...
EmmyS's user avatar
  • 1,543
7 votes
1 answer
3k views

How do I remove variables from the variable table when my module uninstalls?

I'm working on a Drupal 6 module that adds some variables to the variable table. How can I go about having those variables removed from the variable table when the module is uninstalled?
Jim's user avatar
  • 833
4 votes
2 answers
600 views

How to get search to display an error when no search terms are entered

Right now if I don't enter a search query in the drupal search module, it returns results for 'search'. I would like it to display an error prompting the user to enter a search query instead. Is there ...
Linens's user avatar
  • 165
5 votes
4 answers
4k views

How do I get the vote result in Vote API?

I have installed the rate module, and found out that the votes associated to a node are stored in the votingapi_vote table. Is there a function to use to get the sum of all the votes for a node?
enjoylife's user avatar
  • 3,788
8 votes
4 answers
5k views

How can you sort taxonomy terms based on number of times used, in a view?

I'm creating a view that lists the top 10 most popular taxonomy terms (tags). Currently I have the view returning all the terms and I can limit the view to 10 but I can't work out how to order the ...
Camsoft's user avatar
  • 3,139
3 votes
2 answers
403 views

Location module should lookup address before saving

This question is related to Adding geo location content to node. I'm trying to get a location saved to a node. The Location module supports this, but I don't like the workflow of this module. It ...
grm's user avatar
  • 355

15 30 50 per page