drupal

Drupal + Location Module: How to query blog entry locations

I am using the Location module within Drupal 6 to tag geographical locations to blog entries. So every blog entry has a long/lat My question is: What is the most efficient way of querying all coordinates for all blog entries of a given user? ...

drupal taxonomy

I have several different content type nodes (videos, image galleries, stories...) that I would like to categorize and create a top-level page that aggregates these nodes. So for example, the top-level page would have teaser thumbnails very similar to the front page view but of course filtered for that topic (like for instance automobile...

How to disable personal contact form option in drupal user account creation.

I am a drupal beginner. When a user creates his account he/she has the option to have a personal contact form. Where do I go to disable that? It's not in permissions. It's not a bad option but I know it will confuse the hell out of my site's users. It may even scare some away! ...

importing content into drupal.

I have a wordpress site with 5k post and each post has average 25 comments. so 125k total nodes have to be added. I need import those posts and comments into drupal 6 . I have written a script to import those post/comments into drupal by drupal's cron service. but the cron service keeps time out. because import 125k nodes one by one i...

code effect in html/blog

I'm using Eclipse to write php and naturally I get color coding like all IDEs do. How do I get the same effect in a blog? See this example (scroll down to see the code colors), he has full colors, green, red, blue, pretty acceptable I'd say http://www.tellinya.com/read/2007/06/15/20.html Is there something that's standalone PHP that...

Drupal: cache_menu refreshing after each node update

Hi, I have a problem with the cache_menu table, to which data are saved after each node update. With each addition of node, the question inserting data is increasing. At this time, has a length of 310k characters, and it needs about 410MB! Probably by a regular expression that processes it before executing (in db_query() function). Is it...

Converting array to Drupal format

Hi all, This statement gives me the value I want in Drupal (namely the last user role): global $user; return (end($user->roles)); however I need to convert it to this format: return array( 0 => array('value' => value for value), // You'll usually want to stop here. Provide more values // if you want your 'default value' to be ...

Sending a variable to javascrpt in Drupal

Hello, I have set theme handler for a form in Drupal and this handler has a template file. What is the easiest way to send a value from PHP to Javascript in that include file? Thank you. ...

Is there a way to rewrite a url to go to a file stored in the filefield of the node

I have a custom content-type called 'document' On this content-type, I have a File field where a user can upload a document. Assume the path to a document node is /somesite/document/tester I would like to be able to link to /somesite/document/tester/file and it automatically go to the file that is uploaded to the file field of the nod...

Drupal node reference

I am using two content types - test_parent & test_child In test_child there are two fields, both of type datetime And in test_parent there are two fields, week_no & 7 node references I am using node_save to save a new node. After saving a node of parent type, and then saving the node of child type, i want to update the node it into the ...

Front page Featured Section

I have a website where users register their projects for a certain event. I'd like to highlight certain projects on certain days on the front page. What's the easiest way to add a "Featured Section" that accomplishes this? I know I can go through and make the post sticky but that seems tedious. Is it possible to use Views to do this or ...

Creating nodes programatically in Drupal 6

Hey, I have been searching for how to create nodes in Drupal 6. I found some entries here on stackoverflow, but the questions seemed to either be for older versions or the solutions did not work for me. Ok, so here is my current process for trying to create $node = new stdClass(); $node->title = "test title"; $node->body = "test body...

jQuery $.get() not working in Drupal 6

So I am running into this problem. I am trying to use $.get() to interact with a REST application within Drupal 6.16, which uses jQuery 1.2.6 I have a test page on the desktop where I run the following code, and it successfully runs the alert. url = 'http://api.twitter.com/1/help/test.xml'; $.get(url, function(){alert("WORKING!!");...

How would the conversion of a custom CMS using a text-file-based database to Drupal be tackled?

Just today I've started using Drupal for a site I'm designing/developing. For my own site http://jwm-art.net I wrote a user-unfriendly CMS in PHP. My brief experience with Drupal is making me want to convert from the CMS I wrote. A CMS whose sole method (other than comments) of automatically publishing content is by logging in via SSH a...

'on the web' drupal module showing images on localhost but not remote host

Hi, the simple little module titled 'on the web' for drupal shows social network links. It links to some images on the directory. on my localhost install they are showing but in the remote install the img tags aren't even appearing. I looked in the module's files and the path isn't hard-coded or anything so it's not to do with that. ...

Underscore before theme name

Hi There, I was browsing the template.php file for the rootcandy theme and noticed some of the function names start with an underscore i.e. function _rootcandy_admin_links() function rootcandy_body_class() Anyone know why this is? I thought the functions had to start with the name of the theme. Many thanks ...

How to turn off authoring information for a drupal page

Is there a way to hide date and user info from a page post in drual? ...

Drupal advanced ACLs for "untrusted" administrators

I have a multi-site Drupal-6 installation containing websites of different customers. On each site, there is an "administrator" role that includes mainly the customer's account. We want to give as many permissions as possible to this privileged user, but this could bring to security leaks using just the Drupal Core permissions managemen...

Using .inc files when theming.

Hi there, I noticed in the Zen theme there were various PHP files with the .inc file extension .i.e. template.conditional-styles.inc. I've read/watched quite a few theming tutorials but none of them mentioned these files for theming, only the template.php. Can anyone tell me when, if and how I should be using these files for theming. ...

In Drupal 6, is there a way to take a custom field from the latest post to a taxonomy term, and display it in a view?

The title for this question pretty much sums up what I'm asking. I've got a list of taxonomy terms, and I'm using a view to display the latest post to each one. I'd like to also display a custom field set up in CCK just under this. Currently, I'm just using "date updated" of the taxonomy term itself which was easy to set up in views. I...