00:06:44 loggy has joined #openacs 00:06:44 topic is: Welcome to the OpenACS Helpline | http://www.openacs.org/ 00:06:44 Users on #openacs: loggy markd2 AaronSw abbaJ KarlL rbm chump shagster 00:06:44 This channel is logged: http://www.blogspace.com/openacs/chatlogs/ and blogged: http://www.thedesignexperience.org/openacs/ircblog 00:07:24 loggy loggy fo foggy bananna fanna bo boggy. me mi mo moggy. loggy! 00:38:55 markd2 has left #openacs 01:14:14 davb has joined #OpenACS 02:11:22 davb has quit 03:45:43 abbaJ has quit 05:09:03 chump has quit 05:12:18 wtem has joined #openacs 05:12:29 howdy 05:13:04 anyone available for some pl-pgsql debugging fun? 05:14:03 chump has joined #openacs 05:15:00 hey chump 05:15:05 hah 05:16:58 damn 05:17:47 after fixing this bit of pl-pgsql i'm basically done with the photo-album... 05:18:22 and noone's around to help me fix what is probably a stupid mistake on my part, damn 05:42:44 abbaJ has joined #openacs 06:05:53 xemacs5 has joined #openacs 06:18:09 xemacs5 has quit 06:48:04 wtem has quit 08:44:25 ola has joined #openacs 10:03:31 alekhine has joined #openacs 10:03:35 hello 10:07:20 when will openacs go with java? 10:07:33 or perhaps PHP? 10:07:44 tcl is a strange language for webdevelopment 10:21:28 OpenACS won't go with java anytime soon but ACS 4.6/5.0 is written in java and they will release a postgres version in October, I believe. 10:25:40 why do you think tcl is strange for web developement? 10:31:25 re 10:32:36 well, because tcl was never meant for webdevelopment and therefore lacks functionalities to do complex stuff 10:32:42 like regular expression 10:36:50 the way arsdigita validate email addresses is so primitive 10:39:58 aha. you mean the regexp? 10:40:54 yes 10:42:39 ACS with PHP would be cool 10:43:01 I am having trouble with the install of the new ACS with Java 10:43:31 my motivation dropped 10:43:43 now I'm looking for a new framework :) 10:43:55 you guys happen to know another good framework? 10:47:40 dunno a thing about ACS java, sorry. noone's stopping you from porting ACS to PHP;-) 10:48:01 can't do that on my own :) 10:48:09 I'm also new to ACS :) 11:13:13 I'm glad I found ACS/OpenACS so I never have to look for another framework:-) 11:13:29 It works well enough for me... 11:15:27 ola, how flexible is ACS/OpenACS? 11:15:38 can you show a sample site that you've done? 11:16:19 hmm. I've only done one site thus far: infogettable.net 11:16:28 okay, checking :) 11:16:55 let's play a game:-) 11:17:02 :) 11:17:41 did it help decreasing the development time? 11:17:50 and did you have to tweak a lot? 11:18:40 well, I couldn't have done it without OpenACS or a similar tool. 11:19:15 I tweaked it somewhat but not so much. 11:19:38 cool 11:19:42 well 11:19:47 the page doesn't work well 11:20:09 but that's probably because you didn't spend enough to on tweaking :) 11:20:21 this is done with OpenACS 3.2.5. - 4.0 is much more interesting. 11:20:45 ola, is it easy to install openacs? 11:20:49 what doesn't work? 11:21:13 ola, try to search in the forum 11:21:14 fairly easy. takes about a day. 11:21:51 :) 11:22:05 ok. things could have been tweaked better... 11:23:47 have you ever write some functionalities upon the default features? 11:24:04 and how does that go? 11:24:07 flexible? 11:24:08 :) 11:26:12 alekhine has quit 11:26:41 yes I wrote a whole module for backgammon using a range of useful built-in procedures. 11:28:53 darn. noone wants to play with me:-( 11:30:47 til has joined #openacs 11:37:27 alekhine has joined #openacs 11:37:29 :) 11:37:33 wrong button :) 11:39:57 if you know how to play backgammon you can go to the "player pool" and choose to play against me. 11:40:19 you'll have to register with my site, though. 11:41:33 the game is turn based, so I need your correct email to send notifications when it's your turn. 11:44:51 (or icq#) 12:24:31 :) 12:24:32 re 12:24:33 sorry 12:24:36 I don't know how to play 12:24:42 and I'm not in the mood :) 12:24:55 doing a new site for a hotel 13:04:04 xemacs5 has joined #openacs 13:07:02 rbm has quit 13:08:59 rbm has joined #openacs 13:09:33 moo 13:10:24 moo to you toooooo 13:10:33 * shagster steals rbm's call, hopes it is not a GPL violation 13:11:33 I have an openacs install that is giving me some problems 13:11:45 what version of openacs? 13:11:48 davb has joined #openacs 13:12:00 morning davb 13:12:27 3.2.5, with the internationalization patches 13:12:39 specifically the ecommerce module 13:12:47 Hmm, I haven't tried that international.... patches... 13:14:03 that's ok, I will hang around some more... everything else about the software is working properly 13:15:32 I thought the internationalization (phew) was in aolserver ad patches. 13:15:53 I am using the patches from Henry Minsky 13:16:13 patches to acs? 13:16:49 yes, see www.ai.mit.edu/users/hqm/openacs, i think that is the proper url 13:20:00 that url is wrong. 13:20:37 ok, hold on, will get the right one 13:22:04 replace users with people in the above URL 13:25:25 got it now? 13:25:44 Yes. that reminds me, I must learn japanese some day. 13:28:11 I would like to learn it as well, but haven't found the time yet 14:10:44 markd2 has joined #openacs 14:11:16 âllo 14:17:10 hello 14:17:45 hi Mark, do you have any familiarity with internationalization issues? 14:22:42 markd2 has quit 14:28:11 * davb is having fun converting flat file database to relational... 14:29:13 davb has a wierd definition of "fun" 14:32:10 I am trying to convince myself its fun. Luckily it has infinite duplication with no consistency 14:39:29 how far would you get on a 10GB/month transfer limit with an OACS4 site? 14:39:45 enough for a small site? a big site? 14:39:52 about 10000 MB's 14:40:04 hehe 14:40:43 Depends, alot of graphics and file downloads? I think 10GB is like 56kbs average over 1 month. 14:40:57 ok, really it depends on how much graphics you have 14:41:17 one site I have done work for has a HUGE 125k home page 14:41:27 and they do about 1GB per month traffic 14:41:53 another site has smaller graphics, they do about 5GB due to much higher traffic 14:42:40 You have to figure out have many visitors/page views and the average page size. 14:43:15 xemacs5: how many hits are we talking about, per day? 14:43:23 you can get a decent amount of users and traffic with 10GB 14:43:34 I don't have access to their logs, so I can't tell you that 14:44:07 if you have 10GB transfer, you can certainly get started and run for a few months 14:44:16 cool 14:44:30 when a customer's site of mine got slashdotted, they sent out 2GB in about 14 hours 14:45:05 my oh my. 14:45:05 Get a host that doens't rip you off if you go over. 14:46:13 Psychephylax has joined #openacs 14:46:14 I still do it by sustained usage, this GB month is BS in my book 14:46:21 ahoy maties 14:46:42 hey Psychephylax 14:46:46 full disclosure: xemacs5 = patrick@zill.net = www.zill.net, which does hosting of Openacs 14:46:47 Hey 14:47:26 hey dave and others 14:47:44 hey psyche 14:47:47 * shagster does hosting too, I'll hosting anything :) 14:50:27 xemacs5: I wondered who you were. guess I asked at the right moment;-) 14:51:26 :-) 14:54:59 ugh...*reminds himself of what he has to figure out now*...permissions 14:54:59 now you know... 14:55:36 anyone have that "Permissions tediously explained" link handy? 15:00:06 this: http://www.thedesignexperience.org/openacs/ircblog is broken 15:00:17 or at least slow to respond 15:00:31 the price per transfered GB seems fairly standardized here among co-location companies. 15:00:41 davb has quit 15:00:51 about 10$/GB. damn those cartels.. 15:01:22 but wait! this seems cheap. 15:02:00 davb has joined #openacs 15:02:20 lol 15:02:30 my charges are $5 per GB over included bandwidth 15:02:49 not bad. 15:02:52 expect bandwidth charges to drop further 15:03:04 in maybe 6 months, my prediction anyways 15:03:22 psyche: http://openacs.org/new-file-storage/download/permissions-notes-vadim.html?version_id=229 15:03:47 Psychephylax 15:03:50 thanks Ola 15:03:51 Works ok for me. 15:03:59 yeah it timed out the first time 15:04:12 Crappy ISP. 15:07:12 mine? or the hosting one? 15:07:33 Mine. The hosting one. 15:07:48 oh ok 15:08:06 Also slow machine. 15:08:47 My pentium 200 server with 32mb ram can serve up static pages alot faster than the 500Mhz AMD 256MB ram OpenACS machine. 15:10:26 Aha. I am out of RAM according to top. Must be aolserver. 15:10:28 hehe 15:10:40 time to drop down to single user and back :) 15:11:12 * Psychephylax enjoys the tingling superior caffeeinated taste of Dr. Pepper 15:17:25 * davb wonders if its AOLserver 3.2+ad12 and nsvhr. 15:17:42 I have 20 nsd's running and 7 postmasters. 15:18:02 I think its time to spring for some more RAM. 15:19:11 there's a memory leak in ad12, I think. 15:19:12 how much do you have? 15:19:48 AHA! 15:19:57 the contexts are hierarchial 15:20:38 huh? 15:20:50 I'm reading the permissions thing 15:20:59 ah. 15:21:03 There is a top level object 15:21:08 and all other objects are it's children 15:21:33 And if you grant someone read on that object, they can automatically read/write/etc on all the children 15:22:03 And of course, if you go down the tree and grand permissions there, you can read/write/etc below but not above 15:22:29 Now this dude is speaking my language: "As Rafael Schloming 15:22:30 put it so aptly, Oracle can't deal with hierarchies for shit. " 15:22:40 We need more textbooks like that 15:22:41 heh 15:23:17 we need more people like Rafael Schloming. 15:23:23 indeed 15:23:49 If I still all the nsds will I get the RAM back from a memoery leak? 15:24:15 s/still/KILL 15:24:15 and of course, there's inheritance....... 15:24:53 right, an object can inherit its permissions frm the parent, or not. 15:25:03 no, it's lost in a black hole;-) 15:25:08 Dave, it should get rid of the memory leak but you gotta wait until the OS reclaims the memory 15:25:43 Aha. I wonder how long that takes. So that is the secret of "You computer will be restarted now" 15:26:03 lol 15:26:17 Dave, I usually drop down to single user mode, then exit it 15:26:39 frees up all the memory, kills all the zombies and such 15:26:58 it's like brushing teeth without having to go to the dentist :) 15:27:13 dentist = evil = reboot/shutdown 15:27:44 11:36AM up 64 days, 1:33, 1 user, load averages: 0.00, 0.00, 0.00 15:27:46 :) 15:29:42 aha 15:29:47 I need to define my own privileges 15:33:20 grant yourself write on /bin/laden and erase it... 15:33:56 i'd rather have the execute one 15:35:08 anyone good with sed? 15:36:58 i want to edit the output and replace "file or directory" with "terrorist" 15:38:30 argh. My server won't restart. It closed, but its not starting back up. 15:38:35 AOLserver that is. 15:38:43 did you drop down to single user mode? 15:39:05 nope. 15:39:09 Perhaps I should. 15:39:15 Too bad I don't know what to type... 15:39:17 indeed you should 15:39:20 shutdown now 15:39:25 then when it exits 15:39:27 type "exit" 15:39:33 to go back to multi 15:39:59 I am accessing this machine remotely. I suspect that won't work. 15:40:09 heh 15:40:14 i suspect so either 15:40:21 how remote is it? 15:40:33 15 miles or so. 15:40:36 heh 15:40:42 you can always do shutdown -r now 15:40:44 The other AOLserver restarted fine. 15:41:58 Weird. The two other servers restarted fine. The OpenACS one is the only one that's screwed up. 15:42:16 any errors? 15:42:36 Not in the log. It says it shut down. But nothing else every goes into the log. 15:42:52 hmmm 15:42:56 just reboot it then 15:43:27 chump has quit 15:43:38 There it goes 15:43:54 it was up for 45 days or so. 15:44:26 chump has joined #openacs 15:45:57 * ola prays for davb's server to boot 15:46:01 oh yeah, it was a memory leak 15:46:10 49MB used. 15:48:20 you might bypass the leak by setting minthreads = maxthreads 15:49:20 probably not a bad idea. I am going to upgrade to aolserver 3.3 with jerry's patch. 15:49:58 Where do I put that in my config file? 15:50:12 And is 50 too many? 15:50:41 In ns/server/servername I think 15:51:39 but you don't need that with 3.3ad13 15:51:51 Ok. 15:51:57 only 3.2ad12 15:53:42 Has anyone used 3.3+ad12 with the nsvhr patch? 15:53:50 3.3+ad13 that is. 15:55:43 yes, I have tried it out. not in production, though. 15:56:16 I will let you know. 15:56:26 ok 15:57:36 aha 15:58:34 that's the way, aha, aha...... 15:58:38 * Psychephylax puts out a cookie for Mark... 15:58:48 He'll be here shortly 15:58:53 argh! I can't download aolserver because arsdigita.com redirects my to HTTPS and I am in lynx. 15:59:05 d'oh :( 16:00:05 davd: I can email it to you. 16:00:17 Thanks. dave@thedesignexperience.org 16:00:30 This "Permissions Tediously Explained" doc is good...now it actually makes sense to me 16:01:08 * Psychephylax recalls his Set Theory knowledge 16:01:31 I remember sitting in class saying "When the hell am I ever going to use that.... 16:01:38 * Psychephylax realizes - The time has come 16:03:01 later guys 16:03:05 alekhine has quit 16:04:40 What does "nuke this group" do? 16:05:52 I think it removes all traces of the group from the database. 16:06:32 hmmm 16:07:03 Ok, I'm gonna write an e-mail to this guy asking him to rewrite every Computer Science book I have read 16:07:14 With his explanations, stuff is actually VERY clear 16:07:16 The above script would never get around to deleting this entry because it had to loop through a gazillion rows in 16:07:16 the humongous acs_object_party_privilege_map view. 16:07:28 makes sense to me! 16:07:57 The textbook way of saying the same thing: 16:09:45 This code is not the recommended way of executing a deletion due to the time constraints of the database 16:09:51 grr. the darn thing is too big to attach..what to do? 16:10:00 how big is it? 16:10:14 ~3400 16:10:24 3.4 gigs? 16:10:37 damn! 16:10:39 I think rbm has it somewhere.. 16:10:50 Is it 3.4 megs? 16:10:53 Really? You can't attach it? It pays you have your own mail server. 16:10:59 no, megs 16:11:13 well, 3400 megs = 3.4 gigs :) 16:11:21 approximately of course 16:11:25 stupid metric system 16:11:28 3.4 MB 16:11:32 ok 16:11:35 give me the link 16:12:53 it's my friggin webmail.. 16:13:14 you want 3.3+ad13 16:13:16 Run you own. Qmail is cool. 16:13:19 Yes, please. 16:13:22 k 16:13:34 I don't know how to attach in emacs client 16:14:43 my neither I use mutt. 16:15:20 here ya go -> http://www.sinc.sunysb.edu/Stu/nblyumbe/aolserver-src.tar.gz 16:15:53 works? 16:16:19 hey, fast server! 16:16:19 yippee! 16:16:35 :) 16:16:39 OC4 16:16:41 ack 16:16:42 OC3 16:16:57 ~84kB/sec 16:17:01 pshhh 16:17:06 my cable modem goes that fast 16:17:07 lol 16:17:14 uploading 16:17:20 sorry...~84kb/sec 16:17:21 * davb hates Psychephylax's cable modem too. 16:17:30 :) 16:17:39 ok 16:17:46 I read permissions tediously explained 16:17:48 Mine is still DLing, Cheap DSL. 16:17:51 got more permissions info? 16:18:26 The rest of the secrets are encodeding the the code. Hey when you figure it out, right a howto for the rest of us :) 16:19:35 right 16:19:36 :P 16:19:44 * ola wonders when his DocBook howto will be done 16:20:17 The O'Reilly docbook book is free online now. 16:21:34 12KB/s. Cheapskates. They actually are limiting the bandwidth. 16:21:43 who? 16:21:48 DSL ISP. 16:21:50 yes. it's quite good, but too extensive 16:22:02 Cool. I didn't know if you had read it. 16:24:49 ok 16:25:00 You guys are familiar with /admin stuff at all? 16:25:22 in what way? I have used the pages, but not looked at the code. 16:25:52 ok 16:25:58 that's what I need help with..the pages 16:26:20 I see: Site Map, Groups, Group Types, Relational Segments and Relationship types 16:26:46 I hope Jerry hasn't run out of patches.. I downloaded a few erlier.... 16:26:49 :-) 16:27:12 I think you can simplify that to just what you application needs. That is the full-features engineer interface. 16:27:19 ola: I took the last one. 16:27:55 Now, correct me if I'm wrong but the default ACS install has 2 parties 16:28:00 administrator and main site member 16:29:43 sounds good to me. 16:29:47 Dave, what's the difference between "Group types" and "Groups" 16:30:11 no idea. Probably an extra layer of permissions. 16:30:30 So that you can have two groups inside a group type with similar basic permssions. 16:30:56 The group system is very complex. The whole ACS is overengineered for the worst possible case application. 16:31:38 But it is flexible and powerful. The impossible takss are possible and the simple tasks are incredibly complex. 16:31:42 yeah they should have given a slimmer interface depending on needs 16:31:53 That's your job :) 16:32:05 heh 16:32:11 so how do I define a group? 16:32:17 We need a war stories bboard for OpenACS 4. 16:32:47 war stories? 16:33:09 ok 16:33:11 Yeah like all the hell you went through actually building a site. Pratical experiences. 16:33:19 yeah 16:33:23 that's a good idea 16:33:42 this way you can look at the info the other person read to get an idea of things 16:33:46 Psychephylax: to define a group first add a group type 16:33:53 What is the "Application Groups"? 16:33:54 and then add a group of this type 16:34:23 in a group type you can define attributes that groups of this type will have 16:34:47 ok, so I just added a supervisors group 16:35:20 ok 16:35:26 and defined a group SNMP Supervisor 16:35:49 til, can you explain the attribute things a bit? 16:35:54 i think you need to decide which group type you new group belongs to 16:37:28 so I have (Group) <-- Supervisor (Group type) <--SNMP Supervisors (group) 16:37:31 add a group type - you will see that there you can define attributes that can be used to characterize groups of this type 16:38:41 like what kind of attributes? 16:39:12 i think if there will only be one group of this type and you dont need attributes then you could just make your snmp supervisors a group of a pre-existing type 16:40:26 i'm going to have: manager, supervisor, user, admin 16:40:31 admin is the openacs default 16:40:44 user is the openacs regular member 16:40:52 The manager is above a supervisor 16:41:08 Cool 3.3+ad13 nsvhr works! 16:41:12 And the special privileges of supervisors and managers is that they can create users 16:43:25 ah, group types can have child group types, like inherited classes. quite confusing at the beginning. the default group type "Groups" has a child "Application Groups" 16:44:05 right 16:44:11 What is this Application Groups? 16:44:24 don't know what Application Groups is for 16:44:34 Look at it. Does it have any extra attributes? 16:44:46 define a new group type and you will see what is meant by attributes (i am still thinking for an example) 16:44:47 Not sure how to look that up 16:44:57 Click on it. 16:44:57 i did define a new group type 16:45:02 Supervisor 16:45:24 oh i c 16:45:27 Attributes: 16:45:33 Group name 16:45:34 til has quit 16:45:48 til has joined #openacs 16:46:01 markd2 has joined #openacs 16:46:05 aha! 16:46:24 You must have been far away from the computer...this cookie *points* has been waiting for you for quiet a while 16:46:32 I felt a disturbance in the force 16:46:50 :) 16:46:57 I smelled the rum 16:47:03 heh 16:47:06 Ahoy Matey! 16:47:13 arrrrrrrrr 16:47:25 til, I see what attributes are used for 16:47:46 here's a question for you 16:47:56 I am not quiet clear on this 16:48:26 Do I define my groups like Supervisor, Manager using sql code in my package-create.sql script or do I do this through OpenACS 16:48:46 or can I technically do both... 16:49:21 if ya want the package to be reusable, do it in the sql script 16:49:34 e.g. you deploy your package in a production environemt, or sell it to someone 16:49:57 or donate your smntp pacakge to openacs :-) 16:50:28 ok 16:50:57 * ola wonders why AD has started running downloads via https 16:50:58 Well, for now, I'll use the simpler UI 16:51:25 they've moved our intranet to https only / more frequent logins 16:51:33 so the download may have gotten sucked under that umbrella 16:51:52 maybe drop the webmonsters a note - I can imagine they don't want to be serving big files with https 16:51:53 aha 16:52:37 quick question 16:52:41 I have a group 16:52:44 Supervisor 16:53:08 But i'm not exactly sure what I check against to see if a memeber is in that group 16:53:13 How can I find this info out? 16:53:30 * Psychephylax flashes a cookie to peak Mark's interest 16:53:50 s/memeber/member 16:55:49 You don't. 16:56:11 Then how am I supposed to check to see if the user belongs to that group before serving him a page? 16:56:13 You grant permissions on an object to that group. 16:56:30 Then do ad_permission_p to see if that user has permission. 16:56:36 ok 16:56:41 how do I grant him permissions? 16:56:48 in the user interface that is 16:56:48 Aha. 16:57:10 I don't know if there is a UI for that. 16:57:26 I think each package has its own UI for permissions. 16:57:33 hmmmm 16:57:54 You should just do it all in an SQL file. What if your server dies and you need to reinstall the package. 16:58:52 well, I am not 100% sure on how to do it in an sql file yet either 16:59:04 You need the acs_permissions.grant_permission 16:59:06 davb: do you know that, with new nsvhr, it is now possible to add/remove hosts without restarting the server? 16:59:08 i was hoping that I can get some insight on how ACS does it first, then do it in an SQL file myself 16:59:17 ola: no. thats cool. 16:59:33 I think the permissions stuff is centralized 16:59:39 I should read the doc for something before running it on my production server huh? 17:00:05 KarlL has quit 17:00:12 KarlL has joined #openacs 17:01:49 awww, live on the edge! 17:01:53 Psychephylax: "To give a user permission to perform a particular operation on a particular object you call acs_permission.grant_permission like this: 17:01:53 acs_permission.grant_permission ( 17:01:53 object_id => some_object_id, 17:01:53 grantee_id => some_party_id, 17:01:53 privilege => 'some_privilege_name' 17:01:54 ); 17:01:57 17:02:08 thats in doc/permissions.html 17:02:41 hmmm 17:02:49 ok 17:02:50 I have that 17:03:06 * Psychephylax shows his code 17:03:14 declare 17:03:14 v_group_id integer; 17:03:14 default_context acs_objects.object_id%TYPE; 17:03:14 begin 17:03:20 default_context := acs.magic_object_id('default_context'); 17:03:20 select count(group_id) into v_group_id 17:03:20 from groups 17:03:32 where group_name='Manager'; 17:03:32 17:03:32 if v_group_id = 0 then 17:03:32 v_group_id :=acs_group.new (group_name => 'Manager'); 17:03:32 else 17:03:33 select group_id into v_group_id from groups where group_name='Manager'; 17:03:35 end if; 17:03:58 acs_privilege.create_privilege ( 'manager' ); 17:03:58 acs_privilege.add_child( 'manager' ); 17:03:58 17:03:58 acs_permission.grant_permission( default_context, v_group_id, 'manager'); 17:03:58 end; 17:04:09 * davb goes to lunch 17:04:33 d'oh 17:05:54 See, shouldn't my code cause ACS to show that there are Managers when I go to Groups or Group types? 17:15:46 hmmmm 17:17:38 not sure. 17:18:29 talli has joined #openacs 17:18:29 they are being stored 17:18:34 Hey talli 17:18:36 hey 17:18:37 Hi talli. 17:18:57 whoa. xemacs is here! call RMS!!! this is GPL land, buddy! 17:19:07 hey daev 17:19:15 lol 17:19:17 I am not sure what you are trying to create with acs_privilige.create_privilege('manager') 17:19:59 The privileges are read,write,create,delete,admin... 17:20:12 create a new privilege? 17:20:35 Ok. I get it now. 17:21:20 You need to actually add something in add_child though. ('manager', 'read') etc... 17:22:29 Are you trying to give permission for managers to create other users under their level? 17:24:19 Psychephylax check out the cms-permssions.sql inside the CMS package. It is doing the kind of thing you want, only alot more of it. 17:24:35 yes! 17:24:56 where's the cms-permissions.sql? 17:25:11 in the cms package - an extra download 17:25:14 in the CMS package. You probably have to check it out. 17:25:33 I have the cms package 17:25:44 its int he sql/oracle directory 17:25:50 found it :) 17:25:52 * Psychephylax reads 17:26:20 but yes, Dave, I need to ive permission for managers to create other users 17:26:21 under their level? 17:26:31 as well as their own 17:26:36 managers can create other managers 17:26:43 but supervisors can only create regular users 17:27:11 wow...Comments... 17:28:36 Aha. 17:31:13 hmmm 17:31:21 not very good comments but ok...at least some comments 17:34:02 ok 17:34:10 is it me or is there no acs_privilege api? 17:34:21 No results found 17:34:47 acs_privilige 17:34:51 ? 17:35:00 yeah 17:35:17 ugh. I hope it's not spelled privilige. 17:35:19 acs_privilege.create_privilege('cm_admin', 'Administrator', 'Administrators'); 17:35:49 i tried looking for acs_privilege and create_privilege in both PL/SQL api and in TCL api and found nothing 17:35:58 weird. 17:36:11 yeah 17:36:50 see 17:36:53 my stuff is indeed there 17:36:54 acs_permission.grant 17:36:57 cd /web/cookies; find . -name "*.sql" -exec grep acs_privilege {} \; -print 17:36:57 GROUP_ID GROUP_NAME 17:36:57 ---------- ---------- 17:36:57 -2 Registered 17:36:57 Users 17:36:57 2177 Super User 17:36:58 2180 Manager 17:37:00 2183 Supervisor 17:37:02 2239 Main Site 17:37:04 Parties 17:37:04 no wiat. thats for permission. 17:37:06 2324 SNMP Super 17:37:08 visor 17:37:51 is there a way to find out if a user is in a group_id? 17:38:16 \q 17:38:18 oops 17:39:44 Psychephylax: i think you need to look into the relationships stuff that is related to groups and permissions. 17:40:52 Read that 17:41:23 see, the problem is that the docs talk about how the system works in general 17:41:40 like the hierarchy of parties and how groups relate to each other 17:41:54 That's not the problem I have :/ it's the coding part 17:42:02 right. 17:43:33 Heh 17:43:48 I just need some documentation on Roles and I think I got everything covered 17:49:05 Yeah! My query does not require a connect by or similar structure. 17:49:18 woo hoo! 17:53:51 0k 17:55:15 markd2 has left #openacs 17:55:29 hrmmm 17:55:41 so would I have to create my own context? 18:00:31 Is there like a history type thing in Oracle? 18:02:25 interesting 18:02:29 very very interesting 18:04:20 very^3 interesting 18:04:20 talli has quit 18:05:13 lol 18:05:21 well 18:05:27 my sql stuff definetly does work 18:05:34 excellent 18:05:45 I see my entries in all these places that according to the docs define relationships 18:05:46 BUT 18:05:58 It still does not answer the question of "WHY does it not work" 18:06:22 and the fact that I don't know oracle is not helping 18:06:32 I'm building queries that are like 8 times longer than mark can make 18:06:46 It is possible that OpenACS is broken. 18:07:00 Well, that doesn't help me very much! :p 18:07:19 OpenACS better have a job for me when I get fired from here for not providing working stuff! :P 18:07:32 It will work. Don't worry. 18:07:44 deadlines!! deadlines!!!!!! 18:07:51 Not yours...mine! :P 18:08:00 That's why I wish they gave me something to code on my own 18:08:06 not pick through stuff someone already coded for me 18:08:52 Is it possible to create a query that does not stop? 18:08:58 Like an infinite loop type deal? 18:09:05 Probably. 18:09:16 lol 18:09:20 Yeah, I bet that doesn't help either. 18:09:27 nope 18:09:47 Ask a question on the bboard. People are actually using ACS 4 and OpenACS 4. 18:09:52 Just not any of us yet... 18:11:30 5100 rows selected. 18:11:39 not too bad. 18:12:10 davb: what did you do on ETP? 18:14:07 you added keyword functionality, didn't you? 18:16:55 yes. I am still working on it. 18:17:15 I'm sure this is very useful, but, can you explain how? 18:17:57 * Psychephylax shouts 18:17:59 Well, basically I created procs to assign keywords to the content items. Basically its a UI. All the functions are in the CR 18:18:02 Write a how-to! 18:18:14 When I am done... good idea. 18:18:31 BLURB: DavB will write a how-to-categorize your package 18:18:31 A: DavB will write a how-to-categorize your package from davb 18:19:23 oops. need a
in there. 18:20:04 is it something like tags for search engines? 18:20:47 no. Well you could do that if you wanted to in a template. 18:21:06 It is for internal ACS use. I think the search package might use them, maybe not. 18:21:21 ok. 18:21:22 so what bboard should I post into? 18:21:41 aand, what should I tell them to bypass all the "read the 'Permissions tediously explained'" answers 18:21:55 Yeah, nicely though. 18:22:30 Hopefully someone who has used the system will be able to point you in the right direction. 18:22:52 i don't get it though 18:23:00 If you guys are porters how come you're not running 4? 18:23:02 ola: there is a table of keywords cr_keywords and a map cr_content_keyword_map or something like that. 18:23:16 We are way to busy to fool with the group system. 18:23:25 I only have 1 user. 18:23:56 I am going to convert my site as soon as I finish working on ETP. 18:24:32 ola: the keyword maps links any acs_object with a keyword. 18:25:15 Say there are 100 keywords available. Would you like to click on each one to assign it and wait for the page to reload, or have a checkbox for each one? 18:25:20 and one submit button. 18:26:19 checkboxes, I guess. 18:26:51 ok thanks. 18:27:08 np:-) 18:27:52 Hah! 18:28:00 See --> http://openacs.org/bboard/q-and-a-fetch-msg.tcl?msg_id=0002cT&topic_id=12&topic=OpenACS%204%2e0%20Design 18:28:05 I'm not the only one 18:28:11 And nobody posted an answer 18:30:20 well, that's just a fact of life - noone really knows this stuff... 18:31:05 heh 18:31:08 then why is it there? 18:31:09 :P 18:31:21 good point. 18:32:07 If you put it there...at least document it! :) 18:32:12 and document it well 18:36:45 hey Psychephylax, we are on your side. 18:37:36 I'm on your side too :) 18:37:57 And I see that OACS has lots of potential 18:38:19 but lacking of proper (looks around for Roberto) documentation is what makes it really hard to develop for it 18:42:47 Hmmm: http://openacs.org/bboard/q-and-a-fetch-msg.tcl?msg_id=0002r2&topic_id=12&topic=OpenACS%204%2e0%20Design 18:43:00 i am out of dr. pepper 18:43:57 break time. 18:44:15 psyche: why don't you take out one of your cookies, so markd2 comes to your rescue? 18:46:33 hmmmm... 18:47:24 anyone know about ACS templating? I am trying to compare one tcl variable to another one in ane 18:47:58 I fiddled with it a bit. 18:48:18 ..so you can try and ask me... 18:48:31 I have something like this: 18:48:45 I am trying to see if a keyword is already assigned so I can pre-check the checkbox. 18:50:13 All the examples have literals after the operator. 18:50:23 because mark probably won't help me 18:50:51 is @assigned_keywords@ a list? 18:50:59 yes. it should be anyway. 18:51:52 hmm... lemme think. 18:52:09 If I do @assigned_keywords@ i get 3317 3319 etc... all the ids. 18:52:49 aha. it appears that keyword_id is not defined. 18:53:25 well, have you tried the above code? it may work. 18:54:47 It doesn't work. I do have the keyword ids. I can display them in the adp page. 18:56:09 try: @assigned_keywords@> 18:56:14 err. 18:56:27 try: oh man 18:57:22 cool. 18:57:47 nope, darn. 18:58:41 Aha. 18:59:05 If I hard code in the numbers it works fine. @all_keywords.keyword_id@ in 3373 3184 3372 18:59:21 join the list to a string. 18:59:43 How does that work? 19:00:42 set string [join $list " "] 19:00:58 cool. 19:02:01 darn. that squishs them all together into one string. 19:02:26 Seems like I might want to compare one passed in value with another one. 19:03:42 lemme get this straight 19:04:44 basically a party is like a mailing list, where you can add users or other mailing lists to the mailing list 19:06:27 cool...an M&M that looks like a butt 19:06:39 siamese M&M 19:06:44 yup 19:07:08 I think you have to use to iterate through a list otherwise it doesn;t work. 19:07:42 Then I would have to do 19:08:18 hmmm 19:08:24 Interesting... 19:08:25 It would be impossible. I think I can do it in the query so it ends up in the multirow datasource. But then I have to run a plpgsql function on every keyword. 19:08:39 Could be time consuming. 19:08:54 I think I need to write my OWN function to do a check like that. 19:09:57 I still think the should just work like that though. 19:11:21 Now I know how Psychephylax feels. Every time he tries to do something, he almost has to reprogram another part of the ACS kernel to make it work. 19:12:54 davb: maybe you can use a flag column in the multirow? and not ue "in" 19:13:30 Yeah, I think I have to do it that way in the tcl file. 19:13:35 what's wrong with the string? no spaces? 19:13:38 I am just thinking of the best way. 19:14:06 No the string looks great. I just think the template parser is not evaluating the @assigned_keywords@ 19:14:28 on the right side of the operator anyway. 19:14:41 there is a function content_keyword__is_assigned 19:14:47 aha! 19:14:53 I don't want to have to run that for every row in cr_keywords. 19:14:54 composition is transitive 19:15:01 but membership is not 19:15:04 ow, stop my head hurts! 19:15:09 lol 19:16:05 xemacs5 has quit 19:16:22 woooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooohoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo 19:16:27 how can I serach for with grep? 19:16:28 * Psychephylax dances around his desk 19:16:41 it is customary to say eureaka! 19:16:44 was that enough 0's? 19:16:48 * Psychephylax apologizes 19:17:02 EUREKA! (and the bathtub overflows) 19:17:46 * davb wishes he could do regexp 19:17:49 now i Just have to remember how i did it 19:17:58 for tcl? 19:18:04 grep 19:18:19 or whatever I need to find all the oh 19:19:09 i think grep uses perl type regexps 19:19:23 yeah I don't know perl or tcl regexp. 19:20:27 muahahahahahaha! 19:22:24 http://www.scriptics.com/doc/howto/regexp81.html 19:22:24 too much Dr.Pepper?;-) 19:22:24 B: http://www.scriptics.com/doc/howto/regexp81.html from Psychephylax 19:22:46 B:| New Regular Expression Features in Tcl 8.1 19:22:46 titled item B 19:23:14 B: Tcl 8.1 now handles advanced regular expressions (REs). Previous regular expression handling is almost unchanged except that clumsy handling of escapes like \n has been much improved, and a few escapes that were previously legal (but useless) now won't work. 19:23:15 commented item B 19:23:40 TCL regexps 19:24:51 ok 19:24:57 my turn to ask another question about TCL :P 19:25:00 19:25:07 checks to see if snmp_admin equals one 19:25:10 yes 19:25:22 is there a way to do if admin or supervisor eq 1? 19:25:54 if @snmp_admin@ eq 1 or @snmp_supervisor@ ep 1> 19:26:02 ok 19:26:04 thanks 19:26:13 you can use as many and or not as you want in there. 19:26:41 All documentation should have examples. 19:27:10 ok 19:27:24 * Psychephylax gives Dave a cookie 19:28:17 I think the templating system rocks. is VERY poverful. 19:28:38 powerful 19:28:40 I like the templating system very much, 19:28:56 I suspect it is because I am half designer/half programmer though 19:29:54 is also very cool. 19:31:12 that is cool... 19:32:43 anyone seen vinod around recently? 19:32:56 no. 19:33:08 is he on vacation or something? 19:33:50 not sure. His web page was updated 9/18 19:34:04 What's his webpage? 19:35:55 http://www.kurup.com 19:35:56 C: http://www.kurup.com from ola 19:37:46 cool 19:37:49 I like the design of that indexpage! 19:39:11 markd2 has joined #openacs 19:39:22 Hey markd2 19:40:34 yo 19:40:39 * Psychephylax gives Mark a cookie 19:40:51 * markd2 gains weight 19:41:39 * Psychephylax gives mark money for liposuction 19:43:27 Woohooo 19:43:32 I solved my problem of the day 19:43:40 * Psychephylax eats one of the cookies designated "For Mark" 19:43:43 huzzah! play time now 19:43:51 yeah 19:44:03 The next problem of the day is "What exactly happens when you click on the add user button" 19:44:23 "magic" 19:44:30 yeah 19:44:36 I'd like to just tell that to my boss 19:44:40 read the code 19:45:44 i know 19:45:51 use the source, fluke 19:45:56 fluke, I am your father. 19:46:05 and modify it to insert his group types too 19:46:06 * markd2 breathes heavily 19:46:10 Heh 19:46:19 we joked like that when we were on the boat fishing for Fluke 19:46:42 Caught one, open it's mouth saying "Fluuuuuke...*deep breath*...I am your father!" 19:46:56 heh 19:47:20 hehe 19:47:28 You guys gotta see this... 19:48:04 d'oh 19:48:18 I need to set up a terminal client so I can get to my desktop at home 19:49:49 We got stuck on a sand bar when we went out 19:50:01 I have pictures from that 19:50:15 time lapse photography...sandbar getting bigger...and bigger...and BIGGER 19:50:21 heh 19:50:26 That trip cost my friend and I 600$ 19:50:36 I'm on a slow slow slow connection, so my imagination is probably more effective 19:50:39 ouch! 19:50:41 http://gnosis.cx/publish/programming/regular_expressions.html 19:50:41 D: http://gnosis.cx/publish/programming/regular_expressions.html from davb 19:50:53 D:|Regular Expressions Tutorial 19:50:53 titled item D 19:51:04 for what language? 19:51:11 :) 19:51:55 cool pictures 19:52:50 ? 19:52:54 Anyway. All I want to go is give the regexp to grep. I am not sure how to pass it in. Do i need quotes or something? 19:53:00 on the regex site 19:53:10 davb: if it has shell metacharacters in it, yes 19:53:23 grep "*.spoons" file1 file2 file* 19:53:32 Aha. 19:53:41 cool thanks. That is not documented anywhere I could find. 19:53:42 or ls -1 | grep "*.ack" 19:54:01 does anyone know how to make apache listen on a differnet port as well as 80? 19:54:02 New junkyard wars on tonight. 19:54:12 Enterprise(tm) premiers tonight too 19:54:14 edit httpd.conf 19:54:19 yeah I know that 19:54:21 yeah I just heard. Time for Tivo. 19:54:24 :) 19:54:32 we're heading over to a friend's house to watch 19:54:42 * markd2 doesn have the teevee hooked up to the Outside World 19:54:47 lol 19:54:50 teevee is good 19:55:07 I easily slip very easily into Couch Potato mode 19:55:24 so it's dangerous to have a working tv around 19:55:29 save for the B5 and TNG tapes we already have 19:55:39 lol 19:55:44 you'd fit in with my bosses well 19:56:48 See, I edit the Listen part of httpd.conf but it still does not listen 19:57:09 and yes, I restarted 19:57:12 Oh. 19:57:47 aha! 19:57:49 I goofed 19:59:00 it listens to on 1084 but not on 8000 19:59:14 weird. SOmething is already on there. 19:59:18 nope 19:59:22 but I'll try a diff port 19:59:34 ok, just weird then. 19:59:53 nothing there as in verified with trying to telnet to that port? 20:00:43 I portscan localhost 20:00:48 doh 20:00:51 stupid ass I am 20:02:22 ohwha tanass eyeam 20:02:37 yes I am 20:02:52 my firewall blocked the requests :P 20:02:59 heh 20:03:15 well at least you know it works. 20:03:27 i don't know that it works just yet 20:03:51 the firewall :) 20:03:57 oh 20:03:57 lol 20:04:00 egrep: better than grep 20:04:03 yeah I knew that it works before I did that 20:04:09 I've never really used egrep 20:04:19 I always get confused oer what egrep vs fgrep vs regular grep do 20:04:58 oh, just that the regexp seems to be easer to use. I have no clue. 20:05:05 anyone familiar with ipfw? 20:05:21 nope 20:10:59 I don;t think there is an in the whole ACS 20:11:06 but I can;t be sure, my regexp sucks. 20:14:39 hmmm 20:15:08 I think I am right. I found 20:15:29 So no where in the whole ACS is used. 20:15:35 no wonder it doesn't work. 20:16:30 vinod has joined #openacs 20:16:43 yo vinod 20:16:49 hi vinod 20:16:59 howdy everyone! 20:17:40 It's Vinod! 20:17:48 We were just talking about you 20:18:09 uh oh 20:18:12 hehe 20:18:19 Just wondering if you were alive 20:18:34 most of me seems to be working. the jury's still out though 20:18:49 Hi vinod 20:18:50 hmmm? 20:18:56 hey dave! 20:19:09 markd2: did I ask you before about domain-based subsites in ACS 4/Tcl? 20:19:23 i've been taking a semi-self-imposed hiatus from the internet. family stuff, work stuff, etc.. 20:19:30 Good idea. 20:20:21 devb: no 20:20:26 I dunno if they exist / work or not 20:20:36 I figured as much. 20:21:04 I will email the person who said that a patch existed. He should know. 20:21:41 Vinod, you check your e-mail recently? 20:22:39 yeah, i'm still a few days behind though... why? 20:23:05 I e-mailed you :) 20:23:19 ahh... lemme search 20:24:16 i've made progress since that e-mail though 20:24:53 what are you having trouble with now? 20:25:37 Figuring out how to create a user (but when creating a user setting him to belong in a group) instead of just creating a user 20:25:48 talli has joined #openacs 20:25:55 wb talli 20:26:12 whoa. vinod's here 20:26:18 :) 20:26:32 hey talli! 20:27:34 hmm 20:27:51 I think I'll have to create a relation on my own 20:28:09 hmmmm 20:28:50 Do I do sql insert/update statements in my tcl thing or do I write a function somewhere to use for that instead? 20:28:51 Psychephylax: have you created a group yet? 20:28:54 yes 20:29:01 And I can add members to those groups as well 20:29:34 The code I used for reference did almost what I needed 20:29:50 it just never added the new uber-people to the group 20:30:17 Psychephylax: you need a special two-step page. That creates the user then adds him to the group. 20:30:54 technically I only need one..but I need a separate function/procedure dealie to add the user to the group 20:31:06 yes. thats it. 20:31:14 i just have to figure out what to insert where 20:31:23 vinod: where have you been? did you get lost in the radiology department again? 20:31:37 lol 20:31:58 no one told me that 'Xray' wasn't the same as 'eXit' 20:32:07 bahaha 20:32:20 heh 20:32:20 did hey make you where those little gowns that show your ass? 20:32:32 wish i was there for that one. 20:32:44 i know you do, you sick puppy 20:32:48 :/ 20:34:25 Maps the specified user to the specified group in the specified role; if the mapping already exists, 20:34:26 does nothing. 20:34:45 is this saying that I can tell ACS to have user belong to a group as manager? 20:34:49 Psychephylax: that sounds like what you need 20:35:12 aha 20:35:35 user: user121321, group: manager, role: member 20:35:57 BLURB: All the TCL proc APIs and PL/Pgsql APIs need to be in the docs, not just the API browser 20:35:58 E: All the TCL proc APIs and PL/Pgsql APIs need to be in the docs, not just the API browser from davb 20:36:03 so first I need a select to find out what user_id is the person, then one for the group and then run that with those 2 arguments? 20:36:39 well, if you've just created the user, you'll already have the user_id 20:36:49 right 20:36:56 what's this role thing they're talking about? 20:37:03 I'm not quiet sure about "role" stuff yet 20:37:07 bye (going home) 20:37:07 each group can have any number of roles 20:37:10 davb has quit 20:37:12 is that derived from the db 20:37:28 for now, you can ignore it and just make everyone in the 'member' role 20:37:36 oh 20:37:38 dismembers only 20:37:47 it's just more fine-grained permissions within a group 20:38:31 markd2: that was that popular jacket back in the 80's, right? 20:38:47 so my call would be [ad_user_group_add $user_id, 'member', $group_id] where group_id is determined from a select statement that finds the actual group_id when searching for "Manager" 20:39:06 correct 20:39:10 woohoo 20:39:18 * Psychephylax goes to figure out the way to find out the manager ids 20:39:46 vinod: or that great cinematic masterpiece "I dismember mama, may she rest in pieces" 20:39:59 haha 20:40:07 Aha! 20:40:16 select group_id from groups where group_name='Manager'; 20:40:40 bingo. 20:41:11 I can abstract it by reading what user type the person is adding by passing it from the forms page into the next tcl page 20:41:16 :0 20:41:28 This ADP stuff is cake once you spend 2 months figuring it out 20:41:43 correct again 20:41:45 The key is not to get fired before your 2 months are up 20:41:48 dismember is a swedish death metal band 20:41:49 Psychephylax is on a roll 20:41:56 ooooh 20:42:00 death..that sounds so violent 20:42:17 heh 20:42:29 I get really confused about all the different kinds of Heavy Metal: 20:42:29 deathcore, grindcore, hardcore, bellcore. Which kind is which? 20:43:06 (for those who don't get the joke, BellCore was the telco research wing before it got turned into Lucent) 20:43:22 * vinod pulls out his death metal classification workbook 20:43:22 lol 20:43:33 * Psychephylax gives Mark a cookie 20:43:45 Mmmm...Dr. Pepper 20:43:46 gonna ruin my appetite for dinner 20:43:49 but I take it anyway 20:43:53 Vinod, is Dr. Pepper deadly? 20:43:57 :) 20:44:05 markd2: hey.. i'm watchin you 20:44:08 I'm about to go get my 3rd can 20:44:30 Psychephylax: well, if you're eating the cans... 20:45:59 no just sucking the liquid out of them 20:46:29 i think you're ok then. anything endorsed by a Doctor has to be good ;-) 20:46:33 rofl 20:46:35 ok then! 20:47:12 ok 20:47:16 I'm confused on this command 20:47:24 set user_id [ad_user_new $email $first_names $last_name $password "" "" "" "t" 20:47:29 "approved" $user_id] 20:47:31 now 20:47:35 that's how they add a user 20:47:47 but why is it set user_id [function] 20:48:05 the function creates a new user. 20:48:08 and then returns the id of that user 20:48:13 since you don't know the id before you call it 20:48:55 oh 20:49:28 so the function has a return value of type int which happens to be the user_id 20:50:11 why isn't ad_user_new in the API?! 20:50:29 yeah 20:50:33 although there ar no types in tcl :-) 20:51:24 talli has quit 20:51:38 yeah yeah 20:51:41 they're all strings or ints 20:51:42 :P 20:52:11 just strings :-) 20:52:18 which sometimes get interpreted as ints 20:52:31 actually, strings and arrays are the types 20:52:57 ok, well, http://www.arsdigita.com/api-doc/proc-view?proc=ad%5fuser%5fgroup%5fuser%5fadd 20:53:02 does not tell me if it has any returns 20:53:32 so I don't actually "set " anything i just tell it to go [ad_user_group_user_add par1 par2 par3] 20:53:37 and hope it does what it's supposed to? 20:54:47 yep 20:54:57 correct. click on the 'show source' button. it's a pretty simple proc 20:55:10 having the user_id would probably be handy for doing things to the user 20:57:39 like killing him 20:57:40 hehe 20:58:13 we don't kill users. we 'dismember' them 20:59:10 gotta learn the lingo 20:59:17 gah 20:59:30 are the parameters separated by commas or just spaces? 20:59:38 in tcl, spaces 20:59:44 aha 20:59:55 last question 21:00:03 what's the default role? member? 21:00:49 i think it's 'member', but that's just off the top of my head 21:00:58 aha 21:01:07 I can use my handy dandy l33t oracle skillz to look that stuff up 21:01:57 gotta go eat! see y'all later 21:02:16 bye bye 21:02:36 til has quit 21:05:35 member it is 21:06:38 hmmm 21:06:51 This is a question about bridging oracle to tcl 21:07:19 suspension bridges, definitely 21:07:35 what's that? 21:07:39 oh 21:07:40 heh 21:08:19 I need to take the number my select query returns and set a tcl variable to that 21:08:24 * Psychephylax looks at Vinod's code 21:08:52 aha 21:09:02 declare 21:09:07 * markd2 declares 21:09:08 variable type; 21:09:19 select bah into variable; 21:09:29 close? 21:11:09 in pl/sql, I think so 21:12:58 do I need pl/sql for this? 21:13:03 or is there a shortcut of some sorts? 21:13:35 I dunno 21:13:57 ok 21:13:59 if you're just doing a query into a var, you can use set var [db_string blah "select count(*) rom cookies where recipient = 'markd2'] 21:14:09 er, From cookies 21:14:13 my 'F' key is failing me 21:14:14 lol 21:15:06 so I could do set group_id [db_string "select user_id from acs_relations] 21:15:15 what's blah? 21:15:30 check db_String docs 21:15:35 it's like the name of the query 21:15:51 k 21:16:03 and the query has to return one row 21:16:07 use a different command for multiple rows 21:16:50 what's the other command for multiple rows? 21:17:01 db_foreach? 21:17:59 oh 21:19:13 * Psychephylax tries and hopes this works 21:24:51 hmmmm 21:24:54 Here's a problem 21:25:21 aside from Manager and supervisor in my groups table how do I find out what the normal users are 21:29:13 ugly? 21:29:26 no 21:29:45 I'm trying to figure out what regular users are 21:29:58 i mean what group they go to 21:31:21 it's gotta be somewhere here in the db 21:32:30 any ideas? 21:32:40 oh 21:32:45 dunno 21:32:46 here's a nice workaround 21:32:48 lol 21:32:49 they might not be a member of any group 21:32:53 you're right 21:33:01 that's why I'm going to check to see who the person is... 21:33:06 before running a tcl script 21:34:35 hmmmm 21:35:09 hmm 21:35:09 ok 21:35:27 I suppose I can do: 21:35:55 if user_type eq 'manager' or user_type eq 'supervisor' then select group_id from the table 21:35:57 else nothing 21:36:13 this way, if the person is trying to add a manager or supervisor I will find out what group they are in 21:36:17 otherwise, it's just a regular user 21:38:15 now if I can only figure out how to do what i just said I'll be in business 21:39:21 heh 21:40:00 ok 21:40:44 my form passes user_type over to user-add-2.tcl 21:40:58 user-add-2.tcl yanks that out in the contract part 21:41:09 then I compare user_type to 2 strings 21:44:52 Aha! 21:44:56 How does this look: 21:45:07 if { $user_type = "Manager" or $user_type = "Supervisor" } { 21:45:07 set group_id [db_string group_find "select group_id from groups where group_name = $user_type]; 21:45:07 21:45:07 [ad_user_group_user_add $user_id 'member' $group_id] 21:45:08 } 21:45:48 * Psychephylax departs to recycle 3 cans of Dr. Pepper. 21:47:21 ola has quit 21:47:28 * Psychephylax returns weighing 3 pounds less 21:47:36 no sorry....24 ounces less 21:49:18 heh 21:49:59 Mark, that look right to you? 21:50:38 24 ounces? 21:50:38 or should I be using string compare? 21:50:49 oh. more stuf scrolled by. lemme read 21:50:51 well, technically 36 but I didn't finish 1 more 21:50:58 well, == instead of = 21:51:01 ok 21:51:05 no need to use string compare 21:51:19 yeah 21:51:34 you'd need to use sting compare if there's a chance you could have a string that's just digits 21:51:34 ok 21:51:40 oh 21:51:45 then tcl tries to do "manager == 23" as integer math 21:51:49 and barfs quite messily 21:52:04 lol 21:52:07 how about this 21:52:10 unless you are comparing really long strings of digits, like credit cards, which can cause direct comparison to blow out because of integer conversion 21:52:17 Things I'm not positive about 21:52:41 ($user_type == 'Manager" 21:52:48 Which quotes am I using 21:52:55 and...are they even necessary? 21:53:09 Quotes are necessary for comparison in if statements. this special rule... 21:53:10 man, I really need to go pick up that TCL book 21:53:31 ok, then which ones are the correct ones? 21:53:38 prevents many programming errors, where you say ... if {bar == 4} { ... instead of ... if {$bar == 4} ... 21:53:43 I know one set allows for variable expansion while another one does not 21:53:50 if {$user_type == "Manager"} ... 21:53:53 ok 21:55:14 if it's in curly brackets, variable expansion doesn't occur before execution, but "if" knows that its first argument is an expression, so it will call Tcl_ExprObj or whatever the C function is for evaluating expressions, and that function will perform variable expansion where it's needed 21:59:51 in fact, it is dangerous or a guaranteed bug to write while statements like this ... while [condition] {stuff} ... instead of this ... while {[condition]} stuff ... because in the former case the interpreter will evaluate the square bracketed stuff before while even begins, so if the condition returns true, the while will be an infinite loop 22:00:10 biab 22:02:57 Psychephylax has quit 22:10:21 Psychephylax has joined #openacs 22:10:27 lovely 22:10:56 Our building had a brownout 22:11:02 Killed all of the servers 22:11:29 ping 167.206.9.143 22:11:31 ack 22:12:11 gonna go try to get rednet up 22:12:16 hopefully my files are safe 22:12:50 Oh well 22:12:52 this bites 22:12:57 So I'm going home 22:12:59 Psychephylax has quit 23:06:07 markd2 has left #openacs 23:14:48 xemacs5 has joined #openacs 23:15:04 FSF Emacs!! :) 23:15:28 brb 23:15:30 jumping back on to see if ne1 can answer my internationalization q's 23:32:31 Psychephylax has joined #openacs 23:32:35 Hey all 23:35:57 hey 23:40:49 * Psychephylax ctl+x ctl+f /usr/vinod 23:41:08 rm -rf /bin/laden/* 23:58:31 brb 23:58:48 Psychephylax has quit