<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<id>tag:old.nabble.com,2006:forum-14423</id>
	<title>Nabble - Drupal - Dev</title>
	<updated>2009-11-23T13:42:01Z</updated>
	<link rel="self" type="application/atom+xml" href="http://old.nabble.com/Drupal---Dev-f14423.xml" />
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Drupal---Dev-f14423.html" />
	<subtitle type="html">A list for Drupal developers.</subtitle>
	
<entry>
	<id>tag:old.nabble.com,2006:post-26486459</id>
	<title>Re: Doing hook_update_N() when module is installed</title>
	<published>2009-11-23T13:42:01Z</published>
	<updated>2009-11-23T13:42:01Z</updated>
	<author>
		<name>Earnie</name>
	</author>
	<content type="html">On Fri, 13 Nov 2009 Randy Fay wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; Thanks for your comments on this!
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;You're welcome. &amp;nbsp;Let me apologize for being late in responding. &amp;nbsp;Other &amp;nbsp;
&lt;br&gt;duties kept me off list for quite a while.
&lt;br&gt;&lt;br&gt;&amp;gt; While you're right that the original intent of hook_install() is to do a *
&lt;br&gt;&amp;gt; schema* setup and the original intent of hook_update_N() it to update that
&lt;br&gt;&amp;gt; when change occur down the line, they are both actually and widely used to
&lt;br&gt;&amp;gt; set up the Drupal configuration in non-schema ways so that it's ready for
&lt;br&gt;&amp;gt; the module. &amp;nbsp;You yourself mentioned in a later message a variable_set()
&lt;br&gt;&amp;gt; which is a configuration change, not a schema change.
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;I do understand that hook_install and hook_update_N have been misused &amp;nbsp;
&lt;br&gt;to help a package maintain sanity. &amp;nbsp;It is that misuse that needs to be &amp;nbsp;
&lt;br&gt;addressed by providing either updated documentation for hook_install &amp;nbsp;
&lt;br&gt;and hook_update_N to allow for the unintended use or to provide &amp;nbsp;
&lt;br&gt;instruction for how to control the variable default values of a &amp;nbsp;
&lt;br&gt;package during install and upgrade phases.
&lt;br&gt;&lt;br&gt;&amp;gt; I *think* that the reality is that these two functions are often used in a
&lt;br&gt;&amp;gt; variety of ways to make sure configuration is correct for the current
&lt;br&gt;&amp;gt; version of the module, not just in terms of schema.
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;Yes, I agree that they have been used this way but shouldn't be. &amp;nbsp; 
&lt;br&gt;Perhaps a specialized menu callback that is created during the install &amp;nbsp;
&lt;br&gt;or update phases that can is then executed on first use and removed &amp;nbsp;
&lt;br&gt;from then removed from the router table is what is needed for this. &amp;nbsp; 
&lt;br&gt;Only the install or update phase would create the menu callback within &amp;nbsp;
&lt;br&gt;the menu router table.
&lt;br&gt;&lt;br&gt;&amp;gt; You mention the idea of setting up something for cron to do... but that
&lt;br&gt;&amp;gt; would be a privately implemented hook_update_N, woudn't it?
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;No, a variable can be reset outside of the install/update phase so &amp;nbsp;
&lt;br&gt;that it can be executed manually if desired. &amp;nbsp;In D7 hook_update_N will &amp;nbsp;
&lt;br&gt;only be allowed to be executed once.
&lt;br&gt;&lt;br&gt;&amp;gt; In my case, which is a bit extreme, I'm writing a module whose only job is
&lt;br&gt;&amp;gt; to do one-off configuration changes to staging*.drupal.org. There are 10 of
&lt;br&gt;&amp;gt; these machines, and their configuration is slightly different from
&lt;br&gt;&amp;gt; Drupal.org, but they are occasionally reinstalled with D.o's database. That
&lt;br&gt;&amp;gt; means that the install needs to work to set the config correctly, and also
&lt;br&gt;&amp;gt; that when a config change is introduced, hook_update_N (or a similar
&lt;br&gt;&amp;gt; technique) needs to take care of it. We're trying to avoid reconfiguring
&lt;br&gt;&amp;gt; everywhere.
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;The thing I dislike about this is you are requiring a installation of &amp;nbsp;
&lt;br&gt;an update to your module just to make a configuration change. &amp;nbsp;If &amp;nbsp;
&lt;br&gt;instead you put the changes in a INI file type and create a hook_cron &amp;nbsp;
&lt;br&gt;(or even a hook_init if the code doesn't take very long) to check for &amp;nbsp;
&lt;br&gt;a new file date you can make the configuration changes without &amp;nbsp;
&lt;br&gt;shutting down the site for update.php.
&lt;br&gt;&lt;br&gt;&amp;gt; As others have mentioned, this pattern is quite common.
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;INI files are for configuration. &amp;nbsp;It makes sense to use what is &amp;nbsp;
&lt;br&gt;already available for configurations and PHP can read them for you to &amp;nbsp;
&lt;br&gt;the point that it returns an associative array of values. &amp;nbsp;You can &amp;nbsp;
&lt;br&gt;even have a hierarchical tree array.
&lt;br&gt;&lt;br&gt;&amp;gt; A valuable discussion. I'm interested in hearing more.
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;Yes, I agree and I would like to hear more as well.
&lt;br&gt;&lt;br&gt;--
&lt;br&gt;Earnie
&lt;br&gt;-- &lt;a href=&quot;http://r-feed.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://r-feed.com/&lt;/a&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-- &lt;a href=&quot;http://for-my-kids.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://for-my-kids.com/&lt;/a&gt;&lt;br&gt;-- &lt;a href=&quot;http://www.4offer.biz/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.4offer.biz/&lt;/a&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-- &lt;a href=&quot;http://give-me-an-offer.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://give-me-an-offer.com/&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Doing-hook_update_N%28%29-when-module-is-installed-tp26313298p26486459.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26484309</id>
	<title>Re: creating a new usermanagement things</title>
	<published>2009-11-23T11:24:10Z</published>
	<updated>2009-11-23T11:24:10Z</updated>
	<author>
		<name>Clivesj</name>
	</author>
	<content type="html">May be you should have a look at CiviCRM: &lt;a href=&quot;http://www.civicrm.org&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.civicrm.org&lt;/a&gt;&lt;br&gt;&lt;br&gt;Joop
&lt;br&gt;&lt;br&gt;-----Oorspronkelijk bericht-----
&lt;br&gt;Van: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26484309&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;development-bounces@...&lt;/a&gt; [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26484309&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;development-bounces@...&lt;/a&gt;]
&lt;br&gt;Namens Kees Scherpenhuijzen
&lt;br&gt;Verzonden: maandag 23 november 2009 18:29
&lt;br&gt;Aan: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26484309&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;development@...&lt;/a&gt;
&lt;br&gt;Onderwerp: [development] creating a new usermanagement things
&lt;br&gt;&lt;br&gt;Hey all,
&lt;br&gt;&lt;br&gt;When using drupal for a site where users can register themself for a
&lt;br&gt;event; what is the best way to store the data when you have different
&lt;br&gt;modules to manipulate them?
&lt;br&gt;By manipulating i mean:
&lt;br&gt;- Managing some fields like if the person have payed.
&lt;br&gt;- Managing multiple users to assign them to groups
&lt;br&gt;- Just show lists of users
&lt;br&gt;- Printing lists of each user data
&lt;br&gt;&lt;br&gt;I'm right now looking a the module profile which is provided by drupal
&lt;br&gt;it self. but is see it is data stored in a separate table. Is it then
&lt;br&gt;the best way to create code which uses the &amp;quot;API&amp;quot; from profile? Is
&lt;br&gt;there anyone who has more experience with this?
&lt;br&gt;&lt;br&gt;TIA,
&lt;br&gt;-- 
&lt;br&gt;Kees
&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/creating-a-new-usermanagement-things-tp26482521p26484309.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26483413</id>
	<title>Re: Creative querying</title>
	<published>2009-11-23T10:24:10Z</published>
	<updated>2009-11-23T10:24:10Z</updated>
	<author>
		<name>Greg Knaddison</name>
	</author>
	<content type="html">On Mon, Nov 23, 2009 at 8:51 AM, Brian Vuyk &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26483413&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;brian@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Jeff Greenberg wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Brian Vuyk wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; 1.) We are including extra data from the users table (wasn't central to the
&lt;br&gt;&amp;gt; question, so I omitted it to simplify)
&lt;br&gt;&amp;gt; 2.) How would you structure this exactly with subquery?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Create a second table where the role id's have a weight for their capability
&lt;br&gt;&amp;gt; level
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Ah, right, I get it now!
&lt;/div&gt;&lt;br&gt;There's a module for that - &lt;a href=&quot;http://drupal.org/project/role_weights&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://drupal.org/project/role_weights&lt;/a&gt;&lt;br&gt;&lt;br&gt;#rule35
&lt;br&gt;&lt;br&gt;Cheers,
&lt;br&gt;Greg
&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Greg Knaddison | 303-800-5623 | &lt;a href=&quot;http://growingventuresolutions.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://growingventuresolutions.com&lt;/a&gt;&lt;br&gt;Mastering Drupal - &lt;a href=&quot;http://www.masteringdrupal.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.masteringdrupal.com&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Creative-querying-tp26479952p26483413.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26483019</id>
	<title>Re: creating a new usermanagement things</title>
	<published>2009-11-23T09:58:33Z</published>
	<updated>2009-11-23T09:58:33Z</updated>
	<author>
		<name>Andrew Berry-3</name>
	</author>
	<content type="html">On 2009-11-23, at 12:29 PM, Kees Scherpenhuijzen wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; Hey all,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; When using drupal for a site where users can register themself for a
