drupal

How does one inject variables into page templates from a custom Drupal module?

We've created a custom module for organizing and publishing our newsletter content. The issue I'm running into now -- and I'm new to theming and Drupal module development, so it could just be a knowledge issue as opposed to a Drupal issue -- is how to get each newsletter themed. At this point the URL structure of our newsletter will be...

Link phpbb usernames to drupal profiles

I'm using drupal and phpbb with a bridge called phpbbforum. It works quite well, the user information is synched between the drupal and phpbb databases. The forum is embeded in a drupal page, so all variables that come with page.tpl.php should be avaliable. I want drupal to be the only profile handler, so when someone clicks on a phpbb...

Content management recommendations for website?

Hello I am working on a website that has a wide range of content. (News, FAQs, tutorials, blog, articles, product pages etc.) Currently a lot of this content is static or uses special-purpose scripts. I would like to move most of it under the wing of a single content manager. I have not used out of the box content management softwar...

Drupal CCK - Unlimited fieldsets

In Drupal CCK it is possible to set the Number of Values to 'Unlimited,' so that the user can click 'Add Another' and a new field will pop up. Is this somehow possible with a group of CCK fields as well? I need to have a textbox and dropdown linked together, and have my users be able to add an unlimited amount to the content-type. I'v...

integrate php with drupal

How to include php pages in drupal without changing the php code so that dynamically content can be generated.Any process is ok.But i don't want to do the coding in drupal ...

drupal path alias exist or not

How to find whether url is exist or not ? i.e url that leads to 'page not found' error . for ex: finding test/testpage is exist or not i mean that to check whether given relative path or full path is really exist on the site or it leads to page not found error ...

Theming Drupal Add Block form via forms API.

Hiya, Can anyone advise me on customising the Add Block form? (/admin/build/block/add) I want to hide the "User specific visibility settings" and "Role specific visibility settings" from users. This is what i've got so far, but obviously it's not right and I can't figure out what the array is. Anyone got the experience on this? functi...

Drupal destination parameter on the user account page not persistent?

If a user accesses: user/register?destination=node/add/listing And they then click on "Log In" or "Request New Password" tabs, it WONT keep the destination parameter in the address bar. I.e. After clicking on "Log in" and logging in, the user won't actually end up at: node/add/listing I thought of editing the core user module, but ...

file_get_contents not working with non english filenames in DRUPAL

Hello. I have a problem. file_get_contents and other file functions (like file, fopen, glob etc) not working when i try to get file with non english symbols. I getting error that file not exist. It is going when i using any of that functions from my simple drupal module. But same time when i try to use file_get_contents outside drupal's ...

How can I disable Gravatar across an entire Drupal site without breaking the userphotos users have uploaded? I'm using the arrayshift profile, by the way.

How can I disable Gravatar across an entire Drupal site without breaking the userphotos users have uploaded? I'm using the arrayshift profile, by the way. ...

Hide header if node body is empty - Drupal php snippet help

Hello! I've made a content type for links, I'm trying to make a link directory. People only have to submit the link, description is voluntary. If no description is entered, I want the header that says "description" to disappear. The description field is the node body. Right now my snippet looks like this <?php if (!empty($node->body)) {...

How do I execute an action in drupal after each time a node is saved?

I'm developing an Action in Drupal which is supposed to activate after saving a node, exporting content to XML (which includes data from the node that was just saved), using the "Trigger: After saving an updated post" trigger. Unfortunately this action actually happens right before the information from the recently saved post is saved ...

How to include many "sub"-queries in a SQL statement to generate file paths for images?

Greetings, Using this Query to extra data to CSV file from customized OS Commerce mySQL db. SELECT products_id, max( if( products_extra_fields_id = '1', products_extra_fields_value, 0 ) ) AS band_avail, max( if( products_extra_fields_id = '2', products_extra_fields_value, 0 ) ) AS 1_gal_avail, max( if( products_extra_fields_id = '3', ...

Theme the node-create and node-edit template

I'm using drupal 6. I've managed to make a .tpl file for one content type, that is for images in my image gallery. I did that by adding this code in template.php: function artbasic_theme($existing, $type, $theme, $path) { return array( 'galleryimage_node_form' => array( 'arguments' => array('form' => NULL), 'templa...

Simulated click on "add more value" button of multi value cck field causes whole content form to submit

Hi I have a multi value cck field in my cck content type. I want to simulate click on "add another item" using jquery. which is like $('#edit-field-supp-quan-field-supp-quan-add-more').trigger('click'); but it causes whole content form to submit instead of adding extra multi value cck field. Manuall clicks are working perfectly. Can a...

Drupal and Back-End Complexity

Currently I am working on a school website, and we are still in the decision-making process of choosing a framework (we know that we're not using Joomla! or hand-coding). Drupal came up as a viable choice, and currently, that is my best bet for the site. However, I have an issue with CMS's in general. I would like to develop a quite comp...

Drupal: create a node with employee working hours

I have a bit complicated task. 1. I need to create a node with employee working hours (it's gonna be created for all users with role "employee"), which looks like this: Monday: From __ : __ To __ : __ Tuesday: From __ : __ To __ : __ Wednesday: From __ : __ To __ : __ etc. So, I'll have to create probably 14 CCK ...

Adding date to multiple fields via datepicker

i have a form in drupal with jquery based date module. there are multiple fields with date picker enabled. i want to set the value of all of them (they all have class .date-popup-init) to the value of the first field (#edit-field, the 'from' date) when that field is set. my code so far: <script type="text/javascript"> var DatePi...

How to make drupal known submitting custom content

Hi, I know this is not a drupal forum but, as I’m not getting any response there, I decided to give it a shot here. I’m creating a web site that accepts custom content from users. So, for that matter, this site has a form and a custom module. Instead of using admin theme, this form is placed inside custom template which is created to...

drupal: so many js and css files ?

hi, I've realized I'm loading a lot of resources (24 css and 17 js files) using Drupal. I've several modules installed and they all come with a css and js file. For my website I'm only using 1 additional js plugin (all the other 16 come with Drupal modules). I've not installed useless modules. They are all necessary, and they require ...