Re: [development] Easter problem

2010-11-30 Thread la...@garfieldtech.com
There's no need for a hook here at all. You can either code in the algorithm for defining when Easter is (which sounds like it is in fact rather complicated) or just pre-store know pre-calculated dates for it for the next decade or so. (10 records, one per year; totally easy.) Both options a

Re: [development] Easter problem

2010-11-30 Thread la...@garfieldtech.com
The Calendar PHP module is not enabled by default in a stock PHP, so I don't know that you can rely on it (unfortunately). It does have some cool stuff in it, though. --Larry Garfield On 11/30/10 1:22 PM, Carl Wiedemann wrote: Does this help? http://php.net/manual/en/function.easter-days.php

Re: [development] Issue priority

2011-01-11 Thread la...@garfieldtech.com
I believe this to be a good change and agree with it. However, normally such changes should be discussed in the relevant issue queue before being made. A note to this list telling people about the discussion early on is a good courtesy. --Larry Garfield On 1/11/11 5:59 AM, Steven Jones wrot

Re: [development] Drupal Answers: A Stackoverflow/StackExchange site proposal

2011-01-31 Thread la...@garfieldtech.com
Sounds like something to discuss in detail at DrupalCon Chicago and develop an action plan for. :-) --Larry Garfield On 1/31/11 5:37 PM, Randy Fay wrote: I don't think we can delegate any part of Drupal to something we don't control; I think that's just a non-starter. So for me, the issue is

Re: [development] Drupal Answers: A Stackoverflow/StackExchange site proposal

2011-02-01 Thread la...@garfieldtech.com
Uh, Victor, you are aware that Wikipedia has a "team" of editors who correct, prune, and curate content far more actively than anyone on Drupal.org, right? And you are also aware that Drupal core has appointed "leads" who are extremely picky about what they allow in? And that PHP itself has

Re: [development] Drupal Answers: A Stackoverflow/StackExchange site proposal

2011-02-01 Thread la...@garfieldtech.com
On 2/1/11 11:07 AM, Victor Kane wrote: On Tue, Feb 1, 2011 at 1:38 PM, la...@garfieldtech.com <mailto:la...@garfieldtech.com> mailto:la...@garfieldtech.com>> wrote: Uh, Victor, you are aware that Wikipedia has a "team" of editors who correct, prune, and curate con

Re: [development] Drupal Answers: A Stackoverflow/StackExchange site proposal

2011-02-01 Thread la...@garfieldtech.com
You're not confused, David. I don't think anyone was proposing a Drupal SO to replace the handbooks, just potentially the forums. Talking about Docs at all was an unnecessary tangent, and since it's never going to not have someone curating it (since a lack of curation and organization is, as

Re: [development] Git best practices for client codebases