&lt;br&gt;&amp;gt; event; what is the best way to store the data when you have different
&lt;br&gt;&amp;gt; modules to manipulate them?
&lt;br&gt;&lt;br&gt;It sounds like you need to investigate some contrib modules - much of this doesn't require coding at all. Look up CCK, Views, Content Profile, Organic Groups at the least.
&lt;br&gt;&lt;br&gt;I would suggest not using the core Profile module unless your requirements are very simple. Using CCK fields is far more flexible.
&lt;br&gt;&lt;br&gt;--Andrew&lt;br /&gt; &lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://old.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;smime.p7s&lt;/strong&gt; (3K) &lt;a href=&quot;http://old.nabble.com/attachment/26483019/0/smime.p7s&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/creating-a-new-usermanagement-things-tp26482521p26483019.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26482521</id>
	<title>creating a new usermanagement things</title>
	<published>2009-11-23T09:29:26Z</published>
	<updated>2009-11-23T09:29:26Z</updated>
	<author>
		<name>Kees Scherpenhuijzen</name>
	</author>
	<content type="html">Hey all,
&lt;br&gt;&lt;br&gt;When using drupal for a site where users can register themself for a
&lt;br&gt;event; what is the best way to store the data when you have different
&lt;br&gt;modules to manipulate them?
&lt;br&gt;By manipulating i mean:
&lt;br&gt;- Managing some fields like if the person have payed.
&lt;br&gt;- Managing multiple users to assign them to groups
&lt;br&gt;- Just show lists of users
&lt;br&gt;- Printing lists of each user data
&lt;br&gt;&lt;br&gt;I'm right now looking a the module profile which is provided by drupal
&lt;br&gt;it self. but is see it is data stored in a separate table. Is it then
&lt;br&gt;the best way to create code which uses the &amp;quot;API&amp;quot; from profile? Is
&lt;br&gt;there anyone who has more experience with this?
&lt;br&gt;&lt;br&gt;TIA,
&lt;br&gt;-- 
&lt;br&gt;Kees
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/creating-a-new-usermanagement-things-tp26482521p26482521.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26481027</id>
	<title>Re: Creative querying</title>
	<published>2009-11-23T08:12:50Z</published>
	<updated>2009-11-23T08:12:50Z</updated>
	<author>
		<name>larry@garfieldtech.com</name>
	</author>
	<content type="html">Also be aware that, at least on MySQL, subqueries in a WHERE clause get 
&lt;br&gt;executed for every otherwise-matching record. &amp;nbsp;Depending on your dataset 
&lt;br&gt;that could eat up a lot of time. &amp;nbsp;Subqueries in a SELECT or FROM clause 
&lt;br&gt;are only executed once, so those are fine.
&lt;br&gt;&lt;br&gt;With a proper join against a weighting table, though, the subquery 
&lt;br&gt;shouldn't even be necessary.
&lt;br&gt;&lt;br&gt;--Larry Garfield
&lt;br&gt;&lt;br&gt;Ken Winters wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; select * from users where uid in (select uid from users_roles where rid 
&lt;br&gt;&amp;gt; in (4,5,6,7,8));
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Note that I dropped the rid column from the results, but your query 
&lt;br&gt;&amp;gt; didn't provide all that useful results for it to start with (picked 
&lt;br&gt;&amp;gt; one). &amp;nbsp;If you actually need it then you may still need a join, and also 
&lt;br&gt;&amp;gt; might need something like group_concat.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; - Ken Winters
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; On Nov 23, 2009, at 10:41 AM, Brian Vuyk wrote:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; 1.) We are including extra data from the users table (wasn't central 
&lt;br&gt;&amp;gt;&amp;gt; to the question, so I omitted it to simplify)
&lt;br&gt;&amp;gt;&amp;gt; 2.) How would you structure this exactly with subquery?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Brian
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Ken Winters wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; On Nov 23, 2009, at 10:18 AM, Brian Vuyk wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; SELECT DISTINCT u.uid, ur.rid FROM {users} u RIGHT JOIN 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; {users_roles} ur ON ur.uid = u.uid WHERE rid = 6 OR rid = 8 OR rid = 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 5 OR rid = 7 OR rid = 4 GROUP BY uid;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Brian
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; 1) Why are you doing a join when all the info you are selecting is in 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; the users_roles table? &amp;nbsp;If you don't need it for some other reason, 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; problem solved.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; 2) I've found it's generally better to use subqueries (where X in 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; (select Y from Z)) rather than join and group.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; - Ken Winters
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Creative-querying-tp26479952p26481027.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26480701</id>
	<title>Re: Creative querying</title>
	<published>2009-11-23T07:54:09Z</published>
	<updated>2009-11-23T07:54:09Z</updated>
	<author>
		<name>Ken Winters</name>
	</author>
	<content type="html">&lt;html&gt;&lt;body style=&quot;word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; &quot;&gt;&lt;div&gt;select * from users where uid in (select uid from users_roles where rid in (4,5,6,7,8));&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Note that I dropped the rid column from the results, but your query didn't provide all that useful results for it to start with (picked one). &amp;nbsp;If you actually need it then you may still need a join, and also might need something like group_concat.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;- Ken Winters&lt;/div&gt;&lt;br&gt;&lt;div&gt;&lt;div&gt;On Nov 23, 2009, at 10:41 AM, Brian Vuyk wrote:&lt;/div&gt;&lt;br class=&quot;Apple-interchange-newline&quot;&gt;&lt;blockquote type=&quot;cite&quot;&gt; &lt;div bgcolor=&quot;#ffffff&quot; text=&quot;#000000&quot;&gt; 1.) We are including extra data from the users table (wasn't central to the question, so I omitted it to simplify)&lt;br&gt; 2.) How would you structure this exactly with subquery?&lt;br&gt; &lt;br&gt; Brian&lt;br&gt; &lt;br&gt; Ken Winters wrote:&lt;br&gt; &lt;blockquote cite=&quot;mid:F1D65A65-1438-4F97-A450-7D765B64C12C@coalmarch.com&quot; type=&quot;cite&quot;&gt;  &lt;div&gt;  &lt;div&gt;On Nov 23, 2009, at 10:18 AM, Brian Vuyk wrote:&lt;/div&gt;  &lt;blockquote type=&quot;cite&quot;&gt;    &lt;div&gt;&lt;font class=&quot;Apple-style-span&quot; color=&quot;#000000&quot;&gt;&lt;br&gt;    &lt;/font&gt;SELECT DISTINCT u.uid, ur.rid FROM {users} u RIGHT JOIN {users_roles} ur ON ur.uid = u.uid WHERE rid = 6 OR rid = 8 OR rid = 5 OR rid = 7 OR rid = 4 GROUP BY uid;&lt;br&gt;    &lt;br&gt; Brian&lt;br&gt;    &lt;/div&gt;  &lt;/blockquote&gt;  &lt;/div&gt;  &lt;br&gt;  &lt;div&gt;1) Why are you doing a join when all the info you are selecting is in the users_roles table? &amp;nbsp;If you don't need it for some other reason, problem solved.&lt;/div&gt;  &lt;div&gt;2) I've found it's generally better to use subqueries (where X in (select Y from Z)) rather than join and group.&lt;/div&gt;  &lt;div&gt;&lt;br&gt;  &lt;/div&gt;  &lt;div&gt;- Ken Winters&lt;/div&gt; &lt;/blockquote&gt; &lt;br&gt; &lt;/div&gt; &lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/body&gt;&lt;/html&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Creative-querying-tp26479952p26480701.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26480648</id>
	<title>Re: Creative querying</title>
	<published>2009-11-23T07:51:54Z</published>
	<updated>2009-11-23T07:51:54Z</updated>
	<author>
		<name>Brian Vuyk-2</name>
	</author>
	<content type="html">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot;&gt;
&lt;html&gt;
&lt;head&gt;
  &lt;meta content=&quot;text/html;charset=ISO-8859-1&quot; http-equiv=&quot;Content-Type&quot;&gt;
  &lt;title&gt;&lt;/title&gt;
&lt;/head&gt;
&lt;body bgcolor=&quot;#ffffff&quot; text=&quot;#000000&quot;&gt;
Jeff Greenberg wrote:
&lt;blockquote cite=&quot;mid:4B0AAEEA.8050306@ayendesigns.com&quot; type=&quot;cite&quot;&gt;
  &lt;meta content=&quot;text/html;charset=ISO-8859-1&quot; http-equiv=&quot;Content-Type&quot;&gt;
  &lt;p style=&quot;margin-bottom: 0cm; margin-top: 0pt;&quot;&gt;Brian Vuyk wrote:&lt;br&gt;
  &lt;/p&gt;
  &lt;blockquote cite=&quot;mid:4B0AAD12.7060502@brianvuyk.com&quot; type=&quot;cite&quot;&gt;
    &lt;meta content=&quot;text/html;charset=ISO-8859-1&quot; http-equiv=&quot;Content-Type&quot;&gt;
1.) We are including extra data from the users table (wasn't central to
the question, so I omitted it to simplify)&lt;br&gt;
2.) How would you structure this exactly with subquery?&lt;br&gt;
  &lt;/blockquote&gt;
