From sirkitree at gmail.com Thu Jan 1 18:44:15 2009 From: sirkitree at gmail.com (Jerad Bitner) Date: Thu, 1 Jan 2009 13:44:15 -0500 Subject: [development] Scalable Internal Activity Stream Module In-Reply-To: <6C26F980-B060-4FA7-88A6-96CE3879DFF4@chapterthree.com> References: <001001c96b7b$1f9815e0$0200a8c0@structworks.com> <6C26F980-B060-4FA7-88A6-96CE3879DFF4@chapterthree.com> Message-ID: <215a89c90901011044r7ba119dbg4e85673773a3610f@mail.gmail.com> Activity module was created for just this purpose. http://drupal.org/project/activity It doesn't utilize the node system, however, and therefor you can't comment upon recorded activity, which was part of your request. I also have heard that you can have this sort of functionality with workflow-ng in D5, but again, not sure that you can comment on activity there either. Just throwing some ideas out there for ya. Would love to hear what you eventually decide upon! ~jerad On Wed, Dec 31, 2008 at 2:48 PM, Josh Koenig wrote: > > Heh, sometimes that works. Sometimes is just means there's some code. ;) > > Heartbeat seems interesting, though it's dependence on Rules makes it hard > to backport to Drupal 5 (which I'll need) and it's got some internal classes > that I don't entirely grok yet. > > It also doesn't make use of nodes, speaking to my initial question. > > I think I'll repost to the Social Networking group and see what I can stir > up. :) > > -j > > > That's what I love about Drupal -- every time I think to write some code, >> I turn around and someone's already done it for me. :) >> >> Kyle >> >> Research Assistant >> eBusiness Center @ BYU >> kyle.mathews2000.com/blog >> >> >> On Wed, Dec 31, 2008 at 12:22 PM, Josh Koenig >> wrote: >> >> Excellent! >> >> I knew this had to have already happened. :) >> >> I'll dig into this and at least post a link here if I get into the >> discussion, etc. If it all looks good I may bang out a 5.x backport. >> >> cheers >> -j >> >> >> Read this (very) long discussion on g.d.o on activity streams: >> http://groups.drupal.org/node/15088 >> >> Heartbeat is the module that's resulted from that discussion and looks >> promising. >> http://drupal.org/project/heartbeat >> >> I'd love to hear more about your thoughts on this subject as I'm about to >> implement Heartbeat on a site I'm working on. >> >> Kyle >> >> Research Assistant >> eBusiness Center @ BYU >> kyle.mathews2000.com/blog >> >> >> On Wed, Dec 31, 2008 at 12:08 PM, Daniel F. Kudwien < >> news at unleashedmind.com> wrote: >> > Greetings Drupalistas, >> > >> > Happy New Year! >> > -josh >> >> Happy New Year for you, too! *g* >> >> Daniel >> >> >> >> ------------------------------------------ >> Josh Koenig, Partner, CTO >> http://www.chapterthree.com >> AOL IM: chap3josh >> 1-888-496-3238 >> >> >> > ------------------------------------------ > Josh Koenig, Partner, CTO > http://www.chapterthree.com > AOL IM: chap3josh > 1-888-496-3238 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/development/attachments/20090101/86d76e89/attachment.htm From david at fourkitchens.com Thu Jan 1 23:56:31 2009 From: david at fourkitchens.com (David Timothy Strauss) Date: Thu, 1 Jan 2009 17:56:31 -0600 (CST) Subject: [development] Scalable Internal Activity Stream Module In-Reply-To: Message-ID: <1658752275.6624051230854191113.JavaMail.root@mail-2.01.com> If this is anything like the Tracker, you'll need to denormalize and index the data to get a scalable solution. From posco2k5 at gmail.com Fri Jan 2 18:43:52 2009 From: posco2k5 at gmail.com (Neil Goodman) Date: Fri, 2 Jan 2009 12:43:52 -0600 Subject: [development] Repeating events using Date and Calendar Message-ID: <566c720d0901021043v79e3c229y7fd8794128b88253@mail.gmail.com> I am currently working on a project that needs to have the option to create repeating events on a calendar in a Drupal 5 site. Currently we are using the Event module and the Event Repeat module and we are happy with the options the Event Repeat module gives us. However, we have found that it is riddled with bugs. When going to the Event Repeat module's project page ( http://drupal.org/project/eventrepeat ) it has this message: "UPDATE: This modules has some issues related to time zones, performance on high traffic sites and advanced repeat patterns. You may want to use the date/calendar soultion instead, which is currently further along." However I can not find any documentation on how to setup repeating event behavior using just the date module and the calendar module. Has anyone had to do something similar to this? If so, can you recommend a solution? Neil From pavan.k.murthy at gmail.com Fri Jan 2 20:43:31 2009 From: pavan.k.murthy at gmail.com (Pavan Keshavamurthy) Date: Sat, 3 Jan 2009 02:13:31 +0530 Subject: [development] Repeating events using Date and Calendar In-Reply-To: <566c720d0901021043v79e3c229y7fd8794128b88253@mail.gmail.com> References: <566c720d0901021043v79e3c229y7fd8794128b88253@mail.gmail.com> Message-ID: <46b9cfab0901021243j78cef6b4m70b5a86df566d046@mail.gmail.com> The Date Repeat API is part of the date.module. 2009/1/3 Neil Goodman > I am currently working on a project that needs to have the option to > create repeating events on a calendar in a Drupal 5 site. Currently we > are using the Event module and the Event Repeat module and we are > happy with the options the Event Repeat module gives us. However, we > have found that it is riddled with bugs. When going to the Event > Repeat module's project page ( http://drupal.org/project/eventrepeat ) > it has this message: > > "UPDATE: This modules has some issues related to time zones, > performance on high traffic sites and advanced repeat patterns. You > may want to use the date/calendar soultion instead, which is currently > further along." > > However I can not find any documentation on how to setup repeating > event behavior using just the date module and the calendar module. Has > anyone had to do something similar to this? If so, can you recommend a > solution? > > Neil > -- _PK Skype: pavankeshavamurthy http://grahana.net/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/development/attachments/20090103/ba775bbb/attachment.htm From mfioretti at nexaima.net Sun Jan 4 08:39:15 2009 From: mfioretti at nexaima.net (M. Fioretti) Date: Sun, 4 Jan 2009 09:39:15 +0100 (CET) Subject: [development] Info needed to add content to Drupal via shell/curl script Message-ID: <34683.213.203.159.55.1231058355.squirrel@nexaima.net> Greetings, I would like to ask all Drupal developers where to find the info to do what I describe below. I have already found almost identical questions asked both on the support list and in the forums at drupal.org, but they did not receive complete answers, so here I am. I want to write a shell script which takes as input an HTML file and other parameters (title, category, etc...) and then, using curl and the POST method, logs into a Drupal website, adds a node with that text and parameters, logs off and returns the complete URL assigned by drupal to that page. The information I need is: - what is the exact sequence of pages (relative URLs) that drupal presents to users who login and then want to add a node? - what is the complete list of POST parameters (assuming there is only one custom category CAT_1) that drupal wants to see POSTed to each of those pages? - how much the two answers above depend on drupal version, or will change in the future? Important: I know I can look at all the http headers going back and forth between browser and drupal, and using this approach I have *already* written a working draft of the script myself, but I'm looking for a better, more reliable way to do this. I found that the script won't work consistantly, meaning that I'd have to tweak it every time if Drupal version changes or (usign it on other sites) depending on which modules are installed. So, is there any official documentation which contains complete, reliable answers to the questions above? In other words, is there a better, more reliable and future-proof way to get those answers than studying source code or raw http sessions by trial and error? Thank you in advance for any feedback and happy 2009! Marco -- Help *everybody* love Free Standards and Software: http://digifreedom.net From drewish at katherinehouse.com Sun Jan 4 11:13:31 2009 From: drewish at katherinehouse.com (andrew morton) Date: Sun, 4 Jan 2009 03:13:31 -0800 Subject: [development] Info needed to add content to Drupal via shell/curl script In-Reply-To: <34683.213.203.159.55.1231058355.squirrel@nexaima.net> References: <34683.213.203.159.55.1231058355.squirrel@nexaima.net> Message-ID: On Sun, Jan 4, 2009 at 12:39 AM, M. Fioretti wrote: > I want to write a shell script which takes as input an HTML file and other > parameters (title, category, etc...) and then, using curl and the POST > method, logs into a Drupal website, adds a node with that text and > parameters, logs off and returns the complete URL assigned by drupal to > that page. > > The information I need is: > > - what is the exact sequence of pages (relative URLs) that drupal presents > to users who login and then want to add a node? > - what is the complete list of POST parameters (assuming there is only one > custom category CAT_1) that drupal wants to see POSTed to each of those > pages? > - how much the two answers above depend on drupal version, or will change > in the future? There was a discussion at the Portland Drupal Group about using the SimpleTest module to do this type of thing. If nothing else it should be a good place to steal some code. There are likely unit tests for HEAD that would do what you're describing. Good luck, andrew From mfioretti at nexaima.net Sun Jan 4 11:27:53 2009 From: mfioretti at nexaima.net (M. Fioretti) Date: Sun, 4 Jan 2009 12:27:53 +0100 (CET) Subject: [development] Info needed to add content to Drupal via shell/curl script In-Reply-To: References: <34683.213.203.159.55.1231058355.squirrel@nexaima.net> Message-ID: <32847.213.203.159.55.1231068473.squirrel@nexaima.net> On Sun, January 4, 2009 12:13 pm, andrew morton wrote: > > There was a discussion at the Portland Drupal Group > about using the SimpleTest module to do this type > of thing.... There are likely unit tests for > HEAD that would do what you're describing. I have just downloaded simpletest and will study it later today, thanks, but I have one question anyway: From what I read, simpletest looks like: 1) a set of functions/classes/code to do in Php what I was planning to do with bash and curl, but... 2) something that requires anyway, in advance the same information I am asking for, that is the real subject of my search. I am looking for documentation that tells me: - define this exact series of form fields - send them to this url - define this second series of form fields - send them to this other url - etc... I mean, if using simpletest from the command line means, eventually, to type less than writing a bash/curl implementation, that's great, I'll do that. But simpletest looks to me as a way to do automatically and much more quickly something you *already* know in all details, that is a way to go through a constant sequence of predefined steps: maybe I'm missing something, but can it make faster to learn what that sequence *is* ? thanks, Marco -- Help *everybody* love Free Standards and Software: http://digifreedom.net From drewish at katherinehouse.com Sun Jan 4 11:48:55 2009 From: drewish at katherinehouse.com (andrew morton) Date: Sun, 4 Jan 2009 03:48:55 -0800 Subject: [development] Info needed to add content to Drupal via shell/curl script In-Reply-To: <32847.213.203.159.55.1231068473.squirrel@nexaima.net> References: <34683.213.203.159.55.1231058355.squirrel@nexaima.net> <32847.213.203.159.55.1231068473.squirrel@nexaima.net> Message-ID: On Sun, Jan 4, 2009 at 3:27 AM, M. Fioretti wrote: > But simpletest looks to me as a way to do automatically and much more > quickly something you *already* know in all details, that is a way to go > through a constant sequence of predefined steps: maybe I'm missing > something, but can it make faster to learn what that sequence *is* ? Which is exactly why I suggested looking at the tests. There are tests for logging in and test for creating nodes: http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/simpletest/tests/functional/ From aldo at caonao.cu Sun Jan 4 19:36:17 2009 From: aldo at caonao.cu (Aldo Martinez Selleras) Date: Sun, 4 Jan 2009 14:36:17 -0500 Subject: [development] how to edit a record Message-ID: <200901041436.17932.aldo@caonao.cu> i create a node type and all work fine, the records in database are ok, i mean, create a table for details of my node type and the basic information its saved in node table and node_revisions, well, all right. but, there is some problems. - how i do my node type not will be promoted to frontpage, and will no have comment?? i read the Pro Drupal Developement book and not find the solution to this. - how, when i submit the form, the result of the record it's show with my _page() function? - why when i edit the record the inputs don't be filled with data? again, sorry for my english ;) -- ---------------------- Aldo Martinez Selleras Administrador del Nodo CITMATEL GND Camaguey Tel: 32-291661 E-mail: aldo at caonao.cu Linux User #364356 From citizenofgnu at gmail.com Mon Jan 5 07:12:20 2009 From: citizenofgnu at gmail.com (citizenofgnu) Date: Mon, 5 Jan 2009 07:12:20 +0000 Subject: [development] citizenofgnu wants to keep up with you on Twitter Message-ID: <4961b2d4d5062_1140159e30375f943178f@web081.twitter.com.tmail> To find out more about Twitter, visit the link below: http://twitter.com/i/3d44fcb318ebe9d3b16d425605a232bd872c37d8 Thanks, -The Twitter Team About Twitter Twitter is a unique approach to communication and networking based on the simple concept of status. What are you doing? What are your friends doing?right now? With Twitter, you may answer this question over SMS or the Web and the responses are shared between contacts. This message was sent by a Twitter user who entered your email address. If you'd prefer not to receive emails when other people invite you to Twitter, click here: http://twitter.com/i/optout/5c71b7afe056ce6fbc099043388ce315a45e4ca2 From citizenofgnu at gmail.com Mon Jan 5 07:12:58 2009 From: citizenofgnu at gmail.com (citizenofgnu) Date: Mon, 5 Jan 2009 07:12:58 +0000 Subject: [development] citizenofgnu wants to keep up with you on Twitter Message-ID: <4961b2faafa9e_63a2155c7a5db9fc1795a@web060.twitter.com.tmail> To find out more about Twitter, visit the link below: http://twitter.com/i/bb19b3fb8f8022d473b9ec25362ca7aa19c6234f Thanks, -The Twitter Team About Twitter Twitter is a unique approach to communication and networking based on the simple concept of status. What are you doing? What are your friends doing?right now? With Twitter, you may answer this question over SMS or the Web and the responses are shared between contacts. This message was sent by a Twitter user who entered your email address. If you'd prefer not to receive emails when other people invite you to Twitter, click here: http://twitter.com/i/optout/54253f877d476755c403d11855cce20bdc9604d4 From citizenofgnu at gmail.com Mon Jan 5 07:14:22 2009 From: citizenofgnu at gmail.com (citizenofgnu) Date: Mon, 5 Jan 2009 07:14:22 +0000 Subject: [development] citizenofgnu wants to keep up with you on Twitter Message-ID: <4961b34e640d5_1e3915924f56af305533@web082.twitter.com.tmail> To find out more about Twitter, visit the link below: http://twitter.com/i/eb60b7f6393cb87953b782d3614bee6c55460503 Thanks, -The Twitter Team About Twitter Twitter is a unique approach to communication and networking based on the simple concept of status. What are you doing? What are your friends doing?right now? With Twitter, you may answer this question over SMS or the Web and the responses are shared between contacts. This message was sent by a Twitter user who entered your email address. If you'd prefer not to receive emails when other people invite you to Twitter, click here: http://twitter.com/i/optout/5afe83f6ba235373f523016939e2869e8b58d24a From citizenofgnu at gmail.com Mon Jan 5 07:14:40 2009 From: citizenofgnu at gmail.com (citizenofgnu) Date: Mon, 5 Jan 2009 07:14:40 +0000 Subject: [development] citizenofgnu wants to keep up with you on Twitter Message-ID: <4961b360dfce6_c2415919f2d73a01851@web080.twitter.com.tmail> To find out more about Twitter, visit the link below: http://twitter.com/i/aa9e0838a9c576760bbc9f33cd520d03d7d2723a Thanks, -The Twitter Team About Twitter Twitter is a unique approach to communication and networking based on the simple concept of status. What are you doing? What are your friends doing?right now? With Twitter, you may answer this question over SMS or the Web and the responses are shared between contacts. This message was sent by a Twitter user who entered your email address. If you'd prefer not to receive emails when other people invite you to Twitter, click here: http://twitter.com/i/optout/cc2a555caba37375f8a8a975adb93c5ae89be62e From citizenofgnu at gmail.com Mon Jan 5 07:27:43 2009 From: citizenofgnu at gmail.com (=?UTF-8?Q?Thyagarajan?= =?UTF-8?Q?_=E0=AE=A4=E0=AE=BF=E0=AE=AF=E0=AE=BE?= =?UTF-8?Q?=E0=AE=95=E0=AE=B0=E0=AE=BE=E0=AE=9C=E0=AE=A9=E0=AF=8D?=) Date: Mon, 5 Jan 2009 12:57:43 +0530 Subject: [development] citizenofgnu wants to keep up with you on Twitter In-Reply-To: <4961b360dfce6_c2415919f2d73a01851@web080.twitter.com.tmail> References: <4961b360dfce6_c2415919f2d73a01851@web080.twitter.com.tmail> Message-ID: Hello community, Please pardon my ignorance for flooding this crap. I have given my email id to import my contacts into my twitter account. Forgot to un check the development at drupal.org. Sorry for my ignorance. Regards Thyagarajan Shanmugham From posco2k5 at gmail.com Mon Jan 5 17:48:26 2009 From: posco2k5 at gmail.com (Neil Goodman) Date: Tue, 6 Jan 2009 11:48:26 +1800 Subject: [development] Repeating events using Date and Calendar In-Reply-To: <46b9cfab0901021243j78cef6b4m70b5a86df566d046@mail.gmail.com> References: <566c720d0901021043v79e3c229y7fd8794128b88253@mail.gmail.com> <46b9cfab0901021243j78cef6b4m70b5a86df566d046@mail.gmail.com> Message-ID: <566c720d0901050948l65a7c79eia884065eea103ab6@mail.gmail.com> Thanks for pointing this out. Our problem was that we were using Date 5.x-1.8. Date Repeat API was only available in Date 5.x-2.5. Upgrading to 2.5 and enabling Date Repeat API worked great. The new interface is much nicer. Thanks! Neil On Sat, Jan 3, 2009 at 2:43 PM, Pavan Keshavamurthy wrote: > The Date Repeat API is part of the date.module. > > 2009/1/3 Neil Goodman >> >> I am currently working on a project that needs to have the option to >> create repeating events on a calendar in a Drupal 5 site. Currently we >> are using the Event module and the Event Repeat module and we are >> happy with the options the Event Repeat module gives us. However, we >> have found that it is riddled with bugs. When going to the Event >> Repeat module's project page ( http://drupal.org/project/eventrepeat ) >> it has this message: >> >> "UPDATE: This modules has some issues related to time zones, >> performance on high traffic sites and advanced repeat patterns. You >> may want to use the date/calendar soultion instead, which is currently >> further along." >> >> However I can not find any documentation on how to setup repeating >> event behavior using just the date module and the calendar module. Has >> anyone had to do something similar to this? If so, can you recommend a >> solution? >> >> Neil > > > > -- > _PK > Skype: pavankeshavamurthy > http://grahana.net/ > From arancaytar.ilyaran at gmail.com Mon Jan 5 17:55:55 2009 From: arancaytar.ilyaran at gmail.com (Arancaytar Ilyaran) Date: Mon, 05 Jan 2009 18:55:55 +0100 Subject: [development] Per-Field format permissions - new addon module Message-ID: <496249AB.5010500@gmail.com> The ability to assign input formats to specific fields instead of allowing or forbidding them globally is a feature that I've long missed (and not justme). See, for example, this issue for CCK: http://drupal.org/node/81981 Rather than continuing to try to get this feature into core for node bodies and comments, or into CCK for text fields, I realized it would be far easier to provide it via an addon. The module would just need to add some extra settings to the node type form, the CCK text field widgets, and elsewhere; it would then have to override the filter_form()-generated format selector with its own. The most simple and flexible way would be to allow admins to override normal format permissions with "allow" and "deny", or leaving permissions as they are. So this is what I came up with in an afternoon of experimenting (only node bodies so far, no CCK or comments): http://svn.ermarian.net/drupal/modules/fieldformat/trunk/ Screenshot: http://picasaweb.google.com/lh/photo/8QHlLIsscAGo4FFW8CeBkA?authkey=FNEPe1yFIVI&feat=directlink Before I clean it up for d.o contrib, I'd like some feedback: Is this needed, has it been done, does it hit the spot or require some additional functionality? Cheers, -Aran -- Arancaytar ---------------------- Nothing beside remains: Round the decay Of that colossal wreck, boundless and bare The lone and level sands stretch far away... ---------------------- PGP: http://ermarian.net/downloads/0x27CA5C74 XMPP: arancaytar.ilyaran at gmail.com AOL: 282026638 / RealArancaytar URL: http://ermarian.net -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 250 bytes Desc: OpenPGP digital signature Url : http://lists.drupal.org/pipermail/development/attachments/20090105/34a10caa/attachment.pgp From aldo at caonao.cu Mon Jan 5 17:54:32 2009 From: aldo at caonao.cu (Aldo Martinez Selleras) Date: Mon, 5 Jan 2009 12:54:32 -0500 Subject: [development] default settings for new content type Message-ID: <200901051254.32937.aldo@caonao.cu> how to setup the default options, like disable comment, promoted to frontpage? i mean, with a content type created by me, from php code. -- ---------------------- Aldo Martinez Selleras Administrador del Nodo CITMATEL GND Camaguey Tel: 32-291661 E-mail: aldo at caonao.cu Linux User #364356 From jim at rootyhollow.com Mon Jan 5 18:12:28 2009 From: jim at rootyhollow.com (Jim Taylor) Date: Mon, 5 Jan 2009 13:12:28 -0500 Subject: [development] default settings for new content type In-Reply-To: <200901051254.32937.aldo@caonao.cu> References: <200901051254.32937.aldo@caonao.cu> Message-ID: <2f2379e70901051012o7fe057cfxeecb96cc8db6962a@mail.gmail.com> If by with php code you mean in a module, you need hook_node_info http://api.drupal.org/api/function/hook_node_info/6 On Mon, Jan 5, 2009 at 12:54 PM, Aldo Martinez Selleras wrote: > how to setup the default options, like disable comment, promoted to > frontpage? > > i mean, with a content type created by me, from php code. > > -- > ---------------------- > Aldo Martinez Selleras > Administrador del Nodo > CITMATEL GND Camaguey > Tel: 32-291661 > E-mail: aldo at caonao.cu > Linux User #364356 > -- Jim Taylor Rooty Hollow LLC, Owner jim at rootyhollow.com www.rootyhollow.com (614) 886-5530 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/development/attachments/20090105/eae1e54e/attachment.htm From larry at garfieldtech.com Mon Jan 5 18:23:44 2009 From: larry at garfieldtech.com (Larry Garfield) Date: Mon, 5 Jan 2009 12:23:44 -0600 Subject: [development] Per-Field format permissions - new addon module In-Reply-To: <496249AB.5010500@gmail.com> References: <496249AB.5010500@gmail.com> Message-ID: <0d2a7065abc62e2313cbbe50cd3b0cb7@localhost> There's already a half-dozen modules to improve the format handling, and more appearing every day. At this point I am of the mind that any effort to improve the situation in contrib is wasted effort; core's input format handling MUST improve. Gabor has already been spearheading some work on that, but much much more is still needed. For node bodies, there's the filterbynodetype module[1] that I wrote a while back. There's a patch to add support for comments[2] sitting in the queue that I want to commit if it would actually get a review and RTBC. :-) There was an issue[3] to add support for CCK text fields as well[1]. I bounced that over to the CCK queue, as filterbynodetype has to work through totally insane form_alter nonsense. I would much rather see CCK handle that itself. For that, talk to KarenS and yched. Bottom line, absolutely agreed that it's needed, absolutely not agreed that we need yet another contrib module to try and do it. There are too many of them already. Please please please focus on making this system stop sucking in core instead. :-) [1] http://drupal.org/project/filterbynodetype [2] http://drupal.org/node/154760 [3] http://drupal.org/node/152592 --Larry Garfield On Mon, 05 Jan 2009 18:55:55 +0100, Arancaytar Ilyaran wrote: > The ability to assign input formats to specific fields instead of allowing > or > forbidding them globally is a feature that I've long missed (and not > justme). > See, for example, this issue for CCK: http://drupal.org/node/81981 > > Rather than continuing to try to get this feature into core for node > bodies and > comments, or into CCK for text fields, I realized it would be far easier > to > provide it via an addon. > > The module would just need to add some extra settings to the node type > form, the > CCK text field widgets, and elsewhere; it would then have to override the > filter_form()-generated format selector with its own. The most simple and > flexible way would be to allow admins to override normal format > permissions with > "allow" and "deny", or leaving permissions as they are. > > So this is what I came up with in an afternoon of experimenting (only node > bodies so far, no CCK or comments): > > http://svn.ermarian.net/drupal/modules/fieldformat/trunk/ > > Screenshot: > http://picasaweb.google.com/lh/photo/8QHlLIsscAGo4FFW8CeBkA?authkey=FNEPe1yFIVI&feat=directlink > > Before I clean it up for d.o contrib, I'd like some feedback: Is this > needed, > has it been done, does it hit the spot or require some additional > functionality? > > > Cheers, > -Aran > > From dragonwize at gmail.com Mon Jan 5 18:22:02 2009 From: dragonwize at gmail.com (dragonwize) Date: Mon, 5 Jan 2009 13:22:02 -0500 Subject: [development] Per-Field format permissions - new addon module In-Reply-To: <496249AB.5010500@gmail.com> References: <496249AB.5010500@gmail.com> Message-ID: Hi Aran, I am the maintainer of the Better Formats module (http://drupal.org/project/better_formats) and planned to add this feature to my 2.0 version. I would like to work with you on this feature for D6 and incorporate it into the rest of BF's format permissions settings. If you file an task in the issue queue we can work on it. Thanks, -- Alan Doucette http://www.linkedin.com/in/alanio From dragonwize at gmail.com Mon Jan 5 19:05:23 2009 From: dragonwize at gmail.com (dragonwize) Date: Mon, 5 Jan 2009 14:05:23 -0500 Subject: [development] Per-Field format permissions - new addon module In-Reply-To: <0d2a7065abc62e2313cbbe50cd3b0cb7@localhost> References: <496249AB.5010500@gmail.com> <0d2a7065abc62e2313cbbe50cd3b0cb7@localhost> Message-ID: I agree we need to change core and am in the process of getting involved with that effort. However, if Dries' prediction of D7 not shipping till end of 2009, which I am fine with, means that we also need these features now for those that can not wait 1 to 2 years for that change to happen. These efforts can happen simultaneously. Waiting until D7 is finished for to do a backport also does not help us now. These efforts give us great insight into what actually needs to go into core to make it more usable and expendable so that we do not end up with a D7 version that is better than it is now but still not enough. I do not know about anyone else, but my venture in the format area through contrib is the only reason I feel comfortable to seriously join any core format effort. It also gives me the chance to test out what does and does not work both from a technical standpoint and from a usability standpoint. The better_formats module is leaps and bounds ahead of any other format module out there without the insane form_alter stuff that is present in filterbynodetype and others. -- Alan Doucette http://www.linkedin.com/in/alanio From aldo at caonao.cu Mon Jan 5 19:13:20 2009 From: aldo at caonao.cu (Aldo Martinez Selleras) Date: Mon, 5 Jan 2009 14:13:20 -0500 Subject: [development] default settings for new content type In-Reply-To: <2f2379e70901051012o7fe057cfxeecb96cc8db6962a@mail.gmail.com> References: <200901051254.32937.aldo@caonao.cu> <2f2379e70901051012o7fe057cfxeecb96cc8db6962a@mail.gmail.com> Message-ID: <200901051413.20872.aldo@caonao.cu> there is how to define some properties for node type, but i don't see where to include other parameters, like comment and publish options i have seen some place define this with variable_set() function but i'm not sure if that is the way to do that. -- ---------------------- Aldo Martinez Selleras Administrador del Nodo CITMATEL GND Camaguey Tel: 32-291661 E-mail: aldo at caonao.cu Linux User #364356 From news at unleashedmind.com Mon Jan 5 19:34:00 2009 From: news at unleashedmind.com (Daniel F. Kudwien) Date: Mon, 5 Jan 2009 20:34:00 +0100 Subject: [development] Per-Field format permissions - new addon module In-Reply-To: Message-ID: <02bd01c96f6c$8f6dab10$0200a8c0@structworks.com> FWIW, > I agree we need to change core and am in the process of > getting involved with that effort. However, if Dries' > prediction of D7 not shipping till end of 2009, which I am > fine with, means that we also need these features now for > those that can not wait 1 to 2 years for that change to > happen. These efforts can happen simultaneously. there is still very much to do to make Drupal core fully compatible to Wysiwyg editing, so releasing D7 earlier would have the opposite effect. See http://groups.drupal.org/node/6492/summary > The better_formats module is leaps and bounds ahead of any > other format module out there without the insane form_alter > stuff that is present in filterbynodetype and others. Without having looked at the code, I like the module's idea and the effort behind it. In a way, it applies the same principle as Wysiwyg API does to handling of input formats: consolidation and optimization. I would like to see this module evolve and apply the things we've learned to Drupal core afterwards. Thanks, Daniel From larry at garfieldtech.com Mon Jan 5 19:45:55 2009 From: larry at garfieldtech.com (Larry Garfield) Date: Mon, 5 Jan 2009 13:45:55 -0600 Subject: [development] default settings for new content type In-Reply-To: <200901051413.20872.aldo@caonao.cu> References: <200901051413.20872.aldo@caonao.cu> Message-ID: variable_set() is the way to do that. Have a look at the core default.profile for a decent example. http://cvs.drupal.org/viewvc.py/drupal/drupal/profiles/default/default.profile?view=markup&pathrev=DRUPAL-6 --Larry Garfield On Mon, 5 Jan 2009 14:13:20 -0500, Aldo Martinez Selleras wrote: > there is how to define some properties for node type, but i don't see where > to > include other parameters, like comment and publish options > > i have seen some place define this with variable_set() function but i'm > not > sure if that is the way to do that. > > -- > ---------------------- > Aldo Martinez Selleras > Administrador del Nodo > CITMATEL GND Camaguey > Tel: 32-291661 > E-mail: aldo at caonao.cu > Linux User #364356 From cxjohnson at gmail.com Mon Jan 5 23:05:14 2009 From: cxjohnson at gmail.com (Chris Johnson) Date: Mon, 5 Jan 2009 17:05:14 -0600 Subject: [development] read-only / remote CCK field Message-ID: <9ea8d6030901051505o3681aa1exd3aee6867153c540@mail.gmail.com> I'm building (or at least, trying to) a module which will provide a CCK field which will display data acquired from a remote web service. I was able to make it work, but only by horribly abusing the CCK interface and field/widget distinction. I have a read-only field, which has no form widget, and hence is only displayed when a node is viewed, not edited. I'm having difficulties doing it the right way because of 2 hurdles: 1. The content of $element as passed into theme_XXX_formatter_YYY() as the only argument. This variable is a huge array containing all kinds of stuff, including the complete node. My content type fields are in the node, but since they have user-specified names, I don't have any way to reference them without lots of ugly SQL. My fields are also there with numbered keys in the top-level array, but those numbers have no guaranteed correlation, so again, I can't reference them reliably. Is there some better way of coding hook_field() (or other hook) so that the resultant $element array has more easily referenced values? Or am I going about this all wrong? 2. Getting the value into the database. What's the best way to do this? I need to have a local copy in Drupal's CCK tables so that Views can function and as a caching mechanism, so that the remote web service does not need to be hit (and waited for) with each node view. (Perhaps I'll add a hook_cron() to update it periodically.) Any suggestions on how to do this, where to better ask or where to look for documentation and code that might help would be a appreciated. I'm well aware of the drupal.org docs -- I'm editing them as I go along learning how to make this work. -- ..chris From jeremy.oleary at co.multnomah.or.us Tue Jan 6 00:46:06 2009 From: jeremy.oleary at co.multnomah.or.us (O'LEARY Jeremy) Date: Mon, 5 Jan 2009 16:46:06 -0800 Subject: [development] MS SQL support in D7? Message-ID: Hi all, I found scattered references to people getting drupal running on MS SQL and was wondering if MS SQL would be supported in Drupal 7? Thanks, + Jeremy -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/development/attachments/20090105/b4ce926b/attachment.htm From arancaytar.ilyaran at gmail.com Tue Jan 6 01:30:23 2009 From: arancaytar.ilyaran at gmail.com (Arancaytar Ilyaran) Date: Tue, 06 Jan 2009 02:30:23 +0100 Subject: [development] MS SQL support in D7? In-Reply-To: References: Message-ID: <4962B42F.6000205@gmail.com> O'LEARY Jeremy wrote: > Hi all, > > > > I found scattered references to people getting drupal running on MS SQL > and was wondering if MS SQL would be supported in Drupal 7? > > > > Thanks, > > > > + Jeremy > > > D7 uses PDO as a database backend, and a PDO driver for MS SQL exists: http://de.php.net/manual/en/ref.pdo-dblib.php . It appears to be experimental right now. You need to download it separately and compile or include it in PHP as an extension. Drupal does not explicitly support it (as it does MySQL and SQLite), but it could work with the generic interface, without taking advantage of special features. -- Arancaytar ---------------------- Nothing beside remains: Round the decay Of that colossal wreck, boundless and bare The lone and level sands stretch far away... ---------------------- PGP: http://ermarian.net/downloads/0x27CA5C74 XMPP: arancaytar.ilyaran at gmail.com AOL: 282026638 / RealArancaytar URL: http://ermarian.net -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 250 bytes Desc: OpenPGP digital signature Url : http://lists.drupal.org/pipermail/development/attachments/20090106/8949740c/attachment.pgp From arancaytar.ilyaran at gmail.com Tue Jan 6 01:35:39 2009 From: arancaytar.ilyaran at gmail.com (Arancaytar Ilyaran) Date: Tue, 06 Jan 2009 02:35:39 +0100 Subject: [development] MS SQL support in D7? In-Reply-To: <4962B42F.6000205@gmail.com> References: <4962B42F.6000205@gmail.com> Message-ID: <4962B56B.8030906@gmail.com> Arancaytar Ilyaran wrote: > D7 uses PDO as a database backend, and a PDO driver for MS SQL exists: > http://de.php.net/manual/en/ref.pdo-dblib.php . It appears to be experimental > right now. You need to download it separately and compile or include it in PHP > as an extension. > > Drupal does not explicitly support it (as it does MySQL and SQLite), but it > could work with the generic interface, without taking advantage of special features. > Reading a bit more carefully, I see that DB-LIB is not well supported and not recommended on Windows. You should probably look at the ODBC driver instead, which is included in the standard PHP core (and enabled in Windows installations by default): http://de.php.net/manual/en/ref.pdo-odbc.php -- Arancaytar ---------------------- Nothing beside remains: Round the decay Of that colossal wreck, boundless and bare The lone and level sands stretch far away... ---------------------- PGP: http://ermarian.net/downloads/0x27CA5C74 XMPP: arancaytar.ilyaran at gmail.com AOL: 282026638 / RealArancaytar URL: http://ermarian.net -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 250 bytes Desc: OpenPGP digital signature Url : http://lists.drupal.org/pipermail/development/attachments/20090106/f058533e/attachment.pgp From rsw-ml at silverarc.biz Tue Jan 6 06:39:14 2009 From: rsw-ml at silverarc.biz (rsw-ml at silverarc.biz) Date: Tue, 6 Jan 2009 01:39:14 -0500 (EST) Subject: [development] Multiple sites with different database and different contents Message-ID: <38284.59.181.122.24.1231223954.squirrel@www.silverarc.biz> Hi... I have installed drupal 6.8 and its working fine with no problems at all. However, now I am into a scenario where I want to host multiple sites with different databases, different content but the same codebase. I know i can do it by juts extracting a drupal tar file and re-installing stuff again..But this would be my worst case situation. I want to do it using the multiple site flexibility. I am a newbie when it comes to setting up virtual hosts. I am using openSUSE 11.1 thanks in advance! Radhika From rsw-ml at silverarc.biz Tue Jan 6 06:40:23 2009 From: rsw-ml at silverarc.biz (rsw-ml at silverarc.biz) Date: Tue, 6 Jan 2009 01:40:23 -0500 (EST) Subject: [development] IGNORE this msg[Fwd: Multiple sites with different database and different contents] Message-ID: <36184.59.181.122.24.1231224023.squirrel@www.silverarc.biz> ---------------------------- Original Message ---------------------------- Subject: [development] Multiple sites with different database and different contents From: rsw-ml at silverarc.biz Date: Tue, January 6, 2009 1:39 am To: development at drupal.org -------------------------------------------------------------------------- I am sorry to post this message here... This was out of mistake.. Ignore Hi... I have installed drupal 6.8 and its working fine with no problems at all. However, now I am into a scenario where I want to host multiple sites with different databases, different content but the same codebase. I know i can do it by juts extracting a drupal tar file and re-installing stuff again..But this would be my worst case situation. I want to do it using the multiple site flexibility. I am a newbie when it comes to setting up virtual hosts. I am using openSUSE 11.1 thanks in advance! Radhika From jens at reinemuth.info Tue Jan 6 13:25:34 2009 From: jens at reinemuth.info (Jens Reinemuth) Date: Tue, 06 Jan 2009 14:25:34 +0100 Subject: [development] Put a site into maintenance-mode, but not for all... Message-ID: <49635BCE.8070201@reinemuth.info> Hi @all... i try to figure out how to put a live website into the maintenance-mode, but leave it fully accessible by a fixed IP-Range of developers so that bugs can be fixed and tested in a fully running site... Drupal V5.x... My way would be a modification of menu.inc: --snip-- function menu_execute_active_handler() { $client = $_SERVER['REMOTE_ADDR']; $arrAllowed = array ('www.xxx.yyy.zzz','127.0.0.1'); if (_menu_site_is_offline() && !in_array($client,$arrAllowed)) { return MENU_SITE_OFFLINE; } --/snip-- the array is just in there for testing purposes, will be replaced by a GLOBAL or something like that... Is this the only way to do it (as after an update menu.inc could be replaced...) ? Jens From gabor at hojtsy.hu Tue Jan 6 13:27:45 2009 From: gabor at hojtsy.hu (=?ISO-8859-1?Q?G=E1bor_Hojtsy?=) Date: Tue, 6 Jan 2009 14:27:45 +0100 Subject: [development] Put a site into maintenance-mode, but not for all... In-Reply-To: <49635BCE.8070201@reinemuth.info> References: <49635BCE.8070201@reinemuth.info> Message-ID: <86ca3ccb0901060527l1049f83x664efa88345eaf6f@mail.gmail.com> Hi, I prefer whitelisting IPs in .htaccess via Apache setup, so that while you experiment, nobody will get to the site (PHP code) any way, but only those allowed. G?bor On Tue, Jan 6, 2009 at 2:25 PM, Jens Reinemuth wrote: > Hi @all... > > i try to figure out how to put a live website into the maintenance-mode, > but leave it fully accessible by a fixed IP-Range of developers so that > bugs can be fixed and tested in a fully running site... > > Drupal V5.x... > > My way would be a modification of menu.inc: > > --snip-- > > function menu_execute_active_handler() { > $client = $_SERVER['REMOTE_ADDR']; > $arrAllowed = array ('www.xxx.yyy.zzz','127.0.0.1'); > if (_menu_site_is_offline() && !in_array($client,$arrAllowed)) { > return MENU_SITE_OFFLINE; > } > > --/snip-- > > the array is just in there for testing purposes, will be replaced by a > GLOBAL or something like that... > > Is this the only way to do it (as after an update menu.inc could be > replaced...) ? > > Jens > > From jens at reinemuth.info Tue Jan 6 13:35:22 2009 From: jens at reinemuth.info (Jens Reinemuth) Date: Tue, 06 Jan 2009 14:35:22 +0100 Subject: [development] Put a site into maintenance-mode, but not for all... In-Reply-To: <86ca3ccb0901060527l1049f83x664efa88345eaf6f@mail.gmail.com> References: <49635BCE.8070201@reinemuth.info> <86ca3ccb0901060527l1049f83x664efa88345eaf6f@mail.gmail.com> Message-ID: <49635E1A.6020109@reinemuth.info> ? schrieb: > Hi, > > I prefer whitelisting IPs in .htaccess via Apache setup, so that while > you experiment, nobody will get to the site (PHP code) any way, but > only those allowed. > > G?bor > Nice idea, but we have a really nice "site in maintanance mode"-page that surely should be displayed instead of blocking all external users... This should not be experiments, but a really urgent bugfixing that should not happen to often (hopefully)... Next problem is, that you have to edit .htaccess, while the other way you simply have to login drupal and put the site in the maintenance mode, or back to live mode. Jens From Greg at growingventuresolutions.com Tue Jan 6 14:23:22 2009 From: Greg at growingventuresolutions.com (Greg Knaddison) Date: Tue, 6 Jan 2009 07:23:22 -0700 Subject: [development] Put a site into maintenance-mode, but not for all... In-Reply-To: <49635BCE.8070201@reinemuth.info> References: <49635BCE.8070201@reinemuth.info> Message-ID: <3861c6770901060623v3fcbfacdlc4252b05d415ff80@mail.gmail.com> On Tue, Jan 6, 2009 at 6:25 AM, Jens Reinemuth wrote: > Hi @all... > > i try to figure out how to put a live website into the maintenance-mode, > but leave it fully accessible by a fixed IP-Range of developers so that > bugs can be fixed and tested in a fully running site... I've thought about this problem as well and created the Maintenance Helper module: http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/maintenance_helper/ It leaves the site accessible, but prevents users from logging in unless they have a specific permission. It could probably be modified to take an IP range as an admin setting to determine who gets to login as well. I guess I should make a project page for it so it gets an issue queue and we can discuss these kinds of things ;) The concept was discussed http://groups.drupal.org/node/10582 prior to building it which has some good ideas on the field. Regards, Greg -- Greg Knaddison http://knaddison.com | 303-800-5623 | http://growingventuresolutions.com From jens at reinemuth.info Tue Jan 6 14:28:18 2009 From: jens at reinemuth.info (Jens Reinemuth) Date: Tue, 06 Jan 2009 15:28:18 +0100 Subject: [development] Put a site into maintenance-mode, but not for all... In-Reply-To: <3861c6770901060623v3fcbfacdlc4252b05d415ff80@mail.gmail.com> References: <49635BCE.8070201@reinemuth.info> <3861c6770901060623v3fcbfacdlc4252b05d415ff80@mail.gmail.com> Message-ID: <49636A82.1000000@reinemuth.info> Greg Knaddison schrieb: > On Tue, Jan 6, 2009 at 6:25 AM, Jens Reinemuth wrote: > >> Hi @all... >> >> i try to figure out how to put a live website into the maintenance-mode, >> but leave it fully accessible by a fixed IP-Range of developers so that >> bugs can be fixed and tested in a fully running site... >> > > I've thought about this problem as well and created the Maintenance > Helper module: > > http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/maintenance_helper/ > > It leaves the site accessible, but prevents users from logging in > unless they have a specific permission. It could probably be modified > to take an IP range as an admin setting to determine who gets to login > as well. > > I guess I should make a project page for it so it gets an issue queue > and we can discuss these kinds of things ;) The concept was discussed > http://groups.drupal.org/node/10582 prior to building it which has > some good ideas on the field. > > Regards, > Greg > > That's a perfect starting point... Lets make a project page and do it ;-) From andrewberry at sentex.net Tue Jan 6 14:36:05 2009 From: andrewberry at sentex.net (Andrew Berry) Date: Tue, 6 Jan 2009 09:36:05 -0500 Subject: [development] Put a site into maintenance-mode, but not for all... In-Reply-To: <3861c6770901060623v3fcbfacdlc4252b05d415ff80@mail.gmail.com> References: <49635BCE.8070201@reinemuth.info> <3861c6770901060623v3fcbfacdlc4252b05d415ff80@mail.gmail.com> Message-ID: On 6-Jan-09, at 9:23 AM, Greg Knaddison wrote: > On Tue, Jan 6, 2009 at 6:25 AM, Jens Reinemuth > wrote: >> Hi @all... >> >> i try to figure out how to put a live website into the maintenance- >> mode, >> but leave it fully accessible by a fixed IP-Range of developers so >> that >> bugs can be fixed and tested in a fully running site... > > I've thought about this problem as well and created the Maintenance > Helper module: That's a neat idea. Project page for sure! I could see it being useful for doing site updates. On many sites, the DB is mostly read-only unless you're logged in. I wonder if, especially for sites with the aggressive cache option set, if during maintenance all pages would be served from the page cache, so that the site never loads inconsistent data during an update.php run. Only if the page wasn't cached would a maintenance message appear. Another solution is the secure_site module. I use it on development sites as my IP changes to much to be useful in an .htaccess. Also, many corporate clients are stuck behind a proxy, making it harder to whitelist IP's. You could probably theme the secure site login page to be more friendly to the general public. --Andrew -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2672 bytes Desc: not available Url : http://lists.drupal.org/pipermail/development/attachments/20090106/5dad1c48/attachment.bin From jens at reinemuth.info Tue Jan 6 14:54:23 2009 From: jens at reinemuth.info (Jens Reinemuth) Date: Tue, 06 Jan 2009 15:54:23 +0100 Subject: [development] Put a site into maintenance-mode, but not for all... In-Reply-To: References: <49635BCE.8070201@reinemuth.info> <3861c6770901060623v3fcbfacdlc4252b05d415ff80@mail.gmail.com> Message-ID: <4963709F.9060202@reinemuth.info> Andrew Berry schrieb: > On 6-Jan-09, at 9:23 AM, Greg Knaddison wrote: > > >> On Tue, Jan 6, 2009 at 6:25 AM, Jens Reinemuth >> wrote: >> >>> Hi @all... >>> >>> i try to figure out how to put a live website into the maintenance- >>> mode, >>> but leave it fully accessible by a fixed IP-Range of developers so >>> that >>> bugs can be fixed and tested in a fully running site... >>> >> I've thought about this problem as well and created the Maintenance >> Helper module: >> > > That's a neat idea. Project page for sure! > > I could see it being useful for doing site updates. On many sites, the > DB is mostly read-only unless you're logged in. I wonder if, > especially for sites with the aggressive cache option set, if during > maintenance all pages would be served from the page cache, so that the > site never loads inconsistent data during an update.php run. Only if > the page wasn't cached would a maintenance message appear. > > Another solution is the secure_site module. I use it on development > sites as my IP changes to much to be useful in an .htaccess. Also, > many corporate clients are stuck behind a proxy, making it harder to > whitelist IP's. You could probably theme the secure site login page to > be more friendly to the general public. > > --Andrew Ok... The IPs are not the problem, as all Developers come via one Proxy-IP to the webserver... So do the testers, project-managers, ... Our customer is also routed via a proxy, so there should be 2 IPs to whitelist (perhaps some more for the externals...) which should be possible to be set via admin. The htaccess method is not possible as it prevents those ugly pop ups and that the page i have to realize this is also presented to mobilephone users and absolute dummies... so if you give them login-pages and they get access denied, they will check their logins over and over, but if you give them an "error-page" they will simply blame us... Jens From Greg at growingventuresolutions.com Tue Jan 6 22:38:28 2009 From: Greg at growingventuresolutions.com (Greg Knaddison) Date: Tue, 6 Jan 2009 15:38:28 -0700 Subject: [development] Put a site into maintenance-mode, but not for all... In-Reply-To: References: <49635BCE.8070201@reinemuth.info> <3861c6770901060623v3fcbfacdlc4252b05d415ff80@mail.gmail.com> Message-ID: <3861c6770901061438u7a7044c5u2b5aafeb6e24c643@mail.gmail.com> On Tue, Jan 6, 2009 at 7:36 AM, Andrew Berry wrote: > > That's a neat idea. Project page for sure! > Great - done http://drupal.org/project/maintenance_helper The first release is created, but not yet published (it is waiting for the packaging script). Regards, Greg -- Greg Knaddison http://knaddison.com | 303-800-5623 | http://growingventuresolutions.com From mvance at pobox.com Wed Jan 7 01:36:23 2009 From: mvance at pobox.com (Matt V.) Date: Tue, 6 Jan 2009 17:36:23 -0800 (PST) Subject: [development] A streamlined way to develop core patches In-Reply-To: <9ea8d6030812071438x24eb7a77w7f4f2e3ae0bec6df@mail.gmail.com> References: <150209155.6176941228624050546.JavaMail.root@mail-2.01.com> <7E3AB8DC-34C2-4A6E-B078-71317DBA1812@heydon.com.au> <200812071517.31466.jpetso@gmx.at> <200812071638.54600.jpetso@gmx.at> <7E5B5BB1-DAC3-4927-8B21-3A020DE43854@heydon.com.au> <9ea8d6030812071438x24eb7a77w7f4f2e3ae0bec6df@mail.gmail.com> Message-ID: <21323239.post@talk.nabble.com> I realize this thread is a bit old, but I ran across it in the archives and decided to create the documentation page Chris described: http://drupal.org/node/355154 I was able to track down two mirrors each in Subversion, Git, and Bazaar. If anyone knows of a Mercurial mirror (or any other additions or corrections), please feel free to update the page. - Matt V. Chris Johnson-21 wrote: > > Should we have a handbook page or two on drupal.org which lists the > currently supported alternative repositories, and brief summaries of > their usage (i.e. copy the Four Kitchens description above essentially > verbatim)? It seems like services like these could be highly valuable > to the community. > > Thanks to all who support these things. > > ..chris > > On Sun, Dec 7, 2008 at 2:45 PM, Gordon Heydon > wrote: >> Hi >> >> >> >> On 08/12/2008, at 2:38 AM, Jakob Petsovits wrote: >> >>> On Sunday, 7. December 2008, Gordon Heydon wrote: >>>> >>>> I may take a look but it but I have a feeling I will need more than >>>> what is available in the version control api >>>> >>>> Plus I want to make it pretty light weight so that adding this to a >>>> site will have no impact >>> >>> Mmkay, no problem, just wanted to make sure that you consider the >>> possibility >>> before dismissing it :) >> >> I may actually use the version control api to extend the fuctionality and >> not provide the base functionity. >>> >>> (I reserve the right to port good stuff to Version Control API, though.) >> >> No problem >> >> Gordon >> > > -- View this message in context: http://www.nabble.com/A-streamlined-way-to-develop-core-patches-tp20877884p21323239.html Sent from the Drupal - Dev mailing list archive at Nabble.com. From cxjohnson at gmail.com Wed Jan 7 02:38:37 2009 From: cxjohnson at gmail.com (Chris Johnson) Date: Tue, 6 Jan 2009 20:38:37 -0600 Subject: [development] A streamlined way to develop core patches In-Reply-To: <21323239.post@talk.nabble.com> References: <150209155.6176941228624050546.JavaMail.root@mail-2.01.com> <7E3AB8DC-34C2-4A6E-B078-71317DBA1812@heydon.com.au> <200812071517.31466.jpetso@gmx.at> <200812071638.54600.jpetso@gmx.at> <7E5B5BB1-DAC3-4927-8B21-3A020DE43854@heydon.com.au> <9ea8d6030812071438x24eb7a77w7f4f2e3ae0bec6df@mail.gmail.com> <21323239.post@talk.nabble.com> Message-ID: <9ea8d6030901061838s152fd6kf37ceb0dc33178ab@mail.gmail.com> Fantastic! Thanks Matt. On Tue, Jan 6, 2009 at 7:36 PM, Matt V. wrote: > > I realize this thread is a bit old, but I ran across it in the archives and > decided to create the documentation page Chris described: > > http://drupal.org/node/355154 > > I was able to track down two mirrors each in Subversion, Git, and Bazaar. If > anyone knows of a Mercurial mirror (or any other additions or corrections), > please feel free to update the page. > > - Matt V. From jens at reinemuth.info Wed Jan 7 08:52:26 2009 From: jens at reinemuth.info (Jens Reinemuth) Date: Wed, 07 Jan 2009 09:52:26 +0100 Subject: [development] Put a site into maintenance-mode, but not for all... In-Reply-To: <3861c6770901061438u7a7044c5u2b5aafeb6e24c643@mail.gmail.com> References: <49635BCE.8070201@reinemuth.info> <3861c6770901060623v3fcbfacdlc4252b05d415ff80@mail.gmail.com> <3861c6770901061438u7a7044c5u2b5aafeb6e24c643@mail.gmail.com> Message-ID: <49646D4A.7050008@reinemuth.info> Greg Knaddison schrieb: > On Tue, Jan 6, 2009 at 7:36 AM, Andrew Berry wrote: > >> That's a neat idea. Project page for sure! >> >> > > Great - done http://drupal.org/project/maintenance_helper > > The first release is created, but not yet published (it is waiting for > the packaging script). > > Regards, > Greg > > Thanks... i'll check it out asap and have a look over it, how to include the needed patches... I thought perhaps it should not be IP-specific, as for example we locally also have the cases where customers enter the site via mobilephones and you have to identify them via some header variables... So it would be better to write some abstract functions that compare allowed and not allowed access tries depending on some rules that are not only IP-based... Have some other projects richt now, will check it out tomorrow. Regards, Jens From gabor at hojtsy.hu Wed Jan 7 12:48:48 2009 From: gabor at hojtsy.hu (=?ISO-8859-1?Q?G=E1bor_Hojtsy?=) Date: Wed, 7 Jan 2009 13:48:48 +0100 Subject: [development] Please help clear out Drupal 6 critical issue queue Message-ID: <86ca3ccb0901070448i1e8528ddv91da1728bd5ed5de@mail.gmail.com> Hi, The current Drupal 6 critical issue queue is 2 pages long. It was three earlier today, and I took around 1.5 - 2 hours today to clean up some of the very old cruft. Most issues were duplicates of things dealt with elsewhere, even some issues were solved already in current Drupal versions. Some really interesting items popped up however, which were not dealt with (eg. installer cannot be used to set up multisites, taxonomy term paths with views, taxonomy term deletion problems, etc). There were also developer issues, which were not critical to Drupal, but only problems with people on using our APIs. All-in-all it would be good if some other dedicated fellows could help clear out the critical issue queue, so that it only has real critical issues remaining: http://drupal.org/project/issues?projects=3060&categories=bug%2Ctask&priorities=1&states=1%2C8%2C13%2C14&versions=97368%2C345833%2C345462%2C324832%2C318701%2C295065%2C280583%2C244667%2C227618%2C219510%2C216077%2C208616%2C202820%2C198188%2C194287%2C184399%2C175832%2C221219 As it is, it does not shed a good light on Drupal 6 that it seems to have so many critical issues open, while many of these are either developer support requests, already solved, or interaction problems with contrib modules. Thanks for your help, G?bor Hojtsy (Drupal 6 maintainer) From aldo at caonao.cu Wed Jan 7 13:45:59 2009 From: aldo at caonao.cu (Aldo Martinez Selleras) Date: Wed, 7 Jan 2009 08:45:59 -0500 Subject: [development] default settings for new content type In-Reply-To: References: <200901051413.20872.aldo@caonao.cu> Message-ID: <200901070845.59144.aldo@caonao.cu> and what i must to do?? create a .profile for my content type??? or can i use de variable_set() function in my .module ??? -- ---------------------- Aldo Martinez Selleras Administrador del Nodo CITMATEL GND Camaguey Tel: 32-291661 E-mail: aldo at caonao.cu Linux User #364356 From catch56 at googlemail.com Wed Jan 7 14:07:48 2009 From: catch56 at googlemail.com (Nathaniel Catchpole) Date: Wed, 7 Jan 2009 14:07:48 +0000 Subject: [development] Please help clear out Drupal 6 critical issue queue In-Reply-To: <86ca3ccb0901070448i1e8528ddv91da1728bd5ed5de@mail.gmail.com> References: <86ca3ccb0901070448i1e8528ddv91da1728bd5ed5de@mail.gmail.com> Message-ID: I think the Drupal 6 criticals queue would get a lot more attention if we linked to it directly from the contributors block like we do for D7 - see this very old and neglected feature request in the webmasters queue: http://drupal.org/node/221510 Nat On Wed, Jan 7, 2009 at 12:48 PM, G?bor Hojtsy wrote: > Hi, > > The current Drupal 6 critical issue queue is 2 pages long. It was > three earlier today, and I took around 1.5 - 2 hours today to clean up > some of the very old cruft. Most issues were duplicates of things > dealt with elsewhere, even some issues were solved already in current > Drupal versions. Some really interesting items popped up however, > which were not dealt with (eg. installer cannot be used to set up > multisites, taxonomy term paths with views, taxonomy term deletion > problems, etc). There were also developer issues, which were not > critical to Drupal, but only problems with people on using our APIs. > > All-in-all it would be good if some other dedicated fellows could help > clear out the critical issue queue, so that it only has real critical > issues remaining: > > http://drupal.org/project/issues?projects=3060&categories=bug%2Ctask&priorities=1&states=1%2C8%2C13%2C14&versions=97368%2C345833%2C345462%2C324832%2C318701%2C295065%2C280583%2C244667%2C227618%2C219510%2C216077%2C208616%2C202820%2C198188%2C194287%2C184399%2C175832%2C221219 > > As it is, it does not shed a good light on Drupal 6 that it seems to > have so many critical issues open, while many of these are either > developer support requests, already solved, or interaction problems > with contrib modules. > > Thanks for your help, > G?bor Hojtsy (Drupal 6 maintainer) > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/development/attachments/20090107/296eaaaf/attachment.htm From remorse at partners.org Wed Jan 7 16:01:55 2009 From: remorse at partners.org (Richard Morse) Date: Wed, 7 Jan 2009 11:01:55 -0500 Subject: [development] Info needed to add content to Drupal via shell/curl script In-Reply-To: <34683.213.203.159.55.1231058355.squirrel@nexaima.net> References: <34683.213.203.159.55.1231058355.squirrel@nexaima.net> Message-ID: I developed something similar which uses the XML-RPC mechanism to create nodes. I wrote a custom module to receive the data, create a node object, and call node_save() on it. To submit the data, I used Perl. If you're interested, I can send you the code. Ricky On Jan 4, 2009, at 3:39 AM, M. Fioretti wrote: > Greetings, > > I would like to ask all Drupal developers where to find the info to do > what I describe below. I have already found almost identical questions > asked both on the support list and in the forums at drupal.org, but > they > did not receive complete answers, so here I am. > > I want to write a shell script which takes as input an HTML file and > other > parameters (title, category, etc...) and then, using curl and the POST > method, logs into a Drupal website, adds a node with that text and > parameters, logs off and returns the complete URL assigned by drupal > to > that page. > > The information I need is: > > - what is the exact sequence of pages (relative URLs) that drupal > presents > to users who login and then want to add a node? > - what is the complete list of POST parameters (assuming there is > only one > custom category CAT_1) that drupal wants to see POSTed to each of > those > pages? > - how much the two answers above depend on drupal version, or will > change > in the future? > > Important: I know I can look at all the http headers going back and > forth > between browser and drupal, and using this approach I have *already* > written a working draft of the script myself, but I'm looking for a > better, more reliable way to do this. I found that the script won't > work > consistantly, meaning that I'd have to tweak it every time if Drupal > version changes or (usign it on other sites) depending on which > modules > are installed. > > So, is there any official documentation which contains complete, > reliable > answers to the questions above? In other words, is there a better, > more > reliable and future-proof way to get those answers than studying > source > code or raw http sessions by trial and error? > > Thank you in advance for any feedback and happy 2009! > > Marco > > -- > Help *everybody* love Free Standards and Software: > http://digifreedom.net > The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail. From tjfulopp at gmail.com Wed Jan 7 16:18:39 2009 From: tjfulopp at gmail.com (=?UTF-8?Q?Tom=C3=A1=C5=A1_F=C3=BCl=C3=B6pp?=) Date: Wed, 7 Jan 2009 17:18:39 +0100 Subject: [development] Info needed to add content to Drupal via shell/curl script In-Reply-To: References: <34683.213.203.159.55.1231058355.squirrel@nexaima.net> Message-ID: <593475f90901070818n678b3cc6y4f628b100b72b7e1@mail.gmail.com> Hi, Ricky, Seems very useful. Are you planning to package and provide it as a module at d.o.? Then people could comment and supply patches to develop it further. If there are no such plans, I'll appreciate getting the existing code. Cheers, Tom?? -- Tom?? J. F?l?pp http://vacilando.net On Wed, Jan 7, 2009 at 17:01, Richard Morse wrote: > I developed something similar which uses the XML-RPC mechanism to create > nodes. I wrote a custom module to receive the data, create a node object, > and call node_save() on it. To submit the data, I used Perl. > > If you're interested, I can send you the code. > > Ricky > > > On Jan 4, 2009, at 3:39 AM, M. Fioretti wrote: > > Greetings, >> >> I would like to ask all Drupal developers where to find the info to do >> what I describe below. I have already found almost identical questions >> asked both on the support list and in the forums at drupal.org, but they >> did not receive complete answers, so here I am. >> >> I want to write a shell script which takes as input an HTML file and other >> parameters (title, category, etc...) and then, using curl and the POST >> method, logs into a Drupal website, adds a node with that text and >> parameters, logs off and returns the complete URL assigned by drupal to >> that page. >> >> The information I need is: >> >> - what is the exact sequence of pages (relative URLs) that drupal presents >> to users who login and then want to add a node? >> - what is the complete list of POST parameters (assuming there is only one >> custom category CAT_1) that drupal wants to see POSTed to each of those >> pages? >> - how much the two answers above depend on drupal version, or will change >> in the future? >> >> Important: I know I can look at all the http headers going back and forth >> between browser and drupal, and using this approach I have *already* >> written a working draft of the script myself, but I'm looking for a >> better, more reliable way to do this. I found that the script won't work >> consistantly, meaning that I'd have to tweak it every time if Drupal >> version changes or (usign it on other sites) depending on which modules >> are installed. >> >> So, is there any official documentation which contains complete, reliable >> answers to the questions above? In other words, is there a better, more >> reliable and future-proof way to get those answers than studying source >> code or raw http sessions by trial and error? >> >> Thank you in advance for any feedback and happy 2009! >> >> Marco >> >> -- >> Help *everybody* love Free Standards and Software: >> http://digifreedom.net >> >> > > > The information in this e-mail is intended only for the person to whom it > is > addressed. If you believe this e-mail was sent to you in error and the > e-mail > contains patient information, please contact the Partners Compliance > HelpLine at > http://www.partners.org/complianceline . If the e-mail was sent to you in > error > but does not contain patient information, please contact the sender and > properly > dispose of the e-mail. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/development/attachments/20090107/b579b676/attachment.htm From gdd at heyrocker.com Wed Jan 7 16:16:02 2009 From: gdd at heyrocker.com (Greg Dunlap) Date: Wed, 7 Jan 2009 08:16:02 -0800 Subject: [development] Info needed to add content to Drupal via shell/curl script In-Reply-To: References: <34683.213.203.159.55.1231058355.squirrel@nexaima.net> Message-ID: <7e4a3f280901070816s2a34f152h420ed8a2e65206ae@mail.gmail.com> On the Drupal side, you should also look at the Services module, which offers XML-RPC services for creating nodes as well as many other Drupal functions. On Wed, Jan 7, 2009 at 8:01 AM, Richard Morse wrote: > I developed something similar which uses the XML-RPC mechanism to create > nodes. I wrote a custom module to receive the data, create a node object, > and call node_save() on it. To submit the data, I used Perl. > > If you're interested, I can send you the code. > > Ricky > > > On Jan 4, 2009, at 3:39 AM, M. Fioretti wrote: > > Greetings, >> >> I would like to ask all Drupal developers where to find the info to do >> what I describe below. I have already found almost identical questions >> asked both on the support list and in the forums at drupal.org, but they >> did not receive complete answers, so here I am. >> >> I want to write a shell script which takes as input an HTML file and other >> parameters (title, category, etc...) and then, using curl and the POST >> method, logs into a Drupal website, adds a node with that text and >> parameters, logs off and returns the complete URL assigned by drupal to >> that page. >> >> The information I need is: >> >> - what is the exact sequence of pages (relative URLs) that drupal presents >> to users who login and then want to add a node? >> - what is the complete list of POST parameters (assuming there is only one >> custom category CAT_1) that drupal wants to see POSTed to each of those >> pages? >> - how much the two answers above depend on drupal version, or will change >> in the future? >> >> Important: I know I can look at all the http headers going back and forth >> between browser and drupal, and using this approach I have *already* >> written a working draft of the script myself, but I'm looking for a >> better, more reliable way to do this. I found that the script won't work >> consistantly, meaning that I'd have to tweak it every time if Drupal >> version changes or (usign it on other sites) depending on which modules >> are installed. >> >> So, is there any official documentation which contains complete, reliable >> answers to the questions above? In other words, is there a better, more >> reliable and future-proof way to get those answers than studying source >> code or raw http sessions by trial and error? >> >> Thank you in advance for any feedback and happy 2009! >> >> Marco >> >> -- >> Help *everybody* love Free Standards and Software: >> http://digifreedom.net >> >> > > > The information in this e-mail is intended only for the person to whom it > is > addressed. If you believe this e-mail was sent to you in error and the > e-mail > contains patient information, please contact the Partners Compliance > HelpLine at > http://www.partners.org/complianceline . If the e-mail was sent to you in > error > but does not contain patient information, please contact the sender and > properly > dispose of the e-mail. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/development/attachments/20090107/f9e70277/attachment.htm From remorse at partners.org Wed Jan 7 16:25:30 2009 From: remorse at partners.org (Richard Morse) Date: Wed, 7 Jan 2009 11:25:30 -0500 Subject: [development] Info needed to add content to Drupal via shell/curl script In-Reply-To: <7e4a3f280901070816s2a34f152h420ed8a2e65206ae@mail.gmail.com> References: <34683.213.203.159.55.1231058355.squirrel@nexaima.net> <7e4a3f280901070816s2a34f152h420ed8a2e65206ae@mail.gmail.com> Message-ID: Hi! In this particular case, I had some special variables I needed added, and I wanted to restrict the ability to post to certain IP addresses and user(s). I did look at services, and it was more than I needed or wanted... But thanks! Ricky On Jan 7, 2009, at 11:16 AM, Greg Dunlap wrote: > On the Drupal side, you should also look at the Services module, which > offers XML-RPC services for creating nodes as well as many other > Drupal > functions. > > On Wed, Jan 7, 2009 at 8:01 AM, Richard Morse > wrote: > >> I developed something similar which uses the XML-RPC mechanism to >> create >> nodes. I wrote a custom module to receive the data, create a node >> object, >> and call node_save() on it. To submit the data, I used Perl. >> >> If you're interested, I can send you the code. >> >> Ricky >> >> >> On Jan 4, 2009, at 3:39 AM, M. Fioretti wrote: >> >> Greetings, >>> >>> I would like to ask all Drupal developers where to find the info >>> to do >>> what I describe below. I have already found almost identical >>> questions >>> asked both on the support list and in the forums at drupal.org, >>> but they >>> did not receive complete answers, so here I am. >>> >>> I want to write a shell script which takes as input an HTML file >>> and other >>> parameters (title, category, etc...) and then, using curl and the >>> POST >>> method, logs into a Drupal website, adds a node with that text and >>> parameters, logs off and returns the complete URL assigned by >>> drupal to >>> that page. >>> >>> The information I need is: >>> >>> - what is the exact sequence of pages (relative URLs) that drupal >>> presents >>> to users who login and then want to add a node? >>> - what is the complete list of POST parameters (assuming there is >>> only one >>> custom category CAT_1) that drupal wants to see POSTed to each of >>> those >>> pages? >>> - how much the two answers above depend on drupal version, or will >>> change >>> in the future? >>> >>> Important: I know I can look at all the http headers going back >>> and forth >>> between browser and drupal, and using this approach I have *already* >>> written a working draft of the script myself, but I'm looking for a >>> better, more reliable way to do this. I found that the script >>> won't work >>> consistantly, meaning that I'd have to tweak it every time if Drupal >>> version changes or (usign it on other sites) depending on which >>> modules >>> are installed. >>> >>> So, is there any official documentation which contains complete, >>> reliable >>> answers to the questions above? In other words, is there a better, >>> more >>> reliable and future-proof way to get those answers than studying >>> source >>> code or raw http sessions by trial and error? >>> >>> Thank you in advance for any feedback and happy 2009! >>> >>> Marco >>> >>> -- >>> Help *everybody* love Free Standards and Software: >>> http://digifreedom.net >>> >>> >> >> >> The information in this e-mail is intended only for the person to >> whom it >> is >> addressed. If you believe this e-mail was sent to you in error and >> the >> e-mail >> contains patient information, please contact the Partners Compliance >> HelpLine at >> http://www.partners.org/complianceline . If the e-mail was sent to >> you in >> error >> but does not contain patient information, please contact the sender >> and >> properly >> dispose of the e-mail. >> >> From remorse at partners.org Wed Jan 7 16:26:54 2009 From: remorse at partners.org (Richard Morse) Date: Wed, 7 Jan 2009 11:26:54 -0500 Subject: [development] Info needed to add content to Drupal via shell/curl script In-Reply-To: <593475f90901070818n678b3cc6y4f628b100b72b7e1@mail.gmail.com> References: <34683.213.203.159.55.1231058355.squirrel@nexaima.net> <593475f90901070818n678b3cc6y4f628b100b72b7e1@mail.gmail.com> Message-ID: Hi! The code I developed is a small custom module that handles one particular case very well. The more general case is probably better served by services.module. However, I will send you the code I have, which also demonstrates the Perl side of it... Ricky On Jan 7, 2009, at 11:18 AM, Tom?? F?l?pp wrote: > Hi, Ricky, > > Seems very useful. Are you planning to package and provide it as a > module at > d.o.? Then people could comment and supply patches to develop it > further. > > If there are no such plans, I'll appreciate getting the existing code. > > Cheers, > > Tom?? > > -- > Tom?? J. F?l?pp > http://vacilando.net > > > > On Wed, Jan 7, 2009 at 17:01, Richard Morse > wrote: > >> I developed something similar which uses the XML-RPC mechanism to >> create >> nodes. I wrote a custom module to receive the data, create a node >> object, >> and call node_save() on it. To submit the data, I used Perl. >> >> If you're interested, I can send you the code. >> >> Ricky >> >> >> On Jan 4, 2009, at 3:39 AM, M. Fioretti wrote: >> >> Greetings, >>> >>> I would like to ask all Drupal developers where to find the info >>> to do >>> what I describe below. I have already found almost identical >>> questions >>> asked both on the support list and in the forums at drupal.org, >>> but they >>> did not receive complete answers, so here I am. >>> >>> I want to write a shell script which takes as input an HTML file >>> and other >>> parameters (title, category, etc...) and then, using curl and the >>> POST >>> method, logs into a Drupal website, adds a node with that text and >>> parameters, logs off and returns the complete URL assigned by >>> drupal to >>> that page. >>> >>> The information I need is: >>> >>> - what is the exact sequence of pages (relative URLs) that drupal >>> presents >>> to users who login and then want to add a node? >>> - what is the complete list of POST parameters (assuming there is >>> only one >>> custom category CAT_1) that drupal wants to see POSTed to each of >>> those >>> pages? >>> - how much the two answers above depend on drupal version, or will >>> change >>> in the future? >>> >>> Important: I know I can look at all the http headers going back >>> and forth >>> between browser and drupal, and using this approach I have *already* >>> written a working draft of the script myself, but I'm looking for a >>> better, more reliable way to do this. I found that the script >>> won't work >>> consistantly, meaning that I'd have to tweak it every time if Drupal >>> version changes or (usign it on other sites) depending on which >>> modules >>> are installed. >>> >>> So, is there any official documentation which contains complete, >>> reliable >>> answers to the questions above? In other words, is there a better, >>> more >>> reliable and future-proof way to get those answers than studying >>> source >>> code or raw http sessions by trial and error? >>> >>> Thank you in advance for any feedback and happy 2009! >>> >>> Marco >>> >>> -- >>> Help *everybody* love Free Standards and Software: >>> http://digifreedom.net >>> >>> >> >> >> The information in this e-mail is intended only for the person to >> whom it >> is >> addressed. If you believe this e-mail was sent to you in error and >> the >> e-mail >> contains patient information, please contact the Partners Compliance >> HelpLine at >> http://www.partners.org/complianceline . If the e-mail was sent to >> you in >> error >> but does not contain patient information, please contact the sender >> and >> properly >> dispose of the e-mail. >> >> From remorse at partners.org Wed Jan 7 16:33:55 2009 From: remorse at partners.org (Richard Morse) Date: Wed, 7 Jan 2009 11:33:55 -0500 Subject: [development] Info needed to add content to Drupal via shell/curl script In-Reply-To: <593475f90901070818n678b3cc6y4f628b100b72b7e1@mail.gmail.com> References: <34683.213.203.159.55.1231058355.squirrel@nexaima.net> <593475f90901070818n678b3cc6y4f628b100b72b7e1@mail.gmail.com> Message-ID: On Jan 7, 2009, at 11:18 AM, Tom?? F?l?pp wrote: > Hi, Ricky, > > Seems very useful. Are you planning to package and provide it as a > module at > d.o.? Then people could comment and supply patches to develop it > further. > > If there are no such plans, I'll appreciate getting the existing code. Hi! Here is the code. First is the php code, then the perl code. I've obfuscated some specific values (ip addresses, user names, etc), but it should be fairly clear... title, [report_date] => date, [body] => body, [input_format] => format (if empty, default format is used) [oi_restrict] => oi_restriction, [terms] => [ taxonomy_identifier, * ] [attachments] => ** this one is optional 0 => [name] [mime] [data] */ // validate the structure of the submission if (empty($params['title'])) { return xmlrpc_error(10, t('Missing title')); } if (empty($params['report_date'])) { return xmlrpc_error(11, t('Missing report date')); } if (empty($params['body'])) { return xmlrpc_error(12, t('Missing title')); } if (empty($params['input_format'])) { $params['input_format'] = variable_get('filter_default_format', 1); } else if (is_numeric($params['input_format'])) { // do nothing } else { // this is broken right now, I don't know why... $input_filter_name = $params['input_format']; if (false !== strpos($input_filter_name, '"')) { return xmlrpc_error(12, t('Invalid filter format specified: quotes not allowed')); } $matching_formats = array_filter(filter_formats(), create_function('$f', 'return $f->name == "' . $input_filter_name . '";')); if (count($matching_formats) == 1) { $params['input_format'] = array_shift($matching_formats)->format; } else { return xmlrpc_error(12, t('Invalid filter format specified. No matching formats to !format', array('!format' => $input_filter_name))); } } if (empty($params['oi_restrict'])) { return xmlrpc_error(13, t('Missing restriction')); } if (!is_array($params['terms'])) { return xmlrpc_error(14, t('Bad terms parameter')); } if (!empty($params['attachments'])) { foreach ( $params['attachments'] as $attachment_num => $attachment_info ) { if (!is_numeric($attachment_num)) { return xmlrpc_error(15, t('Bad attachment index: !index', array('!index' => $attachment_num))); } if (empty($attachment_info['name'])) { return xmlrpc_error(16, t('Missing attachment name for index ! index', array('!index' => $attachment_num))); } if (empty($attachment_info['mime'])) { return xmlrpc_error(16, t('Missing attachment mime-type for index !index', array('!index' => $attachment_num))); } if (empty($attachment_info['data'])) { return xmlrpc_error(16, t('Missing attachment data for index ! index', array('!index' => $attachment_num))); } } } // set the proper user global $user; $orig_user = $user; $new_user = user_load(array('name' => 'XXXX')); $user = $new_user; // create a new node as an array $node = array( // our particular information 'type' => 'report', 'title' => $params['title'], 'field_report_date' => array(array('value' => $params['report_date'])), 'body' => $params['body'], 'format' => $params['input_format'], 'oi_nodeapi_restrict_eid' => oi_get_entity_eid($params['oi_restrict']), // some variable, but for our purposes static, information 'uid' => $user->uid, // misc stuff that is needed to make things function 'status' => 1, 'promote' => 0, 'sticky' => 0, ); // add in the taxonomy for the report type $node['taxonomy'] = array(); foreach($params['terms'] as $term) { $tids = taxonomy_get_term_by_name($term); if (count($tids) != 1) { xmlrpc_error(14, t('Invalid report type -- returned !count terms for !term', array('!term' => $term, '!count' => count($tids)))); } $tid_obj = $tids[0]; $node['taxonomy'][$tid_obj->vid][$tid_obj->tid] = $tid_obj->tid; } if (!count($node['taxonomy'])) { delete ( $node['taxonomy'] ); } // add in any attachments if (!empty($params['attachments'])) { $node['files'] = array(); foreach ($params['attachments'] as $a_index => $a_info) { $file_temp = file_save_data($a_info['data'], file_directory_path() . '/' . $a_info['name'], FILE_EXISTS_RENAME); $node['files']['upload_' . $a_index] = array( 'fid' => 'upload_' . $a_index, 'title' => basename($file_temp), 'description' => $a_info['name'], 'filename' => basename($file_temp), 'filepath' => $file_temp, 'filesize' => filesize($file_temp), 'filemime' => $a_info['mime'], 'remove' => 0, 'list' => 1, ); } } // convert to an object $node_obj = (object) $node; // save it node_save($node_obj); // fix the user to the original user $user = $orig_user; // return the node id created return "created : " . $node_obj->nid; } ?> #------------------------ Perl --------- #!/usr/bin/perl use strict; use warnings; use Getopt::Long; # handle command line parameters use Date::Format; # provides date formatting use File::Slurp qw( slurp ); # makes it easier to read a file use XMLRPC::Lite; # communicate with the website use Data::Dumper; # dispaly any error messages # the directory to take files from my $in_dir = ''; my $in_file = ''; GetOptions('indir=s' => \$in_dir, 'file=s' => \$in_file); if ($in_dir eq '') { die("You must supply the '-indir' parameter\n"); } if ($in_file eq '') { die("You must supply the '-file' parameter\n"); } # two date formats we'll need my $todays_date = strftime('%Y-%m-%dT00:00:00', @{[localtime()]}); my $rep_month = strftime('%Y-%m', @{[localtime()]}); # read in the 'processed.html' file my $body = slurp($in_dir .'/' . $in_file); # find all of the referenced images my @imgs = ($body =~ m/\[inline:([-A-Za-z0-9_]+\.(?:png|gif|jpg))\]/g); # start creating the submission object my $submission = { 'title' => "Report - $rep_month", 'report_date' => $todays_date, 'body' => $body, 'input_format' => 6, # should be: 'Markdown (full html)', but this doesn't work right now 'oi_restrict' => 'XXXX', 'terms' => [ 'XXXX', 'YYYY', 'ZZZZ', 'Report' ], }; my $count = 0; foreach my $file (@imgs) { my $fdata = slurp($in_dir .'/' . $file, 'binmode' => ':raw'); $submission->{'attachments'}{"$count"} = { 'name' => $file, 'mime' => 'image/' . get_mime_type($file), 'data' => $fdata, }; $count++; } print "Submitting .. "; my $xmlobj = XMLRPC::Lite ->proxy('http://www.example.com/xmlrpc.php') ->call('reports.submit', $submission); if ($xmlobj->fault()) { print "error:\n", Dumper($xmlobj->fault()), "\n"; } else { print $xmlobj->result(), "\n"; } print "done\n"; ########## sub get_mime_type { my ($fname) = @_; my ($ext) = ($fname =~ m/\.(png|gif|jpg)$/); return { 'png' => 'png', 'gif' => 'gif', 'jpg' => 'jpeg', }->{$ext}; } __END__ The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail. From remorse at partners.org Wed Jan 7 16:35:20 2009 From: remorse at partners.org (Richard Morse) Date: Wed, 7 Jan 2009 11:35:20 -0500 Subject: [development] Info needed to add content to Drupal via shell/curl script In-Reply-To: References: <34683.213.203.159.55.1231058355.squirrel@nexaima.net> <593475f90901070818n678b3cc6y4f628b100b72b7e1@mail.gmail.com> Message-ID: <70873AB3-778A-416A-AA11-52FA963C9D70@partners.org> Bah humbug. I forgot to check the "to" field... Sorry for spamming everyone. Ricky On Jan 7, 2009, at 11:33 AM, Richard Morse wrote: > On Jan 7, 2009, at 11:18 AM, Tom?? F?l?pp wrote: > >> Hi, Ricky, >> >> Seems very useful. Are you planning to package and provide it as a >> module at >> d.o.? Then people could comment and supply patches to develop it >> further. >> >> If there are no such plans, I'll appreciate getting the existing >> code. > > > Hi! Here is the code. First is the php code, then the perl code. > I've obfuscated some specific values (ip addresses, user names, > etc), but it should be fairly clear... The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail. From yang_yi_cn at yahoo.com Wed Jan 7 20:41:02 2009 From: yang_yi_cn at yahoo.com (yi yang) Date: Wed, 7 Jan 2009 12:41:02 -0800 (PST) Subject: [development] how to implement hook_views_data() and add a field? Message-ID: <176266.15380.qm@web52512.mail.re2.yahoo.com> Hi, All I want is just return a number, which comes from a sql query count of my custom table. I want to represent that as a field so I can adjust it's position in the views ui. It doesn't sounds like very hard, right? I've looked into the views api 2, but there's really no useful information... Anybody can help? Regards, Yi Yang From drewish at katherinehouse.com Wed Jan 7 21:09:42 2009 From: drewish at katherinehouse.com (andrew morton) Date: Wed, 7 Jan 2009 13:09:42 -0800 Subject: [development] how to implement hook_views_data() and add a field? In-Reply-To: <176266.15380.qm@web52512.mail.re2.yahoo.com> References: <176266.15380.qm@web52512.mail.re2.yahoo.com> Message-ID: On Wed, Jan 7, 2009 at 12:41 PM, yi yang wrote: > Hi, > > > All I want is just return a number, which comes from a sql query count of my custom table. I want to represent that as a field so I can adjust it's position in the views ui. It doesn't sounds like very hard, right? > > I've looked into the views api 2, but there's really no useful information... > > Anybody can help? > > > Regards, > Yi Yang > The best place to look is at the code that views provides to add support for core. Look in views/modules. andrew From merlin at logrus.com Wed Jan 7 22:07:45 2009 From: merlin at logrus.com (Earl Miles) Date: Wed, 07 Jan 2009 14:07:45 -0800 Subject: [development] how to implement hook_views_data() and add a field? In-Reply-To: <176266.15380.qm@web52512.mail.re2.yahoo.com> References: <176266.15380.qm@web52512.mail.re2.yahoo.com> Message-ID: <496527B1.7080607@logrus.com> yi yang wrote: > Hi, > > > All I want is just return a number, which comes from a sql query count of my custom table. I want to represent that as a field so I can adjust it's position in the views ui. It doesn't sounds like very hard, right? Views doesn't support doing things like COUNT() in normal operation yet. From yang_yi_cn at yahoo.com Wed Jan 7 22:55:46 2009 From: yang_yi_cn at yahoo.com (yi yang) Date: Wed, 7 Jan 2009 14:55:46 -0800 (PST) Subject: [development] how to implement hook_views_data() and add a field? In-Reply-To: <496527B1.7080607@logrus.com> Message-ID: <205201.8514.qm@web52512.mail.re2.yahoo.com> All I need is just a placeholder. Say, how can I implement a hook to return a static number as a field? Is it possible? Then I can theme it to whatever I want. --- On Wed, 1/7/09, Earl Miles wrote: > From: Earl Miles > Subject: Re: [development] how to implement hook_views_data() and add a field? > To: development at drupal.org, yang_yi_cn at yahoo.com > Date: Wednesday, January 7, 2009, 2:07 PM > yi yang wrote: > > Hi, > > > > > > All I want is just return a number, which comes from a > sql query count of my custom table. I want to represent that > as a field so I can adjust it's position in the views > ui. It doesn't sounds like very hard, right? > > Views doesn't support doing things like COUNT() in > normal operation yet. From agentrickard at gmail.com Wed Jan 7 23:25:15 2009 From: agentrickard at gmail.com (Ken Rickard) Date: Wed, 7 Jan 2009 18:25:15 -0500 Subject: [development] how to implement hook_views_data() and add a field? In-Reply-To: <205201.8514.qm@web52512.mail.re2.yahoo.com> References: <496527B1.7080607@logrus.com> <205201.8514.qm@web52512.mail.re2.yahoo.com> Message-ID: <25b45da00901071525y5fa27ad9n2dd3def1b54ad253@mail.gmail.com> I think you want a custom field handler. Check the handlers section of the Views API. See, for example, http://drupal.org/node/349178 /me stops pimping his patch now. On Wed, Jan 7, 2009 at 5:55 PM, yi yang wrote: > All I need is just a placeholder. Say, how can I implement a hook to return a static number as a field? Is it possible? Then I can theme it to whatever I want. > > > --- On Wed, 1/7/09, Earl Miles wrote: > >> From: Earl Miles >> Subject: Re: [development] how to implement hook_views_data() and add a field? >> To: development at drupal.org, yang_yi_cn at yahoo.com >> Date: Wednesday, January 7, 2009, 2:07 PM >> yi yang wrote: >> > Hi, >> > >> > >> > All I want is just return a number, which comes from a >> sql query count of my custom table. I want to represent that >> as a field so I can adjust it's position in the views >> ui. It doesn't sounds like very hard, right? >> >> Views doesn't support doing things like COUNT() in >> normal operation yet. > -- Ken Rickard agentrickard at gmail.com http://ken.therickards.com From yang_yi_cn at yahoo.com Wed Jan 7 23:52:56 2009 From: yang_yi_cn at yahoo.com (yi yang) Date: Wed, 7 Jan 2009 15:52:56 -0800 (PST) Subject: [development] how to implement hook_views_data() and add a field? In-Reply-To: <25b45da00901071525y5fa27ad9n2dd3def1b54ad253@mail.gmail.com> Message-ID: <958084.86949.qm@web52502.mail.re2.yahoo.com> Aha, I find a solution myself. First, I learned some syntax from the user_relationships module. Then, in my hook_views_data(), I defined my 'table' with no 'join'. After that, define a fake 'field', in the details of the fake field settings array, I wrote a subquery in the 'real field', which does the COUNT(*). It works fine now! --- On Wed, 1/7/09, Ken Rickard wrote: > From: Ken Rickard > Subject: Re: [development] how to implement hook_views_data() and add a field? > To: development at drupal.org, yang_yi_cn at yahoo.com > Date: Wednesday, January 7, 2009, 3:25 PM > I think you want a custom field handler. Check the handlers > section of > the Views API. > > See, for example, http://drupal.org/node/349178 > > /me stops pimping his patch now. > > > > On Wed, Jan 7, 2009 at 5:55 PM, yi yang > wrote: > > All I need is just a placeholder. Say, how can I > implement a hook to return a static number as a field? Is it > possible? Then I can theme it to whatever I want. > > > > > > --- On Wed, 1/7/09, Earl Miles > wrote: > > > >> From: Earl Miles > >> Subject: Re: [development] how to implement > hook_views_data() and add a field? > >> To: development at drupal.org, yang_yi_cn at yahoo.com > >> Date: Wednesday, January 7, 2009, 2:07 PM > >> yi yang wrote: > >> > Hi, > >> > > >> > > >> > All I want is just return a number, which > comes from a > >> sql query count of my custom table. I want to > represent that > >> as a field so I can adjust it's position in > the views > >> ui. It doesn't sounds like very hard, right? > >> > >> Views doesn't support doing things like > COUNT() in > >> normal operation yet. > > > > > > -- > Ken Rickard > agentrickard at gmail.com > http://ken.therickards.com From syscrusher at 4th.com Thu Jan 8 13:19:19 2009 From: syscrusher at 4th.com (Syscrusher) Date: Thu, 08 Jan 2009 08:19:19 -0500 Subject: [development] Info needed to add content to Drupal via shell/curl script In-Reply-To: <70873AB3-778A-416A-AA11-52FA963C9D70@partners.org> References: <34683.213.203.159.55.1231058355.squirrel@nexaima.net> <593475f90901070818n678b3cc6y4f628b100b72b7e1@mail.gmail.com> <70873AB3-778A-416A-AA11-52FA963C9D70@partners.org> Message-ID: <1231420759.16590.42.camel@marcus> On Wed, 2009-01-07 at 11:35 -0500, Richard Morse wrote: > Bah humbug. I forgot to check the "to" field... > > Sorry for spamming everyone. I was going to email you offlist to ask for a copy of the code anyway. :-) I'm developing an unrelated XMLRPC module for a one-off internal app for my employer, and the Perl example is very helpful. Thanks! Scott -- Syscrusher From redshadow at hackzine.org Thu Jan 8 18:27:27 2009 From: redshadow at hackzine.org (~redShadow~) Date: Thu, 08 Jan 2009 19:27:27 +0100 Subject: [development] Database creation on Install In-Reply-To: <1227017037.9998.284.camel@localhost> References: <979e7e490811132117r5ea68b8boc583e084ea351faf@mail.gmail.com> <1227017037.9998.284.camel@localhost> Message-ID: <4966458F.60400@hackzine.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I think a good way to do this could be let the user specify *also* an administrative database account to be used *only* during the installation, to create database / user.. then, once installed stuff that required super-user access, privileges will be dropped and the "normal" user will be used. what do you think? best regards - -- ~ ~redShadow~ - ilSAMU - ---------------------------------------------------------------- ~ * redshadow[at]hackzine.org ~ * redshadowhack[at]gmail.com ~ * samu[at]comolakerovers.net ~ * http://hackzine.org ~ * http://doku.hackzine.org ~ * http://comolakerovers.net - ---------------------------------------------------------------- ~ "[A-Za-z0-9\-_]*\\[at\\][A-Za-z0-9\-_]*\\[dot\\][a-zA-Z]*" - ---------------------------------------------------------------- ~ GPG Key signature: ~ 050D 3E9F 6E0B 44CE C008 D1FC 166C 3C7E EB26 4933 - ---------------------------------------------------------------- ~ Registered Linux-User: #440008 ~ GENTOO User since 1/1/2008 - ex DEBIAN SID user - ---------------------------------------------------------------- ~ "Software is like sex: it's better when it's free!" ~ -- Linus Torvalds -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAklmRY8ACgkQFmw8fusmSTMrSgCbBVVDRpIzFdkrV471y1PlEoSf WdoAoN2TSODznY6pZypfLvOcRKNBxdFF =xVWx -----END PGP SIGNATURE----- From stewsnooze at gmail.com Fri Jan 9 07:48:21 2009 From: stewsnooze at gmail.com (Stewart Robinson) Date: Fri, 9 Jan 2009 07:48:21 +0000 Subject: [development] Database creation on Install In-Reply-To: <4966458F.60400@hackzine.org> References: <979e7e490811132117r5ea68b8boc583e084ea351faf@mail.gmail.com> <1227017037.9998.284.camel@localhost> <4966458F.60400@hackzine.org> Message-ID: MediaWiki does that although it's not exactly a clear UI. I think it's a great idea. We'd have to do a better job on the UI for that. stew On Thu, Jan 8, 2009 at 6:27 PM, ~redShadow~ wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > I think a good way to do this could be let the user specify *also* an > administrative database account to be used *only* during the > installation, to create database / user.. > then, once installed stuff that required super-user access, privileges > will be dropped and the "normal" user will be used. > what do you think? > > best regards > > - -- > ~ ~redShadow~ - ilSAMU > - ---------------------------------------------------------------- > ~ * redshadow[at]hackzine.org > ~ * redshadowhack[at]gmail.com > ~ * samu[at]comolakerovers.net > ~ * http://hackzine.org > ~ * http://doku.hackzine.org > ~ * http://comolakerovers.net > - ---------------------------------------------------------------- > ~ "[A-Za-z0-9\-_]*\\[at\\][A-Za-z0-9\-_]*\\[dot\\][a-zA-Z]*" > - ---------------------------------------------------------------- > ~ GPG Key signature: > ~ 050D 3E9F 6E0B 44CE C008 D1FC 166C 3C7E EB26 4933 > - ---------------------------------------------------------------- > ~ Registered Linux-User: #440008 > ~ GENTOO User since 1/1/2008 - ex DEBIAN SID user > - ---------------------------------------------------------------- > ~ "Software is like sex: it's better when it's free!" > ~ -- Linus Torvalds > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v2.0.9 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iEYEARECAAYFAklmRY8ACgkQFmw8fusmSTMrSgCbBVVDRpIzFdkrV471y1PlEoSf > WdoAoN2TSODznY6pZypfLvOcRKNBxdFF > =xVWx > -----END PGP SIGNATURE----- > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/development/attachments/20090109/02a1c022/attachment.htm From tjfulopp at gmail.com Fri Jan 9 08:51:41 2009 From: tjfulopp at gmail.com (=?UTF-8?Q?Tom=C3=A1=C5=A1_F=C3=BCl=C3=B6pp?=) Date: Fri, 9 Jan 2009 09:51:41 +0100 Subject: [development] how to run new .install on installed module Message-ID: <593475f90901090051g2dac86bfq7d0b8f6e694f08fa@mail.gmail.com> Hi, Probably a simple problem but I don't find solution on d.o. I have a D6 contrib module that did not use database before, but now it does. The problem is that even though a .install file has been added, the database is not created in case the older version of the module is enabled already, not even after running /update.php. http://drupal.org/node/323314 explains that ".install file is run the first time a module is enabled" -- but how to make sure the initial database is installed on an existing module? Is the only solution to solve it via hook_update_N, detecting whether the table exists, and installing it -- even though in fact we are installing, not updating? Thanks, Tom?? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/development/attachments/20090109/58945e23/attachment.htm From drewish at katherinehouse.com Fri Jan 9 09:22:36 2009 From: drewish at katherinehouse.com (andrew morton) Date: Fri, 9 Jan 2009 01:22:36 -0800 Subject: [development] how to run new .install on installed module In-Reply-To: <593475f90901090051g2dac86bfq7d0b8f6e694f08fa@mail.gmail.com> References: <593475f90901090051g2dac86bfq7d0b8f6e694f08fa@mail.gmail.com> Message-ID: On Fri, Jan 9, 2009 at 12:51 AM, Tom?? F?l?pp wrote: > Hi, > > Probably a simple problem but I don't find solution on d.o. > > I have a D6 contrib module that did not use database before, but now it > does. The problem is that even though a .install file has been added, the > database is not created in case the older version of the module is enabled > already, not even after running /update.php. > > http://drupal.org/node/323314 explains that ".install file is run the first > time a module is enabled" -- but how to make sure the initial database is > installed on an existing module? Is the only solution to solve it via > hook_update_N, detecting whether the table exists, and installing it -- even > though in fact we are installing, not updating? If you're addin a database to an existing module then you need to define it in hook_install() for new sites and also in hook_update_N() for sites that have already installed. If you think that they might have the table installed for some reason then by all means call db_table_exists() and check first. Also be aware that implementations of hook_update_N() should *not* call hook_schema(). You need to have a copy of the schema in the update function. andrew From jan at dittberner.info Fri Jan 9 09:05:24 2009 From: jan at dittberner.info (Jan Dittberner) Date: Fri, 9 Jan 2009 10:05:24 +0100 Subject: [development] how to run new .install on installed module In-Reply-To: <593475f90901090051g2dac86bfq7d0b8f6e694f08fa@mail.gmail.com> References: <593475f90901090051g2dac86bfq7d0b8f6e694f08fa@mail.gmail.com> Message-ID: <20090109090524.GB31745@gnuviech-server.de> On Fri, Jan 09, 2009 at 09:51:41AM +0100, Tom?? F?l?pp wrote: > Hi, > > Probably a simple problem but I don't find solution on d.o. > > I have a D6 contrib module that did not use database before, but now it does. > The problem is that even though a .install file has been added, the database is > not created in case the older version of the module is enabled already, not > even after running /update.php. > > http://drupal.org/node/323314 explains that ".install file is run the first > time a module is enabled" -- but how to make sure the initial database is > installed on an existing module? Is the only solution to solve it via > hook_update_N, detecting whether the table exists, and installing it -- even > though in fact we are installing, not updating? AFAIK this case has to be handled by update functions in your .install file. Regards Jan From tjfulopp at gmail.com Fri Jan 9 11:48:24 2009 From: tjfulopp at gmail.com (=?UTF-8?Q?Tom=C3=A1=C5=A1_F=C3=BCl=C3=B6pp?=) Date: Fri, 9 Jan 2009 12:48:24 +0100 Subject: [development] how to run new .install on installed module In-Reply-To: References: <593475f90901090051g2dac86bfq7d0b8f6e694f08fa@mail.gmail.com> Message-ID: <593475f90901090348p15e5ea98t574636fe08bf4177@mail.gmail.com> Thanks, guys; I've successfully solved that using hook_update_N now. Best regards, Tom?? (Vacilando) On Fri, Jan 9, 2009 at 10:22, andrew morton wrote: > On Fri, Jan 9, 2009 at 12:51 AM, Tom?? F?l?pp wrote: > > Hi, > > > > Probably a simple problem but I don't find solution on d.o. > > > > I have a D6 contrib module that did not use database before, but now it > > does. The problem is that even though a .install file has been added, the > > database is not created in case the older version of the module is > enabled > > already, not even after running /update.php. > > > > http://drupal.org/node/323314 explains that ".install file is run the > first > > time a module is enabled" -- but how to make sure the initial database is > > installed on an existing module? Is the only solution to solve it via > > hook_update_N, detecting whether the table exists, and installing it -- > even > > though in fact we are installing, not updating? > > If you're addin a database to an existing module then you need to > define it in hook_install() for new sites and also in hook_update_N() > for sites that have already installed. If you think that they might > have the table installed for some reason then by all means call > db_table_exists() and check first. Also be aware that implementations > of hook_update_N() should *not* call hook_schema(). You need to have a > copy of the schema in the update function. > > andrew > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/development/attachments/20090109/198e8e26/attachment.htm From cjones at partialflow.com Fri Jan 9 13:40:09 2009 From: cjones at partialflow.com (Christopher M. Jones) Date: Fri, 09 Jan 2009 08:40:09 -0500 Subject: [development] node family, node profile permissions problems Message-ID: <496753B9.3060306@partialflow.com> Sorry if this isn't the right place to ask this question. I asked on the support list, but didn't get an answer. And this is somewhat urgent. I've got a content type set up as a lonely node profile. The problem I'm having is that nobody can edit a node of this type, except the user who authored it-- not even user 1. I can see how this would be by design. But in my case I need to allow members of an editor role to have access to other users' node profiles. I've made sure that the editor role has all the permissions they need in Users->Access Control (create, edit, edit own), and I don't see any other permissions related settings in any of the above modules' configs. I've done everything else I could think of to do: clearing cache, rebuilding permissions, etc. I think I'm going to have to hack some code, which I'm up for, but I'm not sure where to start. Can anyone give me a hand? Like I said, this is about to become extremely urgent, so any help is greatly appreciated. From jpetso at gmx.at Fri Jan 9 13:58:42 2009 From: jpetso at gmx.at (Jakob Petsovits) Date: Fri, 9 Jan 2009 14:58:42 +0100 Subject: [development] node family, node profile permissions problems In-Reply-To: <496753B9.3060306@partialflow.com> References: <496753B9.3060306@partialflow.com> Message-ID: <200901091458.42509.jpetso@gmx.at> On Friday, 9. January 2009, Christopher M. Jones wrote: > Sorry if this isn't the right place to ask this question. I asked on the > support list, but didn't get an answer. And this is somewhat urgent. If your issue is about a particular module, the module's issue queue on drupal.org might yield the most knowledgeable results, and maybe even the quickest ones. (Especially since fago's modules are usually well maintained and their issue queues are reasonably active. Although I'm pretty certain that fago reads this mailing list too.) So, you might try in http://drupal.org/project/nodefamily or http://drupal.org/project/nodeprofile depending on which one is more suitable for your particular problem. Wishes, Jakob From jpetso at gmx.at Fri Jan 9 14:01:55 2009 From: jpetso at gmx.at (Jakob Petsovits) Date: Fri, 9 Jan 2009 15:01:55 +0100 Subject: [development] node family, node profile permissions problems In-Reply-To: <200901091458.42509.jpetso@gmx.at> References: <496753B9.3060306@partialflow.com> <200901091458.42509.jpetso@gmx.at> Message-ID: <200901091501.56027.jpetso@gmx.at> On Friday, 9. January 2009, Jakob Petsovits wrote: > So, you might try in > http://drupal.org/project/nodefamily or > http://drupal.org/project/nodeprofile > depending on which one is more suitable for your particular problem. Oops, I meant the issue queue links of course: http://drupal.org/project/issues/nodefamily or http://drupal.org/project/issues/nodeprofile From drupal at oadaeh.net Fri Jan 9 16:47:35 2009 From: drupal at oadaeh.net (Jason Flatt) Date: Fri, 9 Jan 2009 08:47:35 -0800 Subject: [development] node family, node profile permissions problems In-Reply-To: <496753B9.3060306@partialflow.com> References: <496753B9.3060306@partialflow.com> Message-ID: <200901090847.35243.drupal@oadaeh.net> On Fri Jan 9 2009 5:40:09 am Christopher M. Jones wrote: > Sorry if this isn't the right place to ask this question. I asked on the > support list, but didn't get an answer. And this is somewhat urgent. > I know this has been stated before, and I'm probably going to sound rather bad and like a list mom for saying it now, but just because it's urgent to you doesn't give you the permission to post a support request to the development list. > > I think I'm going to have to hack some code, which I'm up for, but I'm > not sure where to start. Can anyone give me a hand? Like I said, this is > about to become extremely urgent, so any help is greatly appreciated. The answer to your question doesn't require any programming at all. The functionality you are seeking is within the module's current capabilities. I know because I have it working just the way you describe. Follow Jakob's advice. -- Jason Flatt http://www.oadaeh.net/ Father of seven: http://www.flattfamily.com/ (Joseph, 15; Cramer, 13; Travis, 11; Angela; Harry, 8; William, 3; and Dolly, 9-10-2008) Linux User: http://www.ubuntu.org/ Drupal Fanatic: http://drupal.org/ From sivaji2009 at gmail.com Fri Jan 9 19:21:05 2009 From: sivaji2009 at gmail.com (sivaji j.g) Date: Sat, 10 Jan 2009 00:51:05 +0530 Subject: [development] integrating chart module with cck and views Message-ID: Hello I have seen discussions in groups.drupal.org pertaining to "integrating chart module with cck and views" is there anything wrong in this idea because the person who proposed this idea for gsoc2008 has not commited any code. I am interested to do this project looking forward for your help to guide me on this. -- Thanks a lot ----------------------------------------- http://ubuntuslave.blogspot.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/development/attachments/20090110/fa92aa18/attachment.htm From a-joelpe at microsoft.com Mon Jan 12 20:09:25 2009 From: a-joelpe at microsoft.com (Joel Penner (Volt)) Date: Mon, 12 Jan 2009 12:09:25 -0800 Subject: [development] MS SQL support in D7? In-Reply-To: <4962B56B.8030906@gmail.com> References: <4962B42F.6000205@gmail.com> <4962B56B.8030906@gmail.com> Message-ID: Or better yet, use the new sqlsrv driver directly from Microsoft. http://blogs.msdn.com/sqlphp/ Internally we've been working on getting 6.2 working and it seems to be stable minus a huge bug where it loses the left side menu when you clear the cache. Wish I could find a good place for help, but at the same time we're unsure about sharing code just yet. Kinda stuck in a rough place. =[ Joel Penner Microsoft's Open Source Technology Center -----Original Message----- From: development-bounces at drupal.org [mailto:development-bounces at drupal.org] On Behalf Of Arancaytar Ilyaran Sent: Monday, January 05, 2009 5:36 PM To: development at drupal.org Subject: Re: [development] MS SQL support in D7? Arancaytar Ilyaran wrote: > D7 uses PDO as a database backend, and a PDO driver for MS SQL exists: > http://de.php.net/manual/en/ref.pdo-dblib.php . It appears to be > experimental right now. You need to download it separately and compile > or include it in PHP as an extension. > > Drupal does not explicitly support it (as it does MySQL and SQLite), > but it could work with the generic interface, without taking advantage of special features. > Reading a bit more carefully, I see that DB-LIB is not well supported and not recommended on Windows. You should probably look at the ODBC driver instead, which is included in the standard PHP core (and enabled in Windows installations by default): http://de.php.net/manual/en/ref.pdo-odbc.php -- Arancaytar ---------------------- Nothing beside remains: Round the decay Of that colossal wreck, boundless and bare The lone and level sands stretch far away... ---------------------- PGP: http://ermarian.net/downloads/0x27CA5C74 XMPP: arancaytar.ilyaran at gmail.com AOL: 282026638 / RealArancaytar URL: http://ermarian.net From larry at garfieldtech.com Mon Jan 12 20:39:42 2009 From: larry at garfieldtech.com (Larry Garfield) Date: Mon, 12 Jan 2009 14:39:42 -0600 Subject: [development] =?utf-8?q?MS_SQL_support_in_D7=3F?= In-Reply-To: References: Message-ID: <57a8db18c5885e8e1c57a37b16ee1624@localhost> That doesn't appear to be using PDO, so it is largely useless for Drupal 7. We're building all Drupal database drivers on top of PDO. --Larry Garfield On Mon, 12 Jan 2009 12:09:25 -0800, "Joel Penner (Volt)" wrote: > Or better yet, use the new sqlsrv driver directly from Microsoft. > http://blogs.msdn.com/sqlphp/ > > Internally we've been working on getting 6.2 working and it seems to be > stable minus a huge bug where it loses the left side menu when you clear > the cache. Wish I could find a good place for help, but at the same time > we're unsure about sharing code just yet. Kinda stuck in a rough place. =[ > > Joel Penner > Microsoft's Open Source Technology Center > > -----Original Message----- > From: development-bounces at drupal.org > [mailto:development-bounces at drupal.org] On Behalf Of Arancaytar Ilyaran > Sent: Monday, January 05, 2009 5:36 PM > To: development at drupal.org > Subject: Re: [development] MS SQL support in D7? > > Arancaytar Ilyaran wrote: >> D7 uses PDO as a database backend, and a PDO driver for MS SQL exists: >> http://de.php.net/manual/en/ref.pdo-dblib.php . It appears to be >> experimental right now. You need to download it separately and compile >> or include it in PHP as an extension. >> >> Drupal does not explicitly support it (as it does MySQL and SQLite), >> but it could work with the generic interface, without taking advantage > of special features. >> > > Reading a bit more carefully, I see that DB-LIB is not well supported and > not recommended on Windows. > > You should probably look at the ODBC driver instead, which is included in > the standard PHP core (and enabled in Windows installations by default): > http://de.php.net/manual/en/ref.pdo-odbc.php > > -- > Arancaytar > ---------------------- > Nothing beside remains: Round the decay > Of that colossal wreck, boundless and bare The lone and level sands > stretch far away... > ---------------------- > PGP: http://ermarian.net/downloads/0x27CA5C74 > XMPP: arancaytar.ilyaran at gmail.com > AOL: 282026638 / RealArancaytar > URL: http://ermarian.net From damz at prealable.org Mon Jan 12 20:49:04 2009 From: damz at prealable.org (Damien Tournoud) Date: Mon, 12 Jan 2009 21:49:04 +0100 Subject: [development] MS SQL support in D7? In-Reply-To: <57a8db18c5885e8e1c57a37b16ee1624@localhost> References: <57a8db18c5885e8e1c57a37b16ee1624@localhost> Message-ID: On Mon, Jan 12, 2009 at 9:39 PM, Larry Garfield wrote: > > That doesn't appear to be using PDO, so it is largely useless for Drupal 7. > We're building all Drupal database drivers on top of PDO. I researched a little what can be done with that driver. It's very uneasy, because it internally does some *very* strange stuff with references. So I'm with Crell, we need a proper PDO driver before being able to do anything. Damien Tournoud -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/development/attachments/20090112/713d8e85/attachment.htm From darlycoupet at gmail.com Mon Jan 12 21:39:56 2009 From: darlycoupet at gmail.com (Darly Coupet) Date: Mon, 12 Jan 2009 16:39:56 -0500 Subject: [development] 2009 CWE/SANS Top 25 Most Dangerous Programming Errors Message-ID: <52f0c5490901121339o73a57f9fs83f3a57c7321f76@mail.gmail.com> 2009 CWE/SANS Top 25 Most Dangerous Programming Errors http://cwe.mitre.org/top25/#CWE-20 Insecure Interaction Between Components These weaknesses are related to insecure ways in which data is sent and received between separate components, modules, programs, processes, threads, or systems. - CWE-20 : Improper Input Validation - CWE-116 : Improper Encoding or Escaping of Output - CWE-89 : Failure to Preserve SQL Query Structure (aka 'SQL Injection') - CWE-79 : Failure to Preserve Web Page Structure (aka 'Cross-site Scripting') - CWE-78 : Failure to Preserve OS Command Structure (aka 'OS Command Injection') - CWE-319 : Cleartext Transmission of Sensitive Information - CWE-352 : Cross-Site Request Forgery (CSRF) - CWE-362 : Race Condition - CWE-209 : Error Message Information Leak Risky Resource Management The weaknesses in this category are related to ways in which software does not properly manage the creation, usage, transfer, or destruction of important system resources. - CWE-119 : Failure to Constrain Operations within the Bounds of a Memory Buffer - CWE-642 : External Control of Critical State Data - CWE-73 : External Control of File Name or Path - CWE-426 : Untrusted Search Path - CWE-94 : Failure to Control Generation of Code (aka 'Code Injection') - CWE-494 : Download of Code Without Integrity Check - CWE-404 : Improper Resource Shutdown or Release - CWE-665 : Improper Initialization - CWE-682 : Incorrect Calculation Porous Defenses The weaknesses in this category are related to defensive techniques that are often misused, abused, or just plain ignored. - CWE-285 : Improper Access Control (Authorization) - CWE-327 : Use of a Broken or Risky Cryptographic Algorithm - CWE-259 : Hard-Coded Password - CWE-732 : Insecure Permission Assignment for Critical Resource - CWE-330 : Use of Insufficiently Random Values - CWE-250 : Execution with Unnecessary Privileges - CWE-602 : Client-Side Enforcement of Server-Side Security Darly -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/development/attachments/20090112/662578a7/attachment.htm From arancaytar.ilyaran at gmail.com Tue Jan 13 20:20:35 2009 From: arancaytar.ilyaran at gmail.com (Arancaytar Ilyaran) Date: Tue, 13 Jan 2009 21:20:35 +0100 Subject: [development] Asking for donations in contrib Message-ID: <496CF793.3040506@gmail.com> Hello Drupal, I've heard the name ChipIn (http://www.chipin.com/) tossed around a few times in relation to developing on a donation basis, and I'm wondering how it works out for developers, users and the community. Specifically, I'm reaching a point in DHTML Menu (http://drupal.org/project/dhtml_menu) where beside bug reports I often see requests for some pretty substantial features, which admittedly would be very cool, but would also take a lot of development time. I currently develop and maintain this module in my free time. It would be great if I could fix bugs for free but use donation drives to sponsor new features. That would probably be better than selling customizations directly, because it is less expensive to individual customers. Do you have any suggestions or criticism on this idea? :) Cheers, -Arancaytar -- Arancaytar ---------------------- Nothing beside remains: Round the decay Of that colossal wreck, boundless and bare The lone and level sands stretch far away... ---------------------- PGP: http://ermarian.net/downloads/0x27CA5C74 XMPP: arancaytar.ilyaran at gmail.com AOL: 282026638 @icq / RealArancaytar @aim URL: http://ermarian.net -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 250 bytes Desc: OpenPGP digital signature Url : http://lists.drupal.org/pipermail/development/attachments/20090113/93d5603c/attachment.pgp From j.sintjago at xs4all.nl Tue Jan 13 21:02:50 2009 From: j.sintjago at xs4all.nl (J. Sint Jago) Date: Tue, 13 Jan 2009 22:02:50 +0100 Subject: [development] Asking for donations in contrib In-Reply-To: <496CF793.3040506@gmail.com> References: <496CF793.3040506@gmail.com> Message-ID: <71280311072445A3A8E55CAD3889B32D@joopdesktop> I think that would be very acceptable. It should be clear however how much is required and for what. The ChipIn system makes this possible. I see some developers asking for donations to continue/speed-up development. But pay-palling like that doesn't make clear how much is comming in and what is achieved. (Of course I know developing / maintaining a module is very time consuming - but doing it this way (specifying funding required vs setting target) keeps things transparant.) Regards -----Oorspronkelijk bericht----- Van: development-bounces at drupal.org [mailto:development-bounces at drupal.org] Namens Arancaytar Ilyaran Verzonden: dinsdag 13 januari 2009 21:21 Aan: development at drupal.org Onderwerp: [development] Asking for donations in contrib Hello Drupal, I've heard the name ChipIn (http://www.chipin.com/) tossed around a few times in relation to developing on a donation basis, and I'm wondering how it works out for developers, users and the community. Specifically, I'm reaching a point in DHTML Menu (http://drupal.org/project/dhtml_menu) where beside bug reports I often see requests for some pretty substantial features, which admittedly would be very cool, but would also take a lot of development time. I currently develop and maintain this module in my free time. It would be great if I could fix bugs for free but use donation drives to sponsor new features. That would probably be better than selling customizations directly, because it is less expensive to individual customers. Do you have any suggestions or criticism on this idea? :) Cheers, -Arancaytar -- Arancaytar ---------------------- Nothing beside remains: Round the decay Of that colossal wreck, boundless and bare The lone and level sands stretch far away... ---------------------- PGP: http://ermarian.net/downloads/0x27CA5C74 XMPP: arancaytar.ilyaran at gmail.com AOL: 282026638 @icq / RealArancaytar @aim URL: http://ermarian.net From nan_wich at bellsouth.net Tue Jan 13 21:32:59 2009 From: nan_wich at bellsouth.net (Nancy Wichmann) Date: Tue, 13 Jan 2009 16:32:59 -0500 Subject: [development] Asking for donations in contrib In-Reply-To: <496CF793.3040506@gmail.com> Message-ID: Arancaytar Ilyaran wrote: > It would be great if I could fix bugs for free but use donation drives to > sponsor new features. That would probably be better than selling customizations This sounds like a marvelous idea to me. I, too, have limited time, and even more limited funds. I know some maintainers put a Paypal button on their projects, which I have considered. Nancy From steven at digitalpulp.com Tue Jan 13 21:33:37 2009 From: steven at digitalpulp.com (Steven Surowiec) Date: Tue, 13 Jan 2009 16:33:37 -0500 Subject: [development] Asking for donations in contrib In-Reply-To: References: Message-ID: <496D08B1.7060606@digitalpulp.com> One thing I've also done in the past (I don't maintain any Drupal modules but did maintain other small OSS projects) was to tell people, when they requested a feature, that it would be added to the pile but if they want it ASAP I can put a price tag on it. Don't know how well this would work with a Drupal module, or if it would be frowned upon, but for other projects it has worked well. Nancy Wichmann wrote: > Arancaytar Ilyaran wrote: > >> It would be great if I could fix bugs for free but use donation drives to >> sponsor new features. That would probably be better than selling >> > customizations > > This sounds like a marvelous idea to me. I, too, have limited time, and > even more limited funds. > > I know some maintainers put a Paypal button on their projects, which I have > considered. > > Nancy > > From news at unleashedmind.com Tue Jan 13 23:13:34 2009 From: news at unleashedmind.com (Daniel F. Kudwien) Date: Wed, 14 Jan 2009 00:13:34 +0100 Subject: [development] Asking for donations in contrib In-Reply-To: <496CF793.3040506@gmail.com> Message-ID: <014901c975d4$8ef04f80$0200a8c0@structworks.com> > I've heard the name ChipIn (http://www.chipin.com/) tossed > around a few times in relation to developing on a donation > basis, and I'm wondering how it works out for developers, > users and the community. Yes. It is a great way of coordinating a "community fund"-alike thing. For example, see http://drupal.org/project/wysiwyg. I even asked in #drupal whether I can (should) write a patch for drupalorg.module that would add a ChipIn inline (macro) filter, so every project maintainer was able add a ChipIn widget on their project pages if needed. > It would be great if I could fix bugs for free but use > donation drives to sponsor new features. That would probably > be better than selling customizations directly, because it is > less expensive to individual customers. Do you have any > suggestions or criticism on this idea? :) Having worked with some Drupal projects that badly need some community funding, I can see both the need AND the false assumptions of associated fundings. As long as we are not talking about scheduled events like the d.o redesign sprints that are - in their nature - ultimative, a community fund for a contributed module always means that any contribution to it only speeds up the actual, ongoing process. However, financial contributions to a fund do (and can) not guarantee that something will be done in the end. In this regard, FOSS and funding are not exclusive. But, if you consider to get some funding from the community (i.e. users of your module), then you should not rely on it. I had to deal with maintainers on drupal.org who made me think that they deferred all improvements to their modules until the next big "sponsor" hit the issue queue. That is certainly not the way it works. So if you want to setup a ChipIn, then do it rather by-the-way, please. It means that you ask the community to help you getting things done, but it does not imply that nothing will be done if no one contributes. Anything else would hurt the Drupal community, and Drupal's world domination after all. The more Drupal's user-base and our community grows the more I think we need a "proper" process of dealing with this issue. I separated those two audiences on purpose, since I believe that we will never be able to turn everyone into a "real" community member. To keep it short and to the point: donorge.org (Warning: Spam site now), which was capable to funnel a custom amount of all contributions to one project (f.e. the Drupal Association), looked very promising. I think that we need something like that to allow for "modularized" donations - following Drupal's nature. sun From nan_wich at bellsouth.net Wed Jan 14 00:12:18 2009 From: nan_wich at bellsouth.net (Nancy Wichmann) Date: Tue, 13 Jan 2009 19:12:18 -0500 Subject: [development] Asking for donations in contrib In-Reply-To: <014901c975d4$8ef04f80$0200a8c0@structworks.com> Message-ID: Daniel F. Kudwien wrote > The more Drupal's user-base and our community grows the more I think we need > a "proper" process of dealing with this issue. Well, what I'd actually like to become is a professional (i.e. paid) contrib. maintainer. I really enjoy it, but I do have to worry about a roof over my head and food in my stomach. If there was some way to fund people to do this, I think everyone would benefit. Those people could concentrate on those modules that are most used (assuming our stats are close to correct) and could be educated early in a release cycle so that those popular modules follow new Drupal releases closely. That still leaves plenty of modules for those who like to tinker. And, of course, I'd like to see some basic funding for the core maintainers as well. So how do we raise this money? Nancy From hans.rossel at koba.be Wed Jan 14 07:12:00 2009 From: hans.rossel at koba.be (KOBA | Hans Rossel) Date: Wed, 14 Jan 2009 08:12:00 +0100 Subject: [development] Asking for donations in contrib In-Reply-To: References: <014901c975d4$8ef04f80$0200a8c0@structworks.com> Message-ID: <51a9b8330901132312v3377ce7chc83fb10e43f254db@mail.gmail.com> I've contributed a few times to a chipin, but like rather to contribute and communicate directly with the maintainer for certain specific features. I think there are 3 main ways: - chipin: for popular much wanted features, a lot of people contributing a small amount. - bounty: gathering a few sponsors that contribute a larger amount for a specific feature - direct contact with the maintainer: for urgent needs or really custom changes to the module for a specific project. I think chipin is suitable to gather a rather small amount with a lot of people giving very small amounts. So its mainly suitable for popular much wanted features, not something that only a few are really interested in. For my company I would like to have an invoice of expenses and with chipin this is more difficult. Also if you contribute a larger amount it would be nice to be mentioned as "sponsored by" on the project page; with chipin normally every contributor is anonymous, if you pay half of the total amount or 5$. I like the idea of "bounty" more for specific stuff, so gathering with a few sponsors and pay each a third or so, but it could be good to find a better way to show clearly which bounties are searching for extra sponsors for a certain module. There should somewhere be an overview. Same would be true for chipins if you would have more. For me it would be also good if contributors could state in a consequent and clear manner that they are available for paid customisations (and quite a bit do this allready, but maybe drupal.org should provide an structured way to do this) and give in their profile some more info about conditions, contact ways, timing and availability. Also to know if the maintainer is a fulltime freelancer available or somebody working fulltime in a non-drupal related company having only some weekend time to spend and no possibility to write an invoice is very important to me. Hans -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/development/attachments/20090114/0b3e6a43/attachment.htm From pratulkalia at gmail.com Wed Jan 14 08:02:15 2009 From: pratulkalia at gmail.com (Pratul Kalia) Date: Wed, 14 Jan 2009 13:32:15 +0530 Subject: [development] Split module into two? Message-ID: Hello everyone I maintain a set of modules called Vote Up/Down Package - http://drupal.org/project/vote_up_down It's essentially 2 modules (which is why its 'package'). One module provides the voting interface. The other module is called Storylink, and it provides a Digg-submission-like content type that has a title, some small info and a link to the actual story. It also has other stuff like a JS bookmarklet. Since this module has been in existence, these both modules were packaged together. I feel now that it would be beneficial for people to have these as separate modules since they perform 2 separate tasks. Initially, these were together to give a Digg-like package. I don't really see people using the package for that purpose now. I'd like to know what other developers think about this issue. Should I separate Storylink and develop it as a separate module? cheers pratul -- Incoming! - OSScamp Pantnagar, 30 Jan - 1 Feb, 2009 - Freed.in, 20 - 21 February, 2009 dum vivimus, vivamus. http://pratul.in From dmitrig01 at gmail.com Thu Jan 15 02:57:53 2009 From: dmitrig01 at gmail.com (Dmitri Gaskin) Date: Wed, 14 Jan 2009 18:57:53 -0800 Subject: [development] Split module into two? In-Reply-To: References: Message-ID: <3994B80C-8272-4FC9-9C35-973774FB4F20@gmail.com> Why not separate storylink and make it use updown instead of vote_up_down, and deprecate vote_up_down in favor of updown, and of course provide an upgrade path? I'd be able to help with this later this month or next month (or at least the upgrade path) Dmitri On Jan 14, 2009, at 12:02 AM, Pratul Kalia wrote: > Hello everyone > > I maintain a set of modules called Vote Up/Down Package - > http://drupal.org/project/vote_up_down > It's essentially 2 modules (which is why its 'package'). One module > provides the voting interface. The other module is called Storylink, > and it provides a Digg-submission-like content type that has a title, > some small info and a link to the actual story. It also has other > stuff like a JS bookmarklet. > > Since this module has been in existence, these both modules were > packaged together. I feel now that it would be beneficial for people > to have these as separate modules since they perform 2 separate tasks. > Initially, these were together to give a Digg-like package. I don't > really see people using the package for that purpose now. I'd like to > know what other developers think about this issue. Should I separate > Storylink and develop it as a separate module? > > > cheers > pratul > > -- > Incoming! > - OSScamp Pantnagar, 30 Jan - 1 Feb, 2009 > - Freed.in, 20 - 21 February, 2009 > dum vivimus, vivamus. > http://pratul.in From drupal-devel at webchick.net Thu Jan 15 06:59:29 2009 From: drupal-devel at webchick.net (Angela Byron) Date: Thu, 15 Jan 2009 01:59:29 -0500 Subject: [development] Announcing DRUPAL-7-0-UNSTABLE-4 Message-ID: <73F6DB34-D0FC-4B1B-BEEE-8AF6D560D3A8@webchick.net> Greetings, devel list! Due to holidays, conferences, illnesses, and such, it's been about two months since our last unstable release. So, upon mysteriously finding myself some time tonight, I figured now was as good a time as any to roll the next one. :) Here's a summary of some of the changes that seemed to stick out while reading the UNSTABLE-3 => UNSTABLE-4 changelog. I've attached the output of /contributions/tricks/cvs-release-notes.php to this mail (hopefully it makes it through to the list). See http://drupal.org/node/224333#UNSTABLE-4 for the full list of API changes this release. Once again, I encourage contributors to usehttp://groups.drupal.org/patch-spotlight as a place to organize, prioritize, and coordinate on patches they'd like to see in Drupal 7. Keep up the great work, folks! For developers: =============== - RDF goodness! An RDF namespace registry (and core now is XHTML 1.1 compliant as a result). I don't really know what an RDF namespace registry means, but Dries is excited about it. ;) - All of our hook documentation is now embedded in Drupal core files. This means it is easily searchable without access to api.drupal.org, You can enter "hook_something_something" in an IDE and have it auto- fill, AND it means that we will no longer have any hook introduced into Drupal without corresponding documentation. Hooray! - There were several patches committed that are bringing consistency to our table naming conventions: blocks -> block, filters -> filter, etc. This is an enabler for interesting Data API things. - Speaking of the database, HOOK_DB_REWRITE_SQL() IS DEAD. Long live hook_query_alter(), which gives you an actual *query object* instead of a fricking *string* that you have to parse with regex! :P Hooray! - Various "plumbing" improvements to systems like SimpleTest (which got way faster and also had some bug fixes), DBTNG (which got bug fixes, subquery support, improved test coverage, various conversion patches, etc.), File API (tests, tests, and more tests, all of which fixed underlying bugs), and so on. - Node links and comments were moved into $node->content['links'] and $node->content['comments'], respectively. This will make them a lot easier to theme. - Performance improvements to the module system, bootstrap, etc. and the addition of functions such as node_load_multiple() and file_load_multiple() which allow you to save approximately oodles of queries by retrieving all of the objects you need at once rather than one at a time. For users: ========== - Users can now (if given permissions) cancel their own accounts. So endeth the oldest issue in the issue queue. Sniff. ;) - Permissions page now displays human-readable names, in addition to descriptions. - Improvements have been made to Aggregator module which allow pluggable feed fetchers, parsers, and processors. - SQLite database support, which, among other things, opens up interesting possibilities for a "LiveCD"-like distribution of Drupal that requires no installer. - A PostgreSQL "surge" has brought us pretty close to "true" PostgreSQL database support (for real this time - we even have two maintainers!). - The "Display post information" options have been moved from the theme settings (where no one on earth ever thinks to look) to the content type settings (where they do). - A new "Clear all logs" button which lets you delete all watchdog data without having to dork around in the database. - A new module dependency system which magically figures out what order to enable modules when you check off a bunch of them that are inter-dependent so you don't get ugly "function does not exist" fatal errors. Yay, math! -Angie -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/development/attachments/20090115/6f31ba6e/attachment-0002.htm -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/development/attachments/20090115/6f31ba6e/attachment-0001.html -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/development/attachments/20090115/6f31ba6e/attachment-0003.htm From drewish at katherinehouse.com Thu Jan 15 08:08:03 2009 From: drewish at katherinehouse.com (andrew morton) Date: Thu, 15 Jan 2009 00:08:03 -0800 Subject: [development] Split module into two? In-Reply-To: <3994B80C-8272-4FC9-9C35-973774FB4F20@gmail.com> References: <3994B80C-8272-4FC9-9C35-973774FB4F20@gmail.com> Message-ID: On Wed, Jan 14, 2009 at 6:57 PM, Dmitri Gaskin wrote: > Why not separate storylink and make it use updown instead of vote_up_down, > and deprecate vote_up_down in favor of updown, and of course provide an > upgrade path? > I'd be able to help with this later this month or next month (or at least > the upgrade path) If anything I'd say the other way would be better. Not to start a flame war over modules but vote_up_down seemed much more useful when I was evaluating voting modules last month. I'd say split storylink out into it's own project if it turns out it's useful outside of the module that spawned it. I just did that with the audio module's audio_itunes sub-module. It's now the iTunes module (http://drupal.org/project/itunes) and will hopefully prevent other media modules from having to re-implement iTunes feed support. andrew From cooperq at cooperq.com Thu Jan 15 09:22:03 2009 From: cooperq at cooperq.com (cooper Quintin) Date: Thu, 15 Jan 2009 01:22:03 -0800 Subject: [development] Development and Production environments Message-ID: <496F003B.1010705@cooperq.com> Hello All, I am trying to set up an already live drupal site with a development, testing and production (live) environment. I started by checking all the code and a mysqldump into a subversion repository. I then began to set up a development environment on the same server that the live site was running on. I got everything set up (development database, vhost, etc.) and went to the development site, it worked fine but after running for about 1 or 2 minutes it crashed the server. I restarted the server and left it running just fine for a while, then I tried visiting the development site again with the same results. (Spectacular crash). I tried setting up a dev environment on my local computer and the same exact thing happened. I find this to be incredibly strange since the live site runs perfect on the same exact server, with the same exact settings. Has anyone else run into this problem or have any ideas what could be causing it? I was pondering that it could be memcached but then that shouldn't have caused a problem running solo on my box. I have included some pertinent information below. Thanks, -- Cooper Quintin Freelance Programmer, Indymedia Journalist http://CooperQ.com (510) 827-5382 P.S. Here is the pertinent info for the server: Server OS: CentOS 5 Drupal Version: 5.15 php 5.2.8 apache 2.2.3 mysql 5.0.45 memcached 1.2.5 From darthsteven at gmail.com Thu Jan 15 09:27:22 2009 From: darthsteven at gmail.com (Steven Jones) Date: Thu, 15 Jan 2009 09:27:22 +0000 Subject: [development] Development and Production environments In-Reply-To: <496F003B.1010705@cooperq.com> References: <496F003B.1010705@cooperq.com> Message-ID: Please don't spam the development list with a support question (you know it is a support question because you sent it to that list too). Regards Steven Jones ComputerMinds ltd - Perfect Drupal Websites Phone : 0121 288 0434 Mobile : 07951 270 026 http://www.computerminds.co.uk 2009/1/15 cooper Quintin : > Hello All, > I am trying to set up an already live drupal site with a development, > testing and production (live) environment. I started by checking all > the code and a mysqldump into a subversion repository. I then began to > set up a development environment on the same server that the live site > was running on. I got everything set up (development database, vhost, > etc.) and went to the development site, it worked fine but after running > for about 1 or 2 minutes it crashed the server. I restarted the server > and left it running just fine for a while, then I tried visiting the > development site again with the same results. (Spectacular crash). I > tried setting up a dev environment on my local computer and the same > exact thing happened. I find this to be incredibly strange since the > live site runs perfect on the same exact server, with the same exact > settings. Has anyone else run into this problem or have any ideas what > could be causing it? I was pondering that it could be memcached but > then that shouldn't have caused a problem running solo on my box. I > have included some pertinent information below. > Thanks, > > -- > Cooper Quintin > Freelance Programmer, Indymedia Journalist > http://CooperQ.com > (510) 827-5382 > > > P.S. Here is the pertinent info for the server: > Server OS: CentOS 5 > Drupal Version: 5.15 > php 5.2.8 > apache 2.2.3 > mysql 5.0.45 > memcached 1.2.5 > From cooperq at cooperq.com Thu Jan 15 09:29:31 2009 From: cooperq at cooperq.com (cooper Quintin) Date: Thu, 15 Jan 2009 01:29:31 -0800 Subject: [development] Development and Production environments In-Reply-To: References: <496F003B.1010705@cooperq.com> Message-ID: <496F01FB.4080409@cooperq.com> Sorry, I wasn't sure which one to send it to so I sent it to both, I figured since it pretained to development that maybe development was a more appropriate place for it. Steven Jones wrote: > Please don't spam the development list with a support question (you > know it is a support question because you sent it to that list too). > -- Cooper Quintin Freelance Programmer, Indymedia Journalist http://CooperQ.com (510) 827-5382 From pratulkalia at gmail.com Thu Jan 15 17:14:20 2009 From: pratulkalia at gmail.com (Pratul Kalia) Date: Thu, 15 Jan 2009 22:44:20 +0530 Subject: [development] Split module into two? Message-ID: Dmitri, I have already talked to Josh about UpDown and we had decided to keep Vote Up/Down and instead provide an upgrade path from UpDown. Vote Up/Down is an older module, is used much more widely and has more features. Of course, there are some points to note in the UpDown implementation (like the hash value at the end to prevent false votes) that I need to incorporate in Vote Up/Down. There's more on my to-do list as well. I hope you will help us out with that as well :-) Andrew, I do think Storylink would be better off as a separate project since it's not really a voting related module after all. It was a part of the original goal Vote Up/Down had in mind (a Digg/Reddit type clone) but I have decided to focus on purely on voting for Vote Up/Down now. cheers pratul -- Incoming! - OSScamp Pantnagar, 30 Jan - 1 Feb, 2009 - Freed.in, 20 - 21 February, 2009 dum vivimus, vivamus. http://pratul.in From brianpkennedy at gmail.com Thu Jan 15 19:09:21 2009 From: brianpkennedy at gmail.com (Brian Kennedy) Date: Thu, 15 Jan 2009 13:09:21 -0600 Subject: [development] Asking for donations in contrib In-Reply-To: References: <014901c975d4$8ef04f80$0200a8c0@structworks.com> Message-ID: <302792e70901151109s1a7c7df4x9f9555e7b66e176c@mail.gmail.com> So much for the F in FOSS. On Tue, Jan 13, 2009 at 6:12 PM, Nancy Wichmann wrote: > Daniel F. Kudwien wrote > > The more Drupal's user-base and our community grows the more I think we > need > > a "proper" process of dealing with this issue. > > Well, what I'd actually like to become is a professional (i.e. paid) > contrib. maintainer. I really enjoy it, but I do have to worry about a > roof > over my head and food in my stomach. If there was some way to fund people > to do this, I think everyone would benefit. Those people could concentrate > on those modules that are most used (assuming our stats are close to > correct) and could be educated early in a release cycle so that those > popular modules follow new Drupal releases closely. That still leaves > plenty of modules for those who like to tinker. And, of course, I'd like > to > see some basic funding for the core maintainers as well. > > So how do we raise this money? > > Nancy > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/development/attachments/20090115/79c7d9a3/attachment.htm From brianpkennedy at gmail.com Thu Jan 15 19:25:01 2009 From: brianpkennedy at gmail.com (Brian Kennedy) Date: Thu, 15 Jan 2009 13:25:01 -0600 Subject: [development] Asking for donations in contrib In-Reply-To: <51a9b8330901132312v3377ce7chc83fb10e43f254db@mail.gmail.com> References: <014901c975d4$8ef04f80$0200a8c0@structworks.com> <51a9b8330901132312v3377ce7chc83fb10e43f254db@mail.gmail.com> Message-ID: <302792e70901151125q13534de9w1c1296de17aef5c2@mail.gmail.com> On Wed, Jan 14, 2009 at 1:12 AM, KOBA | Hans Rossel wrote: > I've contributed a few times to a chipin, but like rather to contribute and > communicate directly with the maintainer for certain specific features. > I think there are 3 main ways: > - chipin: for popular much wanted features, a lot of people contributing a > small amount. > - bounty: gathering a few sponsors that contribute a larger amount for a > specific feature > - direct contact with the maintainer: for urgent needs or really custom > changes to the module for a specific project. > You seem to have left out the 4th way -- which is digging in and and writing some code yourself. If there's a feature that you're willing to pay someone else for, why can't you do it yourself (whether that means writing your own code, or if you're a PM having someone who works for you write the code)? After you write implement the feature yourself, you can contribute that code back in the form of a patch and the maintainer can apply that him/herself. One of the benefits of open source is that the source is open. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/development/attachments/20090115/e941f092/attachment.htm From drupal at dwwright.net Thu Jan 15 19:27:09 2009 From: drupal at dwwright.net (Derek Wright) Date: Thu, 15 Jan 2009 11:27:09 -0800 Subject: [development] Asking for donations in contrib In-Reply-To: <302792e70901151109s1a7c7df4x9f9555e7b66e176c@mail.gmail.com> References: <014901c975d4$8ef04f80$0200a8c0@structworks.com> <302792e70901151109s1a7c7df4x9f9555e7b66e176c@mail.gmail.com> Message-ID: <9697C04C-30FB-43F4-B6FC-2001BF12B128@dwwright.net> On Jan 15, 2009, at 11:09 AM, Brian Kennedy wrote: > So much for the F in FOSS. Uhh, no. The "F" is "Free" as in "you don't have to pay to download the code I wrote". However, until the global victory of socialism, our rent isn't "free", our food isn't "free", and therefore, we all sell our labor power to survive. My labor is not free, even if the code I produce with it is. -Derek (dww) From lists at intermedia-online.com Thu Jan 15 21:40:00 2009 From: lists at intermedia-online.com (Liam McDermott) Date: Thu, 15 Jan 2009 16:40:00 -0500 Subject: [development] Asking for donations in contrib In-Reply-To: <302792e70901151109s1a7c7df4x9f9555e7b66e176c@mail.gmail.com> References: <014901c975d4$8ef04f80$0200a8c0@structworks.com> <302792e70901151109s1a7c7df4x9f9555e7b66e176c@mail.gmail.com> Message-ID: <496FAD30.9030606@intermedia-online.com> Brian Kennedy wrote: > So much for the F in FOSS. Incorrect. The 'F' means free as in freedom, not free as in gratis. See: http://www.gnu.org/licenses/gpl-faq.html#DoesTheGPLAllowMoney Kind Regards, Liam McDermott. From mistknight at gmail.com Thu Jan 15 21:50:10 2009 From: mistknight at gmail.com (Ashraf Amayreh) Date: Thu, 15 Jan 2009 23:50:10 +0200 Subject: [development] load node globally Message-ID: Hello All, Since I see so many node loads in block visibility and in modules that do $node manipulations and so forth, which would make me think that sometimes many node loads might occur on some pages and tens perhaps when you add contributed modules on that, I was wondering why not just load $node globally on node//* pages like we do with $user to avoid any extra node_loads? Developers would only need to global $node and it would either be null or populated and ready. Before creating a patch for a *possibly* terrible idea, I thought I'd raise a stick and see if it gets shot :D -- Ashraf Amayreh http://aamayreh.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/development/attachments/20090115/5aa7fb03/attachment.htm From anthony at thrillist.com Thu Jan 15 21:53:27 2009 From: anthony at thrillist.com (Anthony Wlodarski) Date: Thu, 15 Jan 2009 13:53:27 -0800 Subject: [development] load node globally In-Reply-To: Message-ID: I believe any further calls to node_load with the same node id are cached. -Anthony -- Anthony Wlodarski www.thrillist.com Web Applications Developer 568 Broadway Ste. 605 New York, NY, 10012 (o) 646.786.1944 ________________________________ From: Ashraf Amayreh Reply-To: Date: Thu, 15 Jan 2009 13:50:10 -0800 To: Subject: [development] load node globally Hello All, Since I see so many node loads in block visibility and in modules that do $node manipulations and so forth, which would make me think that sometimes many node loads might occur on some pages and tens perhaps when you add contributed modules on that, I was wondering why not just load $node globally on node//* pages like we do with $user to avoid any extra node_loads? Developers would only need to global $node and it would either be null or populated and ready. Before creating a patch for a *possibly* terrible idea, I thought I'd raise a stick and see if it gets shot :D -- Ashraf Amayreh http://aamayreh.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/development/attachments/20090115/55ff76c1/attachment.htm From arthur at 24b6.net Thu Jan 15 21:55:11 2009 From: arthur at 24b6.net (arthur) Date: Thu, 15 Jan 2009 16:55:11 -0500 Subject: [development] load node globally In-Reply-To: References: Message-ID: <82D3139C-D093-4A6B-9233-5891055E8B88@24b6.net> On Jan 15, 2009, at 4:50 PM, Ashraf Amayreh wrote: > Hello All, > > Since I see so many node loads in block visibility and in modules > that do $node manipulations and so forth, which would make me think > that sometimes many node loads might occur on some pages and tens > perhaps when you add contributed modules on that, I was wondering > why not just load $node globally on node//* pages like we do > with $user to avoid any extra node_loads? Developers would only need > to global $node and it would either be null or populated and ready. node_load() stores nodes in a static variable already- see http://api.drupal.org/api/function/node_load best, a. > > > -- > Ashraf Amayreh > http://aamayreh.org --------------------------------------------------- arthur at civicactions.com From darrenoh at sidepotsinternational.com Thu Jan 15 22:04:14 2009 From: darrenoh at sidepotsinternational.com (Darren Oh) Date: Thu, 15 Jan 2009 17:04:14 -0500 Subject: [development] load node globally In-Reply-To: References: Message-ID: <05B89175-1244-4D1B-A45C-8858BC5EA4A1@sidepotsinternational.com> I just confirmed that node_load() stores loaded nodes in a static variable. On Jan 15, 2009, at 4:53 PM, Anthony Wlodarski wrote: > I believe any further calls to node_load with the same node id are > cached. > > -Anthony > -- > Anthony Wlodarski > www.thrillist.com > Web Applications Developer > 568 Broadway Ste. 605 > New York, NY, 10012 > (o) 646.786.1944 > > > From: Ashraf Amayreh > Reply-To: > Date: Thu, 15 Jan 2009 13:50:10 -0800 > To: > Subject: [development] load node globally > > Hello All, > > Since I see so many node loads in block visibility and in modules > that do $node manipulations and so forth, which would make me think > that sometimes many node loads might occur on some pages and tens > perhaps when you add contributed modules on that, I was wondering > why not just load $node globally on node//* pages like we do > with $user to avoid any extra node_loads? Developers would only need > to global $node and it would either be null or populated and ready. > > Before creating a patch for a *possibly* terrible idea, I thought > I'd raise a stick and see if it gets shot :D > > -- > Ashraf Amayreh > http://aamayreh.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/development/attachments/20090115/4ccc01d2/attachment.htm From fletch at splendora.com Thu Jan 15 21:57:37 2009 From: fletch at splendora.com (Dave Fletcher) Date: Thu, 15 Jan 2009 13:57:37 -0800 Subject: [development] load node globally In-Reply-To: References: Message-ID: <1211d97f0901151357m154a127fg8eb30f92e4b07cef@mail.gmail.com> > Since I see so many node loads in block visibility and in modules that do > $node manipulations and so forth, which would make me think that sometimes > many node loads might occur on some pages and tens perhaps when you add > contributed modules on that, I was wondering why not just load $node > globally on node//* pages like we do with $user to avoid any extra > node_loads? I think it's pretty rare that the same node gets loaded twice. Well, one example might be a sidebar block with a view of full nodes or teasers in it. If one of the nodes was the URL target, it would be loaded once for the page, once for the sidebar. And how would views take advantage of it? node_load is just smart enough not to load the node twice? I think there's caching modules (e.g. the node cache feature of memcached) that do this type of thing. I'd look into cache modules if you're worried about multiple loads. Oh and of course, the built-in page cache for anon visitors makes this a non-issue if the bulk of your traffic is anon. Cheers, --fletch From catch56 at googlemail.com Thu Jan 15 22:34:36 2009 From: catch56 at googlemail.com (Nathaniel Catchpole) Date: Thu, 15 Jan 2009 22:34:36 +0000 Subject: [development] load node globally In-Reply-To: <1211d97f0901151357m154a127fg8eb30f92e4b07cef@mail.gmail.com> References: <1211d97f0901151357m154a127fg8eb30f92e4b07cef@mail.gmail.com> Message-ID: In HEAD node_load() is done about 13 times during the course of a node/n page load - but as already mentioned, the static cache in node_load() prevents duplicate queries in those cases, or if it's called again from a theme. In Drupal 7, node_load_multiple() will let you pull all nodes on a page in a single query (+ 1 per hook) for node listings, and there's an active patch to cache fully loaded node objects persistently (i.e. in a cache_node table, or memcache) here: http://drupal.org/node/111127 which could use some extra benchmarks if anyone wants to help it get in. Nat -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/development/attachments/20090115/a4047464/attachment.htm From news at unleashedmind.com Thu Jan 15 22:37:45 2009 From: news at unleashedmind.com (Daniel F. Kudwien) Date: Thu, 15 Jan 2009 23:37:45 +0100 Subject: [development] load node globally In-Reply-To: <1211d97f0901151357m154a127fg8eb30f92e4b07cef@mail.gmail.com> Message-ID: <032001c97761$e2e325c0$0200a8c0@structworks.com> node_load() is statically cached when certain conditions are met: http://api.drupal.org/api/function/node_load/6 For D6, you can avoid node_load() in many situations by re-using the path argument: http://api.drupal.org/api/function/menu_get_object/6 For D7, node_load() will be cached: http://drupal.org/node/111127 Views avoids the use of node_load() in many cases (but not all) by directly querying only the required data in a single query. sun > -----Original Message----- > From: development-bounces at drupal.org > [mailto:development-bounces at drupal.org] On Behalf Of Dave Fletcher > Sent: Thursday, January 15, 2009 10:58 PM > To: development at drupal.org > Subject: Re: [development] load node globally > > > Since I see so many node loads in block visibility and in > modules that > > do $node manipulations and so forth, which would make me think that > > sometimes many node loads might occur on some pages and > tens perhaps > > when you add contributed modules on that, I was wondering > why not just > > load $node globally on node//* pages like we do with $user to > > avoid any extra node_loads? > > I think it's pretty rare that the same node gets loaded > twice. Well, one example might be a sidebar block with a view > of full nodes or teasers in it. If one of the nodes was the > URL target, it would be loaded once for the page, once for > the sidebar. > > And how would views take advantage of it? node_load is just > smart enough not to load the node twice? I think there's > caching modules (e.g. the node cache feature of memcached) > that do this type of thing. > I'd look into cache modules if you're worried about multiple > loads. Oh and of course, the built-in page cache for anon > visitors makes this a non-issue if the bulk of your traffic is anon. > > Cheers, > > --fletch > From nan_wich at bellsouth.net Thu Jan 15 23:09:20 2009 From: nan_wich at bellsouth.net (Nancy Wichmann) Date: Thu, 15 Jan 2009 18:09:20 -0500 Subject: [development] Asking for donations in contrib In-Reply-To: <302792e70901151109s1a7c7df4x9f9555e7b66e176c@mail.gmail.com> Message-ID: Brian Kennedy wrote: > So much for the F in FOSS. I?m not asking for *you* to pay for my time. But my rent is not free, nor are any of the bills I pay (like electric or internet), nor is the food that passes, occasionally, through my system. Those all benefit you, whether or not you pay to download the code I provide. But if I don?t pay them, you will lose support for that code. Have you ever seen a module that says ?Supported by? or ?Underwritten by?? That means that someone paid for that module you get for nothing and about which you are free to complain. I would have much more time and incentive to work on those modules if someone ? anyone ? was paying me to do it. Right now, Real Life* is hindering my ability to support my 20+ modules. I feel very bad about that, but it is a reality that I must face ? and so must my adopters. There are many large companies that would otherwise be paying a large chunk of change to some vendor for the benefits they get from Drupal core and contib maintainers. If they would contribute a portion of the savings, the entire Drupal community would be better off. BTW, how much are you making from Drupal? How much have you contributed back? Nancy -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/development/attachments/20090115/ee19f716/attachment.htm From hans.rossel at koba.be Fri Jan 16 08:36:50 2009 From: hans.rossel at koba.be (KOBA | Hans Rossel) Date: Fri, 16 Jan 2009 09:36:50 +0100 Subject: [development] Asking for donations in contrib In-Reply-To: <302792e70901151125q13534de9w1c1296de17aef5c2@mail.gmail.com> References: <014901c975d4$8ef04f80$0200a8c0@structworks.com> <51a9b8330901132312v3377ce7chc83fb10e43f254db@mail.gmail.com> <302792e70901151125q13534de9w1c1296de17aef5c2@mail.gmail.com> Message-ID: <51a9b8330901160036r5301dc01i54fc417219e9cf3a@mail.gmail.com> I was not making a complete list of all possible ways to contribute (there are a lot more then), just giving the alternatives in my opinion for chipin/financial contribution. I prefer that the module maintainer writes the code instead of myself or somebody that works for me because - I think paying the module maintainer gives her the opportunity to make a living of Drupal modules and thus having the freedom to spend more time on the module, improving the quality of that module, implement faster improvements and make it better for everyone. Such a module will not get abandoned. - I also think that the module maintainer knows her module best (or should) so will not have to waste time to digg into the code just to understand how the module works before being able to start adding the feature. So we save time. - If you make yourself or let somebody else make a patch and contribute it it is not sure that it will finally get incorporated into the module code, the module maintainer will decide on that, and when she had started developing a similar feature in another way, you will be left with an ugly patch that makes updates harder. - Letting other people write an extra feature often gives you code which is too custom to be contributed, its often an easy fix that is specific for your installation; I rather prefer that the maintainer makes a generic solution that will get included in the next update of the module. And I'm confident enough in the enthousiasm of most maintainers that we will not get into a future situation where all modules would get stuck on a chipin, and nothing would be done anymore before the amount is reached. Its not about free/paid, but about liking what you do. Hans 2009/1/15 Brian Kennedy > > > On Wed, Jan 14, 2009 at 1:12 AM, KOBA | Hans Rossel wrote: > >> I've contributed a few times to a chipin, but like rather to contribute >> and communicate directly with the maintainer for certain specific features. >> I think there are 3 main ways: >> - chipin: for popular much wanted features, a lot of people contributing a >> small amount. >> - bounty: gathering a few sponsors that contribute a larger amount for a >> specific feature >> - direct contact with the maintainer: for urgent needs or really custom >> changes to the module for a specific project. >> > > > You seem to have left out the 4th way -- which is digging in and and > writing some code yourself. If there's a feature that you're willing to pay > someone else for, why can't you do it yourself (whether that means writing > your own code, or if you're a PM having someone who works for you write the > code)? After you write implement the feature yourself, you can contribute > that code back in the form of a patch and the maintainer can apply that > him/herself. One of the benefits of open source is that the source is open. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/development/attachments/20090116/67c09ad8/attachment.htm From mfioretti at nexaima.net Fri Jan 16 08:57:35 2009 From: mfioretti at nexaima.net (M. Fioretti) Date: Fri, 16 Jan 2009 09:57:35 +0100 (CET) Subject: [development] Info needed to add content to Drupal via shell/curl script In-Reply-To: <34683.213.203.159.55.1231058355.squirrel@nexaima.net> References: <34683.213.203.159.55.1231058355.squirrel@nexaima.net> Message-ID: <50958.213.203.159.55.1232096255.squirrel@nexaima.net> On Sun, January 4, 2009 9:39 am, M. Fioretti wrote: > Greetings, > > I would like to ask all Drupal developers where to > find the info to... write a shell script which > takes as input an HTML file and other parameters > (title, category, etc...) and then, using curl and > the POST method, logs into a Drupal website, adds > a node with that text and parameters, logs off and > returns the complete URL assigned by drupal to > that page. I would just like to thank all the developers who answered, either here or privately. I haven't found a solution yet, primarily because I didn't explain myself clearly, sorry for the confusion. When I wrote "shell script" above, I didn't make clear that I am (almost) only interested in shell running remotely, not on the server which is running drupal. The tips and pointers I got are less useful (=require more extra tweaking to work) in such a context, so I *think* I'll retry, when I have again time, with the bash+curl approach Thanks anyway for the info, it was quite useful to learn something on how drupal works and is developed. Ciao, Marco -- Help *everybody* love Free Standards and Software: http://digifreedom.net From mfioretti at nexaima.net Fri Jan 16 09:05:05 2009 From: mfioretti at nexaima.net (M. Fioretti) Date: Fri, 16 Jan 2009 10:05:05 +0100 (CET) Subject: [development] Upgrade to 6.8/6.9 breaks all taxonomy listings Message-ID: <60527.213.203.159.55.1232096705.squirrel@nexaima.net> Greetings, I *do* know that is list is for development, not for support, sorry. But I have already tried two times, both on the support list and in the drupal forums, to get some answer, any answer to something which probably requires top drupal expertise to solve. I got a serious problem which I explained in detail here: http://drupal.org/node/356394 http://drupal.org/node/358739 (for the record, I just upgraded to 6.9 and nothing changed). I'm a bit worried that in one week there was no reaction whatever to something like this. Didn't I provide enough information? How can I find out what went wrong and how to fix it? I have no problem to study documentation or do command line work myself. I also have ssh and phpmyadmin access to that server, but honestly I need some pointer to get started in the right direction (assuming this is a problem in my site and not a bug in Drupal). What's the problem? Why did those listing disappear? Please let me know and don't hesitate to ask for more info, tests to run on the server, whatever. TIA, Marco -- Help *everybody* love Free Standards and Software: http://digifreedom.net From catch56 at googlemail.com Fri Jan 16 10:03:59 2009 From: catch56 at googlemail.com (Nathaniel Catchpole) Date: Fri, 16 Jan 2009 10:03:59 +0000 Subject: [development] Upgrade to 6.8/6.9 breaks all taxonomy listings In-Reply-To: <60527.213.203.159.55.1232096705.squirrel@nexaima.net> References: <60527.213.203.159.55.1232096705.squirrel@nexaima.net> Message-ID: If you find a bug, in 99% of cases there'll already be a report on the issue queue, like this one http://drupal.org/node/345080 You can search the issue queue using http://drupal.org/project/issues/search/drupal - only a very small proportion of people working on core look at the forums, which IMO should never be used to post bug reports since there's no tracking whatsoever and because they're completely outside the normal core and contrib workflow. If you could run the upgrade again and post any error messages to that issue, it might help tracking it down. Nat On Fri, Jan 16, 2009 at 9:05 AM, M. Fioretti wrote: > > Greetings, > > I *do* know that is list is for development, not for support, sorry. But I > have already tried two times, both on the support list and in the drupal > forums, to get some answer, any answer to something which probably > requires top drupal expertise to solve. I got a serious problem which I > explained in detail here: > > http://drupal.org/node/356394 > http://drupal.org/node/358739 > > (for the record, I just upgraded to 6.9 and nothing changed). > > I'm a bit worried that in one week there was no reaction whatever to > something like this. Didn't I provide enough information? How can I find > out what went wrong and how to fix it? I have no problem to study > documentation or do command line work myself. I also have ssh and > phpmyadmin access to that server, but honestly I need some pointer to get > started in the right direction (assuming this is a problem in my site and > not a bug in Drupal). > > What's the problem? Why did those listing disappear? Please let me know > and don't hesitate to ask for more info, tests to run on the server, > whatever. > > TIA, > Marco > > -- > Help *everybody* love Free Standards and Software: > http://digifreedom.net > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/development/attachments/20090116/2e09dae6/attachment-0001.htm From fgm at osinet.fr Fri Jan 16 10:12:46 2009 From: fgm at osinet.fr (FGM) Date: Fri, 16 Jan 2009 11:12:46 +0100 Subject: [development] Upgrade to 6.8/6.9 breaks all taxonomy listings References: <60527.213.203.159.55.1232096705.squirrel@nexaima.net> Message-ID: <5C908C70AF1740A49B17CD433C72271B@pcosi> Problem solved on http://drupal.org/node/358739 ----- Original Message ----- From: "Nathaniel Catchpole" To: ; Sent: Friday, January 16, 2009 11:03 AM Subject: Re: [development] Upgrade to 6.8/6.9 breaks all taxonomy listings If you find a bug, in 99% of cases there'll already be a report on the issue queue, like this one http://drupal.org/node/345080 You can search the issue queue using http://drupal.org/project/issues/search/drupal - only a very small proportion of people working on core look at the forums, which IMO should never be used to post bug reports since there's no tracking whatsoever and because they're completely outside the normal core and contrib workflow. If you could run the upgrade again and post any error messages to that issue, it might help tracking it down. Nat On Fri, Jan 16, 2009 at 9:05 AM, M. Fioretti > wrote: Greetings, I *do* know that is list is for development, not for support, sorry. But I have already tried two times, both on the support list and in the drupal forums, to get some answer, any answer to something which probably requires top drupal expertise to solve. I got a serious problem which I explained in detail here: http://drupal.org/node/356394 http://drupal.org/node/358739 (for the record, I just upgraded to 6.9 and nothing changed). I'm a bit worried that in one week there was no reaction whatever to something like this. Didn't I provide enough information? How can I find out what went wrong and how to fix it? I have no problem to study documentation or do command line work myself. I also have ssh and phpmyadmin access to that server, but honestly I need some pointer to get started in the right direction (assuming this is a problem in my site and not a bug in Drupal). What's the problem? Why did those listing disappear? Please let me know and don't hesitate to ask for more info, tests to run on the server, whatever. TIA, Marco -- Help *everybody* love Free Standards and Software: http://digifreedom.net From mfioretti at nexaima.net Fri Jan 16 10:23:08 2009 From: mfioretti at nexaima.net (M. Fioretti) Date: Fri, 16 Jan 2009 11:23:08 +0100 (CET) Subject: [development] Upgrade to 6.8/6.9 breaks all taxonomy listings In-Reply-To: References: <60527.213.203.159.55.1232096705.squirrel@nexaima.net> Message-ID: <57443.213.203.159.55.1232101388.squirrel@nexaima.net> On Fri, January 16, 2009 11:03 am, Nathaniel Catchpole wrote: Nathaniel, thanks a lot for the prompt answer. Now: > If you find a bug, in 99% of cases there'll > already be a report on the issue queue, like > this one http://drupal.org/node/345080 I **had** tried several searches before asking for help. I know how to find for help, provide as much info as possible etc, but this time, for some reason, simply missed that page, thanks. However: 1) Yes, the symptoms are the same I have, so it must be the same bug 2) Like the others, I have not seen any related error/warning during the 5.5->6.8 upgrade, otherwise I'd have posted them one week ago 3) Please see again http://drupal.org/node/358739 where interesting comments appeared a few minutes ago 4) wrt the bug tracker, the only difference in my case, is that I also upgraded from 6.8 to 6.9. Also, my (6.9) term_node table is not empty. I don't know if and how this and the comments in point 3 above are all related. is it possible to rebuild the term_node table so that it works with sane URLs? I have no problem to work at the mysql prompt, but I need to know what to do. What now? If you need to look at the exact content of the table, just ask. Thanks! Marco -- Help *everybody* love Free Standards and Software: http://digifreedom.net From mfioretti at nexaima.net Fri Jan 16 11:18:14 2009 From: mfioretti at nexaima.net (M. Fioretti) Date: Fri, 16 Jan 2009 12:18:14 +0100 (CET) Subject: [development] Upgrade to 6.8/6.9 breaks all taxonomy listings In-Reply-To: <5C908C70AF1740A49B17CD433C72271B@pcosi> References: <60527.213.203.159.55.1232096705.squirrel@nexaima.net> <5C908C70AF1740A49B17CD433C72271B@pcosi> Message-ID: <33361.213.203.159.55.1232104694.squirrel@nexaima.net> On Fri, January 16, 2009 11:12 am, FGM wrote: > Problem solved on http://drupal.org/node/358739 er, no, with all respect it isn't is it now? See my answer at 10:25 on that same page . Your answer is surely useful for other developers to diagnose the issue, but how is a website visitor supposed to know that if he wants to see what Drupal says it's at http://storiafse.net/taxonomy/term/67, he should manually add a /1 to the URL? Please let me know if you need more info from me (including running tests) and if and how it's possible to make that term_node table work again, even by working manually at the mysql prompt. Thanks, Marco -- Help *everybody* love Free Standards and Software: http://digifreedom.net From syscrusher at 4th.com Sat Jan 17 02:56:00 2009 From: syscrusher at 4th.com (Syscrusher) Date: Fri, 16 Jan 2009 21:56:00 -0500 Subject: [development] Want drupal.org to show dev shapshot but not "released" for D7 version of module Message-ID: <1232160960.7409.8.camel@marcus> Good evening! I've looked at the online docs but am still a little ambiguous. I have a module that I've ported to the latest snapshot of Drupal 7; my module's most recent previous version is for D6. It's "working" but not "finished" yet in the D7 version. I'd like to CVS tag it in such a way that drupal.org will show the D7 version as a nightly development snapshot, as I progress toward an official release. It looks to me as if what I want is "cvs tag -b DRUPAL-7--1" for the development branch, then make a drupal.org release for that tag. If I recall, that sticky-tag release node on d.o will track daily changes. But since we're talking about a sticky tag, I want to be sure. I know how to do the official releases for beta and production with non-sticky tags, but it's been a while since I did one of these. Thanks for any reminders someone might care to post. Scott -- Syscrusher From syscrusher at 4th.com Sun Jan 18 03:39:52 2009 From: syscrusher at 4th.com (Syscrusher) Date: Sat, 17 Jan 2009 22:39:52 -0500 Subject: [development] Want drupal.org to show dev shapshot but not "released" for D7 version of module In-Reply-To: <1232160960.7409.8.camel@marcus> References: <1232160960.7409.8.camel@marcus> Message-ID: <1232249993.7409.15.camel@marcus> On Fri, 2009-01-16 at 21:56 -0500, Syscrusher wrote: > I've looked at the online docs but am still a little ambiguous. I have > a > module that I've ported to the latest snapshot of Drupal 7; my > module's > most recent previous version is for D6. > > It's "working" but not "finished" yet in the D7 version. I'd like to > CVS > tag it in such a way that drupal.org will show the D7 version as a > nightly development snapshot, as I progress toward an official > release. > > It looks to me as if what I want is "cvs tag -b DRUPAL-7--1" for the > development branch, then make a drupal.org release for that tag. I found the answer elsewhere in the online docs...please disregard this question. Scott -- Syscrusher From andrewberry at sentex.net Wed Jan 21 02:12:19 2009 From: andrewberry at sentex.net (Andrew Berry) Date: Tue, 20 Jan 2009 21:12:19 -0500 Subject: [development] Writing a test for book_get_books() Message-ID: <0BE083BA-B0BA-4D04-BC9A-CD9E9236AFC4@sentex.net> Hi, This is in relation to http://drupal.org/node/360377. What I'm doing is building multiple $form_state arrays and using them to build an entire structure of a book automatically. In essence, the code looks like this (mostly from the comments above drupal_execute(), and yes, I want to create a book of articles - node type doesn't seem to matter): $parent_node = array('type' => 'article'); $form_state = array(); $form_state['values'] = array(); $form_state['values']['title'] = $number . ' - SimpleTest test node ' . $this->randomName(10); $form_state['values']['body'] = 'SimpleTest test body ' . $this- >randomName(32) . ' ' . $this->randomName(32); $form_state['values']['book'] = _book_link_defaults('new'); $form_state['values']['book']['bid'] = 'new'; $form_state['values']['op'] = t('Save'); drupal_execute($parent_node['type'] . '_node_form', $form_state, (object)$parent_node); And repeat for the various subpages setting the various book properties so that child pages have the right parents. According to lyricnz2 on IRC (thanks!), the problem is that drupal_execute() doesn't work as expected in SimpleTest environments, as it runs against the normal database, and not the simpletest copy. Two questions then: 1) Is the original issue actually a bug, or am I abusing FAPI incorrectly? 2) Since the issue requires multiple book nodes to be inserted in one request, meaning I can't use drupalPost(), how can I write a proper test for it? It was suggested that I could create a block and run PHP in it, but I would think there has to be a better way. Thanks, --Andrew -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2672 bytes Desc: not available Url : http://lists.drupal.org/pipermail/development/attachments/20090120/c164d0a3/attachment.bin From sheryl at permutations.com Wed Jan 21 06:26:26 2009 From: sheryl at permutations.com (Sheryl (Permutations Software)) Date: Wed, 21 Jan 2009 01:26:26 -0500 Subject: [development] converting a module from Drupal 5 to Drupal 6 In-Reply-To: <1232249993.7409.15.camel@marcus> References: <1232160960.7409.8.camel@marcus> <1232249993.7409.15.camel@marcus> Message-ID: <02f601c97b91$30692000$913b6000$@com> I'm converting a module from Drupal 5 to Drupal 6, and I'm having a very hard time understanding the change in the use of 'op'. I can't figure out how I need to change my code. There are these lines. if (!empty($form_values['op'])) { _phpfreechat_clear_cache(); _phpfreechat_clear_cookies(); } if (!_phpfreechat_check_install()) { form_set_error('op', _phpfreechat_not_found()); } if (!_phpfreechat_check_files()) { form_set_error('op', t('Unable to create data folders for phpfreechat.')); } I took this module over from someone else, so I don't fully understand the use of 'op' here to begin with. Not understanding what it's doing makes it very hard to rewrite. I've spent the last two hours on the Drupal site trying to figure it out and I'm boggled. All I can tell is that 'op' was the default name of buttons in Drupal 5, but I still can't figure out what's being tested in these "if" statements or how I need to rewrite them for Drupal 6. Any guidance you can give me would be greatly appreciated! - Sheryl From darthsteven at gmail.com Wed Jan 21 07:33:28 2009 From: darthsteven at gmail.com (Steven Jones) Date: Wed, 21 Jan 2009 07:33:28 +0000 Subject: [development] Writing a test for book_get_books() In-Reply-To: <0BE083BA-B0BA-4D04-BC9A-CD9E9236AFC4@sentex.net> References: <0BE083BA-B0BA-4D04-BC9A-CD9E9236AFC4@sentex.net> Message-ID: Drupal execute won't work with the batch API, this might be the source of the problem, there's an issue here: http://drupal.org/node/297972 though it hasn't got much attention. Regards Steven Jones ComputerMinds ltd - Perfect Drupal Websites Phone : 0121 288 0434 Mobile : 07951 270 026 http://www.computerminds.co.uk 2009/1/21 Andrew Berry : > Hi, > > This is in relation to http://drupal.org/node/360377. > > What I'm doing is building multiple $form_state arrays and using them to > build an entire structure of a book automatically. In essence, the code > looks like this (mostly from the comments above drupal_execute(), and yes, I > want to create a book of articles - node type doesn't seem to matter): > > $parent_node = array('type' => 'article'); > $form_state = array(); > $form_state['values'] = array(); > $form_state['values']['title'] = $number . ' - SimpleTest test node ' . > $this->randomName(10); > $form_state['values']['body'] = 'SimpleTest test body ' . > $this->randomName(32) . ' ' . $this->randomName(32); > $form_state['values']['book'] = _book_link_defaults('new'); > $form_state['values']['book']['bid'] = 'new'; > $form_state['values']['op'] = t('Save'); > drupal_execute($parent_node['type'] . '_node_form', $form_state, > (object)$parent_node); > > And repeat for the various subpages setting the various book properties so > that child pages have the right parents. > > According to lyricnz2 on IRC (thanks!), the problem is that drupal_execute() > doesn't work as expected in SimpleTest environments, as it runs against the > normal database, and not the simpletest copy. > > Two questions then: > > 1) Is the original issue actually a bug, or am I abusing FAPI incorrectly? > 2) Since the issue requires multiple book nodes to be inserted in one > request, meaning I can't use drupalPost(), how can I write a proper test for > it? It was suggested that I could create a block and run PHP in it, but I > would think there has to be a better way. > > Thanks, > --Andrew From stewsnooze at gmail.com Wed Jan 21 09:11:14 2009 From: stewsnooze at gmail.com (Stewart Robinson) Date: Wed, 21 Jan 2009 09:11:14 +0000 Subject: [development] converting a module from Drupal 5 to Drupal 6 In-Reply-To: <02f601c97b91$30692000$913b6000$@com> References: <1232160960.7409.8.camel@marcus> <1232249993.7409.15.camel@marcus> <02f601c97b91$30692000$913b6000$@com> Message-ID: Hi, Op means different things in different places, or at least its values do. What function does your copied code come from and do you know the value of op? Stew On 1/21/09, Sheryl (Permutations Software) wrote: > I'm converting a module from Drupal 5 to Drupal 6, and I'm having a very > hard time understanding the change in the use of 'op'. I can't figure out > how I need to change my code. There are these lines. > > if (!empty($form_values['op'])) { > _phpfreechat_clear_cache(); > _phpfreechat_clear_cookies(); > } > if (!_phpfreechat_check_install()) { > form_set_error('op', _phpfreechat_not_found()); > } > if (!_phpfreechat_check_files()) { > form_set_error('op', t('Unable to create data folders for > phpfreechat.')); > } > > I took this module over from someone else, so I don't fully understand the > use of 'op' here to begin with. Not understanding what it's doing makes it > very hard to rewrite. I've spent the last two hours on the Drupal site > trying to figure it out and I'm boggled. All I can tell is that 'op' was the > default name of buttons in Drupal 5, but I still can't figure out what's > being tested in these "if" statements or how I need to rewrite them for > Drupal 6. Any guidance you can give me would be greatly appreciated! > > - Sheryl > > > -- Sent from my mobile device From sivaji2009 at gmail.com Wed Jan 21 09:19:04 2009 From: sivaji2009 at gmail.com (sivaji j.g) Date: Wed, 21 Jan 2009 14:49:04 +0530 Subject: [development] converting a module from Drupal 5 to Drupal 6 In-Reply-To: <02f601c97b91$30692000$913b6000$@com> References: <1232160960.7409.8.camel@marcus> <1232249993.7409.15.camel@marcus> <02f601c97b91$30692000$913b6000$@com> Message-ID: On Wed, Jan 21, 2009 at 11:56 AM, Sheryl (Permutations Software) ...r how I need to rewrite them for > Drupal 6. Any guidance you can give me would be greatly appreciated! Did you try this ? http://drupal.org/project/deadwood http://drupal.org/project/coder -- Thanks a lot ----------------------------------------- http://ubuntuslave.blogspot.com/ From darthsteven at gmail.com Wed Jan 21 09:25:19 2009 From: darthsteven at gmail.com (Steven Jones) Date: Wed, 21 Jan 2009 09:25:19 +0000 Subject: [development] converting a module from Drupal 5 to Drupal 6 In-Reply-To: References: <1232160960.7409.8.camel@marcus> <1232249993.7409.15.camel@marcus> <02f601c97b91$30692000$913b6000$@com> Message-ID: This is clearly in either a form _submit or _validate handler, so you'll want to read, and understand: http://drupal.org/node/144132#buttons Regards Steven Jones ComputerMinds ltd - Perfect Drupal Websites Phone : 0121 288 0434 Mobile : 07951 270 026 http://www.computerminds.co.uk 2009/1/21 Stewart Robinson : > Hi, > > Op means different things in different places, or at least its values do. > > What function does your copied code come from and do you know the value of op? > > Stew > > On 1/21/09, Sheryl (Permutations Software) wrote: >> I'm converting a module from Drupal 5 to Drupal 6, and I'm having a very >> hard time understanding the change in the use of 'op'. I can't figure out >> how I need to change my code. There are these lines. >> >> if (!empty($form_values['op'])) { >> _phpfreechat_clear_cache(); >> _phpfreechat_clear_cookies(); >> } >> if (!_phpfreechat_check_install()) { >> form_set_error('op', _phpfreechat_not_found()); >> } >> if (!_phpfreechat_check_files()) { >> form_set_error('op', t('Unable to create data folders for >> phpfreechat.')); >> } >> >> I took this module over from someone else, so I don't fully understand the >> use of 'op' here to begin with. Not understanding what it's doing makes it >> very hard to rewrite. I've spent the last two hours on the Drupal site >> trying to figure it out and I'm boggled. All I can tell is that 'op' was the >> default name of buttons in Drupal 5, but I still can't figure out what's >> being tested in these "if" statements or how I need to rewrite them for >> Drupal 6. Any guidance you can give me would be greatly appreciated! >> >> - Sheryl >> >> >> > > -- > Sent from my mobile device > From mike at mikeyp.net Wed Jan 21 10:09:40 2009 From: mike at mikeyp.net (Michael Prasuhn) Date: Wed, 21 Jan 2009 02:09:40 -0800 Subject: [development] converting a module from Drupal 5 to Drupal 6 In-Reply-To: References: <1232160960.7409.8.camel@marcus> <1232249993.7409.15.camel@marcus> <02f601c97b91$30692000$913b6000$@com> Message-ID: On Jan 21, 2009, at 1:11 AM, Stewart Robinson wrote: > Hi, > > Op means different things in different places, or at least its > values do. > > What function does your copied code come from and do you know the > value of op? 'op' doesn't mean anything with forms in Drupal 6. From http://drupal.org/update/modules/ I was able to find this page: http://drupal.org/node/144132 which is titled Drupal 5.x to 6.x form changes. Here are a few excerpts from that page: > $form_state['clicked_button'] > A full copy of the button element that was clicked to submit the > form. This is more reliable than the old $form_values['op'] name, > and also carries any additional information that was placed in the > button element's form definition. and > The 'op' element in the form values is deprecated and should not be > relied upon > As discussed above, each button can have #validate and #submit > functions associated with it. Thus, there should be one button that > submits the form and which invokes the normal $form_id_validate and > $form_id_submit handlers. Any additional buttons which need to > invoke different validate or submit functionality should have button- > specific functions. Note also that the 'op' element in the form > values, corresponding to the button clicked when there are several > in a form in Drupal 5.x, should no longer be relied upon and may not > be present. > -Mike __________________ Michael Prasuhn mike at mikeyp.net http://mikeyp.net From earnie at users.sourceforge.net Wed Jan 21 14:57:19 2009 From: earnie at users.sourceforge.net (Earnie Boyd) Date: Wed, 21 Jan 2009 09:57:19 -0500 Subject: [development] converting a module from Drupal 5 to Drupal 6 In-Reply-To: References: <1232160960.7409.8.camel@marcus> <1232249993.7409.15.camel@marcus> <02f601c97b91$30692000$913b6000$@com> Message-ID: <20090121095719.mbrkf24e1js0kwwg@mail.progw.org> Quoting "sivaji j.g" : > On Wed, Jan 21, 2009 at 11:56 AM, Sheryl (Permutations Software) > ...r how I need to rewrite them for >> Drupal 6. Any guidance you can give me would be greatly appreciated! > > Did you try this ? > > http://drupal.org/project/deadwood > A start in the right direction. It doesn't do everything because it just doesn't know how. For instance you'll need to watch out for those ``if ($may_cache)'' and remove them even thought the deadwood removed the parameter in the goodwood version. > http://drupal.org/project/coder > Coder is a lint helper to give you suggested ideas of how well your code is formatted to the code standard for that Drupal version. Your module will look prettier but it doesn't help the functionality. You will also want http://drupal.org/project/schema on the version 5 side of your conversion if you have tables. The project/schema module can help on the version 6 side if you're developing a new table in say phpMyAdmin and now need to create the schema array for your .install file. -- Earnie http://r-feed.com Make a Drupal difference and review core patches. -- http://for-my-kids.com/ -- http://give-me-an-offer.com/ From sheryl at permutations.com Wed Jan 21 16:27:43 2009 From: sheryl at permutations.com (Sheryl (Permutations Software)) Date: Wed, 21 Jan 2009 11:27:43 -0500 Subject: [development] converting a module from Drupal 5 to Drupal 6 In-Reply-To: References: <1232160960.7409.8.camel@marcus> <1232249993.7409.15.camel@marcus> <02f601c97b91$30692000$913b6000$@com> Message-ID: <033a01c97be5$2fda1b40$8f8e51c0$@com> Stewart Robinson wrote: > Op means different things in different places, or at least its values do. > What function does your copied code come from and do you know the value of op? It's related to the admin form. In phpfreechat.module there is this function: function phpfreechat_settings() { return system_settings_form(_phpfreechat_settings()); } The mystery code is in the function _phpfreechat_settings()in phpfreechat.inc. It's the first three statements. I can't figure out what $form_values['op'] refers to, or what it means if the value is not empty, and I can't figure out how to rewrite form_set_error('op', 'error message') in case of error - I don't see what the error conditions tested have to do with buttons or any other control in the admin form. I have spent hours digging through Drupal docs trying to figure this out - docs for the Drupal 5 API, docs for the changes between Drupal 5 and Drupal 6. I'm not asking for links to these articles. I have them. I'm asking for someone to please give me a substantive answer to these two small questions: (1) What does $form_values['op'] refer to, and what does it mean if the value is not empty. (And how does Drupal 6 code this.) (2) How do I rewrite form_set_error('op', 'error message') for Drupal 6 when it's being set in response to a condition that has nothing at all to do with controls in the form? Thanks. - Sheryl On 1/21/09, Sheryl (Permutations Software) wrote: > I'm converting a module from Drupal 5 to Drupal 6, and I'm having a very > hard time understanding the change in the use of 'op'. I can't figure out > how I need to change my code. There are these lines. > > if (!empty($form_values['op'])) { > _phpfreechat_clear_cache(); > _phpfreechat_clear_cookies(); > } > if (!_phpfreechat_check_install()) { > form_set_error('op', _phpfreechat_not_found()); > } > if (!_phpfreechat_check_files()) { > form_set_error('op', t('Unable to create data folders for > phpfreechat.')); > } > > I took this module over from someone else, so I don't fully understand the > use of 'op' here to begin with. Not understanding what it's doing makes it > very hard to rewrite. I've spent the last two hours on the Drupal site > trying to figure it out and I'm boggled. All I can tell is that 'op' was the > default name of buttons in Drupal 5, but I still can't figure out what's > being tested in these "if" statements or how I need to rewrite them for > Drupal 6. Any guidance you can give me would be greatly appreciated! > > - Sheryl > > From sheryl at permutations.com Wed Jan 21 16:30:35 2009 From: sheryl at permutations.com (Sheryl (Permutations Software)) Date: Wed, 21 Jan 2009 11:30:35 -0500 Subject: [development] converting a module from Drupal 5 to Drupal 6 In-Reply-To: References: <1232160960.7409.8.camel@marcus> <1232249993.7409.15.camel@marcus> <02f601c97b91$30692000$913b6000$@com> Message-ID: <033b01c97be5$96a8c560$c3fa5020$@com> > sivaji j.g wrote: > Did you try this ? > http://drupal.org/project/deadwood > http://drupal.org/project/coder Yes. It was a warning in my code inserted by deadwood that alerted me to the 'op' problem in the first place. But I have been unable to fix it, for reasons previously stated. That's why I wrote to this list asking for help. From sheryl at permutations.com Wed Jan 21 16:32:41 2009 From: sheryl at permutations.com (Sheryl (Permutations Software)) Date: Wed, 21 Jan 2009 11:32:41 -0500 Subject: [development] converting a module from Drupal 5 to Drupal 6 In-Reply-To: References: <1232160960.7409.8.camel@marcus> <1232249993.7409.15.camel@marcus> <02f601c97b91$30692000$913b6000$@com> Message-ID: <033c01c97be5$e1aabc80$a5003580$@com> Steve Jones wrote: > This is clearly in either a form _submit or _validate handler, so you'll want to read, and understand: > http://drupal.org/node/144132#buttons I already read it - multiple times - and it didn't help. I wouldn't have written to this list for help if I hadn't first tried to figure it out on my own and read all the relevant docs. - Sheryl -----Original Message----- From: development-bounces at drupal.org [mailto:development-bounces at drupal.org] On Behalf Of Sheryl (Permutations Software) Sent: Wednesday, January 21, 2009 1:26 AM To: development at drupal.org Subject: [development] converting a module from Drupal 5 to Drupal 6 I'm converting a module from Drupal 5 to Drupal 6, and I'm having a very hard time understanding the change in the use of 'op'. I can't figure out how I need to change my code. There are these lines. if (!empty($form_values['op'])) { _phpfreechat_clear_cache(); _phpfreechat_clear_cookies(); } if (!_phpfreechat_check_install()) { form_set_error('op', _phpfreechat_not_found()); } if (!_phpfreechat_check_files()) { form_set_error('op', t('Unable to create data folders for phpfreechat.')); } I took this module over from someone else, so I don't fully understand the use of 'op' here to begin with. Not understanding what it's doing makes it very hard to rewrite. I've spent the last two hours on the Drupal site trying to figure it out and I'm boggled. All I can tell is that 'op' was the default name of buttons in Drupal 5, but I still can't figure out what's being tested in these "if" statements or how I need to rewrite them for Drupal 6. Any guidance you can give me would be greatly appreciated! - Sheryl From sheryl at permutations.com Wed Jan 21 16:34:44 2009 From: sheryl at permutations.com (Sheryl (Permutations Software)) Date: Wed, 21 Jan 2009 11:34:44 -0500 Subject: [development] converting a module from Drupal 5 to Drupal 6 In-Reply-To: References: <1232160960.7409.8.camel@marcus> <1232249993.7409.15.camel@marcus> <02f601c97b91$30692000$913b6000$@com> Message-ID: <033d01c97be6$2ab04760$8010d620$@com> Please - I don't need links or excerpts from the linked pages. I've read the docs. I can't see how to apply what is written to this module code. Is there anyone here who can add something to what is already in the docs - fill in the missing piece for me? Thank you. -----Original Message----- From: development-bounces at drupal.org [mailto:development-bounces at drupal.org] On Behalf Of Michael Prasuhn Sent: Wednesday, January 21, 2009 5:10 AM To: development at drupal.org Subject: Re: [development] converting a module from Drupal 5 to Drupal 6 On Jan 21, 2009, at 1:11 AM, Stewart Robinson wrote: > Hi, > > Op means different things in different places, or at least its > values do. > > What function does your copied code come from and do you know the > value of op? 'op' doesn't mean anything with forms in Drupal 6. From http://drupal.org/update/modules/ I was able to find this page: http://drupal.org/node/144132 which is titled Drupal 5.x to 6.x form changes. Here are a few excerpts from that page: > $form_state['clicked_button'] > A full copy of the button element that was clicked to submit the > form. This is more reliable than the old $form_values['op'] name, > and also carries any additional information that was placed in the > button element's form definition. and > The 'op' element in the form values is deprecated and should not be > relied upon > As discussed above, each button can have #validate and #submit > functions associated with it. Thus, there should be one button that > submits the form and which invokes the normal $form_id_validate and > $form_id_submit handlers. Any additional buttons which need to > invoke different validate or submit functionality should have button- > specific functions. Note also that the 'op' element in the form > values, corresponding to the button clicked when there are several > in a form in Drupal 5.x, should no longer be relied upon and may not > be present. > -Mike __________________ Michael Prasuhn mike at mikeyp.net http://mikeyp.net From darthsteven at gmail.com Wed Jan 21 16:48:46 2009 From: darthsteven at gmail.com (Steven Jones) Date: Wed, 21 Jan 2009 16:48:46 +0000 Subject: [development] converting a module from Drupal 5 to Drupal 6 In-Reply-To: <033d01c97be6$2ab04760$8010d620$@com> References: <1232160960.7409.8.camel@marcus> <1232249993.7409.15.camel@marcus> <02f601c97b91$30692000$913b6000$@com> <033d01c97be6$2ab04760$8010d620$@com> Message-ID: $form_values['op'] is the '#value' of the clicked button on a form, so I'd guess if it were empty, then then the form hasn't been submitted yet. Regards Steven Jones ComputerMinds ltd - Perfect Drupal Websites Phone : 0121 288 0434 Mobile : 07951 270 026 http://www.computerminds.co.uk 2009/1/21 Sheryl (Permutations Software) : > Please - I don't need links or excerpts from the linked pages. I've read the > docs. I can't see how to apply what is written to this module code. > > Is there anyone here who can add something to what is already in the docs - > fill in the missing piece for me? > > Thank you. > > > -----Original Message----- > From: development-bounces at drupal.org [mailto:development-bounces at drupal.org] > On Behalf Of Michael Prasuhn > Sent: Wednesday, January 21, 2009 5:10 AM > To: development at drupal.org > Subject: Re: [development] converting a module from Drupal 5 to Drupal 6 > > On Jan 21, 2009, at 1:11 AM, Stewart Robinson wrote: >> Hi, >> >> Op means different things in different places, or at least its >> values do. >> >> What function does your copied code come from and do you know the >> value of op? > > > 'op' doesn't mean anything with forms in Drupal 6. > > From http://drupal.org/update/modules/ I was able to find this page: > http://drupal.org/node/144132 > which is titled Drupal 5.x to 6.x form changes. > > Here are a few excerpts from that page: > >> $form_state['clicked_button'] >> A full copy of the button element that was clicked to submit the >> form. This is more reliable than the old $form_values['op'] name, >> and also carries any additional information that was placed in the >> button element's form definition. > > and > >> The 'op' element in the form values is deprecated and should not be >> relied upon >> As discussed above, each button can have #validate and #submit >> functions associated with it. Thus, there should be one button that >> submits the form and which invokes the normal $form_id_validate and >> $form_id_submit handlers. Any additional buttons which need to >> invoke different validate or submit functionality should have button- >> specific functions. Note also that the 'op' element in the form >> values, corresponding to the button clicked when there are several >> in a form in Drupal 5.x, should no longer be relied upon and may not >> be present. >> > > > -Mike > > __________________ > Michael Prasuhn > mike at mikeyp.net > http://mikeyp.net > > > > > > > From sheryl at permutations.com Wed Jan 21 16:57:28 2009 From: sheryl at permutations.com (Sheryl (Permutations Software)) Date: Wed, 21 Jan 2009 11:57:28 -0500 Subject: [development] converting a module from Drupal 5 to Drupal 6 In-Reply-To: <20090121095719.mbrkf24e1js0kwwg@mail.progw.org> References: <1232160960.7409.8.camel@marcus> <1232249993.7409.15.camel@marcus> <02f601c97b91$30692000$913b6000$@com> <20090121095719.mbrkf24e1js0kwwg@mail.progw.org> Message-ID: <034a01c97be9$57f1a360$07d4ea20$@com> Yes, I already did all the things you suggest. I would not have bothered the people on this list with my question if I hadn't already tried hard to find the answer on my own. -----Original Message----- From: development-bounces at drupal.org [mailto:development-bounces at drupal.org] On Behalf Of Earnie Boyd Sent: Wednesday, January 21, 2009 9:57 AM To: development at drupal.org Subject: Re: [development] converting a module from Drupal 5 to Drupal 6 Quoting "sivaji j.g" : > On Wed, Jan 21, 2009 at 11:56 AM, Sheryl (Permutations Software) > ...r how I need to rewrite them for >> Drupal 6. Any guidance you can give me would be greatly appreciated! > > Did you try this ? > > http://drupal.org/project/deadwood > A start in the right direction. It doesn't do everything because it just doesn't know how. For instance you'll need to watch out for those ``if ($may_cache)'' and remove them even thought the deadwood removed the parameter in the goodwood version. > http://drupal.org/project/coder > Coder is a lint helper to give you suggested ideas of how well your code is formatted to the code standard for that Drupal version. Your module will look prettier but it doesn't help the functionality. You will also want http://drupal.org/project/schema on the version 5 side of your conversion if you have tables. The project/schema module can help on the version 6 side if you're developing a new table in say phpMyAdmin and now need to create the schema array for your .install file. -- Earnie http://r-feed.com Make a Drupal difference and review core patches. -- http://for-my-kids.com/ -- http://give-me-an-offer.com/ From sheryl at permutations.com Wed Jan 21 17:34:24 2009 From: sheryl at permutations.com (Sheryl (Permutations Software)) Date: Wed, 21 Jan 2009 12:34:24 -0500 Subject: [development] converting a module from Drupal 5 to Drupal 6 In-Reply-To: References: <1232160960.7409.8.camel@marcus> <1232249993.7409.15.camel@marcus> <02f601c97b91$30692000$913b6000$@com> <033d01c97be6$2ab04760$8010d620$@com> Message-ID: <035201c97bee$80dab6e0$829024a0$@com> Ah! This helps. Thank you!! So in Drupal 6 I would change this to: if ($form_state['submitted'] == false) {} Correct? Now I just have that other mystery: if () { form_set_error('op', _phpfreechat_not_found()); } I'm guessing that this prevents the user from submitting the admin form if the module isn't installed correctly. (I need to confirm by causing the error and seeing what happens in the admin form.) In Drupal 6, how do I set a general form error that is not related to a particular field? Or maybe the question is... In Drupal 6, how do I set a form error tied to the submit button? -----Original Message----- From: development-bounces at drupal.org [mailto:development-bounces at drupal.org] On Behalf Of Steven Jones Sent: Wednesday, January 21, 2009 11:49 AM To: development at drupal.org Subject: Re: [development] converting a module from Drupal 5 to Drupal 6 $form_values['op'] is the '#value' of the clicked button on a form, so I'd guess if it were empty, then then the form hasn't been submitted yet. Regards Steven Jones ComputerMinds ltd - Perfect Drupal Websites Phone : 0121 288 0434 Mobile : 07951 270 026 http://www.computerminds.co.uk From cxjohnson at gmail.com Wed Jan 21 17:36:47 2009 From: cxjohnson at gmail.com (Chris Johnson) Date: Wed, 21 Jan 2009 11:36:47 -0600 Subject: [development] converting a module from Drupal 5 to Drupal 6 In-Reply-To: <034a01c97be9$57f1a360$07d4ea20$@com> References: <1232160960.7409.8.camel@marcus> <1232249993.7409.15.camel@marcus> <02f601c97b91$30692000$913b6000$@com> <20090121095719.mbrkf24e1js0kwwg@mail.progw.org> <034a01c97be9$57f1a360$07d4ea20$@com> Message-ID: <9ea8d6030901210936n5742b216se72576ea2a678f3c@mail.gmail.com> I think 'op' is simply the arbitrary identifier of the element being validated. form_set_error() marks the element on the form with styling (typically appears in red, or with a red asterisk or a red background) when in error, e.g. a required element was left blank. ..chris On Wed, Jan 21, 2009 at 10:57 AM, Sheryl (Permutations Software) wrote: > Yes, I already did all the things you suggest. I would not have bothered the > people on this list with my question if I hadn't already tried hard to find > the answer on my own. > > > -----Original Message----- > From: development-bounces at drupal.org [mailto:development-bounces at drupal.org] > On Behalf Of Earnie Boyd > Sent: Wednesday, January 21, 2009 9:57 AM > To: development at drupal.org > Subject: Re: [development] converting a module from Drupal 5 to Drupal 6 > > Quoting "sivaji j.g" : > >> On Wed, Jan 21, 2009 at 11:56 AM, Sheryl (Permutations Software) >> ...r how I need to rewrite them for >>> Drupal 6. Any guidance you can give me would be greatly appreciated! >> >> Did you try this ? >> >> http://drupal.org/project/deadwood >> > > A start in the right direction. It doesn't do everything because it > just doesn't know how. For instance you'll need to watch out for those > ``if ($may_cache)'' and remove them even thought the deadwood removed > the parameter in the goodwood version. > >> http://drupal.org/project/coder >> > > Coder is a lint helper to give you suggested ideas of how well your > code is formatted to the code standard for that Drupal version. Your > module will look prettier but it doesn't help the functionality. > > You will also want http://drupal.org/project/schema on the version 5 > side of your conversion if you have tables. The project/schema module > can help on the version 6 side if you're developing a new table in say > phpMyAdmin and now need to create the schema array for your .install > file. > > -- > Earnie http://r-feed.com > Make a Drupal difference and review core patches. > > -- http://for-my-kids.com/ -- http://give-me-an-offer.com/ > > > > From darthsteven at gmail.com Wed Jan 21 17:54:11 2009 From: darthsteven at gmail.com (Steven Jones) Date: Wed, 21 Jan 2009 17:54:11 +0000 Subject: [development] converting a module from Drupal 5 to Drupal 6 In-Reply-To: <035201c97bee$80dab6e0$829024a0$@com> References: <1232160960.7409.8.camel@marcus> <1232249993.7409.15.camel@marcus> <02f601c97b91$30692000$913b6000$@com> <033d01c97be6$2ab04760$8010d620$@com> <035201c97bee$80dab6e0$829024a0$@com> Message-ID: Use form_set_error (http://api.drupal.org/api/function/form_set_error/6) and call it with the first parameter as 'NULL', then the error will be set on the form as a whole, not an individual element. Regards Steven Jones ComputerMinds ltd - Perfect Drupal Websites Phone : 0121 288 0434 Mobile : 07951 270 026 http://www.computerminds.co.uk 2009/1/21 Sheryl (Permutations Software) : > Ah! This helps. Thank you!! So in Drupal 6 I would change this to: > > if ($form_state['submitted'] == false) {} > > Correct? > > Now I just have that other mystery: > > if () { > form_set_error('op', _phpfreechat_not_found()); > } > > I'm guessing that this prevents the user from submitting the admin form if > the module isn't installed correctly. (I need to confirm by causing the > error and seeing what happens in the admin form.) > > In Drupal 6, how do I set a general form error that is not related to a > particular field? Or maybe the question is... In Drupal 6, how do I set a > form error tied to the submit button? > > > > -----Original Message----- > From: development-bounces at drupal.org [mailto:development-bounces at drupal.org] > On Behalf Of Steven Jones > Sent: Wednesday, January 21, 2009 11:49 AM > To: development at drupal.org > Subject: Re: [development] converting a module from Drupal 5 to Drupal 6 > > $form_values['op'] is the '#value' of the clicked button on a form, so > I'd guess if it were empty, then then the form hasn't been submitted > yet. > > Regards > Steven Jones > ComputerMinds ltd - Perfect Drupal Websites > > Phone : 0121 288 0434 > Mobile : 07951 270 026 > http://www.computerminds.co.uk > > > From jpetso at gmx.at Wed Jan 21 19:09:03 2009 From: jpetso at gmx.at (Jakob Petsovits) Date: Wed, 21 Jan 2009 20:09:03 +0100 Subject: [development] converting a module from Drupal 5 to Drupal 6 In-Reply-To: References: <1232160960.7409.8.camel@marcus> <035201c97bee$80dab6e0$829024a0$@com> Message-ID: <200901212009.04774.jpetso@gmx.at> On Wednesday, 21. January 2009, Steven Jones wrote: > Use form_set_error > (http://api.drupal.org/api/function/form_set_error/6) and call it with > the first parameter as 'NULL', then the error will be set on the form > as a whole, not an individual element. form_set_error() encloses the error assignment in this if-condition: if (isset($name) && !isset($form[$name])) { (...set the form error...) } which means when the first parameter ($name) is NULL then no error will be set. It seems you need to set the error for any of your form elements, presumably the submit button in your case was used because the submit button was the only element that's remotely suitable for that error. You might use the actual submit button as error target in Drupal 6 (...I think that should work) by doing a form_set_error('mybuttonname', t('message')) or - alternatively, same effect - form_error($form['mybuttonname'], t('message')). Cheers, Jakob From earnie at users.sourceforge.net Wed Jan 21 19:38:36 2009 From: earnie at users.sourceforge.net (Earnie Boyd) Date: Wed, 21 Jan 2009 14:38:36 -0500 Subject: [development] converting a module from Drupal 5 to Drupal 6 In-Reply-To: <033a01c97be5$2fda1b40$8f8e51c0$@com> References: <1232160960.7409.8.camel@marcus> <1232249993.7409.15.camel@marcus> <02f601c97b91$30692000$913b6000$@com> <033a01c97be5$2fda1b40$8f8e51c0$@com> Message-ID: <20090121143836.ok1g69biijhw8cco@mail.progw.org> Quoting "Sheryl (Permutations Software)" : > > (1) What does $form_values['op'] refer to, and what does it mean if the > value is not empty. (And how does Drupal 6 code this.) > > (2) How do I rewrite form_set_error('op', 'error message') for Drupal 6 when > it's being set in response to a condition that has nothing at all to do with > controls in the form? > When I'm debugging forms to understand the structures I use something like drupal_set_message('
' . print_r($form_values, TRUE) . '
') so I can see the contents of the arguments in the callback functions. The first argument of form_set_error should match the form element name being flagged with an error and is used in the form validate function. You might be able to rewrite the form_set_error as ``form_set_error('', 'error message')'' depending on what you need. Also, take the deadwood comments with a grain of salt because the comment could be a false positive based on regular expressions. Deadwood only gives a starting point, it doesn't do the whole job. http://api.drupal.org/api/function/form_set_error/6 http://api.drupal.org/api/file/developer/topics/forms_api.html HTH, -- Earnie http://r-feed.com Make a Drupal difference and review core patches. -- http://for-my-kids.com/ -- http://give-me-an-offer.com/ From sheryl at permutations.com Wed Jan 21 19:55:35 2009 From: sheryl at permutations.com (Sheryl (Permutations Software)) Date: Wed, 21 Jan 2009 14:55:35 -0500 Subject: [development] converting a module from Drupal 5 to Drupal 6 In-Reply-To: <49775AFD.1010500@ChapmanMedia.com> References: <1232160960.7409.8.camel@marcus> <1232249993.7409.15.camel@marcus> <02f601c97b91$30692000$913b6000$@com> <20090121095719.mbrkf24e1js0kwwg@mail.progw.org> <034a01c97be9$57f1a360$07d4ea20$@com> <49775AFD.1010500@ChapmanMedia.com> Message-ID: <039001c97c02$39862040$ac9260c0$@com> Matt Chapman wrote: ------------------------------------------- I might suggest moving this code into a hook_validate and hook_submit as a possible approach, eg: function your_form_name_validate($form, $form_state) { //This assumes that there is a submit buttons called 'submit'. Adapt as per your form. if (!_phpfreechat_check_install()) { form_set_error('submit', _phpfreechat_not_found()); } if (!_phpfreechat_check_files()) { form_set_error('submit', t('Unable to create data folders for phpfreechat.')); } } function your_form_name_submit($form, $form_state) { _phpfreechat_clear_cache(); _phpfreechat_clear_cookies(); } ------------------------------------------- What you have here doesn't jive with what I'm seeing in the docs, so I'm confused. According to the links below, hook_validate does not take $form_state as a parameter: http://drupal.org/node/241364 http://api.drupal.org/api/function/hook_validate Also, you say to name the function "myformname_validate", but I don't see a form name set anywhere. Where do I get the form name? Thanks. - Sheryl From sheryl at permutations.com Wed Jan 21 21:28:41 2009 From: sheryl at permutations.com (Sheryl (Permutations Software)) Date: Wed, 21 Jan 2009 16:28:41 -0500 Subject: [development] converting a module from Drupal 5 to Drupal 6 In-Reply-To: <039001c97c02$39862040$ac9260c0$@com> References: <1232160960.7409.8.camel@marcus> <1232249993.7409.15.camel@marcus> <02f601c97b91$30692000$913b6000$@com> <20090121095719.mbrkf24e1js0kwwg@mail.progw.org> <034a01c97be9$57f1a360$07d4ea20$@com> <49775AFD.1010500@ChapmanMedia.com> <039001c97c02$39862040$ac9260c0$@com> Message-ID: <03a301c97c0f$3b2b58e0$b1820aa0$@com> Apparently the function Matt was talking about is not hook_validate, but _form_validate. That still doesn't have exactly the parameters he showed, but $form_state is one of them. http://api.drupal.org/api/function/_form_validate/6 -----Original Message----- From: development-bounces at drupal.org [mailto:development-bounces at drupal.org] On Behalf Of Sheryl (Permutations Software) Sent: Wednesday, January 21, 2009 2:56 PM To: development at drupal.org Subject: Re: [development] converting a module from Drupal 5 to Drupal 6 Matt Chapman wrote: ------------------------------------------- I might suggest moving this code into a hook_validate and hook_submit as a possible approach, eg: function your_form_name_validate($form, $form_state) { //This assumes that there is a submit buttons called 'submit'. Adapt as per your form. if (!_phpfreechat_check_install()) { form_set_error('submit', _phpfreechat_not_found()); } if (!_phpfreechat_check_files()) { form_set_error('submit', t('Unable to create data folders for phpfreechat.')); } } function your_form_name_submit($form, $form_state) { _phpfreechat_clear_cache(); _phpfreechat_clear_cookies(); } ------------------------------------------- What you have here doesn't jive with what I'm seeing in the docs, so I'm confused. According to the links below, hook_validate does not take $form_state as a parameter: http://drupal.org/node/241364 http://api.drupal.org/api/function/hook_validate Also, you say to name the function "myformname_validate", but I don't see a form name set anywhere. Where do I get the form name? Thanks. - Sheryl From andrewberry at sentex.net Wed Jan 21 21:35:55 2009 From: andrewberry at sentex.net (Andrew Berry) Date: Wed, 21 Jan 2009 16:35:55 -0500 Subject: [development] Writing a test for book_get_books() In-Reply-To: References: <0BE083BA-B0BA-4D04-BC9A-CD9E9236AFC4@sentex.net> Message-ID: <983BA214-A5FB-4330-8021-7CB32BD6B96C@sentex.net> On 21-Jan-09, at 2:33 AM, Steven Jones wrote: > Drupal execute won't work with the batch API, this might be the source > of the problem, there's an issue here: > http://drupal.org/node/297972 > though it hasn't got much attention. Thanks! The latest patch on that allows my test to pass and fail as expected. --Andrew -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2672 bytes Desc: not available Url : http://lists.drupal.org/pipermail/development/attachments/20090121/e46c660f/attachment.bin From sheryl at permutations.com Wed Jan 21 21:38:51 2009 From: sheryl at permutations.com (Sheryl (Permutations Software)) Date: Wed, 21 Jan 2009 16:38:51 -0500 Subject: [development] converting a module from Drupal 5 to Drupal 6 References: <1232160960.7409.8.camel@marcus> <1232249993.7409.15.camel@marcus> <02f601c97b91$30692000$913b6000$@com> <20090121095719.mbrkf24e1js0kwwg@mail.progw.org> <034a01c97be9$57f1a360$07d4ea20$@com> <49775AFD.1010500@ChapmanMedia.com> <039001c97c02$39862040$ac9260c0$@com> Message-ID: <03a401c97c10$a700d3a0$f5027ae0$@com> But (on investigation) it's still the totally wrong function for the job. The code belongs where it is. I just need to update the syntax. -----Original Message----- From: Sheryl (Permutations Software) [mailto:sheryl at permutations.com] Sent: Wednesday, January 21, 2009 4:29 PM To: 'development at drupal.org' Subject: RE: [development] converting a module from Drupal 5 to Drupal 6 Apparently the function Matt was talking about is not hook_validate, but _form_validate. That still doesn't have exactly the parameters he showed, but $form_state is one of them. http://api.drupal.org/api/function/_form_validate/6 -----Original Message----- From: development-bounces at drupal.org [mailto:development-bounces at drupal.org] On Behalf Of Sheryl (Permutations Software) Sent: Wednesday, January 21, 2009 2:56 PM To: development at drupal.org Subject: Re: [development] converting a module from Drupal 5 to Drupal 6 Matt Chapman wrote: ------------------------------------------- I might suggest moving this code into a hook_validate and hook_submit as a possible approach, eg: function your_form_name_validate($form, $form_state) { //This assumes that there is a submit buttons called 'submit'. Adapt as per your form. if (!_phpfreechat_check_install()) { form_set_error('submit', _phpfreechat_not_found()); } if (!_phpfreechat_check_files()) { form_set_error('submit', t('Unable to create data folders for phpfreechat.')); } } function your_form_name_submit($form, $form_state) { _phpfreechat_clear_cache(); _phpfreechat_clear_cookies(); } ------------------------------------------- What you have here doesn't jive with what I'm seeing in the docs, so I'm confused. According to the links below, hook_validate does not take $form_state as a parameter: http://drupal.org/node/241364 http://api.drupal.org/api/function/hook_validate Also, you say to name the function "myformname_validate", but I don't see a form name set anywhere. Where do I get the form name? Thanks. - Sheryl From sheryl at permutations.com Wed Jan 21 22:12:11 2009 From: sheryl at permutations.com (Sheryl (Permutations Software)) Date: Wed, 21 Jan 2009 17:12:11 -0500 Subject: [development] a "form_initialize" function? (was "converting a module from Drupal 5 to Drupal 6") In-Reply-To: <200901212009.04774.jpetso@gmx.at> References: <1232160960.7409.8.camel@marcus> <035201c97bee$80dab6e0$829024a0$@com> <200901212009.04774.jpetso@gmx.at> Message-ID: <03be01c97c15$4ee50880$ecaf1980$@com> I figured out what the module code was trying to do by creating the error. It's actually not well implemented even in Drupal 5, but I don't know if there is a function in Drupal to handle the case. When the administration form for the module is first loaded, the code checks to see if the module has been correctly installed. If it hasn't, it displays an error message at the top of the form. It attributes the error to the submit button just as a convenience. But the user still can see and submit the form. Ideally, there would be a form initialization function that checked that all was well before the form was even displayed. If all was not well, the user would see the error message, but no admin form. I don't see a _form_initialize function anywhere in Drupal. Is it there somewhere and I missed it? If not, it might be a good thing to add. In the meantime, how do I get the name of the submit button so I can use the same technique the module is currently using, but rewritten for Drupal 6? The button is not explicitly defined anywhere in the code - it must be using defaults. Also, according to the Drupal 6 docs, the name for buttons assigned by the system is 'op' - suggesting that the existing code is already correct: http://api.drupal.org/api/file/developer/topics/forms_api_reference.html The following is a list of default values which do not need to be set (found in system_elements): button #name = 'op' #button_type = 'submit' #executes_submit_callback = FALSE #ahah['event'] = 'click' ------------------------------------- Thus this statement is exactly correct for what I want to do, even in Drupal 6: form_set_error('op', 'error text'); Am I missing something here? -----Original Message----- From: development-bounces at drupal.org [mailto:development-bounces at drupal.org] On Behalf Of Jakob Petsovits Sent: Wednesday, January 21, 2009 2:09 PM To: development at drupal.org Subject: Re: [development] converting a module from Drupal 5 to Drupal 6 On Wednesday, 21. January 2009, Steven Jones wrote: > Use form_set_error > (http://api.drupal.org/api/function/form_set_error/6) and call it with > the first parameter as 'NULL', then the error will be set on the form > as a whole, not an individual element. form_set_error() encloses the error assignment in this if-condition: if (isset($name) && !isset($form[$name])) { (...set the form error...) } which means when the first parameter ($name) is NULL then no error will be set. It seems you need to set the error for any of your form elements, presumably the submit button in your case was used because the submit button was the only element that's remotely suitable for that error. You might use the actual submit button as error target in Drupal 6 (...I think that should work) by doing a form_set_error('mybuttonname', t('message')) or - alternatively, same effect - form_error($form['mybuttonname'], t('message')). Cheers, Jakob From cxjohnson at gmail.com Wed Jan 21 23:40:41 2009 From: cxjohnson at gmail.com (Chris Johnson) Date: Wed, 21 Jan 2009 17:40:41 -0600 Subject: [development] a "form_initialize" function? (was "converting a module from Drupal 5 to Drupal 6") In-Reply-To: <03be01c97c15$4ee50880$ecaf1980$@com> References: <1232160960.7409.8.camel@marcus> <035201c97bee$80dab6e0$829024a0$@com> <200901212009.04774.jpetso@gmx.at> <03be01c97c15$4ee50880$ecaf1980$@com> Message-ID: <9ea8d6030901211540v607f55e3s8451728fe5e7e5a7@mail.gmail.com> There has to be a better solution than a form_initialize() hook. This is not criticism directed at you, Sheryl. But I think you've got a use case that should be addressed, assuming there is not an existing way to do it. I may well be ignorant of the proper, Drupal-ish way of handling this situation. ..chris On Wed, Jan 21, 2009 at 4:12 PM, Sheryl (Permutations Software) wrote: > I figured out what the module code was trying to do by creating the error. > It's actually not well implemented even in Drupal 5, but I don't know if > there is a function in Drupal to handle the case. > > When the administration form for the module is first loaded, the code checks > to see if the module has been correctly installed. If it hasn't, it displays > an error message at the top of the form. It attributes the error to the > submit button just as a convenience. But the user still can see and submit > the form. Ideally, there would be a form initialization function that > checked that all was well before the form was even displayed. If all was not > well, the user would see the error message, but no admin form. > > I don't see a _form_initialize function anywhere in Drupal. Is it there > somewhere and I missed it? If not, it might be a good thing to add. > > In the meantime, how do I get the name of the submit button so I can use the > same technique the module is currently using, but rewritten for Drupal 6? > The button is not explicitly defined anywhere in the code - it must be using > defaults. Also, according to the Drupal 6 docs, the name for buttons > assigned by the system is 'op' - suggesting that the existing code is > already correct: > > http://api.drupal.org/api/file/developer/topics/forms_api_reference.html > > The following is a list of default values which do not need to be set (found > in system_elements): > > button > #name = 'op' > #button_type = 'submit' > #executes_submit_callback = FALSE > #ahah['event'] = 'click' > ------------------------------------- > > Thus this statement is exactly correct for what I want to do, even in Drupal > 6: > > form_set_error('op', 'error text'); > > Am I missing something here? > > > > -----Original Message----- > From: development-bounces at drupal.org [mailto:development-bounces at drupal.org] > On Behalf Of Jakob Petsovits > Sent: Wednesday, January 21, 2009 2:09 PM > To: development at drupal.org > Subject: Re: [development] converting a module from Drupal 5 to Drupal 6 > > On Wednesday, 21. January 2009, Steven Jones wrote: >> Use form_set_error >> (http://api.drupal.org/api/function/form_set_error/6) and call it with >> the first parameter as 'NULL', then the error will be set on the form >> as a whole, not an individual element. > > form_set_error() encloses the error assignment in this if-condition: > > if (isset($name) && !isset($form[$name])) { > (...set the form error...) > } > > which means when the first parameter ($name) is NULL then no error will be > set. > It seems you need to set the error for any of your form elements, presumably > > the submit button in your case was used because the submit button was the > only > element that's remotely suitable for that error. > > You might use the actual submit button as error target in Drupal 6 (...I > think > that should work) by doing a form_set_error('mybuttonname', t('message')) or > - > alternatively, same effect - form_error($form['mybuttonname'], > t('message')). > > Cheers, > Jakob > > > From hovercrafter at earthlink.net Wed Jan 21 23:58:11 2009 From: hovercrafter at earthlink.net (Jamie Holly) Date: Wed, 21 Jan 2009 18:58:11 -0500 Subject: [development] a "form_initialize" function? (was "converting a module from Drupal 5 to Drupal 6") In-Reply-To: <9ea8d6030901211540v607f55e3s8451728fe5e7e5a7@mail.gmail.com> References: <1232160960.7409.8.camel@marcus> <035201c97bee$80dab6e0$829024a0$@com> <200901212009.04774.jpetso@gmx.at> <03be01c97c15$4ee50880$ecaf1980$@com> <9ea8d6030901211540v607f55e3s8451728fe5e7e5a7@mail.gmail.com> Message-ID: <4977B693.1010707@earthlink.net> The simple solution: Under the _menu hook where you define the settings page 'page callback'=>'mymodule_setttings_page' Then create that new function function mymodule_settings_page(){ if (!function_to_test_appropriate_installation()){ return "