2011-03-01 Thread la...@garfieldtech.com
I think the question is more about non-custom dev history; there's little need for a client site to have the complete development history of Drupal 4.3 in its repo, for instance. Lately, what I've been doing/advocating is using Drush and real releases to download stuff from Drupal.org (core, c

Re: [development] Git best practices for client codebases

2011-03-01 Thread la...@garfieldtech.com
is perfectly reasonable, and worth avoiding the ball and chain of storing every Drupal commit ever. -marco On Tue, Mar 1, 2011 at 11:13 AM, la...@garfieldtech.com <mailto:la...@garfieldtech.com> mailto:la...@garfieldtech.com>> wrote: I think the question is more about non-custom de

Re: [development] Git best practices for client codebases

2011-03-01 Thread la...@garfieldtech.com
useless because I'm not even using it. I'm not saying there are no use cases for an all-git-all-the-time site building process, just that it has implications that you're glossing over in return for a benefit that the majority of use cases don't even need. --Larry G

Re: [development] node_load using cck fields

2011-03-22 Thread la...@garfieldtech.com
You can only load nodes in D6 individually by ID. However, you can run raw SQL queries to find nodes meeting certain criteria, then run node_load() on those IDs. I forget the functions off hand but there is a magic incantation to get the right field column info and build a query string yourse

Re: [development] Database / SQL future thoughts

2009-05-06 Thread la...@garfieldtech.com
Karoly Negyesi wrote: There would have to be some significant performance improvements to justify pushing these views into the database in this developers opinion. If my understanding is correct then that's what David Strauss' materialized views do. Eh, not really. They're a sort of manual o

Re: [development] Proposed Apocrypha

2009-05-07 Thread la...@garfieldtech.com
Ivan Sergio Borgonovo wrote: At least in my experience a "what if they were 3" makes a huge difference to avoid 2 just a special case of 1. But anyway how could you plan or even think an API could be useful knowing just 2 use-case? But then... when you cut and paste more than once... you need an

Re: [development] need a standard for contrib node build_mode constants

2009-05-18 Thread la...@garfieldtech.com
Peter's suggestion may work for D6, but for D7, I refer people to Eaton's "How to make good APIs" session from DCDC. Digest version: If you expect people to extend your list of flags/constants/modes, for the love of god use strings, not ints. Ints WILL break. Don't be stupid, use strings.

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

2009-05-26 Thread la...@garfieldtech.com
Naheem Zaffar wrote: I think many people will be happy with a(n easily customiseable/extendable) tag editor in core - even those who want a full fledged wysiwyg, if their only other option is no editor in core at all. I myself prefer a simple tag editor too - it also has this "ability" to s

Re: [development] Convince Client to Release Code

2009-07-13 Thread la...@garfieldtech.com
As others have noted, the time to be having this conversation with a client is before any work is done, not after. Your contract (which you want to have, period, even if it's a friend, and this is why) should specify who holds the copyright on any code written for the project. For Drupal modu

Re: [development] Files table includes file_directory_path

2009-07-16 Thread la...@garfieldtech.com
sites.php was actually added specifically for this sort of issue, because the sites/ directory structure was too brittle. Of course, for the files directories in particular I have long since dropped using sites//files in favor of files/, which sidesteps the issue entirely. That doesn't need t

Re: [development] Files table includes file_directory_path

2009-07-20 Thread la...@garfieldtech.com
Earnie Boyd wrote: Quoting Clemens Tolboom : On Thu, 2009-07-16 at 10:18 -0500, la...@garfieldtech.com wrote: sites.php was actually added specifically for this sort of issue, because the sites/ directory structure was too brittle. Of course, for the files directories in particular I have

Re: [development] How could everyone win and get Views in Drupal 8?

2009-08-12 Thread la...@garfieldtech.com
Um. hook_query_alter() went into core nearly a year ago as part of DBTNG. It only applies to dynamic SELECT queries, which is a small minority of the queries Drupal runs. Jamie Holly wrote: Yeah I agree we really need to keep Drupal lean. I wouldn't want to see the entire Views package integ

Re: [development] How could everyone win and get Views in Drupal 8?

2009-08-12 Thread la...@garfieldtech.com
n see that becoming a very handy hook. By the way, do you have a decent reference to the new Database layer for D7? I got some stuff to start converting and I would like to start that in the near future. Jamie Holly http://www.intoxination.net http://www.hollyit.net la...@garfieldtech.com wrot

Re: [development] Why I don't Upload a Module to Drupal

2009-08-17 Thread la...@garfieldtech.com
Hi Sam. Most sites have custom code that doesn't get released. Generally I would split it into 3 groups: - Non-module site specific stuff (like custom form alters to tweak something here or there). There's really no way or reason to release this. - Site-specific modules that are modules i

Re: [development] Guidelines for writing efficient SQL code

2009-08-26 Thread la...@garfieldtech.com
This is a moot point anyway as of Drupal 7, as you shouldn't be quoting anything. You should be using placeholders/prepared statements for all queries, and the database will deal with it. --Larry Garfield Pierre Rineau wrote: All I'm asking is Standard SQL, I don't blame you to use MySQL. P

Re: [development] code coverage sept

2009-09-22 Thread la...@garfieldtech.com
The reporting seems a bit wonky. It's returning a "we didn't test this" for the closing brace of dozens of methods even though there's a return statement immediately before it, with no code in between. :-) That's throwing off the numbers considerably. --Larry Garfield Raymond Muilwijk wrote

Re: [development] Creating recordset displays

2009-09-23 Thread la...@garfieldtech.com
There's also the "scaffolding" template module here, courtesy Jeff Eaton: http://cvs.drupal.org/viewvc.py/drupal/contributions/docs/developer/examples/scaffolding_example/ Stupid long CVS URLs... --Larry Garfield andrew morton wrote: I'd suggest looking at the Views Bulk Operation module: htt

Re: [development] Changing Input format for all instances of a field

2009-09-28 Thread la...@garfieldtech.com
The input format is stored as an integer in the database. You should be able to just go to the appropriate CCK table in the database and run an UPDATE query on it manually. You'll then want to clear all caches to make sure it takes effect. I do not know of any more automated method, but it's

Re: [development] Changing Input format for all instances of a field

2009-09-28 Thread la...@garfieldtech.com
ntent_type_* or content_field_* tables. It may be in the serialized arrays in content_node_field or content_node_field_instance, but changing those didn't seem to have an effect. Brian la...@garfieldtech.com wrote: The input format is stored as an integer in the database. You should be ab

Re: [development] How to make Require_once refreshable

2009-10-05 Thread la...@garfieldtech.com
By default, PHP will reload files on disk every page request. If it's not, then it's doing something weird. Possible causes: 1) You're running APC in no-stat mode. You need to restart apache for it to flush its cache. This is not a good mode to run a dev server for the reason you're seeing

Re: [development] Distributed Pairprogramming for Drupal

2009-10-14 Thread la...@garfieldtech.com
Just one point to clarify, there is no "Drupal Team" that could decide en masse to use a tool like this. Drupal is so distributed that we all have our own development workflows using a variety of tools, often in our basements rather than our offices (although there, too). So "Could use and Dr

Re: [development] Convention for naming contrib hooks?

2009-10-15 Thread la...@garfieldtech.com
There's no central canonical list, since hooks are fairly free-form. It's generally good practice to prefix a hook with the name of your module if you're not a core module (hook_yourmodulenamehere_hookname()), but that's not universal unfortunately. --Larry Garfield arthur wrote: Hi- Forgiv

Re: [development] Distributed Pairprogramming for Drupal

2009-10-19 Thread la...@garfieldtech.com
Eike Starkmann wrote: Vladimir Zlatanov wrote: The tool is usable, in some limited fashion - project teams etc... It is not a Drupal tool - there is no such beast - drupal is the tool itself. Having said that the irc paste combo is used exactly in the manner you suggest. Not just by the drupal

[development] PHP Standards Group

2009-11-11 Thread la...@garfieldtech.com
Back in the spring, a group of PHP developers from several popular "pure frameworks" got together and started a PHP standards working group. Their goal was to standardize certain OO coding standards, in particular the use of namespaces, across PHP projects, even if such standards necessitated s

Re: [development] PHP Standards Group

2009-11-11 Thread la...@garfieldtech.com
at a good portion of the D8 or D9 development cycle to come to compatibility? What kind of workload will this place on the Drupal dev community? Either way, you are a good person to have in that discussion. Brian Vuyk http://www.brianvuyk.com la...@garfieldtech.com wrote: Back in the s

Re: [development] Move Dev List to groups.drupal.org

2009-11-18 Thread la...@garfieldtech.com
Put me in the same column. I loathe forums with a passion. They are a horrifically bad interface for pretty much everything other than "getting indexed by Google". Ironically, the Drupal project* issue queues are the forum-type system I despite the least, out of all the ones I've used. Desp

Re: [development] new dev q: are mysql queries possible within drupal?

2009-11-18 Thread la...@garfieldtech.com
spartaguy spartaguy wrote: Thanks to everyone that replied. To summarise then: 1) I need to make a custom module. 2) The module should have a block for displaying the query and a menu hook 3) I can add the module to either primary links or navigation as a menu item 4) Rendered HTML usi