Create a second table where the role id's have a weight for their
capability level&lt;br&gt;
&lt;/blockquote&gt;
Ah, right, I get it now!&lt;br&gt;
&lt;/body&gt;
&lt;/html&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Creative-querying-tp26479952p26480648.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26480594</id>
	<title>Re: Creative querying</title>
	<published>2009-11-23T07:48:58Z</published>
	<updated>2009-11-23T07:48:58Z</updated>
	<author>
		<name>Jeff Greenberg-3</name>
	</author>
	<content type="html">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot;&gt;
&lt;html style=&quot;direction: ltr;&quot;&gt;
&lt;head&gt;
  &lt;meta content=&quot;text/html;charset=ISO-8859-1&quot; http-equiv=&quot;Content-Type&quot;&gt;
&lt;/head&gt;
&lt;body style=&quot;direction: ltr;&quot; bgcolor=&quot;#ffffff&quot; text=&quot;#000000&quot;&gt;
&lt;p style=&quot;margin-bottom: 0cm; margin-top: 0pt;&quot;&gt;Brian Vuyk wrote:&lt;br&gt;
&lt;/p&gt;
&lt;blockquote cite=&quot;mid:4B0AAD12.7060502@brianvuyk.com&quot; type=&quot;cite&quot;&gt;
  &lt;meta content=&quot;text/html;charset=ISO-8859-1&quot; http-equiv=&quot;Content-Type&quot;&gt;
1.) We are including extra data from the users table (wasn't central to
the question, so I omitted it to simplify)&lt;br&gt;
2.) How would you structure this exactly with subquery?&lt;br&gt;
&lt;/blockquote&gt;
Create a second table where the role id's have a weight for their
capability level&lt;br&gt;
&lt;/body&gt;
&lt;/html&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Creative-querying-tp26479952p26480594.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26480547</id>
	<title>Re: Creative querying</title>
	<published>2009-11-23T07:46:52Z</published>
	<updated>2009-11-23T07:46:52Z</updated>
	<author>
		<name>Pierre Rineau</name>
	</author>
	<content type="html">PS: Please do standard SQL (in previous post, mine was, I think).
&lt;br&gt;&lt;br&gt;Re PS: Do not rely on MySQL performance, they are sometime even better
&lt;br&gt;when you disable MySQL internal optimizer :D
&lt;br&gt;&lt;br&gt;This was a FLAAAAAAAAAAAAAAAAAAAAAAME,
&lt;br&gt;Pierre.
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Creative-querying-tp26479952p26480547.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26480410</id>
	<title>Re: Creative querying</title>
	<published>2009-11-23T07:41:06Z</published>
	<updated>2009-11-23T07:41:06Z</updated>
	<author>
		<name>Brian Vuyk-2</name>
	</author>
	<content type="html">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot;&gt;
&lt;html&gt;
&lt;head&gt;
  &lt;meta content=&quot;text/html;charset=ISO-8859-1&quot; http-equiv=&quot;Content-Type&quot;&gt;
&lt;/head&gt;
&lt;body bgcolor=&quot;#ffffff&quot; text=&quot;#000000&quot;&gt;
1.) We are including extra data from the users table (wasn't central to
the question, so I omitted it to simplify)&lt;br&gt;
2.) How would you structure this exactly with subquery?&lt;br&gt;
&lt;br&gt;
Brian&lt;br&gt;
&lt;br&gt;
Ken Winters wrote:&lt;br&gt;
&lt;blockquote cite=&quot;mid:F1D65A65-1438-4F97-A450-7D765B64C12C@coalmarch.com&quot; type=&quot;cite&quot;&gt;
  &lt;div&gt;
  &lt;div&gt;On Nov 23, 2009, at 10:18 AM, Brian Vuyk wrote:&lt;/div&gt;
  &lt;blockquote type=&quot;cite&quot;&gt;
    &lt;div&gt;&lt;font class=&quot;Apple-style-span&quot; color=&quot;#000000&quot;&gt;&lt;br&gt;
    &lt;/font&gt;SELECT DISTINCT u.uid, ur.rid FROM {users} u RIGHT JOIN
{users_roles} ur ON ur.uid = u.uid WHERE rid = 6 OR rid = 8 OR rid = 5
OR rid = 7 OR rid = 4 GROUP BY uid;&lt;br&gt;
    &lt;br&gt;
Brian&lt;br&gt;
    &lt;/div&gt;
  &lt;/blockquote&gt;
  &lt;/div&gt;
  &lt;br&gt;
  &lt;div&gt;1) Why are you doing a join when all the info you are selecting
is in the users_roles table? &amp;nbsp;If you don't need it for some other
reason, problem solved.&lt;/div&gt;
  &lt;div&gt;2) I've found it's generally better to use subqueries (where X
in (select Y from Z)) rather than join and group.&lt;/div&gt;
  &lt;div&gt;&lt;br&gt;
  &lt;/div&gt;
  &lt;div&gt;- Ken Winters&lt;/div&gt;
&lt;/blockquote&gt;
&lt;br&gt;
&lt;/body&gt;
&lt;/html&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Creative-querying-tp26479952p26480410.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26480390</id>
	<title>Re: Creative querying</title>
	<published>2009-11-23T07:39:29Z</published>
	<updated>2009-11-23T07:39:29Z</updated>
	<author>
		<name>Pierre Rineau</name>
	</author>
	<content type="html">On Mon, 2009-11-23 at 10:18 -0500, Brian Vuyk wrote:
&lt;br&gt;&amp;gt; SELECT DISTINCT u.uid, ur.rid FROM {users} u RIGHT JOIN {users_roles} ur 
&lt;br&gt;&amp;gt; ON ur.uid = u.uid WHERE rid = 6 OR rid = 8 OR rid = 5 OR rid = 7 OR rid 
&lt;br&gt;&amp;gt; = 4 GROUP BY uid;
&lt;br&gt;&lt;br&gt;If the order is an arbitrary order, you'll have somewhere to create a
&lt;br&gt;new table, containing rid and an order column, then join it with rid in
&lt;br&gt;your request, and finally order with the order field.
&lt;br&gt;&lt;br&gt;SELECT DISTINCT(u.uid), ynst.rid FROM {users}
&lt;br&gt;&amp;nbsp; JOIN {users_roles} ur ON ur.uid = u.uid
&lt;br&gt;&amp;nbsp; JOIN {you_new_shiny_table} ynst ON nst.rid = ur.rid
&lt;br&gt;&amp;nbsp; ORDER BY ynst.order DESC
&lt;br&gt;&amp;nbsp; GROUP BY u.uid
&lt;br&gt;&lt;br&gt;If this does not works (I did not tested it, I think the GROUP BY clause
&lt;br&gt;will override the ORDER BY one, maybe with more than one ON clause it
&lt;br&gt;may work) try a subquery in the result clause:
&lt;br&gt;&lt;br&gt;SELECT DISTINCT(u.uid), (SELECT ynst.rid
&lt;br&gt;&amp;nbsp; &amp;nbsp; FROM {you_new_shiny_table} ynst
&lt;br&gt;&amp;nbsp; &amp;nbsp; WHERE r.rid = ur.rid
&lt;br&gt;&amp;nbsp; &amp;nbsp; ORDER BY ynst.order DESC
&lt;br&gt;&amp;nbsp; &amp;nbsp; LIMIT 1
&lt;br&gt;&amp;nbsp; ) AS rid
&lt;br&gt;&amp;nbsp; FROM {users}
&lt;br&gt;&amp;nbsp; JOIN {users_roles} ur ON ur.uid = u.uid
&lt;br&gt;&amp;nbsp; GROUP BY u.uid
&lt;br&gt;&lt;br&gt;Note: you can even easily create somewhere a form to order your roles
&lt;br&gt;(or altering the existing one) to add a dragtable to order them.
&lt;br&gt;&lt;br&gt;Pierre.
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Creative-querying-tp26479952p26480390.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26480349</id>
	<title>Re: Creative querying</title>
	<published>2009-11-23T07:38:22Z</published>
	<updated>2009-11-23T07:38:22Z</updated>
	<author>
		<name>Brian Vuyk-2</name>
	</author>
	<content type="html">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot;&gt;
&lt;html&gt;
&lt;head&gt;
  &lt;meta content=&quot;text/html;charset=ISO-8859-1&quot; http-equiv=&quot;Content-Type&quot;&gt;
&lt;/head&gt;
&lt;body bgcolor=&quot;#ffffff&quot; text=&quot;#000000&quot;&gt;
Yep, that will do it too.&lt;br&gt;
&lt;br&gt;
Thanks for the suggestion!&lt;br&gt;
&lt;br&gt;
nan wich wrote:
&lt;blockquote cite=&quot;mid:954154.95547.qm@web180316.mail.gq1.yahoo.com&quot; type=&quot;cite&quot;&gt;
  
  &lt;div style=&quot;font-family: arial,helvetica,sans-serif; font-size: 12pt;&quot;&gt;
  &lt;div&gt;Brian Vuyk wrote:&lt;/div&gt;
  &lt;div&gt;&amp;gt; SELECT DISTINCT u.uid, ur.rid FROM {users} u RIGHT JOIN
{users_roles} ur ON ur.uid = u.uid WHERE rid = 6 OR rid = 8 OR rid = 5
OR rid = 7 OR rid = 4 GROUP BY uid;&lt;/div&gt;
  &lt;div&gt;&amp;nbsp;&lt;/div&gt;
  &lt;div&gt;You might find something like this easier to maintain (think
about an array, which could also map the levels):&lt;/div&gt;
  &lt;div&gt;SELECT DISTINCT u.uid, ur.rid FROM {users} u RIGHT JOIN
{users_roles} ur ON ur.uid = u.uid WHERE rid&amp;nbsp;IN (6, 8, 5, 7, 4) GROUP
BY uid;&lt;br&gt;
&amp;nbsp;&lt;/div&gt;
  &lt;p&gt;&lt;font color=&quot;#ff007f&quot; face=&quot;bookman old style, new york, times, serif&quot; size=&quot;4&quot;&gt;&lt;em&gt;&lt;strong&gt;Nancy
