drupal

Drupal 6 - Views2 - How to build a view of non-nodes

I have a need to build views in drupal of non-nodes, actually objects external to drupal. The api that I am calling against passes me back a stdClass object. Anyone have ideas on how to get Views2 to display non-node objects? ...

Advanced search with Drupal (Views and CCK)

Hi. I'm building a site where products are hold in a content type created with CCK. Products can be associated with multiple taxonomy vocabularities. Now I need an advanced product search which user could use to search by many search arguments (taxonomy terms, CCK field values). I have done quite a lot googling but I haven't been able t...

Drupal/Ubercart ... node styling?

I am trying to style the product view on a Drupal site, but am having problems. I can't find where the node (product) view is put together in ubercart! I'm using UC 5.x-1.7, and I need to style the node (product) view page. At the moment in my node.tpl.php file, I have print $body; which spits out all the SKU, attributes, price, pictur...

SVN Checkout of drupal to another site

I'm trying to svn checkout into treeoil.com's public_html directory (site is not really named treeoil.com), but my repo is located on one of my other sites (landonwinters.com). When I try to do this checkout: svn checkout file:///home/landonwinters/svn/treeoil/trunk . But I get an error that reads: svn: Unable to open an ra_local se...

How to develop drupal site on local server or on test server before publishing it

(Actual site names have been changed) I installed drupal on elephantboarding.com, and it is under version control. I svn updated in landonwinters.com/elephantboarding after i svn committed the installation in megafishoil.com. But landonwinters.com/elephantboarding looks weird, like it doesn't have the default theme set up right, it's ...

Drupal 5: Flag module - display user flagged items in a block

I am aiming to get a list of the current user's flagged items in a block which I can use in my node.tpl.php The functionality required is a "comparison list" of products. Can anyone with experience of the flag module in D5 point me in the right direction? I essentially want to be able to say: <?php print $all_current_user_flags ?> Is...

Drupal node_save no longer returns $nid, so how do I get it?

I have code like this: ... setup $issue object ... $node = node_save($issue); print_r($node); The node is created successfully, and everything works fine...but nothing it returned from save_node(). Older docs indicate that it returns $nid. Several discussions and tickets indicate that in recent Drupal versions the node object is re...

Feedback form on Drupal 6 CCK content type

Hi, This is a follow on to my previous question http://stackoverflow.com/questions/772880/creating-drupal-cck-content-programatically-via-api which is now pretty much complete. I have a system in Drupal 6 which uses the CCK quite extensively and generates exercise programmes for users based on their preferences. The programmes are Con...

How can we select existing image for image field?

I need to select existing image for image field not new upload of image in drupal6X ...

How do I Programmatically Output Custom Paths for Drupal Node Links (w/o PathAuto)?

I would like to be able to programmatically change the outputted path to a Drupal node without using the PathAuto module. We currently process a large volume of content (thousands of articles per day) that get added on the back-end. Rather than use PathAuto to generate path aliases, I would like to have Drupal output the default link b...

How can I save a process resource from proc_open in order to check the status later on?

I'm running a sh script that runs a java process through php on ubuntu server. I'm using proc_open for running the process. usually the Workflow goes like : request a page -> script runs (until it's finished) -> result page. In my case the script runs in parallel so the server won't wait until the script is finished (it takes ho...

Blank arguments in Drupal view not working

I'm stuck on (what I think is) a simple views issue. I have a view with a page display, with a path of: /mydir/%/% Some URLs I would hit are: /mydir/pc/2008/ /mydir/xbox/2007/ /mydir/pc/ %1 and %2 are different CCK fields. When I specify the path with both arguments: /mydir/pc/2008/ it works great. But the one argument paths: /mydir/p...

How can I search the contents of .module files?

I'm working with Drupal at the moment and I'm having a real hard time searching the contents of various .module files. For example I want to search for something like "div style="border: 1px solid red;" and find out which file it's in. All my code editors ignore the .module files in their search because it is a strange extension. Windo...

Why is XDebug producing corrupted files?

I have XDebug enabled on my XAMPP installation. I've used XDebug + Wincachegrind to profile my code for some time. Recently XDebug started throwing some weird stuff into cachegrind.out files. Examples of weird stuff: fl=fl=php:internal fn=php::ini_set 127 7 and fl=C:\xampp\htdocs\drupal-5.7\includes\session.inc fn=sess_close 0 3 =1...

Drupal user_hook in custom module

Modifying download_count module to include information about users who downloaded files. Want to show this info on users' profile pages. Here's the code: function download_count_user($op, &$edit, &$account, $caterory = NULL) { if ($op == 'view') { $result = db_query("SELECT filename FROM file_downloads_users WHERE user_id = %d...

Drupal OG Profile

Is it possible to make a group profile page as for users in Drupal 6.x? if so, how? thanx ...

how to get tinymce (in-browser "rich editor") to preserve indentation

PROBLEM: I use Drupal with a rich-editor, and the rich editor likes to clobber my text by stripping out the indentation and formatting. This would be unacceptable in a desktop editor, but people seem to tolerate this with in-browser wyswigs. QUESTION: How do I turn this off. I've searched around and I have yet to discover the best pract...

Is it worth using MYSQLI_CLIENT_COMPRESS when the db is on another machine?

I have two machines on amazon ec2, one with a drupal installation and another one with the mysql database. I wonder if it's worth to patch drupal to activate mysql client compression. Are there any caveats? ...

Creating a Drupal node with javascript

I'm looking to create a drupal node with javascript, from the same site, and I wonder which direction I should go. I know you can use services/json to do this, but surely there's a simpler way? Thanks ...

Drupal node_seach

I'm working on a RSS feed where full text search has to be offered - you search from some box, and get the result as a RSS. I've been trying to get node_search and do_search working but I'm missing something... but what? As far as I can tell, something like $find = node_search('search', 'type:article'); should give me a result containin...