Time Nick Message 11:03 osmoze paul, J ai eu Francis, on doit se voir courant semaine prochaine pour une premiere approche. Par contre, tu as dis sortir la 2.2.5 vers noël pour notre petit cadeau, as tu une date ? On va surement prevoir un rdv avec sandrine pour faire une demonstration aux differentes personnes agent des bibliotheque courant janvier. Ca me donnerai une idée de savoir si j aurai le temps de l installer 11:03 paul super nouvelle pour françis. 11:03 paul pour la date exacte, je ne promets rien, désolé ! 11:04 osmoze je m en doutais un peu, mais qui ne demande rien .... :) 11:04 paul mais je suis en congés du 20 au 27, ce sera surement après 11:04 osmoze ok, voila la reponse a ma question :) 11:04 paul je pense que le 18 je vais publier un AAT (Appel A Tester) sur bureau.paulpulain.com pendant mon absence. 11:04 paul et selon les retours, on verra, ce sera le 28 ou plus tard ! 11:05 paul et bien, dans ce cas, fais moi une copie de ta base, je te ferai une install rien que pour toi !!! 11:05 paul (sur ma machine of course) 11:05 osmoze avec grand plaisir :) 11:06 osmoze je viens de la donner a hdl il y a quelque jour, peut etre avait vous un endroit de stockage en commun, sinon je te la remet en telechargement 11:07 paul non, je lui demanderai. 11:07 osmoze ok :) 11:07 paul (il a un accès ssh sur ma machine) 11:08 paul ;-) 11:08 paul je déménage en fin de semaine prochaine pour un nouveau bureau. 11:08 osmoze roh, on prend du galon ;) 11:08 paul 8MB en DL et 650 en UL :-D 11:08 paul (tjs chez nerim) 11:09 paul j'attends plus que le modem/routeur/wifi 2lamorkituetellementkiléenrupture2stok ! 11:09 osmoze aller, je ne me plaint pas, depuis 2 semaines on a l adsl sur tous les sites 11:09 osmoze lol :) 11:09 paul ADSL ou reADSL 11:09 paul ? 11:09 osmoze ADSL 11:09 osmoze je suis à 120m du central a vazerac 11:09 osmoze par contre, reADSL a Loubejac je crois 11:09 paul ah, bon débit alors ! 11:10 paul ah, mauvais débit alors ! 11:10 osmoze paul, wanadoo nous limite en 2M pro 11:10 osmoze donc 2M et 256 11:10 osmoze alors que j i une ligne cable à 8 11:10 paul 2M c'est déjà pas mal. C'est 256 qui est nul. 11:10 osmoze oui 11:10 osmoze mais pas le choix car pas d autre operateur encore....meme pas a lafrancaise 11:11 paul ah, hdl vient de voir ta demande, ca va arriver sur mon PC ;-) 11:11 osmoze hé hé 11:43 owen kados, are you around? 11:43 paul unread yet here today. morning owen 11:44 owen Hi paul 11:47 kados owen: sure am 11:47 kados owen: what's up? 11:48 owen G'morning 11:48 kados icey in the Plains this morning? 11:48 owen I was reading Lauren's comment about search results ordering and wondering what we can expect in 3.0 11:48 kados right 11:49 owen Very icy. I'm not likely to get back up my hill tonight if things don't change. 11:49 kados so stripping out spaces from the beginning of member searches? 11:50 owen Lauren's talking about title searches in particular 11:50 owen (different post) 11:50 kados ahh 11:50 paul a nice sunny day today in Marseille. 11:50 paul (something like 10°C) 11:50 owen the number one change is relevance ranking, I know 11:50 kados well we have a block of code that handles the MARC non-filing chars 11:50 kados for koha 2.x 11:50 kados but the problem is it's dog slow 11:51 kados for 3.0 we'll have to make sure that the Zebra configuration files for indexing include removing the non-filing characters 11:51 kados that would be a good question for koha-zebra 11:51 kados paul: lucky you :-) 11:52 paul unless i've missed something, zebra deals with non filling characters. 11:52 paul I confirm 11:53 kados cool, thx paul 12:01 kados paul: quick question 12:02 kados paul: if I wanted to build a plugin for the MARC editor 12:02 kados paul: that would generate 'today's' date and put it in 'dataaccessioned' field 12:02 kados paul: would that be difficult? 12:02 kados paul: (do you already have one for this?) 12:02 paul no i haven't 12:02 paul no it would not bee too complex 12:03 paul (if you have dateaccessioned mapped to any marc field) 12:03 kados it is mapped 12:03 paul you could even do this automatically using the onexit javascript. 12:03 kados how would that work? 12:04 paul look unimarc_210 plugin. 12:04 paul good sample. 12:04 kados 210c? 12:04 paul yep 12:04 paul (get the value from isbn & calculate automatically the publisher) 12:05 paul (I would do it with XMLhttprequest if I had to write it today) 12:06 kados wait ... dateaccessioned is 'today's date' right? 12:06 kados why would I need isbn? 12:06 paul you don't. 12:07 paul it's just to show how a "on enter" javascript event will be managed by plugins 12:07 paul (on enter, and not onexit as I said before) 12:08 kados what if the item has no isbn? 12:08 kados ahh ... I understand now 12:09 paul nothing happends, we can't deduce the publishername :-) 12:09 kados you mean 210 is an isbn script 12:09 paul 210c is the publisher name. 12:09 kados deduced from the isbn :-) 12:09 kados got it 12:09 paul if isbn is filled, then publisher is magically deduced. 12:09 kados right 12:09 kados very nice 12:09 paul libraries find this feature very impressive :-D 12:09 kados yep I bet :-) 12:10 paul + unimarc 225 that shows the list of seriestitle for the publisher. 12:10 kados I think what I need is much simpler 12:11 kados I wonder if javascript has date functions 12:11 paul yes, but that's to show the onenter trick ;-) 12:11 kados ahh 12:12 paul you can have things happening on 3 events : onEnter, on Exit, clicking on ... 12:12 paul how you write your plugin makes different things happend ! 12:13 kados right 12:32 kados I think for my purposes it might just be easier to insert javascript directly on the page 12:32 kados to generate the date 12:32 kados on the page load 12:33 paul yes, but the plugin system will include it automatically without hacking Koha 12:38 kados true, but it's complex for me to understand :-) 12:39 kados if I understand sofar 12:39 kados each fieldXXX.pl has 12:39 kados several subroutines 12:39 kados which Koha calls if there is a 'plugin' defined 12:40 kados correct? 12:40 paul yes. 12:40 kados plugin, plugin_javascript, plugin_parameters 12:40 kados do I need all three? 12:40 paul there are 3 subroutines. 12:41 paul used while the page is build (on server side), and when the javascript event occurs (on client side) 12:42 kados for my purposes I don't really need any server-side stuff(like query to MySQL for example), just a simple javascript date function ... 12:42 paul just let the subs empty then! 12:42 kados so I should delete all queries and just insert my javascript in the plugin_javascript, etc. 12:42 kados right :-) 12:42 paul (plugin_parameters) 12:43 paul (plugin_javascript being the client side) 12:43 kados ahh 12:43 kados so if I send a value "yyyy-mm-dd" to return in plugin_parameters it will fill in? 12:43 paul not exactly. 12:43 kados (not sure if I should generate date server-side or client-side) 12:43 kados (probably server-side if possible) 12:44 paul plugin_javascript is run on the server side. 12:44 paul BUT 12:44 paul is supposed to create some fields added to the client side. 12:49 kados but in the scripts I look at plugin_parameters always has: return "" 12:49 kados at thened 12:49 kados end even 12:50 kados meaning it basically does nothing 12:52 paul plugin_parameters : other parameters added when the plugin is called by the dopop function 12:53 paul plugin_javascript : the client-side part 12:53 paul plugin : what to do when the user clic on ... 12:54 paul (plugin is executed on server side, and returned in a popup to the client) 12:56 paul it's unimarc_field_210c.pl 12:57 kados I see, so the plugin is only triggered when the user clicks on "..." 12:57 paul no. 12:57 paul the sub plugin is triggered when the user clicks on ... 12:57 kados then, new window, user selects what she wants ... then value is filled? 12:58 kados so plugin_javascript is onpageload? 12:58 paul it's more tricky ;-) 12:58 kados even with no clicks? 12:58 paul plugin_javascript returns some javascript code that is INCLUDED on the MARC editor page. 12:58 paul thus, the MARC editor contains some javascript. 12:59 paul 3 subs : 1 that is triggered onEnter on the field connected to the plugin 12:59 paul 1 triggered onExit 12:59 kados very nice, so I should be able to add some code like document.object.value = today's date 12:59 paul and one triggered on ... 12:59 paul EXACTLY ! 12:59 paul on the OnEnter event ! 13:00 paul function Focus$function_name(subfield_managed) { 13:00 paul return 1; 13:00 paul change to : 13:00 paul function Focus$function_name(subfield_managed) { 13:00 paul calculate the date & fills the field 13:00 paul } 13:01 paul the field number being numbered subfield_managed ! 13:01 kados ahh ... I get it ... Blur$function_name(subfield_managed) { is managed with javascript already on the MARC editor page 13:01 kados it's an onBlur routine 13:02 paul yep. onBlur = on exit & onFocus = on enter 13:03 kados I think I get it now ... thanks paul! 13:03 paul your welcome 13:18 kados paul: I set : 13:18 kados sub plugin { 13:18 kados my ($input) = @_; 13:18 kados return ""; 13:18 kados } 13:18 kados and 13:18 kados function Blur$function_name(subfield_managed) { 13:18 kados field_found="date test"; 13:18 kados return 1; 13:18 paul field_found ??? 13:18 kados (field_found was found above) 13:19 kados var field_found; 13:19 kados for (i=0 ; i<document.f.field_value.length ; i++) { 13:19 kados if (document.f.tag[i].value == '952' && document.f.subfield[i].value == 'v') { 13:19 kados field_found=document.f.field_value[i].value; 13:19 paul ah, OK 13:19 kados } 13:19 kados } 13:19 kados } 13:19 kados but I get a 404 :-) 13:19 paul I would not write field_found=document.f.field_value[i].value; 13:19 paul document.f.field_value[i].value = date test 13:20 paul otherwise, you set field_found to the field value, then you update it to "date test", but that does not change document.f.field_value.value 13:21 kados I see 13:21 kados also I get: 13:21 kados Bareword found where operator expected at ../value_builder/dateaccessioned.pl line 100, near "field_found="date", 13:21 paul hehe... 13:22 paul in dateaccessioned.pl, you write javascript IN A VARIABLE 13:22 kados but that's because of bad coding :-) 13:22 paul so everything is included in " " 13:22 kados yep 13:22 kados I added "" around date test 13:22 kados and that messed it up I think 13:22 paul so escape \"date_test\" 13:22 kados right 13:22 kados done :-) 13:24 paul error number what now ? 405 ? :-D 13:27 kados now it works 13:27 kados but ... 13:27 kados when I click on ... 13:27 kados it sends me to a blank page 13:27 kados with a big "1" :-) 13:27 kados I thought adding 13:27 kados return 0; 13:27 kados to the Click routine would stop it from loading 13:27 paul return 0 is just for the javascript part. 13:27 kados but no :-) 13:27 paul (it returns 0 to the javascript event) 13:28 paul just create a window.close, and the window will immediatly close ! 13:29 kados will close the window I'm working on too :-) I took out the newwindow bit ... I'll add it in again 13:29 paul nope, there's something easier 13:29 paul in function Clic$functionname(i) { 13:29 paul } 13:29 paul remove the window.open 13:30 paul it will do nothing ! 13:30 kados hehe 13:30 kados very nice 13:30 kados I will commit this plugin as soon as I write docs for it 13:30 kados thanks paul 13:30 kados (2.2.x OK?) 13:30 paul yep. 13:31 kados how will we resolve unimarc->usmarc differences for plugins? 13:31 kados can I commit it as usmarc952v.pl? 13:31 paul I have no way, except that naming them unimarcXXX.pl 13:31 kados k 14:21 thd paul: Why must plugin names be unimarcXXX.pl? 14:34 kados thd: they don't _need_ to be 14:34 kados thd: it's just convenient for knowing what they are for 14:34 kados thd: I just added on usmarc-field952v.pl 14:35 kados thd: what do you suppose that does? :-) 14:35 thd kados: Did paul not say that they needed to be in the unimarcXXX.pl form? 14:35 kados thd: nope he didn't 14:36 kados thd: he said that is the recommended form 14:38 thd kados: I assume your date accessioned is not rewritten if the record is reopened for editing. 14:39 kados thd: you assume wrong :-) 14:39 kados thd: that's not how plugins work unfortunately :-) 14:40 thd kados: Can you not safeguard against rewriting without the user first erasing the original value. Check if the subfield is nonempty? 14:41 thd kados: Also, I thought there is code that already should work from full acquisitions for accomplishing the same task. 14:45 thd kados: But it is good that someone has finally written a plugin for use in MARC 21 Koha. 14:47 kados thd: might be able too 14:47 kados thd: but not right now :-) 14:47 kados thd: feel free to spruce my script up :-) 14:50 thd kados: Where is the message from Lauren that you were discussing earlier? 14:50 kados message from Lauren? 14:52 thd kados: owen had a message from Lauren 14:53 thd kados: about search result ordering 14:54 thd kados: Does Lauren work at NPL so I would not have seen the message on a public list? 14:56 kados ahh 14:56 kados correct 14:56 kados yep, NPL has an internal forum 14:58 thd kados: Is that where all the best ideas about Koha are? :) 14:58 kados hehe, probably 15:04 thd kados: considering how your plugin works it should be filling 005, date and time of last transaction. 15:04 kados doesn't that already get filled? 15:05 kados dateaccessioned is just a date field 15:05 kados yyyy-mm-dd 15:05 kados no time 15:05 thd kados: I know it would need a time too. 15:07 thd kados: 005 is not even in the MARC 21 SQL table. The user has to add it. 15:08 thd kados: My comment was meant as humour. 15:08 kados ahh :-)