Re: [development] Batch API on cron

2010-07-15 Thread andrew morton
On Thu, Jul 15, 2010 at 9:04 AM, Ken Rickard wrote: > Drush scripts (especially bulk node processing) are subject to hitting > PHP memory limits when processing large amounts of data. > > Anyone have ways around that issue? Besides ? andrew

Re: [development] Batch API on cron

2010-07-15 Thread andrew morton
On Thu, Jul 15, 2010 at 7:46 AM, Earnie Boyd wrote: > Sven Decabooter wrote: >> >> Any pointers as to how I could have large chunks of data processed on >> cron in another way? >> > > Not by using hook_cron but by creating a separate script that you execute > within the server cron.  The cron proc

Re: [development] Form API and enter key press

2010-03-08 Thread andrew morton
On Mon, Mar 8, 2010 at 12:12 PM, Pierre Rineau. wrote: > On Mon, 2010-03-08 at 09:06 -0700, Randy Fay wrote: >> Does this work with Chrome? It seems like I've seen Chrome refuse to >> use the enter key when there is more than one submit on the page. >> >> -Randy > > If so, then Chrome is evil :) >

Re: [development] howto views filter null timestamps

2010-02-09 Thread andrew morton
You need a filter that uses COALESCE(fieldname, 0) = 0 to convert NULLs into zeros. I think the numeric filter has this ability. andrew On Tue, Feb 9, 2010 at 5:55 AM, Lluís wrote: > I have coded a content-type and I want to filter it using views. I > have to check if a timestamp field is 0 or N

Re: [development] Creating a user and assigning a node in the node's submit callback.

2010-01-12 Thread andrew morton
Just a shot in the dark but try setting the node's 'name' value on the node as well. On Tue, Jan 12, 2010 at 4:24 PM, Brian Vuyk wrote: > Hi all. > > I've been trying to get a bit of code working, and I would appreciate a set > of eyes. > > Basically, I have a content type ('profile') which has f

Re: [development] Deploying content from master site to subsites

2009-12-31 Thread andrew morton
On Thu, Dec 31, 2009 at 4:53 PM, Domenic Santangelo wrote: > As to overengineering in general, I think Drupal as a whole would be in a > much better place if we called each other out on it more often > (imagefield+imageapi+imagecache+upload+cck required for images in a node, > anyone?). Food fo

Re: [development] Consolidating duplicate contrib modules for D7