E. Wichmann, PMP&lt;/strong&gt;&lt;/em&gt;&lt;/font&gt;&lt;/p&gt;
  &lt;p&gt;&lt;font face=&quot;arial, helvetica, sans-serif&quot;&gt;Injustice anywhere is a
threat to justice everywhere. -- Dr. Martin L. King, Jr.&lt;/font&gt;&lt;/p&gt;
  &lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;!-- cg1.c204.mail.gq1.yahoo.com compressed/chunked Mon Nov 23 06:51:20 PST 2009 --&gt;&lt;/div&gt;
&lt;/blockquote&gt;
&lt;br&gt;
&lt;/body&gt;
&lt;/html&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Creative-querying-tp26479952p26480349.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26480335</id>
	<title>Re: Creative querying</title>
	<published>2009-11-23T07:37:06Z</published>
	<updated>2009-11-23T07:37:06Z</updated>
	<author>
		<name>Ken Winters</name>
	</author>
	<content type="html">&lt;html&gt;&lt;body style=&quot;word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; &quot;&gt;&lt;div&gt;&lt;div&gt;On Nov 23, 2009, at 10:18 AM, Brian Vuyk wrote:&lt;/div&gt;&lt;blockquote type=&quot;cite&quot;&gt;&lt;div&gt;&lt;font class=&quot;Apple-style-span&quot; color=&quot;#000000&quot;&gt;&lt;br&gt;&lt;/font&gt;SELECT DISTINCT u.uid, ur.rid FROM {users} u RIGHT JOIN {users_roles} ur ON ur.uid = u.uid WHERE rid = 6 OR rid = 8 OR rid = 5 OR rid = 7 OR rid = 4 GROUP BY uid;&lt;br&gt;&lt;br&gt;Brian&lt;br&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;div&gt;1) Why are you doing a join when all the info you are selecting is in the users_roles table? &amp;nbsp;If you don't need it for some other reason, problem solved.&lt;/div&gt;&lt;div&gt;2) I've found it's generally better to use subqueries (where X in (select Y from Z)) rather than join and group.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;- Ken Winters&lt;/div&gt;&lt;/body&gt;&lt;/html&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Creative-querying-tp26479952p26480335.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26480207</id>
	<title>Re: Creative querying</title>
	<published>2009-11-23T07:31:51Z</published>
	<updated>2009-11-23T07:31:51Z</updated>
	<author>
		<name>nan wich</name>
	</author>
	<content type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;&lt;div style=&quot;font-family:arial, helvetica, sans-serif;font-size:12pt&quot;&gt;&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;Brian Vuyk wrote:&lt;/DIV&gt;
&lt;DIV&gt;&amp;gt; SELECT DISTINCT u.uid, ur.rid FROM {users} u RIGHT JOIN {users_roles} ur ON ur.uid = u.uid WHERE rid = 6 OR rid = 8 OR rid = 5 OR rid = 7 OR rid = 4 GROUP BY uid;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;You might find something like this easier to maintain (think about an array, which could also map the levels):&lt;/DIV&gt;
&lt;DIV&gt;SELECT DISTINCT u.uid, ur.rid FROM {users} u RIGHT JOIN {users_roles} ur ON ur.uid = u.uid WHERE rid&amp;nbsp;IN (6, 8, 5, 7, 4) GROUP BY uid;&lt;BR&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&lt;FONT color=#ff007f size=4 face=&quot;bookman old style, new york, times, serif&quot;&gt;&lt;EM&gt;&lt;STRONG&gt;Nancy E. Wichmann, PMP&lt;/STRONG&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=&quot;arial, helvetica, sans-serif&quot;&gt;Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.&lt;/FONT&gt;&lt;/P&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;!-- cg1.c204.mail.gq1.yahoo.com compressed/chunked Mon Nov 23 06:51:20 PST 2009 --&gt;&lt;/div&gt;&lt;/body&gt;&lt;/html&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Creative-querying-tp26479952p26480207.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26479952</id>
	<title>Creative querying</title>
	<published>2009-11-23T07:18:48Z</published>
	<updated>2009-11-23T07:18:48Z</updated>
	<author>
		<name>Brian Vuyk-2</name>
	</author>
	<content type="html">Hello all.
&lt;br&gt;&lt;br&gt;I am trying to write a MySQL query for users and roles, and could use a 
&lt;br&gt;little help along.
&lt;br&gt;&lt;br&gt;Basically, I need to compile a list of users who have certain roles. On 
&lt;br&gt;this site, users can have 4-5 roles which represent ascending privilege 
&lt;br&gt;levels, and we need to find the highest privilege level a user can get.
&lt;br&gt;&lt;br&gt;The problem is, the highest privilege level in terms of functionality 
&lt;br&gt;isn't the highest numerically by role id.
&lt;br&gt;&lt;br&gt;In essence, as output, I am trying to get results that show a user id in 
&lt;br&gt;one column, and rid 6 if they have it, otherwise rid 8, otherwise rid 5, 
&lt;br&gt;otherwise 7, otherwise 4.
&lt;br&gt;&lt;br&gt;Edit:
&lt;br&gt;&lt;br&gt;As I was typing this, I thought of another thing to try, and it seems to 
&lt;br&gt;have worked:
&lt;br&gt;&lt;br&gt;SELECT DISTINCT u.uid, ur.rid FROM {users} u RIGHT JOIN {users_roles} ur 
&lt;br&gt;ON ur.uid = u.uid WHERE rid = 6 OR rid = 8 OR rid = 5 OR rid = 7 OR rid 
&lt;br&gt;= 4 GROUP BY uid;
&lt;br&gt;&lt;br&gt;This depends on MySQL's query evaluation to stop on the first match from 
&lt;br&gt;the OR'd conditions that apply. Without the GROUP BY condition, this 
&lt;br&gt;still returns a list of all uid / rid combinations...
&lt;br&gt;&lt;br&gt;Since this email was already written, I thought I would send it along 
&lt;br&gt;with the solution I have both so that:
&lt;br&gt;&lt;br&gt;1. If anyone else is trying to do something similar, they can see what I 
&lt;br&gt;did.
&lt;br&gt;2. It goes into the list archives for the same reason as #1.
&lt;br&gt;&lt;br&gt;Brian
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Creative-querying-tp26479952p26479952.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26471086</id>
	<title>Re: Drupal way of doing onchange</title>
	<published>2009-11-22T16:23:04Z</published>
	<updated>2009-11-22T16:23:04Z</updated>
	<author>
		<name>Jeff Greenberg-3</name>
	</author>
	<content type="html">Jamie Holly wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; That isn't even valid - having the &amp;lt;div&amp;gt; not inside a &amp;lt;td&amp;gt; or &amp;lt;th&amp;gt;. 