Re: [development] CVS Approval Policy: was Re: new features in D6 core?

2009-11-19 Thread la...@garfieldtech.com
Ashraf Amayreh wrote: If each module developer HAD TO post to the list before being able to create his project the result could have been much better. Currently there's no holding any CVS owner from creating as many new modules without even doing basic research and no one can know it happened

Re: [development] GPL 2 violation by integrationservic.es

2009-11-19 Thread la...@garfieldtech.com
*sigh* There is nothing in the GPL that says you cannot sell a module. The module author is free to charge $1 million dollars a copy if he wants to... provided that the code is then licensed to buyers under the GPL, which means the buyer could redistribute it for free if they felt like it.

Re: [development] GPL 2 violation by integrationservic.es

2009-11-19 Thread la...@garfieldtech.com
Please follow up in the mentioned thread then, not here. --Larry Garfield Brian Vuyk wrote: Nowhere did I claim selling a module was wrong. Of course they can sell a GPL module. The problem here is the code is not being released under the GPL. Brian la...@garfieldtech.com wrote: *sigh

Re: [development] Creative querying

2009-11-23 Thread la...@garfieldtech.com
Also be aware that, at least on MySQL, subqueries in a WHERE clause get executed for every otherwise-matching record. Depending on your dataset that could eat up a lot of time. Subqueries in a SELECT or FROM clause are only executed once, so those are fine. With a proper join against a weigh

