drupal

Theming node-xxx.tpl.php

hi. i am new to drupal theming. i want to do the following: i have a product content type that i am manipulating it's node-product.tpl.php, the product content-type has a CCK field of type "Embedded Video" (using the Media module found at http://drupal.org/project/media ). since i need to wrap the "Embedded Video" field with a tag i wan...

Drupal - Admin stay logged in forever

Quick question - Is there any simple way (module perhaps?) to set the admin account to stay logged in forever? I admin a bunch of Drupal sites and am getting really tired of constantly logging in after whatever interval it logs out automatically. ...

Changing the value of a field in a Drupal form

Hello, I've created a hook submit function for my Drupal node edit form. I'd like to change the value of a CCK field (not in the form) for that specific node within the sumbit handler. I've tried setting the field as hidden and applying a value to it, but this didn't work. Could anyone suggest a way to do this? Thanks, Jonathan ...

$cookie_domain value causes access denied upon login

I have FCK editor installed, and trying to enable FCK file manager. It tells me that in order to use it, $cookie_domain must be set. Easy enough, I set it to www.mysite.com. I can log in, register, etc just fine. However I started seeing a number of people get Access Denied after logging in or trying to access any protected area. Comm...

In Drupal, how to set node-[content type].tpl.php to display 404 Error?

In Drupal 6, I would like to have certain Content Types display Error 404, when accessed. I don't want them indexed by search engines or being accessible to users. They are used to store data, such as photos or other attachments. I've tried setting node-[content type].tpl.php to <?php return drupal_not_found(); but it duplicates the ...

What does @ mean in a string PHP? (Not the error suppression operator)

Possible Duplicate: @ (at sign) in drupal I know that sometimes it has to do with error suppression but I'm looking at Drupal code and I can't recognize the syntax: Example 1: $batch = array( 'operations' => $operations, 'finished' => '_install_profile_batch_finished', 'title' => st('Installing @drupal', array('@drupal' => d...

How to upgrade drupal modules?

In my case I'm upgrading the memcache module,though there's a README.txt but it seems not operable : 1. Install the memcached binaries on your server. See http://www.lullabot.com/articles/how_install_memcache_debian_etch 2. Install the PECL memcache extension for PHP. This must be version 2.2.1 or higher or you will experience errors. 3...

Ubercart - Product discount based on total number of all products in cart

I'm using Ubercart in Drupal for a simple web store. I'm having trouble calculating a product discount based on the total number of all products in the cart. For example, I'm easily able to define discounts for if a user buys more than one of the same product, using the uc_custom_price module. But I want to give the discount if they buy...

Is Plone doing enough to keep up with other CMSes?

I do Drupal for a living and I like the system. However I've always been intrigued by Plone and wanted to learn it well to broad base my knowledge of CMSes in general. I've played around with Plone in the past and was both mesmerized and repulsed by it -- depending on the day. But then again here is what I saw as the advantages of Plon...

Drupal Core Poll - http 403 error

Hello! I've asked this before but with other questions so I posted it again. I'm actually receiving an error message An HTTP error 403 occurred. /poll/js when trying to add additional option in poll. I'm using the Drupal Core Poll and the latest version of files. I have several modules including boost which is known to have issue...

LDAP JBoss and Drupal authentication

Setup JBoss using LdapExtLoginModule to auth to Microsoft ADAM (Lightweight Directory Server) Drupal using ldap_integration module to auth to the same Microsoft ADAM above Url within JBoss realm that requires user to auth (again) using HTTP Basic Auth Use Case User logs in to Drupal , auth'ed by ADAM. At this point Drupal only kno...

Drupal Views: Get nodes with the same taxonomy as the current node.

Hi Folks, I have a Content-Type with taxonomy-terms. It's a select-list, so it can have only one taxonomy - at least of that vocabulary. Now I need to build a view that lists all nodes with the same taxonomy. Thought that this wouldn't be too hard since it sounds pretty basic. Yet I can't get it working. Any ideas? I'm trying to avoid...

Drupal Adding custom Omniture code, PHP variable not being set

Ok I have some custom Omniture code I need to add to a Drupal site. All is good as I have added the Javascript code to the themes template page. The code shows up on all the pages as expected but I have a couple of PHP variables that I need to print in the Javascript that are coming up blank. <?php $omniture_event = "test this work...

Security risk of $update_access_free = true in Drupal

What kind of potential security risk it raises if I left $update_access_free = TRUE in Drupal on a production environment? In that case, everyone can run update.php. Assuming there are no updates available, what can an attacker do? ...

What's use of "#process" callback in drupal form api?

Hi,In drupal fapi there is an attribute "#process".what exactly does it?Why password field use it for field duplication instead of adding it with theming? I want to use it for defining a new field type with hook_elements. Edit: here is my hook_elements: function test_elemets() { return array( 'test_field' => array( '#in...

How to change Drupal user password programmatically?

We are going to deploy a Drupal site inside company's intranet. There is a requirement for user to reset password. We have a centralized password reset mechanism (for single sign on): user submits a password change request in system the request is sent to a password server the password server will reset the user's password in all syste...

Attached files rights for Drupal

hello, on my website i have two types of files that end users can download - one of them are available for all visitors, and second is only for registered users (users that are logged in). setting of drupal allows to set only if files are available for all users or only for users that are logged in. how can i achieve that some files a...

Drupal Views 3 rescan template files

Hi, I am having some issues with Views 3 on Drupal 7 Beta when rescanning template files. I've put a new template in my theme folder called views-view-fields--blog--block-1.tpl.php which is the filename Theme Information suggests. When I click "Rescan Template Files" the pane disappears and it doesn't bold the new template (and doesn't ...

Dynamic forum permissions in Drupal

My users access Drupal through SSO and everytime the server authorizes them, it returns a set of permissions (groups/roles), according to which I need to dynamically set the User's forum permissions. So for example if a User logs in and the SSO says that he has enrolled in a course, I need to give him specific permissions for that cours...

How can I call a Drupal function from inside a PHP file?

I'm trying to do some integration between Drupal and a webmail client and I want to call a Drupal function from a PHP file that is part of the webmail client. In this case, the function I want to call is provided by a contrib module, but I'm assuming that won't matter. So, if I have a non-Drupal page called mail_login.php and want to c...