&lt;br&gt;&amp;gt; That could lead to problems, but you might want to try:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; $(&amp;quot;#{field_id}&amp;quot;).parent().prev('.generalclass');
&lt;br&gt;&amp;gt;
&lt;br&gt;Yeah, it's pretty ugly...but that worked! &amp;nbsp;Thanks, Jamie.
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Drupal-way-of-doing-onchange-tp26468063p26471086.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26470816</id>
	<title>Re: Drupal way of doing onchange</title>
	<published>2009-11-22T15:38:39Z</published>
	<updated>2009-11-22T15:38:39Z</updated>
	<author>
		<name>Jamie Holly</name>
	</author>
	<content type="html">That isn't even valid - having the &amp;lt;div&amp;gt; not inside a &amp;lt;td&amp;gt; or &amp;lt;th&amp;gt;. That 
&lt;br&gt;could lead to problems, but you might want to try:
&lt;br&gt;&lt;br&gt;$(&amp;quot;#{field_id}&amp;quot;).parent().prev('.generalclass');
&lt;br&gt;&lt;br&gt;Like I said it might not even work considering the markup you are 
&lt;br&gt;showing is invalid in HTML and XHTML.
&lt;br&gt;&lt;br&gt;If for some reason you missed the &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt; surrounding the div then try 
&lt;br&gt;this:
&lt;br&gt;&lt;br&gt;$(&amp;quot;#{field_id}&amp;quot;).parents('td').prev('.generalclass');
&lt;br&gt;&lt;br&gt;&lt;br&gt;Jamie Holly
&lt;br&gt;&lt;a href=&quot;http://www.intoxination.net&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.intoxination.net&lt;/a&gt;&amp;nbsp;
&lt;br&gt;&lt;a href=&quot;http://www.hollyit.net&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.hollyit.net&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;Jeff Greenberg wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Jamie Holly wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; $(&amp;quot;#{field_id}&amp;quot;).prev('label') will give you the label
&lt;br&gt;&amp;gt; Might have worked if the label were encased in &amp;lt;label&amp;gt; tags, but it's 
&lt;br&gt;&amp;gt; really ugly...like this
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;lt;tr&amp;gt;
&lt;br&gt;&amp;gt; &amp;lt;td class=&amp;quot;generalclass&amp;quot;&amp;gt;labeltest&amp;lt;/td&amp;gt;
&lt;br&gt;&amp;gt; &amp;lt;div&amp;gt;field&amp;lt;/div&amp;gt;
&lt;br&gt;&amp;gt; &amp;lt;/td&amp;gt;
&lt;br&gt;&amp;gt; &amp;lt;/tr&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; don't know why it was done that way. I tried prev(&amp;quot;td&amp;quot;), 
&lt;br&gt;&amp;gt; prev(&amp;quot;td.generalclass&amp;quot;) and prev(&amp;quot;tr&amp;quot;) ... nada
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Drupal-way-of-doing-onchange-tp26468063p26470816.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26470750</id>
	<title>Re: Drupal way of doing onchange</title>
	<published>2009-11-22T15:28:42Z</published>
	<updated>2009-11-22T15:28:42Z</updated>
	<author>
		<name>Jeff Greenberg-3</name>
	</author>
	<content type="html">Jamie Holly wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; $(&amp;quot;#{field_id}&amp;quot;).prev('label') will give you the label
&lt;br&gt;Might have worked if the label were encased in &amp;lt;label&amp;gt; tags, but it's 
&lt;br&gt;really ugly...like this
&lt;br&gt;&lt;br&gt;&amp;lt;tr&amp;gt;
&lt;br&gt;&amp;lt;td class=&amp;quot;generalclass&amp;quot;&amp;gt;labeltest&amp;lt;/td&amp;gt;
&lt;br&gt;&amp;lt;div&amp;gt;field&amp;lt;/div&amp;gt;
&lt;br&gt;&amp;lt;/td&amp;gt;
&lt;br&gt;&amp;lt;/tr&amp;gt;
&lt;br&gt;&lt;br&gt;don't know why it was done that way. I tried prev(&amp;quot;td&amp;quot;), 
&lt;br&gt;prev(&amp;quot;td.generalclass&amp;quot;) and prev(&amp;quot;tr&amp;quot;) ... nada
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Drupal-way-of-doing-onchange-tp26468063p26470750.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26470647</id>
	<title>Re: Drupal way of doing onchange</title>
	<published>2009-11-22T15:14:43Z</published>
	<updated>2009-11-22T15:14:43Z</updated>
	<author>
		<name>Jamie Holly</name>
	</author>
	<content type="html">Unless it is added inline with a defer then you do risk loading problems:
&lt;br&gt;&lt;br&gt;&amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; $(&amp;quot;#edit-cc&amp;quot;).change(edit-cc-function);
&lt;br&gt;&amp;lt;/script&amp;gt;
&lt;br&gt;&amp;lt;script src=&amp;quot;/path/to/edit-cc-function.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;
&lt;br&gt;&lt;br&gt;Without the defer, edit-cc-funciton will be undefined.
&lt;br&gt;&lt;br&gt;Even though this scenario is most likely for private use, something else 
&lt;br&gt;that should be considered in contrib modules as well as core (and 
&lt;br&gt;possibly added to the JS coding standards) is the use of event 
&lt;br&gt;namespaces. That way you can easily disable any bound events later on in 
&lt;br&gt;the code without having to rewrite the original JS. Something like:
&lt;br&gt;&lt;br&gt;$(&amp;quot;#edit-cc&amp;quot;).bind(&amp;quot;click.myccmodule&amp;quot;,edit-cc-function);
&lt;br&gt;&lt;br&gt;Now if I want to unbind that function all I got to do is:
&lt;br&gt;&lt;br&gt;&lt;br&gt;$(&amp;quot;#edit-cc&amp;quot;).unbind(&amp;quot;click.myccmodule&amp;quot;);
&lt;br&gt;&lt;br&gt;Want to unbind every event that module binds to?
&lt;br&gt;&lt;br&gt;$(&amp;quot;#edit-cc&amp;quot;).unbind(&amp;quot;.myccmodule&amp;quot;);
&lt;br&gt;&lt;br&gt;It really adds a nice new layer of extensibility.
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://docs.jquery.com/Namespaced_Events&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://docs.jquery.com/Namespaced_Events&lt;/a&gt;&lt;br&gt;&lt;br&gt;Jamie Holly
&lt;br&gt;&lt;a href=&quot;http://www.intoxination.net&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.intoxination.net&lt;/a&gt;&amp;nbsp;
&lt;br&gt;&lt;a href=&quot;http://www.hollyit.net&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.hollyit.net&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;Scott Reynen wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; On Nov 22, 2009, at 2:25 PM, Greg Holsclaw wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Of course, from a JavaScript purists mindset, you should attach all &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; the
&lt;br&gt;&amp;gt; &amp;gt; event handlings later, but that is a completely different topic.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I'll bite. &amp;nbsp;One might argue that inline JS violates Drupal coding &amp;nbsp;
&lt;br&gt;&amp;gt; standards:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://drupal.org/node/172169#jscodeplacement&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://drupal.org/node/172169#jscodeplacement&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; That could be read with a more narrow meaning (i.e. event function &amp;nbsp;
&lt;br&gt;&amp;gt; bindings are okay, nothing else), but is there any actual benefit to &amp;nbsp;
&lt;br&gt;&amp;gt; doing inline JS? &amp;nbsp;It's not as if it's more difficult to select an &amp;nbsp;
&lt;br&gt;&amp;gt; element and apply an event handler in jQuery.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; $('#edit-cc').change(some_js_funtion);
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Doing things the &amp;quot;purist&amp;quot; (right) way seems to be both easier and &amp;nbsp;
&lt;br&gt;&amp;gt; better for modularity, so why not do it?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; --
&lt;br&gt;&amp;gt; Scott Reynen
&lt;br&gt;&amp;gt; MakeDataMakeSense.com
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Drupal-way-of-doing-onchange-tp26468063p26470647.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26470508</id>
	<title>Re: Drupal way of doing onchange</title>
	<published>2009-11-22T14:57:21Z</published>
	<updated>2009-11-22T14:57:21Z</updated>
	<author>
		<name>Jamie Holly</name>
	</author>
	<content type="html">$(&amp;quot;#{field_id}&amp;quot;).prev('label') will give you the label
&lt;br&gt;&lt;br&gt;Jamie Holly
&lt;br&gt;&lt;a href=&quot;http://www.intoxination.net&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.intoxination.net&lt;/a&gt;&amp;nbsp;
&lt;br&gt;&lt;a href=&quot;http://www.hollyit.net&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.hollyit.net&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;Jeff Greenberg wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Greg Holsclaw wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; A quick way to do this is to use the attributes as you mentioned. Any HTML
&lt;br&gt;&amp;gt; &amp;gt; attribute can be added into the attributes array as follows:
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; 
&lt;br&gt;&amp;gt; Thanks. That's what I've done for now, until I figure out how to make 
&lt;br&gt;&amp;gt; CTools work. Frustratingly, the field has an ID, but neither the label, 
&lt;br&gt;&amp;gt; the cell they're in or the row that the cell is in have ID's. So without 
&lt;br&gt;&amp;gt; doing more work than is warranted, the field disappears but not its 
&lt;br&gt;&amp;gt; label. So when the field disappears, I replace it with a string 'Not 
&lt;br&gt;&amp;gt; applicable.'
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Drupal-way-of-doing-onchange-tp26468063p26470508.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26470328</id>
	<title>Re: Drupal way of doing onchange</title>
	<published>2009-11-22T14:34:09Z</published>
	<updated>2009-11-22T14:34:09Z</updated>
	<author>
		<name>Jeff Greenberg-3</name>
	</author>
	<content type="html">Greg Holsclaw wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; A quick way to do this is to use the attributes as you mentioned. Any HTML
&lt;br&gt;&amp;gt; attribute can be added into the attributes array as follows:
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;Thanks. That's what I've done for now, until I figure out how to make 
&lt;br&gt;CTools work. Frustratingly, the field has an ID, but neither the label, 
&lt;br&gt;the cell they're in or the row that the cell is in have ID's. So without 
&lt;br&gt;doing more work than is warranted, the field disappears but not its 
&lt;br&gt;label. So when the field disappears, I replace it with a string 'Not 
&lt;br&gt;applicable.'
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Drupal-way-of-doing-onchange-tp26468063p26470328.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26470317</id>
	<title>Re: Drupal way of doing onchange</title>
	<published>2009-11-22T14:32:38Z</published>
	<updated>2009-11-22T14:32:38Z</updated>
	<author>
		<name>Scott Reynen</name>
	</author>
	<content type="html">On Nov 22, 2009, at 2:25 PM, Greg Holsclaw wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; Of course, from a JavaScript purists mindset, you should attach all &amp;nbsp;
&lt;br&gt;&amp;gt; the
&lt;br&gt;&amp;gt; event handlings later, but that is a completely different topic.
&lt;br&gt;&lt;br&gt;&lt;br&gt;I'll bite. &amp;nbsp;One might argue that inline JS violates Drupal coding &amp;nbsp;
&lt;br&gt;standards:
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://drupal.org/node/172169#jscodeplacement&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://drupal.org/node/172169#jscodeplacement&lt;/a&gt;&lt;br&gt;&lt;br&gt;That could be read with a more narrow meaning (i.e. event function &amp;nbsp;
&lt;br&gt;bindings are okay, nothing else), but is there any actual benefit to &amp;nbsp;
&lt;br&gt;doing inline JS? &amp;nbsp;It's not as if it's more difficult to select an &amp;nbsp;
&lt;br&gt;element and apply an event handler in jQuery.
&lt;br&gt;&lt;br&gt;$('#edit-cc').change(some_js_funtion);
&lt;br&gt;&lt;br&gt;Doing things the &amp;quot;purist&amp;quot; (right) way seems to be both easier and &amp;nbsp;
&lt;br&gt;better for modularity, so why not do it?
&lt;br&gt;&lt;br&gt;--
&lt;br&gt;Scott Reynen
&lt;br&gt;MakeDataMakeSense.com
&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Drupal-way-of-doing-onchange-tp26468063p26470317.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26470001</id>
	<title>Re: Drupal way of doing onchange</title>
	<published>2009-11-22T13:59:25Z</published>
	<updated>2009-11-22T13:59:25Z</updated>
	<author>
		<name>Jamie Holly</name>
	</author>
	<content type="html">FYI if you do the 'onChange' and have your site set to XHTML strict it 
&lt;br&gt;won't work. Change it to 'onchange' and you'll be fine. I see a lot of 
&lt;br&gt;people get caught by that one.
&lt;br&gt;&lt;br&gt;Jamie Holly
&lt;br&gt;&lt;a href=&quot;http://www.intoxination.net&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.intoxination.net&lt;/a&gt;&amp;nbsp;
&lt;br&gt;&lt;a href=&quot;http://www.hollyit.net&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.hollyit.net&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;Greg Holsclaw wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; A quick way to do this is to use the attributes as you mentioned. Any HTML
&lt;br&gt;&amp;gt; attribute can be added into the attributes array as follows:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; $form['cc'] = array (
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; ...
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; '#attributes' =&amp;gt; array(
&lt;br&gt;&amp;gt; 	'onChange' =&amp;gt; &amp;quot;some_js_funtion();&amp;quot;
&lt;br&gt;&amp;gt; 	),
&lt;br&gt;&amp;gt; 	...
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; You can include Jquery directly there instead of the function if you simply
&lt;br&gt;&amp;gt; need to hide a div, or you can use:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; drupal_add_js(path_to_file);
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Of course, from a JavaScript purists mindset, you should attach all the
&lt;br&gt;&amp;gt; event handlings later, but that is a completely different topic.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; If you have a callback to get more information from a menu callback, then
&lt;br&gt;&amp;gt; AHAH or CTOOLs is definitely the way to go, but for simpler affects this way
&lt;br&gt;&amp;gt; might be sufficient.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Greg
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; -----Original Message-----
&lt;br&gt;&amp;gt; From: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26470001&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;development-bounces@...&lt;/a&gt; [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26470001&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;development-bounces@...&lt;/a&gt;]
&lt;br&gt;&amp;gt; On Behalf Of Jeff Greenberg
&lt;br&gt;&amp;gt; Sent: Sunday, November 22, 2009 10:38 AM
&lt;br&gt;&amp;gt; To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26470001&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;development@...&lt;/a&gt;
&lt;br&gt;&amp;gt; Subject: [development] Drupal way of doing onchange
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Haven't delved into AHAH yet, this might force the issue.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Using an easy (=less typing) example. A credit card form. When the 
&lt;br&gt;&amp;gt; credit card type is selected from a select, the selection needs to fire 
&lt;br&gt;&amp;gt; a javascript function that will disable fields that don't apply to that 
&lt;br&gt;&amp;gt; card type (such as CVV).
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Normally, I would have an onchange event for the select, and noticed 
&lt;br&gt;&amp;gt; that in the form api, while there is an attribute section to add 
&lt;br&gt;&amp;gt; miscellaneous attributes, the doc doesn't mention events as examples. 
&lt;br&gt;&amp;gt; And if putting an event there is legitimate, there isn't a mention of 
&lt;br&gt;&amp;gt; how to include the responding js function in the form.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; If AHAH is the way I'm supposed to handle this, I'd appreciate being 
&lt;br&gt;&amp;gt; pointed to a good similar example, because I'm a bit unclear from the 
&lt;br&gt;&amp;gt; AHAH entries in the form reference docs, for example, how to relate the 
&lt;br&gt;&amp;gt; myhandler/js entry to a physical location of the function, and how the 
&lt;br&gt;&amp;gt; function gets there.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Thanks!
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Drupal-way-of-doing-onchange-tp26468063p26470001.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26469909</id>
	<title>Re: Drupal way of doing onchange</title>
	<published>2009-11-22T13:25:11Z</published>
	<updated>2009-11-22T13:25:11Z</updated>
	<author>
		<name>Greg Holsclaw-3</name>
	</author>
	<content type="html">A quick way to do this is to use the attributes as you mentioned. Any HTML
&lt;br&gt;attribute can be added into the attributes array as follows:
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp; $form['cc'] = array (
&lt;br&gt;&amp;nbsp; &amp;nbsp; ...
&lt;br&gt;&amp;nbsp; &amp;nbsp; '#attributes' =&amp;gt; array(
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'onChange' =&amp;gt; &amp;quot;some_js_funtion();&amp;quot;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ),
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ...
&lt;br&gt;&lt;br&gt;You can include Jquery directly there instead of the function if you simply
&lt;br&gt;need to hide a div, or you can use:
&lt;br&gt;&lt;br&gt;drupal_add_js(path_to_file);
&lt;br&gt;&lt;br&gt;Of course, from a JavaScript purists mindset, you should attach all the
&lt;br&gt;event handlings later, but that is a completely different topic.
&lt;br&gt;&lt;br&gt;If you have a callback to get more information from a menu callback, then
&lt;br&gt;AHAH or CTOOLs is definitely the way to go, but for simpler affects this way
&lt;br&gt;might be sufficient.
&lt;br&gt;&lt;br&gt;Greg
&lt;br&gt;&lt;br&gt;-----Original Message-----
&lt;br&gt;From: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26469909&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;development-bounces@...&lt;/a&gt; [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26469909&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;development-bounces@...&lt;/a&gt;]
&lt;br&gt;On Behalf Of Jeff Greenberg
&lt;br&gt;Sent: Sunday, November 22, 2009 10:38 AM
&lt;br&gt;To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26469909&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;development@...&lt;/a&gt;
&lt;br&gt;Subject: [development] Drupal way of doing onchange
&lt;br&gt;&lt;br&gt;Haven't delved into AHAH yet, this might force the issue.
&lt;br&gt;&lt;br&gt;&lt;br&gt;Using an easy (=less typing) example. A credit card form. When the 
&lt;br&gt;credit card type is selected from a select, the selection needs to fire 
&lt;br&gt;a javascript function that will disable fields that don't apply to that 
&lt;br&gt;card type (such as CVV).
&lt;br&gt;&lt;br&gt;&lt;br&gt;Normally, I would have an onchange event for the select, and noticed 
&lt;br&gt;that in the form api, while there is an attribute section to add 
&lt;br&gt;miscellaneous attributes, the doc doesn't mention events as examples. 
&lt;br&gt;And if putting an event there is legitimate, there isn't a mention of 
&lt;br&gt;how to include the responding js function in the form.
&lt;br&gt;&lt;br&gt;&lt;br&gt;If AHAH is the way I'm supposed to handle this, I'd appreciate being 
&lt;br&gt;pointed to a good similar example, because I'm a bit unclear from the 
&lt;br&gt;AHAH entries in the form reference docs, for example, how to relate the 
&lt;br&gt;myhandler/js entry to a physical location of the function, and how the 
&lt;br&gt;function gets there.
&lt;br&gt;&lt;br&gt;&lt;br&gt;Thanks!
&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Drupal-way-of-doing-onchange-tp26468063p26469909.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26469530</id>
	<title>Re: Drupal way of doing onchange</title>
	<published>2009-11-22T13:11:07Z</published>
	<updated>2009-11-22T13:11:07Z</updated>
	<author>
		<name>Jeff Greenberg-3</name>
	</author>
	<content type="html">Obviously doing something wrong with Ctools (latest version enabled in D6)
&lt;br&gt;&lt;br&gt;&lt;br&gt;Here is the form field that should disappear when the option selected in 
&lt;br&gt;the edit-cc-type field is Other. The Ctools parameters are the last two.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; $form['cc_cvv'] = array(
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; '#type' =&amp;gt; 'textfield',
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; '#title' =&amp;gt; t('CVV'),
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; '#default_value' =&amp;gt; $_SESSION['clear_cc'] ? '' : $default_cvv,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; '#attributes' =&amp;gt; array('autocomplete' =&amp;gt; 'off'),
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; '#size' =&amp;gt; variable_get('uc_credit_amex', TRUE) ? 4 : 3,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; '#maxlength' =&amp;gt; variable_get('uc_credit_amex', TRUE) ? 4 : 3,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; '#process' =&amp;gt; array('CTools_process_dependency'),
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; '#dependency' =&amp;gt; array('edit-cc-type'=&amp;gt; 
&lt;br&gt;array('Visa','Mastercard','Discover','American Express')),
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; );
&lt;br&gt;&lt;br&gt;&lt;br&gt;Changing the selected option has no affect on this field.
&lt;br&gt;&lt;br&gt;&lt;br&gt;Jeff
&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Drupal-way-of-doing-onchange-tp26468063p26469530.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26468772</id>
	<title>Re: Drupal way of doing onchange</title>
	<published>2009-11-22T11:47:46Z</published>
	<updated>2009-11-22T11:47:46Z</updated>
	<author>
		<name>Jeff Greenberg-3</name>
	</author>
	<content type="html">Earl Miles wrote:
&lt;br&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; You wouldn't use AHAH. CTools as a tool called 'dependent' that will 
&lt;br&gt;&amp;gt; help you do this kind of behavior without having to write any javascript.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;Thanks everyone. &amp;nbsp;Earl, coincidentally, I started working on another 
&lt;br&gt;site last night, and had installed CTools and was looking forward to 
&lt;br&gt;trying them out. More so now!
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Drupal-way-of-doing-onchange-tp26468063p26468772.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26468645</id>
	<title>Re: Drupal way of doing onchange</title>
	<published>2009-11-22T11:33:36Z</published>
	<updated>2009-11-22T11:33:36Z</updated>
	<author>
		<name>Randy Fay</name>
	</author>
	<content type="html">Great to hear about CTools &amp;#39;dependent&amp;#39;, Earl!&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Can you point us to information about it, or give us an example of how we&amp;#39;d use it, or point us to related code?&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Thanks for all you do!&lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;-Randy&lt;br&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Sun, Nov 22, 2009 at 2:07 PM, Earl Miles &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26468645&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;merlin@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;&quot;&gt;
&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;div class=&quot;h5&quot;&gt;Jeff Greenberg wrote:&lt;br&gt;
&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex&quot;&gt;
Haven&amp;#39;t delved into AHAH yet, this might force the issue.&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
Using an easy (=less typing) example. A credit card form. When the credit card type is selected from a select, the selection needs to fire a javascript function that will disable fields that don&amp;#39;t apply to that card type (such as CVV).&lt;br&gt;

&lt;br&gt;
&lt;br&gt;
Normally, I would have an onchange event for the select, and noticed that in the form api, while there is an attribute section to add miscellaneous attributes, the doc doesn&amp;#39;t mention events as examples. And if putting an event there is legitimate, there isn&amp;#39;t a mention of how to include the responding js function in the form.&lt;br&gt;

&lt;br&gt;
&lt;br&gt;
If AHAH is the way I&amp;#39;m supposed to handle this, I&amp;#39;d appreciate being pointed to a good similar example, because I&amp;#39;m a bit unclear from the AHAH entries in the form reference docs, for example, how to relate the myhandler/js entry to a physical location of the function, and how the function gets there.&lt;br&gt;

&lt;br&gt;
&lt;/blockquote&gt;
&lt;br&gt;&lt;/div&gt;&lt;/div&gt;
You wouldn&amp;#39;t use AHAH. CTools as a tool called &amp;#39;dependent&amp;#39; that will help you do this kind of behavior without having to write any javascript.&lt;br&gt;
&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;br clear=&quot;all&quot;&gt;&lt;br&gt;-- &lt;br&gt;Randy Fay&lt;br&gt;Drupal Development, troubleshooting, and debugging&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26468645&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;randy@...&lt;/a&gt;&lt;br&gt;+1  970.462.7450&lt;br&gt;&lt;br&gt;
&lt;/div&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Drupal-way-of-doing-onchange-tp26468063p26468645.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26468472</id>
	<title>Re: Drupal way of doing onchange</title>
	<published>2009-11-22T11:07:41Z</published>
	<updated>2009-11-22T11:07:41Z</updated>
	<author>
		<name>Earl Miles</name>
	</author>
	<content type="html">Jeff Greenberg wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Haven't delved into AHAH yet, this might force the issue.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Using an easy (=less typing) example. A credit card form. When the 
&lt;br&gt;&amp;gt; credit card type is selected from a select, the selection needs to 
&lt;br&gt;&amp;gt; fire a javascript function that will disable fields that don't apply 
&lt;br&gt;&amp;gt; to that card type (such as CVV).
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Normally, I would have an onchange event for the select, and noticed 
&lt;br&gt;&amp;gt; that in the form api, while there is an attribute section to add 
&lt;br&gt;&amp;gt; miscellaneous attributes, the doc doesn't mention events as examples. 
&lt;br&gt;&amp;gt; And if putting an event there is legitimate, there isn't a mention of 
&lt;br&gt;&amp;gt; how to include the responding js function in the form.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; If AHAH is the way I'm supposed to handle this, I'd appreciate being 
&lt;br&gt;&amp;gt; pointed to a good similar example, because I'm a bit unclear from the 
&lt;br&gt;&amp;gt; AHAH entries in the form reference docs, for example, how to relate 
&lt;br&gt;&amp;gt; the myhandler/js entry to a physical location of the function, and how 
&lt;br&gt;&amp;gt; the function gets there.
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;You wouldn't use AHAH. CTools as a tool called 'dependent' that will 
&lt;br&gt;help you do this kind of behavior without having to write any javascript.
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Drupal-way-of-doing-onchange-tp26468063p26468472.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26468244</id>
	<title>Re: Drupal way of doing onchange</title>
	<published>2009-11-22T10:53:09Z</published>
	<updated>2009-11-22T10:53:09Z</updated>
	<author>
		<name>Bugzilla from neclimdul@gmail.com</name>
	</author>
	<content type="html">AHAH is generally more for submitting something and changing the form,
&lt;br&gt;this doesn't really sound like your example. ie. submitting a file
&lt;br&gt;like in the d.o issue queue.
&lt;br&gt;&lt;br&gt;Generally the &amp;quot;Drupal way&amp;quot; is the jQuery way in the simple case you
&lt;br&gt;described. It doesn't add javascript directly to anything html
&lt;br&gt;elements and uses the jQuery event handlers in a javascipt file added
&lt;br&gt;to the page. This ends in much more manageable code, less html, etc.
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://docs.jquery.com/Events/change&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://docs.jquery.com/Events/change&lt;/a&gt;&lt;br&gt;&lt;br&gt;On Sun, Nov 22, 2009 at 12:37 PM, Jeff Greenberg &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26468244&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jeff@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Haven't delved into AHAH yet, this might force the issue.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Using an easy (=less typing) example. A credit card form. When the credit
&lt;br&gt;&amp;gt; card type is selected from a select, the selection needs to fire a
&lt;br&gt;&amp;gt; javascript function that will disable fields that don't apply to that card
&lt;br&gt;&amp;gt; type (such as CVV).
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Normally, I would have an onchange event for the select, and noticed that in
&lt;br&gt;&amp;gt; the form api, while there is an attribute section to add miscellaneous
&lt;br&gt;&amp;gt; attributes, the doc doesn't mention events as examples. And if putting an
&lt;br&gt;&amp;gt; event there is legitimate, there isn't a mention of how to include the
&lt;br&gt;&amp;gt; responding js function in the form.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; If AHAH is the way I'm supposed to handle this, I'd appreciate being pointed
&lt;br&gt;&amp;gt; to a good similar example, because I'm a bit unclear from the AHAH entries
&lt;br&gt;&amp;gt; in the form reference docs, for example, how to relate the myhandler/js
&lt;br&gt;&amp;gt; entry to a physical location of the function, and how the function gets
&lt;br&gt;&amp;gt; there.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Thanks!
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Drupal-way-of-doing-onchange-tp26468063p26468244.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26468178</id>
	<title>Re: Drupal way of doing onchange</title>
	<published>2009-11-22T10:47:14Z</published>
	<updated>2009-11-22T10:47:14Z</updated>
	<author>
		<name>Randy Fay</name>
	</author>
	<content type="html">As long as you don&amp;#39;t change form elements, you can use traditional javascript/jquery.  So it would be OK to hide/show or disable/enable the CVV field in your example. &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;If you change them (for example, by adding in a CVV field, or by changing the options in a select) then form validation will fail. That&amp;#39;s the case where you&amp;#39;re forced into AJAX(D7)/AHAH.&lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;If you find you need to do AHAH, there are working examples in the Examples module (&lt;a href=&quot;http://drupal.org/project/examples&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://drupal.org/project/examples&lt;/a&gt;), and there is a tutorial at &lt;a href=&quot;http://randyfay.com/ahah&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://randyfay.com/ahah&lt;/a&gt;, which also has references to other information.&lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;-Randy &lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Sun, Nov 22, 2009 at 1:37 PM, Jeff Greenberg &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26468178&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jeff@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;&quot;&gt;
Haven&amp;#39;t delved into AHAH yet, this might force the issue.&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
Using an easy (=less typing) example. A credit card form. When the credit card type is selected from a select, the selection needs to fire a javascript function that will disable fields that don&amp;#39;t apply to that card type (such as CVV).&lt;br&gt;

&lt;br&gt;
&lt;br&gt;
Normally, I would have an onchange event for the select, and noticed that in the form api, while there is an attribute section to add miscellaneous attributes, the doc doesn&amp;#39;t mention events as examples. And if putting an event there is legitimate, there isn&amp;#39;t a mention of how to include the responding js function in the form.&lt;br&gt;

&lt;br&gt;
&lt;br&gt;
If AHAH is the way I&amp;#39;m supposed to handle this, I&amp;#39;d appreciate being pointed to a good similar example, because I&amp;#39;m a bit unclear from the AHAH entries in the form reference docs, for example, how to relate the myhandler/js entry to a physical location of the function, and how the function gets there.&lt;br&gt;

&lt;br&gt;
&lt;br&gt;
Thanks!&lt;br&gt;
&lt;br&gt;
&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;br clear=&quot;all&quot;&gt;&lt;br&gt;-- &lt;br&gt;Randy Fay&lt;br&gt;Drupal Development, troubleshooting, and debugging&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26468178&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;randy@...&lt;/a&gt;&lt;br&gt;+1  970.462.7450&lt;br&gt;&lt;br&gt;
&lt;/div&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Drupal-way-of-doing-onchange-tp26468063p26468178.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26468063</id>
	<title>Drupal way of doing onchange</title>
	<published>2009-11-22T10:37:56Z</published>
	<updated>2009-11-22T10:37:56Z</updated>
	<author>
		<name>Jeff Greenberg-3</name>
	</author>
	<content type="html">Haven't delved into AHAH yet, this might force the issue.
&lt;br&gt;&lt;br&gt;&lt;br&gt;Using an easy (=less typing) example. A credit card form. When the 
&lt;br&gt;credit card type is selected from a select, the selection needs to fire 
&lt;br&gt;a javascript function that will disable fields that don't apply to that 
&lt;br&gt;card type (such as CVV).
&lt;br&gt;&lt;br&gt;&lt;br&gt;Normally, I would have an onchange event for the select, and noticed 
&lt;br&gt;that in the form api, while there is an attribute section to add 
&lt;br&gt;miscellaneous attributes, the doc doesn't mention events as examples. 
&lt;br&gt;And if putting an event there is legitimate, there isn't a mention of 
&lt;br&gt;how to include the responding js function in the form.
&lt;br&gt;&lt;br&gt;&lt;br&gt;If AHAH is the way I'm supposed to handle this, I'd appreciate being 
&lt;br&gt;pointed to a good similar example, because I'm a bit unclear from the 
&lt;br&gt;AHAH entries in the form reference docs, for example, how to relate the 
&lt;br&gt;myhandler/js entry to a physical location of the function, and how the 
&lt;br&gt;function gets there.
&lt;br&gt;&lt;br&gt;&lt;br&gt;Thanks!
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Drupal-way-of-doing-onchange-tp26468063p26468063.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26467313</id>
	<title>Re: Drupal, SimpleTest and Continuous Integration</title>
	<published>2009-11-22T09:25:25Z</published>
	<updated>2009-11-22T09:25:25Z</updated>
	<author>
		<name>Steven Jones-9</name>
	</author>
	<content type="html">Hi Yannick,
&lt;br&gt;&lt;br&gt;Are you using SimpleTest or Drupal's SimpleTest? I'm not sure of the
&lt;br&gt;exact differences myself, but I know that they are not the same thing.
&lt;br&gt;&lt;br&gt;As for using continuous integration there a number of scattered
&lt;br&gt;articles/resources around the place, and it seems that a lot of people
&lt;br&gt;using Drupal like the Hudson CI engine (myself included).
&lt;br&gt;&lt;br&gt;Here are a few I can think of:
&lt;br&gt;Paris presentation:
&lt;br&gt;&lt;a href=&quot;http://paris2009.drupalcon.org/session/continuous-integration-and-drupal&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://paris2009.drupalcon.org/session/continuous-integration-and-drupal&lt;/a&gt;&lt;br&gt;Getting Simpletest results into Hudson:
&lt;br&gt;&lt;a href=&quot;http://www.computerminds.co.uk/hudson-and-simpletest&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.computerminds.co.uk/hudson-and-simpletest&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;http://www.lullabot.com/drupal-voices/drupal-voices-52-stew-robinson-continuous-integration-deployment-economistcom&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.lullabot.com/drupal-voices/drupal-voices-52-stew-robinson-continuous-integration-deployment-economistcom&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;http://www.archive.org/download/DrupalCampUK/ScalingDrupalDevelopment_512kb.mp4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.archive.org/download/DrupalCampUK/ScalingDrupalDevelopment_512kb.mp4&lt;/a&gt;&lt;br&gt;&lt;br&gt;Regards
&lt;br&gt;Steven Jones
&lt;br&gt;ComputerMinds ltd - Perfect Drupal Websites
&lt;br&gt;&lt;br&gt;Phone : 024 7666 7277
&lt;br&gt;Mobile : 07702 131 576
&lt;br&gt;Twitter : darthsteven
&lt;br&gt;&lt;a href=&quot;http://www.computerminds.co.uk&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.computerminds.co.uk&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;2009/11/22 Yannick Warnier &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26467313&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ywarnier@...&lt;/a&gt;&amp;gt;:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi there,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I'm the lead developer of a GPL e-learning system called Dokeos, and
&lt;br&gt;&amp;gt; occasional contributor to the Dokeos-Drupal module [1].
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; A few (12) months ago, we (Dokeos team) had to choose between PHPUnit
&lt;br&gt;&amp;gt; and SimpleTest to cover our system with unit tests. As the Drupal
&lt;br&gt;&amp;gt; community was in the same situation at that time, only a few weeks
&lt;br&gt;&amp;gt; ahead, we decided to follow and chose SimpleTest.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Unit Testing is not our final goal, and we want to implement something
&lt;br&gt;&amp;gt; like Xinc [2] or PHPUnderControl [3] to have Continuous Integration, as
&lt;br&gt;&amp;gt; it's called (a way to check when new code introduces regressions,
&lt;br&gt;&amp;gt; basically).
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; However, both seem to support better PHPUnit (I haven't tried
&lt;br&gt;&amp;gt; PHPUnderControl, but I have broken a few teeth on SimpleTest + Phing +
&lt;br&gt;&amp;gt; Xinc already, mainly because of conflicting versions of SimpleTest and
&lt;br&gt;&amp;gt; complexity of the configuration files for Xinc).
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; To get to the point, I would like to know if anybody has already
&lt;br&gt;&amp;gt; configured that type of combination in the context of Drupal and would
&lt;br&gt;&amp;gt; be so kind as to give me a link to some kind of report, examples or
&lt;br&gt;&amp;gt; plain documentation about this.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; In any case, I will be looking at the problem myself (so far it's been
&lt;br&gt;&amp;gt; only team members) and report here if it works, so it can be used with
&lt;br&gt;&amp;gt; Drupal too (but the question is more like if Drupal has a few weeks in
&lt;br&gt;&amp;gt; advance on our investigation there as well).
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Cheers,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Yannick
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; [1] &lt;a href=&quot;http://drupal.org/project/Dokeos&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://drupal.org/project/Dokeos&lt;/a&gt;&lt;br&gt;&amp;gt; [2] &lt;a href=&quot;http://code.google.com/p/xinc/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://code.google.com/p/xinc/&lt;/a&gt;&amp;nbsp;(LGPL)
&lt;br&gt;&amp;gt; [3] &lt;a href=&quot;http://www.phpundercontrol.org/about.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.phpundercontrol.org/about.html&lt;/a&gt;&amp;nbsp;(not OSI license)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Drupal%2C-SimpleTest-and-Continuous-Integration-tp26467171p26467313.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26467171</id>
	<title>Drupal, SimpleTest and Continuous Integration</title>
	<published>2009-11-22T09:04:04Z</published>
	<updated>2009-11-22T09:04:04Z</updated>
	<author>
		<name>Yannick Warnier</name>
	</author>
	<content type="html">Hi there,
&lt;br&gt;&lt;br&gt;I'm the lead developer of a GPL e-learning system called Dokeos, and
&lt;br&gt;occasional contributor to the Dokeos-Drupal module [1].
&lt;br&gt;&lt;br&gt;A few (12) months ago, we (Dokeos team) had to choose between PHPUnit
&lt;br&gt;and SimpleTest to cover our system with unit tests. As the Drupal
&lt;br&gt;community was in the same situation at that time, only a few weeks
&lt;br&gt;ahead, we decided to follow and chose SimpleTest.
&lt;br&gt;&lt;br&gt;Unit Testing is not our final goal, and we want to implement something
&lt;br&gt;like Xinc [2] or PHPUnderControl [3] to have Continuous Integration, as
&lt;br&gt;it's called (a way to check when new code introduces regressions,
&lt;br&gt;basically).
&lt;br&gt;&lt;br&gt;However, both seem to support better PHPUnit (I haven't tried
&lt;br&gt;PHPUnderControl, but I have broken a few teeth on SimpleTest + Phing +
&lt;br&gt;Xinc already, mainly because of conflicting versions of SimpleTest and
&lt;br&gt;complexity of the configuration files for Xinc).
&lt;br&gt;&lt;br&gt;To get to the point, I would like to know if anybody has already
&lt;br&gt;configured that type of combination in the context of Drupal and would
&lt;br&gt;be so kind as to give me a link to some kind of report, examples or
&lt;br&gt;plain documentation about this.
&lt;br&gt;&lt;br&gt;In any case, I will be looking at the problem myself (so far it's been
&lt;br&gt;only team members) and report here if it works, so it can be used with
&lt;br&gt;Drupal too (but the question is more like if Drupal has a few weeks in
&lt;br&gt;advance on our investigation there as well).
&lt;br&gt;&lt;br&gt;Cheers,
&lt;br&gt;&lt;br&gt;Yannick
&lt;br&gt;&lt;br&gt;[1] &lt;a href=&quot;http://drupal.org/project/Dokeos&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://drupal.org/project/Dokeos&lt;/a&gt;&lt;br&gt;[2] &lt;a href=&quot;http://code.google.com/p/xinc/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://code.google.com/p/xinc/&lt;/a&gt;&amp;nbsp;(LGPL)
&lt;br&gt;[3] &lt;a href=&quot;http://www.phpundercontrol.org/about.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.phpundercontrol.org/about.html&lt;/a&gt;&amp;nbsp;(not OSI license)
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Drupal%2C-SimpleTest-and-Continuous-Integration-tp26467171p26467171.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26446891</id>
	<title>Possible to create nodereference field in Form API?</title>
	<published>2009-11-20T09:09:39Z</published>
	<updated>2009-11-20T09:09:39Z</updated>
	<author>
		<name>Steve Edwards-8</name>
	</author>
	<content type="html">I'm creating a form via Forms API in a module, and I need to create a 
&lt;br&gt;nodereference field. &amp;nbsp;Is there a way to do that, or can nodereference 
&lt;br&gt;only be used as part of a CCK form?
&lt;br&gt;&lt;br&gt;Thanks.
&lt;br&gt;&lt;br&gt;Steve
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Possible-to-create-nodereference-field-in-Form-API--tp26446891p26446891.html" />
</entry>

</feed>