Re: [development] Getting SVN to deal with orphaned and new files

2009-11-24 Thread la...@garfieldtech.com
SVN isn't quite as bad for this as you make it out to be. :-) You can do: svn add --force sites/all/modules and it will recursively add any files under that directory that it doesn't already know about. Be careful of ._ files and similar crap that OS X may create. :-) That's actually my us

Re: [development] is drupal a MVC stuff

2009-12-11 Thread la...@garfieldtech.com
Andrew Berry wrote: On 2009-12-11, at 9:33 AM, Damien Tournoud wrote: a big part of the view and the controller is actually handled by the browser. This is true for how %99.9 percent of the Drupal installations out there, but a "view" doesn't have to be graphical. A View could be RSS, XML, P

Re: [development] Drupal's target audience

2010-01-05 Thread la...@garfieldtech.com
Brian Vuyk wrote: I think this whole overlay-in-core issue has kind of raised a fairly significant issue to my mind - who exactly is Drupal's target audience? Everyone! Anyone! The whole world! Which is of course a problem. "You can please some of the people all of the time, and all of the

Re: [development] Good practice for module development

2010-02-04 Thread la...@garfieldtech.com
First and foremost, leverage the menu system's lazy-loading capabilities: http://drupal.org/node/146172 That won't work for everything, but it will work for page callbacks. The theme system has a parallel design. --Larry Garfield ktt wrote: Hello, Is there any good practice advises for dev

Re: [development] Distributing "bi-modal" Drupal modules

2010-02-16 Thread la...@garfieldtech.com
I certainly hope they don't do it a lot. As of Drupal 6, info files must specify their core version and will be rejected by any other core version. If you have code that doesn't change between two versions, sure, you can put it into an include file of your own. And then look into a good sou

Re: [development] No suitable nodes available at RackspaceCloud (Mosso)

2010-02-18 Thread la...@garfieldtech.com
Drupal by design doesn't generate output of any kind until the last second, and then sends the entire page as one giant string. That is what allows us to do all sorts of fun things in the theme layer or HTTP redirection before content gets sent. That said, if I understood the original message

Re: [development] Force admin login

2010-02-23 Thread la...@garfieldtech.com
You can always edit the database directly. It sounds like a cookie problem, though. Try setting the cookie domain explicitly in your settings.php file to just example.com (not www.example.com, or whatever). Also, check to make sure that uid 0 is still intact in the database. That's another

Re: [development] order in which regions are rendered

2010-03-22 Thread la...@garfieldtech.com
That actually seems like a rather screwy thing to be doing in the first place. :-) Perhaps you can explain what you're trying to accomplish and we could figure out a better approach? IME, if you care about the order that blocks are rendered in, or in which region they appear, more often than

Re: [development] Interacting with Views Tabs via code

2010-03-29 Thread la...@garfieldtech.com
Views does all of its menu manipulation in hook_menu_alter already, so if your hook_menu_alter runs first then the views additions won't be there. Try setting your module weight to heavier than views. Alternatively, create your page first using hook_menu as the default tab and then tweak the

Re: [development] php4