OOPS you didn't configure your module correctly

"; } return drupal_get_form("mysettings_form_id"); } Jamie Holly Chris Johnson wrote: > There has to be a better solution than a form_initialize() hook. This > is not criticism directed at you, Sheryl. But I think you've got a > use case that should be addressed, assuming there is not an existing > way to do it. I may well be ignorant of the proper, Drupal-ish way of > handling this situation. > > ..chris > > On Wed, Jan 21, 2009 at 4:12 PM, Sheryl (Permutations Software) > wrote: > > I figured out what the module code was trying to do by creating the error. > > It's actually not well implemented even in Drupal 5, but I don't know if > > there is a function in Drupal to handle the case. > > > > When the administration form for the module is first loaded, the code checks > > to see if the module has been correctly installed. If it hasn't, it displays > > an error message at the top of the form. It attributes the error to the > > submit button just as a convenience. But the user still can see and submit > > the form. Ideally, there would be a form initialization function that > > checked that all was well before the form was even displayed. If all was not > > well, the user would see the error message, but no admin form. > > > > I don't see a _form_initialize function anywhere in Drupal. Is it there > > somewhere and I missed it? If not, it might be a good thing to add. > > > > In the meantime, how do I get the name of the submit button so I can use the > > same technique the module is currently using, but rewritten for Drupal 6? > > The button is not explicitly defined anywhere in the code - it must be using > > defaults. Also, according to the Drupal 6 docs, the name for buttons > > assigned by the system is 'op' - suggesting that the existing code is > > already correct: > > > > http://api.drupal.org/api/file/developer/topics/forms_api_reference.html > > > > The following is a list of default values which do not need to be set (found > > in system_elements): > > > > button > > #name = 'op' > > #button_type = 'submit' > > #executes_submit_callback = FALSE > > #ahah['event'] = 'click' > > ------------------------------------- > > > > Thus this statement is exactly correct for what I want to do, even in Drupal > > 6: > > > > form_set_error('op', 'error text'); > > > > Am I missing something here? > > > > > > > > -----Original Message----- > > From: development-bounces at drupal.org [mailto:development-bounces at drupal.org] > > On Behalf Of Jakob Petsovits > > Sent: Wednesday, January 21, 2009 2:09 PM > > To: development at drupal.org > > Subject: Re: [development] converting a module from Drupal 5 to Drupal 6 > > > > On Wednesday, 21. January 2009, Steven Jones wrote: > >> Use form_set_error > >> (http://api.drupal.org/api/function/form_set_error/6) and call it with > >> the first parameter as 'NULL', then the error will be set on the form > >> as a whole, not an individual element. > > > > form_set_error() encloses the error assignment in this if-condition: > > > > if (isset($name) && !isset($form[$name])) { > > (...set the form error...) > > } > > > > which means when the first parameter ($name) is NULL then no error will be > > set. > > It seems you need to set the error for any of your form elements, presumably > > > > the submit button in your case was used because the submit button was the > > only > > element that's remotely suitable for that error. > > > > You might use the actual submit button as error target in Drupal 6 (...I > > think > > that should work) by doing a form_set_error('mybuttonname', t('message')) or > > - > > alternatively, same effect - form_error($form['mybuttonname'], > > t('message')). > > > > Cheers, > > Jakob > > > > > > > > From yang_yi_cn at yahoo.com Thu Jan 22 00:00:05 2009 From: yang_yi_cn at yahoo.com (yi yang) Date: Wed, 21 Jan 2009 16:00:05 -0800 (PST) Subject: [development] a "form_initialize" function? (was "converting a module from Drupal 5 to Drupal 6") In-Reply-To: <9ea8d6030901211540v607f55e3s8451728fe5e7e5a7@mail.gmail.com> Message-ID: <252545.34950.qm@web52504.mail.re2.yahoo.com> I'll do //drupal_get_form('my_form'); function my_form() { ? if (everything_is_ok()) { ??? $form = ... ??? ... ??? return $form; ? } ? else { ?? drupal_set_message("something bad happened."); ?? return array(); ? } } --- On Wed, 1/21/09, Chris Johnson wrote: From: Chris Johnson Subject: Re: [development] a "form_initialize" function? (was "converting a module from Drupal 5 to Drupal 6") To: development at drupal.org Date: Wednesday, January 21, 2009, 3:40 PM There has to be a better solution than a form_initialize() hook. This is not criticism directed at you, Sheryl. But I think you've got a use case that should be addressed, assuming there is not an existing way to do it. I may well be ignorant of the proper, Drupal-ish way of handling this situation. ..chris On Wed, Jan 21, 2009 at 4:12 PM, Sheryl (Permutations Software) wrote: > I figured out what the module code was trying to do by creating the error. > It's actually not well implemented even in Drupal 5, but I don't know if > there is a function in Drupal to handle the case. > > When the administration form for the module is first loaded, the code checks > to see if the module has been correctly installed. If it hasn't, it displays > an error message at the top of the form. It attributes the error to the > submit button just as a convenience. But the user still can see and submit > the form. Ideally, there would be a form initialization function that > checked that all was well before the form was even displayed. If all was not > well, the user would see the error message, but no admin form. > > I don't see a _form_initialize function anywhere in Drupal. Is it there > somewhere and I missed it? If not, it might be a good thing to add. > > In the meantime, how do I get the name of the submit button so I can use the > same technique the module is currently using, but rewritten for Drupal 6? > The button is not explicitly defined anywhere in the code - it must be using > defaults. Also, according to the Drupal 6 docs, the name for buttons > assigned by the system is 'op' - suggesting that the existing code is > already correct: > > http://api.drupal.org/api/file/developer/topics/forms_api_reference.html > > The following is a list of default values which do not need to be set (found > in system_elements): > > button > #name = 'op' > #button_type = 'submit' > #executes_submit_callback = FALSE > #ahah['event'] = 'click' > ------------------------------------- > > Thus this statement is exactly correct for what I want to do, even in Drupal > 6: > > form_set_error('op', 'error text'); > > Am I missing something here? > > > > -----Original Message----- > From: development-bounces at drupal.org [mailto:development-bounces at drupal.org] > On Behalf Of Jakob Petsovits > Sent: Wednesday, January 21, 2009 2:09 PM > To: development at drupal.org > Subject: Re: [development] converting a module from Drupal 5 to Drupal 6 > > On Wednesday, 21. January 2009, Steven Jones wrote: >> Use form_set_error >> (http://api.drupal.org/api/function/form_set_error/6) and call it with >> the first parameter as 'NULL', then the error will be set on the form >> as a whole, not an individual element. > > form_set_error() encloses the error assignment in this if-condition: > > if (isset($name) && !isset($form[$name])) { > (...set the form error...) > } > > which means when the first parameter ($name) is NULL then no error will be > set. > It seems you need to set the error for any of your form elements, presumably > > the submit button in your case was used because the submit button was the > only > element that's remotely suitable for that error. > > You might use the actual submit button as error target in Drupal 6 (...I > think > that should work) by doing a form_set_error('mybuttonname', t('message')) or > - > alternatively, same effect - form_error($form['mybuttonname'], > t('message')). > > Cheers, > Jakob > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/development/attachments/20090121/7e933b35/attachment.htm From darthsteven at gmail.com Thu Jan 22 10:22:59 2009 From: darthsteven at gmail.com (Steven Jones) Date: Thu, 22 Jan 2009 10:22:59 +0000 Subject: [development] HEAD is broken Message-ID: http://drupal.org/node/352121 didn't get committed properly, and HEAD is broken. Just thought everyone should know, that's why tests are failing. Regards Steven Jones ComputerMinds ltd - Perfect Drupal Websites Phone : 0121 288 0434 Mobile : 07951 270 026 http://www.computerminds.co.uk From catch56 at googlemail.com Thu Jan 22 10:54:35 2009 From: catch56 at googlemail.com (Nathaniel Catchpole) Date: Thu, 22 Jan 2009 10:54:35 +0000 Subject: [development] HEAD is broken In-Reply-To: References: Message-ID: I've switched testing.drupal.org off for now. Nat On Thu, Jan 22, 2009 at 10:22 AM, Steven Jones wrote: > http://drupal.org/node/352121 didn't get committed properly, and HEAD > is broken. Just thought everyone should know, that's why tests are > failing. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/development/attachments/20090122/79098a67/attachment.htm From earnie at users.sourceforge.net Thu Jan 22 13:00:09 2009 From: earnie at users.sourceforge.net (Earnie Boyd) Date: Thu, 22 Jan 2009 08:00:09 -0500 Subject: [development] a "form_initialize" function? (was "converting a module from Drupal 5 to Drupal 6") In-Reply-To: <03be01c97c15$4ee50880$ecaf1980$@com> References: <1232160960.7409.8.camel@marcus> <035201c97bee$80dab6e0$829024a0$@com> <200901212009.04774.jpetso@gmx.at> <03be01c97c15$4ee50880$ecaf1980$@com> Message-ID: <20090122080009.0npk8juynbc4o8w0@mail.progw.org> Quoting "Sheryl (Permutations Software)" : > > In the meantime, how do I get the name of the submit button so I can use the > same technique the module is currently using, but rewritten for Drupal 6? Based on the below the button name is 'op'. > The button is not explicitly defined anywhere in the code - it must be using > defaults. Also, according to the Drupal 6 docs, the name for buttons > assigned by the system is 'op' - suggesting that the existing code is > already correct: > > http://api.drupal.org/api/file/developer/topics/forms_api_reference.html > > The following is a list of default values which do not need to be set (found > in system_elements): > > button > #name = 'op' > #button_type = 'submit' > #executes_submit_callback = FALSE > #ahah['event'] = 'click' > ------------------------------------- > > Thus this statement is exactly correct for what I want to do, even in Drupal > 6: > > form_set_error('op', 'error text'); > > Am I missing something here? > Deadwood has given you a false positive; ignore the warning. -- Earnie http://r-feed.com Make a Drupal difference and review core patches. -- http://for-my-kids.com/ -- http://give-me-an-offer.com/ From drupal-devel at webchick.net Thu Jan 22 17:09:31 2009 From: drupal-devel at webchick.net (Angela Byron) Date: Thu, 22 Jan 2009 12:09:31 -0500 Subject: [development] HEAD is broken In-Reply-To: References: Message-ID: <052D93F0-66D4-4032-AE03-23E1E6DC2AF6@webchick.net> /me wears the Dunce Cap of Shame. Sorry guys. :( I had forgotten to cvs add the Locale test module. It's fixed now, and the testing bot is back on. On 22-Jan-09, at 5:54 AM, Nathaniel Catchpole wrote: > I've switched testing.drupal.org off for now. > > Nat > > On Thu, Jan 22, 2009 at 10:22 AM, Steven Jones wrote: > http://drupal.org/node/352121 didn't get committed properly, and HEAD > is broken. Just thought everyone should know, that's why tests are > failing. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/development/attachments/20090122/2028b64c/attachment-0001.htm From darrel.opry at gmail.com Thu Jan 22 19:06:38 2009 From: darrel.opry at gmail.com (Darrel O'Pry) Date: Thu, 22 Jan 2009 14:06:38 -0500 Subject: [development] HEAD is broken In-Reply-To: <052D93F0-66D4-4032-AE03-23E1E6DC2AF6@webchick.net> References: <052D93F0-66D4-4032-AE03-23E1E6DC2AF6@webchick.net> Message-ID: /me shoots the cap off webchick's head with will tell's faulty arrow of forgiveness... On Thu, Jan 22, 2009 at 12:09 PM, Angela Byron wrote: > /me wears the Dunce Cap of Shame. > Sorry guys. :( I had forgotten to cvs add the Locale test module. It's > fixed now, and the testing bot is back on. > > On 22-Jan-09, at 5:54 AM, Nathaniel Catchpole wrote: > > I've switched testing.drupal.org off for now. > > Nat > > On Thu, Jan 22, 2009 at 10:22 AM, Steven Jones wrote: > >> http://drupal.org/node/352121 didn't get committed properly, and HEAD >> is broken. Just thought everyone should know, that's why tests are >> failing. >> >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/development/attachments/20090122/92996a3b/attachment.htm From sjh_drupal at shic.co.uk Thu Jan 22 23:25:21 2009 From: sjh_drupal at shic.co.uk (Steve) Date: Thu, 22 Jan 2009 23:25:21 +0000 Subject: [development] High level request for hints... Message-ID: <49790061.3090509@shic.co.uk> I've decided that I need to create a niche portal for a topic I've recently discovered I find interesting. My ideas are kind-of grand, but - potentially - flexible, too. The topic for my site is expected to be controversial, sometimes subjective - and usually complex... and the grand aim of the site is to establish a collaborative system in which a vast number of external sources can be referenced, summarised, peer reviewed and, in light of constructive criticism, improved. While I expect and accept that opinions will be posted, it is my aim to structure the site such that material backed by supporting evidence (such as a link to a corroborating document elsewhere on the web) 'floats' to be most prominent. I intend the material to my site to be more structured than that contributed to a Wiki... but to be organised more like a Wiki than a forum or a Slashdot clone. As I see it, the primary challenges I'm faced with are: * I need a bespoke ranking system for contributions - each of which needs an attribution, annotations of sources (maybe referencing one or more earlier contributions), peer-reviewed accuracy and relevance scores... where contributors accrue some sort of score relative to the credibility - which determines their influence on rankings. * I need a bespoke strategy to collate contributions so as to create as coherent a collection of data as possible... including both sides of a debate - if one arose. * While I've a few ideas about the broad structure of contributions now, I expect this to evolve during the lifetime of the site. It is essential that the implementation of the site remains flexible. * Each contribution, I think, can be captured on a "form" - including free-text, labels, dates, numbers - etc. - but contributions are likely to have associations... and I need to be able to display these. * I expect topical conversations - and I'd like keywords to link back to the emerging 'consensus' data - and for discussions to prompt enthusiasm and material to expand the more structured data. * Initially, I expect a very small volume of traffic and data - but I need to be able to cope if this were to grow exponentially... I can't justify building a site for 10,000 concurrent users at the outset (when 10 would probably be a coup) but I don't want to paint myself into a technical corner making it difficult to grow the site in future. In essence, I guess, I'm trying to build a self-organising expert-system based upon the contributions from site visitors - guiding and collating the material that emerges. I've fiddled with out-the-box Drupal 6, and I'm very impressed. I suspect that I may need to develop custom modules in order to achieve what I want - but, for obvious reasons, I hope to make maximum use of modules that already exist - where that reduces the burden of development. My main uncertainties at the moment include: * I'm unsure if I should pursue using the CCK - It seems to target something like what I'm trying to achieve using forms - but I'm uncertain if the DBMS schema that emerges will pose later problems... For example, it seems undesirable to have a 'node' for each of my CCK forms... and I'm concerned about scalability with the definition of views. Is it worth my while to persevere with the CCK, or am I best trying to use a custom module and define my own DBMS schema that way? * Should I start from scratch with my ambtious ideas about ranking contributors and their contributions, or is it a better idea to try to extend an existing modules (Karma, for example)? * Is it likely that I can integrate an emerging 'knowledge base' into a pre-existing forum module, or will I need to embrace/extend - or write my own? I'd be very interested to receive comments from those better versed in Drupal than I am... of all the frameworks I've researched - it shows the most hope... yet quite a lot of hurdles remain. I'd love to know if Drupal is already deployed to run a site with a structure similar to that I've described. I'd also appreciate hints as to suitable books... I've got "Pro Drupal Development" - the Apress one - but that seems to assume I know when I need to write a module, and how it fits into the wider scheme of existing modules. I'm wondering if there is something that covers topics such as making most effective use of the CCK and views... online tutorials seem somewhat ad-hock... if I'm going to use CCK then, I suspect, I'll need to think carefully about the DBMS schema to support later collation. Any pointers and/or hints gratefully received... Steve From hovercrafter at earthlink.net Fri Jan 23 13:59:28 2009 From: hovercrafter at earthlink.net (Jamie Holly) Date: Fri, 23 Jan 2009 08:59:28 -0500 Subject: [development] libxml2 2.7.1 Breaks BlogAPI Message-ID: <4979CD40.3050305@earthlink.net> This is more of a heads up. I have had a couple of people contact me that they can't use blogapi on their sites. They are hosted with different companies. Then I had someone using Wordpress tell me the same thing. It turns out there is a bug in libxml2 2.7.1 that is stripping out the opening <. More info can be found on this Wordpress ticket: http://trac.wordpress.org/ticket/7771 And it appears that the CVS of libxml 2has been fixed: http://bugs.php.net/bug.php?id=45996 It appears that as hosting companies are updating then they are breaking xmlrpc (and any other module that might rely on libxml2). I figured I would throw out a warning in case we see an increase in support or tickets on this. -- Jamie Holly From matt at mattfarina.com Fri Jan 23 14:14:57 2009 From: matt at mattfarina.com (matt at mattfarina.com) Date: Fri, 23 Jan 2009 06:14:57 -0800 Subject: [development] libxml2 2.7.1 Breaks BlogAPI In-Reply-To: <4979CD40.3050305@earthlink.net> References: <4979CD40.3050305@earthlink.net> Message-ID: <20090123061457.v454eagilcgs8k8w@webmail.mattfarina.com> I wonder if this issue is what broke the drupal planet. Quoting Jamie Holly : > This is more of a heads up. I have had a couple of people contact me > that they can't use blogapi on their sites. They are hosted with > different companies. Then I had someone using Wordpress tell me the > same thing. It turns out there is a bug in libxml2 2.7.1 that is > stripping out the opening <. > > More info can be found on this Wordpress ticket: > > http://trac.wordpress.org/ticket/7771 > > And it appears that the CVS of libxml 2has been fixed: > > http://bugs.php.net/bug.php?id=45996 > > It appears that as hosting companies are updating then they are > breaking xmlrpc (and any other module that might rely on libxml2). I > figured I would throw out a warning in case we see an increase in > support or tickets on this. > > -- > Jamie Holly From sheryl at permutations.com Fri Jan 23 16:22:45 2009 From: sheryl at permutations.com (Sheryl (Permutations Software)) Date: Fri, 23 Jan 2009 11:22:45 -0500 Subject: [development] how to fix a cvs branching error? In-Reply-To: <20090122080009.0npk8juynbc4o8w0@mail.progw.org> References: <1232160960.7409.8.camel@marcus> <035201c97bee$80dab6e0$829024a0$@com> <200901212009.04774.jpetso@gmx.at> <03be01c97c15$4ee50880$ecaf1980$@com> <20090122080009.0npk8juynbc4o8w0@mail.progw.org> Message-ID: <010e01c97d76$d30590a0$7910b1e0$@com> I made an error when I created the branch for the 6.x version of the phpFreeChat module, and I need advice on how to fix it. FYI... I'm using TortoiseCVS. I can log in on the command line if absolutely necessary, but I will need "type this" style instructions because I'm a CVS novice - which is why I made the mistake in the first place. Here's the problem... I created a branch called DRUPAL-6--1. And then (here's the mistake) before committing the new files I created a tag called DRUPAL-6--1-0. I then committed the new files to the branch and went to the project page to release the new version. I had a choice between the new branch or the new tag, which confused me. I chose the tag (wrong). This resulted in the 5.x-1.3 files (latest version of DRUPAL-5 branch) being placed in the DRUPAL-6--1-0 download. Someone reported the problem and I realized my mistake. So I created a new tag called DRUPAL-6--1.1 and released this. That worked, since this time the tag was created AFTER uploading the new files to the DRUPAL-6--1 branch. On the Drupal site, all appears well. 6.x-1.1 is shown as the current recommended release and it has the correct files. BUT... if you install the module, go to the Drupal admin panel, and select Reports-Updates, it says that phpfreechat 6.x-1.0 is the recommended version, with the warning that "no available releases are found". I don't have the faintest idea why it says that or how to fix it. Please advice. - Sheryl From sheryl at permutations.com Fri Jan 23 20:41:52 2009 From: sheryl at permutations.com (Sheryl (Permutations Software)) Date: Fri, 23 Jan 2009 15:41:52 -0500 Subject: [development] how to fix a cvs branching error? In-Reply-To: <010e01c97d76$d30590a0$7910b1e0$@com> References: <1232160960.7409.8.camel@marcus> <035201c97bee$80dab6e0$829024a0$@com> <200901212009.04774.jpetso@gmx.at> <03be01c97c15$4ee50880$ecaf1980$@com> <20090122080009.0npk8juynbc4o8w0@mail.progw.org> <010e01c97d76$d30590a0$7910b1e0$@com> Message-ID: <01ff01c97d9b$05f1b7e0$11d527a0$@com> If I have asked about this in the wrong place, could you tell me where I should report the problem? It mentioned in the CVS tutorials that there's a CVS webmaster who can fix problems, but I don't know how to contact that person. Thanks. -----Original Message----- From: development-bounces at drupal.org [mailto:development-bounces at drupal.org] On Behalf Of Sheryl (Permutations Software) Sent: Friday, January 23, 2009 11:23 AM To: development at drupal.org Subject: [development] how to fix a cvs branching error? I made an error when I created the branch for the 6.x version of the phpFreeChat module, and I need advice on how to fix it. FYI... I'm using TortoiseCVS. I can log in on the command line if absolutely necessary, but I will need "type this" style instructions because I'm a CVS novice - which is why I made the mistake in the first place. Here's the problem... I created a branch called DRUPAL-6--1. And then (here's the mistake) before committing the new files I created a tag called DRUPAL-6--1-0. I then committed the new files to the branch and went to the project page to release the new version. I had a choice between the new branch or the new tag, which confused me. I chose the tag (wrong). This resulted in the 5.x-1.3 files (latest version of DRUPAL-5 branch) being placed in the DRUPAL-6--1-0 download. Someone reported the problem and I realized my mistake. So I created a new tag called DRUPAL-6--1.1 and released this. That worked, since this time the tag was created AFTER uploading the new files to the DRUPAL-6--1 branch. On the Drupal site, all appears well. 6.x-1.1 is shown as the current recommended release and it has the correct files. BUT... if you install the module, go to the Drupal admin panel, and select Reports-Updates, it says that phpfreechat 6.x-1.0 is the recommended version, with the warning that "no available releases are found". I don't have the faintest idea why it says that or how to fix it. Please advice. - Sheryl From darrenoh at sidepotsinternational.com Fri Jan 23 20:50:21 2009 From: darrenoh at sidepotsinternational.com (Darren Oh) Date: Fri, 23 Jan 2009 15:50:21 -0500 Subject: [development] how to fix a cvs branching error? In-Reply-To: <01ff01c97d9b$05f1b7e0$11d527a0$@com> References: <1232160960.7409.8.camel@marcus> <035201c97bee$80dab6e0$829024a0$@com> <200901212009.04774.jpetso@gmx.at> <03be01c97c15$4ee50880$ecaf1980$@com> <20090122080009.0npk8juynbc4o8w0@mail.progw.org> <010e01c97d76$d30590a0$7910b1e0$@com> <01ff01c97d9b$05f1b7e0$11d527a0$@com> Message-ID: <53BDE387-F929-4C02-9AD7-D05B851104A6@sidepotsinternational.com> You can't fix this yourself if you've already created a release from the tag. Try http://drupal.org/project/webmasters for help. On Jan 23, 2009, at 3:41 PM, Sheryl (Permutations Software) wrote: > If I have asked about this in the wrong place, could you tell me > where I > should report the problem? It mentioned in the CVS tutorials that > there's a > CVS webmaster who can fix problems, but I don't know how to contact > that > person. > > Thanks. > > > -----Original Message----- > From: development-bounces at drupal.org [mailto:development-bounces at drupal.org > ] > On Behalf Of Sheryl (Permutations Software) > Sent: Friday, January 23, 2009 11:23 AM > To: development at drupal.org > Subject: [development] how to fix a cvs branching error? > > I made an error when I created the branch for the 6.x version of the > phpFreeChat module, and I need advice on how to fix it. > > FYI... I'm using TortoiseCVS. I can log in on the command line if > absolutely > necessary, but I will need "type this" style instructions because > I'm a CVS > novice - which is why I made the mistake in the first place. > > Here's the problem... > > I created a branch called DRUPAL-6--1. And then (here's the mistake) > before > committing the new files I created a tag called DRUPAL-6--1-0. I then > committed the new files to the branch and went to the project page to > release the new version. I had a choice between the new branch or > the new > tag, which confused me. I chose the tag (wrong). This resulted in the > 5.x-1.3 files (latest version of DRUPAL-5 branch) being placed in the > DRUPAL-6--1-0 download. > > Someone reported the problem and I realized my mistake. So I created > a new > tag called DRUPAL-6--1.1 and released this. That worked, since this > time the > tag was created AFTER uploading the new files to the DRUPAL-6--1 > branch. On > the Drupal site, all appears well. 6.x-1.1 is shown as the current > recommended release and it has the correct files. > > BUT... if you install the module, go to the Drupal admin panel, and > select > Reports-Updates, it says that phpfreechat 6.x-1.0 is the recommended > version, with the warning that "no available releases are found". I > don't > have the faintest idea why it says that or how to fix it. > > Please advice. > > - Sheryl From yuval at avramzon.net Sat Jan 24 21:44:59 2009 From: yuval at avramzon.net (Yuval Hager) Date: Sat, 24 Jan 2009 23:44:59 +0200 Subject: [development] libxml2 2.7.1 Breaks BlogAPI In-Reply-To: <4979CD40.3050305@earthlink.net> References: <4979CD40.3050305@earthlink.net> Message-ID: <200901242344.59493.yuval@avramzon.net> On Friday 23 January 2009, Jamie Holly wrote: > This is more of a heads up. I have had a couple of people contact me > that they can't use blogapi on their sites. They are hosted with > different companies. Then I had someone using Wordpress tell me the same > thing. It turns out there is a bug in libxml2 2.7.1 that is stripping > out the opening <. > > More info can be found on this Wordpress ticket: > > http://trac.wordpress.org/ticket/7771 > > And it appears that the CVS of libxml 2has been fixed: > > http://bugs.php.net/bug.php?id=45996 > > It appears that as hosting companies are updating then they are breaking > xmlrpc (and any other module that might rely on libxml2). I figured I > would throw out a warning in case we see an increase in support or > tickets on this. The bug is somewhere in between PHP and libxml2. I had encountered the same issue yesterday while programming to Google Checkout XML API. For those of you running your own environments, the bug was fixed when I upgraded (Gentoo revision numbers) to: * php-5.2.8-r2 * libxml2-2.7.2-r2 Cheers, -- Yuval Hager -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part. Url : http://lists.drupal.org/pipermail/development/attachments/20090124/279e8dd3/attachment.pgp From barry at jaspan.org Sat Jan 24 23:57:30 2009 From: barry at jaspan.org (Barry Jaspan) Date: Sat, 24 Jan 2009 18:57:30 -0500 Subject: [development] Field API! Review it, or forever hold your peace. Message-ID: <7.0.1.0.2.20090124183656.0410e2a8@jaspan.org> After a year of thought and (intermittent) work, the Drupal 7 Field API is very nearly a reality. The recent Fields in Core code sprint at Acquia was a great success and got us "over the hump" on the this project. Since then, the team has been working on finishing up the loose ends standing between us and the initial commit. The Field API is going to *replace* CCK's database functionality in D7 and beyond. If you think this might affect your Drupal-ish future, now would be a good time to review it and chime in with your opinion. If you choose not to, don't come complaining to me later. :-) You will probably find the Fields in Core Code Sprint Final Report a useful introduction: http://drupal.org/node/361042. I've set up a handy-dandy page describing the best way(s) to help: http://drupal.org/node/361849. To start you off in the right direction, though, here's a tip: the best two ways to help out RIGHT NOW are to review the Field API documentation (http://drupal.org/node/362764) and the current proposed Field API patch (http://drupal.org/node/361683). Note that the patch Field API patch is not in a ready-to-commit state yet but it is close and the key elements are all in place. You can also try out the CCK UI, but you'll have to get it directly from CVS contrib. Yes, this means that CCK will probably be ready on the day D7 is released. Yay for that. Thanks, Barry From development at robuustdesign.nl Sun Jan 25 08:51:53 2009 From: development at robuustdesign.nl (Stefan Nagtegaal) Date: Sun, 25 Jan 2009 09:51:53 +0100 Subject: [development] Field API! Review it, or forever hold your peace. In-Reply-To: <7.0.1.0.2.20090124183656.0410e2a8@jaspan.org> References: <7.0.1.0.2.20090124183656.0410e2a8@jaspan.org> Message-ID: Are there any screencasts of the proposed functionality, or screendumps of the user interface? Stefan Op 25 jan 2009, om 00:57 heeft Barry Jaspan het volgende geschreven: > After a year of thought and (intermittent) work, the Drupal 7 Field > API is very nearly a reality. The recent Fields in Core code sprint > at Acquia was a great success and got us "over the hump" on the this > project. Since then, the team has been working on finishing up the > loose ends standing between us and the initial commit. > > The Field API is going to *replace* CCK's database functionality in > D7 and beyond. If you think this might affect your Drupal-ish > future, now would be a good time to review it and chime in with your > opinion. If you choose not to, don't come complaining to me > later. :-) > > You will probably find the Fields in Core Code Sprint Final Report a > useful introduction: http://drupal.org/node/361042. > > I've set up a handy-dandy page describing the best way(s) to help: http://drupal.org/node/361849 > . > > To start you off in the right direction, though, here's a tip: the > best two ways to help out RIGHT NOW are to review the Field API > documentation (http://drupal.org/node/362764) and the current > proposed Field API patch (http://drupal.org/node/361683). Note that > the patch Field API patch is not in a ready-to-commit state yet but > it is close and the key elements are all in place. > > You can also try out the CCK UI, but you'll have to get it directly > from CVS contrib. Yes, this means that CCK will probably be ready > on the day D7 is released. Yay for that. > > Thanks, > > Barry > From mistknight at gmail.com Sun Jan 25 13:41:54 2009 From: mistknight at gmail.com (Ashraf Amayreh) Date: Sun, 25 Jan 2009 15:41:54 +0200 Subject: [development] taxonomy defaults based on URL arguments Message-ID: Hello All, I was just thinking of creating a module that assigns default taxonomies inside a node add form based on arguments in the URL, for example: ?q=node/add/page/5/6/7/8 Where 5 and 7 would be vocabularies and 6 and 8 would be the respective desired values to be chosen in the vocab drop downs. The reason for this is that sometimes I want different taxonomies to be chosen by default depending on where I reach the node add form from. I searched for similar modules but they didn't quite implement this functionality as far as I could tell. This should be an extremely simple module to implement, I've done it so many times I felt it just warrants a simple module. So, are there any similar modules available? -- Ashraf Amayreh http://aamayreh.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/development/attachments/20090125/3cb38fbc/attachment.htm From syscrusher at 4th.com Sun Jan 25 16:36:34 2009 From: syscrusher at 4th.com (Syscrusher) Date: Sun, 25 Jan 2009 11:36:34 -0500 Subject: [development] Field API! Review it, or forever hold your peace. In-Reply-To: <7.0.1.0.2.20090124183656.0410e2a8@jaspan.org> References: <7.0.1.0.2.20090124183656.0410e2a8@jaspan.org> Message-ID: <1232901394.7409.154.camel@marcus> On Sat, 2009-01-24 at 18:57 -0500, Barry Jaspan wrote: > The Field API is going to *replace* CCK's database functionality in > D7 and beyond. If you think this might affect your Drupal-ish > future, now would be a good time to review it and chime in with your > opinion. If you choose not to, don't come complaining to me > later. :-) Thanks very much for the heads-up on this. I am just starting my first CCK-related project (today, coincidentally!), and this was perfect timing. I will review this carefully and probably chime in with some comments (possibly just "this looks fine as-is") later this week. :-) > > You can also try out the CCK UI, but you'll have to get it directly > from CVS contrib. Yes, this means that CCK will probably be ready on > the day D7 is released. Yay for that. Does this mean that if I also build CCK functionality for D6 into my project that there will be an automated update path for site admins to the D7 version with functionality in core? Given what you have said in your post, I will probably choose to develop for D7 and back-port all or part of the functionality to D6. Kind regards, Scott -- Syscrusher From larry at garfieldtech.com Sun Jan 25 17:21:45 2009 From: larry at garfieldtech.com (Larry Garfield) Date: Sun, 25 Jan 2009 11:21:45 -0600 Subject: [development] taxonomy defaults based on URL arguments In-Reply-To: References: Message-ID: <200901251121.45660.larry@garfieldtech.com> I don't know of any for taxonomy, but quicksketch just released a CCK widget for nodereference that does something similar. It could be worth looking into. http://drupal.org/project/nodereference_url I would suggest being more flexible with your path string, though. You want to be able to allow multiple terms to be added in the same vocabulary easily. On Sunday 25 January 2009 7:41:54 am Ashraf Amayreh wrote: > Hello All, > > I was just thinking of creating a module that assigns default taxonomies > inside a node add form based on arguments in the URL, for example: > > ?q=node/add/page/5/6/7/8 > > Where 5 and 7 would be vocabularies and 6 and 8 would be the respective > desired values to be chosen in the vocab drop downs. > > The reason for this is that sometimes I want different taxonomies to be > chosen by default depending on where I reach the node add form from. I > searched for similar modules but they didn't quite implement this > functionality as far as I could tell. > > This should be an extremely simple module to implement, I've done it so > many times I felt it just warrants a simple module. So, are there any > similar modules available? -- Larry Garfield larry at garfieldtech.com From Greg at GrowingVentureSolutions.com Sun Jan 25 18:26:35 2009 From: Greg at GrowingVentureSolutions.com (Greg Knaddison) Date: Sun, 25 Jan 2009 11:26:35 -0700 Subject: [development] taxonomy defaults based on URL arguments In-Reply-To: References: Message-ID: <3861c6770901251026r24df4e17h27c941fd3c0a44af@mail.gmail.com> On Sun, Jan 25, 2009 at 6:41 AM, Ashraf Amayreh wrote: > I was just thinking of creating a module that assigns default taxonomies > inside a node add form based on arguments in the URL, for example: > > ?q=node/add/page/5/6/7/8 > > Where 5 and 7 would be vocabularies and 6 and 8 would be the respective > desired values to be chosen in the vocab drop downs. There is http://drupal.org/project/prepopulate which probably does what you want (but with much longer URLs). One note if you do decide to implement this: term ID values are unique so there is no need to specify the vocab that is the container of the term ID. Greg -- Greg Knaddison http://knaddison.com | 303-800-5623 | http://growingventuresolutions.com From drupal at dave-cohen.com Mon Jan 26 19:36:40 2009 From: drupal at dave-cohen.com (David Cohen) Date: Mon, 26 Jan 2009 11:36:40 -0800 Subject: [development] how to display an extremely large document Message-ID: <1232998600.12149.1296837501@webmail.messagingengine.com> I'm building a site to support a very large outline of legal cases. There are thousands of nodes in the outline, each with a very small amount of text. The outline is about 5 or 6 levels deep. I've written some code to import the outline into the book module. So the book hierarchy reflects the outline and the node bodies contain these small chunks of text. I'd like to display the entire outline in a single page. This is not practical because of the overall size. Still I'd like the user to feel as if they are scrolling through the entire thing, not visiting thousands of different pages. My idea is to use AJAX to accomplish this. Imagine how google maps works (start somewhere but scroll to anywhere, use ajax to refresh the view after the scroll). I'd like the same thing for arbitrary HTML. In other words the browser starts with mostly placeholder divs and a small amount of content. As the user scrolls around, the placeholders get replaced with real content. And the real content which scrolls out of view gets cleaned up so the browser does not run out of memory. Has anyone encountered such a thing? Or would be interested in collaborating on it? Any reason why it would not work? Thanks, -Dave From hovercrafter at earthlink.net Mon Jan 26 19:49:37 2009 From: hovercrafter at earthlink.net (Jamie Holly) Date: Mon, 26 Jan 2009 14:49:37 -0500 Subject: [development] how to display an extremely large document In-Reply-To: <1232998600.12149.1296837501@webmail.messagingengine.com> References: <1232998600.12149.1296837501@webmail.messagingengine.com> Message-ID: <497E13D1.7080205@earthlink.net> I haven't seen anything done like this in Drupal (not saying something doesn't exist that I just missed), but a good example would actually be Google Reader. It loads content as you scroll the window down through AJAX. I have actually thought about using this on sites that get a bunch of comments. Load say 50 at a time, then have the next 50 auto-load as the user gets closer to the bottom of the page. Jamie Holly David Cohen wrote: > I'm building a site to support a very large outline of legal cases. > There are thousands of nodes in the outline, each with a very small > amount of text. The outline is about 5 or 6 levels deep. I've written > some code to import the outline into the book module. So the book > hierarchy reflects the outline and the node bodies contain these small > chunks of text. > > I'd like to display the entire outline in a single page. This is not > practical because of the overall size. Still I'd like the user to feel > as if they are scrolling through the entire thing, not visiting > thousands of different pages. > > My idea is to use AJAX to accomplish this. Imagine how google maps > works (start somewhere but scroll to anywhere, use ajax to refresh the > view after the scroll). I'd like the same thing for arbitrary HTML. In > other words the browser starts with mostly placeholder divs and a small > amount of content. As the user scrolls around, the placeholders get > replaced with real content. And the real content which scrolls out of > view gets cleaned up so the browser does not run out of memory. > > Has anyone encountered such a thing? Or would be interested in > collaborating on it? Any reason why it would not work? > > Thanks, > > -Dave > > > From ben at hyperdimensional.net Mon Jan 26 20:25:46 2009 From: ben at hyperdimensional.net (Ben Steele) Date: Mon, 26 Jan 2009 20:25:46 +0000 Subject: [development] how to display an extremely large document In-Reply-To: <497E13D1.7080205@earthlink.net> References: <1232998600.12149.1296837501@webmail.messagingengine.com> <497E13D1.7080205@earthlink.net> Message-ID: <6d2181d60901261225j1ee6abb4u958b7bc8cf7706ac@mail.gmail.com> You could try this tutorial - http://www.webresourcesdepot.com/load-content-while-scrolling-with-jquery/ - it implements infinite scrolling with jquery. It's ASP, but shouldn't be too difficult to get something like this working in Drupal. I haven't tried it myself, so I don't know whether it's doable. 2009/1/26 Jamie Holly > I haven't seen anything done like this in Drupal (not saying something > doesn't exist that I just missed), but a good example would actually be > Google Reader. It loads content as you scroll the window down through AJAX. > I have actually thought about using this on sites that get a bunch of > comments. Load say 50 at a time, then have the next 50 auto-load as the user > gets closer to the bottom of the page. > > Jamie Holly > > > > > David Cohen wrote: > >> I'm building a site to support a very large outline of legal cases. There >> are thousands of nodes in the outline, each with a very small >> amount of text. The outline is about 5 or 6 levels deep. I've written >> some code to import the outline into the book module. So the book >> hierarchy reflects the outline and the node bodies contain these small >> chunks of text. >> >> I'd like to display the entire outline in a single page. This is not >> practical because of the overall size. Still I'd like the user to feel >> as if they are scrolling through the entire thing, not visiting >> thousands of different pages. >> >> My idea is to use AJAX to accomplish this. Imagine how google maps >> works (start somewhere but scroll to anywhere, use ajax to refresh the >> view after the scroll). I'd like the same thing for arbitrary HTML. In >> other words the browser starts with mostly placeholder divs and a small >> amount of content. As the user scrolls around, the placeholders get >> replaced with real content. And the real content which scrolls out of >> view gets cleaned up so the browser does not run out of memory. >> >> Has anyone encountered such a thing? Or would be interested in >> collaborating on it? Any reason why it would not work? >> >> Thanks, >> >> -Dave >> >> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/development/attachments/20090126/99b8b590/attachment.htm From earnie at users.sourceforge.net Mon Jan 26 20:35:16 2009 From: earnie at users.sourceforge.net (Earnie Boyd) Date: Mon, 26 Jan 2009 15:35:16 -0500 Subject: [development] how to display an extremely large document In-Reply-To: <497E13D1.7080205@earthlink.net> References: <1232998600.12149.1296837501@webmail.messagingengine.com> <497E13D1.7080205@earthlink.net> Message-ID: <20090126153516.9o1ixfnfmtcwkw80@mail.progw.org> Quoting Jamie Holly : > I haven't seen anything done like this in Drupal (not saying > something doesn't exist that I just missed), but a good example would > actually be Google Reader. It loads content as you scroll the window > down through AJAX. I have actually thought about using this on sites > that get a bunch of comments. Load say 50 at a time, then have the > next 50 auto-load as the user gets closer to the bottom of the page. > Jamie, you probably want panels and views. > Jamie Holly > > > > David Cohen wrote: >> I'm building a site to support a very large outline of legal cases. >> There are thousands of nodes in the outline, each with a very small >> amount of text. The outline is about 5 or 6 levels deep. I've written >> some code to import the outline into the book module. So the book >> hierarchy reflects the outline and the node bodies contain these small >> chunks of text. >> I've used http://drupal.org/project/relativity to create outlines. It allows you to associate existing nodes to the relative mapping or create new children. >> I'd like to display the entire outline in a single page. This is not >> practical because of the overall size. Still I'd like the user to feel >> as if they are scrolling through the entire thing, not visiting >> thousands of different pages. >> It doesn't display on a single page but you can create a menu of items and the page presents child and parent links. >> My idea is to use AJAX to accomplish this. Imagine how google maps >> works (start somewhere but scroll to anywhere, use ajax to refresh the >> view after the scroll). I'd like the same thing for arbitrary HTML. In >> other words the browser starts with mostly placeholder divs and a small >> amount of content. As the user scrolls around, the placeholders get >> replaced with real content. And the real content which scrolls out of >> view gets cleaned up so the browser does not run out of memory. >> I haven't attempted using AJAX. It may be possible to create a view from the relative mapping table and show the outline in a panel. >> Has anyone encountered such a thing? Or would be interested in >> collaborating on it? Any reason why it would not work? >> I don't no of any reason why it shouldn't work. -- Earnie http://r-feed.com Make a Drupal difference and review core patches. -- http://for-my-kids.com/ -- http://give-me-an-offer.com/ From mike at mikeyp.net Mon Jan 26 21:25:00 2009 From: mike at mikeyp.net (Michael Prasuhn) Date: Mon, 26 Jan 2009 13:25:00 -0800 Subject: [development] how to display an extremely large document In-Reply-To: <1232998600.12149.1296837501@webmail.messagingengine.com> References: <1232998600.12149.1296837501@webmail.messagingengine.com> Message-ID: <374DBD35-088C-4538-A6B8-55E4E883B33C@mikeyp.net> http://drupal.org/project/endless_page __________________ Michael Prasuhn mike at mikeyp.net http://mikeyp.net From sirkitree at gmail.com Wed Jan 28 15:00:59 2009 From: sirkitree at gmail.com (Jerad Bitner) Date: Wed, 28 Jan 2009 07:00:59 -0800 Subject: [development] Nodecomment module up for grabs Message-ID: <215a89c90901280700v461668c6x62353eeac9944f27@mail.gmail.com> Nodecomment module does just what it says, provides comments as nodes. I originally took over the project just to port it to D6 for my company at the time, but now I really have no use for it. I'm actually surprised people still find use for it in D6 because all of my reasons for using it have disappeared with Views2 and the comment support that other modules have upheld. There's still quite a few people using it but I have no time to dedicate to it (haven't for a while and I appologise for letting the issue queue get a bit out of hand). If anyone is interested in taking it up, please let me know off-list. Otherwise it'll find itself unmaintained again. Thanks, ~Jerad -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/development/attachments/20090128/9f67ccf5/attachment.htm From rob at robshouse.net Wed Jan 28 19:00:36 2009 From: rob at robshouse.net (Robert Douglass) Date: Wed, 28 Jan 2009 20:00:36 +0100 Subject: [development] Nodecomment module up for grabs In-Reply-To: <215a89c90901280700v461668c6x62353eeac9944f27@mail.gmail.com> References: <215a89c90901280700v461668c6x62353eeac9944f27@mail.gmail.com> Message-ID: This code might be instructive for anyone who wants to move comments to nodes in core. See: http://ca.tchpole.net/node/8 Robert Douglass The RobsHouse.net Newsletter: http://robshouse.net/newsletter/robshousenet-newsletter Follow me on Twitter: http://twitter.com/robertDouglass On Jan 28, 2009, at 4:00 PM, Jerad Bitner wrote: > Nodecomment module does just what it says, provides comments as > nodes. I originally took over the project just to port it to D6 for > my company at the time, but now I really have no use for it. I'm > actually surprised people still find use for it in D6 because all of > my reasons for using it have disappeared with Views2 and the comment > support that other modules have upheld. There's still quite a few > people using it but I have no time to dedicate to it (haven't for a > while and I appologise for letting the issue queue get a bit out of > hand). > > If anyone is interested in taking it up, please let me know off- > list. Otherwise it'll find itself unmaintained again. > > Thanks, > ~Jerad From aldo at caonao.cu Thu Jan 29 15:56:48 2009 From: aldo at caonao.cu (Aldo Martinez Selleras) Date: Thu, 29 Jan 2009 10:56:48 -0500 Subject: [development] avatar library Message-ID: <200901291056.49022.aldo@caonao.cu> where can i find a avatar library for use with avatar modules related?? -- ---------------------- Aldo Martinez Selleras Especialista en Telematica CITMATEL GND Camaguey Tel: 53 32 291661 Linux User #364356