drupal

Drupal field with mp3 files in - play as playlist with titles

I have a custom 'Player' node type in Drupal with a CCK file field allowing multiple mp3 files to be uploaded (3 in this instance). Currently I have SWFTools installed and most of the players that supports. So far I have been using FlowPlayer3 for it, which does everything I want except display the track names. I've tried most of the oth...

Convert PDF to JPG automatically on upload in Drupal

Hiya, I was wondering if anyone knows how to automatically convert PDF's to JPGs in Drupal when a user uploads, i'm able to create a script to do the actual conversion but my dilema is being able to catch the file on upload and the process it. (or if there is a script/module that already does it it would be even better!). Thanks in adv...

Drupal6: User Access to Deny Login

I want a permission that will prevent people from logging in. (So, all users of role X could be temporarily blocked, while keeping their profile pages available.) Excerpt of the login process from Pro Drupal Development 2nd Edition: POST from login form User is blocked? User is denied by access control? I want to stop users at step ...

disabling Drupal's CSS/JS aggregation for admins

Drupal 6 has a wonderful CSS and JavaScript aggregator. Unfortunately, it interferes with development as it's only regenerated when you clear the Drupal cache. I'd like to turn it on for non-admins (to save HTTP requests) but have the individual CSS and JS files served directly to admins for development. Has anyone done this? Is it poss...

Adding HTML to Drupal closure?

To add javascript, you can use: drupal_add_js And similar for css: drupal_add_css But what if I just want to add html at the end of my page. I.e. Add a div with some text in it at the end of the page? ...

Drupal Filefield won't upload javascript files?

Hiya, I've got a site where individual pages might require some javascript or CSS files hooked into their heads. I'm trying to keep everything client side when it comes to managing this process, rather than getting on the FTP and sorting everything out in the code so I need to be able to upload css and js files. I've got CCK filefield...

Drupal Views: difference between Filters and Arguments?

What difference between Filters and Arguments? E.g. if I need to show nodes where event_start is located inside specified month, which one should I use? ...

Drupal search - alternative ways of doing it?

3rd Drupal question in a day.. guess what I'm doing! OK, I've got the default Drupal search block, but I really need to find a way of restricting it to just searching one particular content type which is called "recipes" (guess what that one contains!) Does anyone have any ideas on how I can restrict the search and then go about contro...

How to map old paths to Drupal paths

I'm converting a Wordpress blog to Drupal and need to map the WP paths to the new Drupal ones. What's the best practice for doing this? There are only around a hundred pages to map. I've been experimenting with the URL Alter module, which provides an alternative to messing with custom_url_rewrite functions settings.php but keep getting 4...

Drupal 6: How can I "turn off" a page?

Using Drupal 6 I simply want to disable the user/1/openid page for authenticated users. How? ...

Drupal 6: custom profile fields and saving data to a DB

So i've added several some custom profile fields (administer -> profiles) which is all fine but completely useless if I can't store the information in a database. I've been searching for hours now trying to figure out the "best practices" way for doing this with very little luck. Do I add the new columns to the Users table? Do I create...

Drupal PHP pages without having a DB Query?

I'm working on a site where there will be several admin pages that have intense logic in them. Let's take an example. I want a page that lists certain nodes and allows you to add or remove them, or do other actions on them. Now, I can create a normal page in Drupal and select the input filter as "php code" and then just add the followin...

Is using "global" user in Drupal dangerous?

I always hear using global variables are dangerous. Does this apply to Drupal? Take a look at the following example: function myFunction($bla) { global $user; if (isAuthenticated($user->uid)) { print $secretCode; } } Can this be hacked? ...

Mass node_load for Drupal?

Is there an easy way to get several noads loaded into an array? I know node_load works for one node, but what if I have a large list of node ids that I want all data of? ...

Confused about user profiles in drupal

Hi all, I'm very confused about the whole user profile thing in drupal, hope someone can help me out here since I haven't found a clear answer anywhere else. For starters, where do you set up custom fields for users, is it under 'admin/user/profile' or under 'admin/content/node-type/profile' (with the content_profile Module installed)?...

Drupal6 Deployment: Developed on XAMPP, when online localhost is still the base path

I developed a Drupal site on XAMPP. I deployed it to an Apache webserver by uploading a zip file and .sql file of the database. However, the links on pages generated by Views 2 are still as they were on XAMPP - http://localhost, etc. (So instead of www.example.com, it's http://localhost). Where do I change this setting? I looked in sett...

Increase PHP Memory limit (Apache, Drupal6)

I'm trying to run a Drupal installation on a shared hosting server. (I'm just subscribing to a provider - I don't own the box.) I need to increase the PHP memory limit for my Apache server. I have tried ini_set('memory_limit', '64M'); in settings.php (a file that is included in every request), but this causes Internal Server Error 50...

Limiting the total number of certain types of nodes a user may create in Drupal by role?

On my site, I have three roles: Role 1 Role 2 Role 3 Role 1 may only ever have 10 nodes of type "NODE_TYPE". Role 2 may only ever have 100 nodes of type "NODE_TYPE". Role 3 may only ever have 1000 nodes of type "NODE_TYPE". What can I use to enforce this? The following modules don't do the trick: node_limit user quota Anyone?...

Adding a rule that checks if the user's role has changed?

Is there a way to add a rule that can do a certain action when a user's role is changed? ...

Drupal: updating with Drush doesn't change update status

I've updated my drupal installation and drupal modules, but admin/reports/updates says that Drupal version is still 6.12. To update drupal I ran - drush updatecode - drush updatedb (this updated only modules and said code still needs to be updated manually). Then I uploaded core, unzipped it, allowed to overwrite older versions and again...