2010-06-14 Thread la...@garfieldtech.com
Official position: Drupal 6 core runs on PHP 4. Contribs are at their discretion to decide what they support. Drupal 7 and its contribs will require PHP 5.2 or higher. My personal position: The host in question will likely be deservedly out of business soon. Seriously, PHP 5 is not hard to

Re: [development] State of geo and google map modules?

2010-06-22 Thread la...@garfieldtech.com
On 6/22/10 11:30 AM, Domenic Santangelo wrote: On Jun 22, 2010, at 12:53 AM, Ronald Ashri wrote: In the meantime, I would suggest a careful look at the Openlayers (http://drupal.org/project/openlayers) module if I were you. It is powerful and once you get into it gives you a lot of flexibility

Re: [development] [OT] Eclipse Helios

2010-06-29 Thread la...@garfieldtech.com
I actually had to downgrade from Helios back to Ganymede on my OS X system. I gave it plenty of RAM, but I still kept getting stack overflow errors when opening common.inc, theme.inc, and other large files. The code completion is actually useful in Helios, which is more than I can say for Gan

Re: [development] Module suggestion

2010-07-12 Thread la...@garfieldtech.com
On 7/12/10 4:46 AM, icerain wrote: Thanks for reply. All these module seems in initial stage. Module question: is for the usage of asking questions to administrator, but i want all users can answer the questions. Module question_answer: have evident bugs, after fixed myself, can one of the comme

Re: [development] (no subject)

2010-07-13 Thread la...@garfieldtech.com
I generally warn people away from modifying another module's tables (core being a collection of modules). The potential for collision, confusion, and stuff randomly disappearing on you is too great. If you have a one-off where you know what your situation is, then you can sometimes get away w

Re: [development] Batch API on cron

2010-07-15 Thread la...@garfieldtech.com
I've used drupal_queue on a project recently and I very much like it. It's a backport of the Drupal 7 queue system, too, which gives you an easier upgrade path in the future. It was designed to scale to millions of queue items, although not withe the default backend plugin. The default one is

Re: [development] MySql Performance Problem

2010-07-19 Thread la...@garfieldtech.com
The query is doing a WHERE on the node table and an ORDER BY on the radioactivity table. That will force a temp table no matter what you do. If the temp table is larger than some size (no idea how MySQL determines that size) it will dump it to disk, hence the filesort. Your best bet is to tr

Re: [development] &$node in nodeapi

2010-10-04 Thread la...@garfieldtech.com
On 10/4/10 4:01 PM, Pierre Rineau wrote: On Mon, 2010-10-04 at 19:53 +0200, luca capra wrote: The $op presave was my problem. This is a syntax error my_fill_cck(&$node ); and this should be my hook: function mymod_nodeapi($node ... because&$node is a pointer, and what I need is a refere

Re: [development] Refresh rather than re-create D6 cache

2010-10-18 Thread la...@garfieldtech.com
Just to make sure, have you tried using the minimum cache lifetime on the performance page? It essentially says that a cache record will always last at least that long, even if a clear is requested for it. That's your first step if you're finding some caches clearing too frequently (especially

Re: [development] Refresh rather than re-create D6 cache

2010-10-18 Thread la...@garfieldtech.com
_PERMANENT What do you think? On Mon, Oct 18, 2010 at 14:34, la...@garfieldtech.com <mailto:la...@garfieldtech.com> mailto:la...@garfieldtech.com>> wrote: Just to make sure, have you tried using the minimum cache lifetime on the performance page? It essentially says th

Re: [development] Refresh rather than re-create D6 cache

2010-10-18 Thread la...@garfieldtech.com
On 10/18/10 11:44 AM, Earl Miles wrote: On 10/18/2010 8:25 AM, Pierre Rineau wrote: hook_flush_caches() function description is quite clear on api.d.o, it specifies that this hook should just return cache table names. It is, but the current documentation does not match the name of the hook. My

Re: [development] barcode module for drupal

2010-11-03 Thread la...@garfieldtech.com
Hi, Mahesh. Generally this list is not used for new module announcements. There are far too many of those for it to be feasible. :-) You should also consider releasing your module on Drupal.org[1] so that others can download it, extend it, and participate in its development. Modules not on