2009-12-08 Thread andrew morton
On Mon, Dec 7, 2009 at 10:12 PM, Marcel Partap wrote: > So imho Drupal contrib repository should be freed from > only-maintainer-writable-restriction to accessible-for-all-devs. The new way > of avoiding bogus code commits is not to prohibit developers (who might be > perfectly qualified for th

Re: [development] what's the best way to create nodes from code?

2009-10-30 Thread andrew morton
On Fri, Oct 30, 2009 at 2:44 PM, Domenic Santangelo wrote: > On Oct 30, 2009, at 11:34 AM, Emma Irwin wrote: > > Isn't there a need for node_submit() as well before node_save(); ? > > In D6, yes. Also to clarify Alex's point, a pure node_submit() + node_save() > is indeed faster -- because it does

Re: [development] what's the best way to create nodes from code?

2009-10-30 Thread andrew morton
Yeah there's quite a few modules that expect the hook_nodeapi($op = 'submit') to fire. andrew On Fri, Oct 30, 2009 at 2:34 PM, Emma Irwin wrote: > Isn't there a need for node_submit() as well before node_save(); ? > > On Fri, Oct 30, 2009 at 9:52 AM, Alex Barth > wrote: >> >> If speed is not an

Re: [development] How to make Require_once refreshable

2009-10-05 Thread andrew morton
On Mon, Oct 5, 2009 at 11:12 AM, Nancy Wichmann wrote: > I was trying to track down an issue I am having with the node module's > content_types.inc so I stuck in some messages. Unfortunately, the menu > system uses require_once to load these files, so my changes are not working. > I really don't w

Re: [development] node_get_types question

2009-09-29 Thread andrew morton
Either call node_get_types('name', $type) once for each node type or call $names = node_get_types('names') and pick out the particular names by their key $name[$type] andrew On Tue, Sep 29, 2009 at 9:41 AM, Aldo Martinez Selleras wrote: > i have a variable with 3 node types as value, where only

Re: [development] how to create channel based template callback

2009-09-28 Thread andrew morton
I'm not totally clear what you're trying to do but it seems like you could use a preprocess hook (e.g. modulename_preprocess_page()) to alter the 'template_files' variable that the theme system uses to find candidate files. I'd suggest reviewing the code in template_preprocess_page() to see how the

Re: [development] Creating recordset displays

2009-09-23 Thread andrew morton
I'd suggest looking at the Views Bulk Operation module: http://drupal.org/project/views_bulk_operations On Wed, Sep 23, 2009 at 8:12 AM, Raja Sekharan wrote: > Hi all, > > In many applications I create I find myself doing just one thing - > create CRUD interfaces in the admin panel. So far I have

Re: [development] programatically adding a CCK field to a content type.

2009-09-21 Thread andrew morton
On Mon, Sep 21, 2009 at 6:51 AM, nitin gupta wrote: > Hi, > I wanted to add an imagefield to a content type, using the function > content_field_instance_create(). I wrote this piece of code. > $field['field_name'] = 'myfield'; > $field['type_name'] = 'story'; > $field['type'] = 'filefield'; > $fie

Re: [development] Making your data act like a field

2009-09-16 Thread andrew morton
On Wed, Sep 16, 2009 at 10:03 AM, Nancy Wichmann wrote: > After reading Eaton's well-written article > http://www.lullabot.com/articles/great-pretender-making-your-data-act-field, > I tried this in a module I work on. The fields are definitely showing on > "Manage fields" in CCK. > > However, thos

Re: [development] Apollo 11 code for Drupal?

2009-07-21 Thread andrew morton
On Tue, Jul 21, 2009 at 7:14 PM, Moshe Weitzman wrote: > well, do you want the chx/dww job_queue.inc or do want apollo's? take > 5 mins to read http://history.nasa.gov/alsj/a11/a11.1201-fm.html. > nothing like a software engineering drama. This is by far my favorite Apollo drama: http://www.hq.nas

Re: [development] Why is the Drupal File System relative to website root and not relative to admin/settings/file-system path?

2009-07-16 Thread andrew morton
On Thu, Jul 16, 2009 at 9:57 AM, Ashraf Amayreh wrote: > I don't really understand why the files are not just stored relative to the > files folder rather than the site root. > > That way, changing the location of the files folder would only entail > changing the file path inside the administration

Re: [development] Status update: WYSIWYG support in Drupal core

2009-05-27 Thread andrew morton
On Wed, May 27, 2009 at 6:16 AM, Mikkel Høgh wrote: > More importantly, I think the default response to any sort of "add x > to core" shoud be a loud and resounding "NO". In my opinion, core > should be as slim and lean as possible. We might consider having more > distributions, like "Drupal ready

Re: [development] Status update: WYSIWYG support in Drupal core

2009-05-24 Thread andrew morton
On Sun, May 24, 2009 at 9:06 AM, Walt Daniels wrote: > My sentiments, exactly! If the users can't use it without problems they will > leave you site for one that is more user friendly. Without problems means > whatever ugly hacks under the covers are needed to really strip Word junk. > They don't

Re: [development] Issue queue links from project pages?

2009-05-07 Thread andrew morton
On Thu, May 7, 2009 at 1:01 PM, Michael Favia wrote: > Derek Wright wrote: >> >> However, the point of the maintainers block isn't necessarily to provide >> links people click on, but text people read.  And data about how many >> maintainers, who they are, and how active they are is important info