You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(21) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(136) |
Feb
(104) |
Mar
(80) |
Apr
(21) |
May
(36) |
Jun
(18) |
Jul
(22) |
Aug
(5) |
Sep
(11) |
Oct
(7) |
Nov
(3) |
Dec
(12) |
2004 |
Jan
(5) |
Feb
|
Mar
(3) |
Apr
(1) |
May
|
Jun
(1) |
Jul
(3) |
Aug
(6) |
Sep
(3) |
Oct
(4) |
Nov
(4) |
Dec
|
2005 |
Jan
(1) |
Feb
(4) |
Mar
|
Apr
(7) |
May
(4) |
Jun
(7) |
Jul
(4) |
Aug
(4) |
Sep
|
Oct
(8) |
Nov
(4) |
Dec
(1) |
2006 |
Jan
|
Feb
(3) |
Mar
(2) |
Apr
(4) |
May
|
Jun
(6) |
Jul
(2) |
Aug
(1) |
Sep
|
Oct
(3) |
Nov
|
Dec
|
2007 |
Jan
|
Feb
(4) |
Mar
(7) |
Apr
(4) |
May
(4) |
Jun
(8) |
Jul
(2) |
Aug
(2) |
Sep
|
Oct
|
Nov
(2) |
Dec
|
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(2) |
Jun
(1) |
Jul
(3) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
(1) |
Mar
|
Apr
(2) |
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
From: Ram P. <ra...@pa...> - 2003-01-18 10:27:00
|
You were late .. I had to go to for lunch.. Lets meet today again... -----Original Message----- From: apc...@li... [mailto:apc...@li...] On Behalf Of Mitra Sent: Saturday, January 18, 2003 1:28 PM To: apc...@so... Subject: [Apc-aa-coders] Conflicts with new CVS version - and suggested fixes Jakub I've done a CVS update from your mgettext version. I successfully merged your changes with mine. I have NOT committed my changes yet, I don't think my code is stable enough for that, although its running fine on my site. There is one problem I've seen - apart from the missing files you mentioned. config.php3 contains an include for the main language file you are using, which no longer exists. Which file is included will of course vary from machine to machine. I suggest commenting out that part of the config.php3, that way your change should merge cleanly with whatever each site has locally. - Mitra -- Mitra Technology Consulting - www.mitra.biz - mi...@mi... 02-6684-8096 or 0414-648-0722 Life is a Mystery to be Lived, not a Problem to be Solved ------------------------------------------------------- This SF.NET email is sponsored by: Thawte.com - A 128-bit supercerts will allow you to extend the highest allowed 128 bit encryption to all your clients even if they use browsers that are limited to 40 bit encryption. Get a guide here:http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0030en _______________________________________________ Apc-aa-coders mailing list Apc...@li... https://lists.sourceforge.net/lists/listinfo/apc-aa-coders |
From: Mitra <mi...@mi...> - 2003-01-18 08:05:42
|
Jakub I've done a CVS update from your mgettext version. I successfully merged your changes with mine. I have NOT committed my changes yet, I don't think my code is stable enough for that, although its running fine on my site. There is one problem I've seen - apart from the missing files you mentioned. config.php3 contains an include for the main language file you are using, which no longer exists. Which file is included will of course vary from machine to machine. I suggest commenting out that part of the config.php3, that way your change should merge cleanly with whatever each site has locally. - Mitra -- Mitra Technology Consulting - www.mitra.biz - mi...@mi... 02-6684-8096 or 0414-648-0722 Life is a Mystery to be Lived, not a Problem to be Solved |
From: Mitra <mi...@mi...> - 2003-01-17 22:21:41
|
Jakub Might it be better just to use standard - i.e. 8 character - tab widths? I think that's what most of the source is using now, and a quick grep finds tabs in 275 of the 378 files in APC. - Mitra At 11:16 AM +0100 17/1/03, Jakub Ad=E1mek wrote: >Please don't use tabs in any sources nor in the CHANGES file. I have >just found a misformed text in CHANGES due to another tab width than I >am using. > >Set "insert Tabs as spaces" and "indent by using spaces" or similar >options in your editors. The text are than much better to share. > >And I repeat: always use \n Unix line ends (this means you cannot use >Notepad to edit the files in Windows), CVS can't handle the difference >between \n and \r\n and hopefully now all files are with \n only. > >Jakub > > > >------------------------------------------------------- >This SF.NET email is sponsored by: Thawte.com >Understand how to protect your customers personal information by implementi= ng >SSL on your Apache Web Server. Click here to get our FREE Thawte Apache >Guide: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0029en >_______________________________________________ >Apc-aa-coders mailing list >Apc...@li... >https://lists.sourceforge.net/lists/listinfo/apc-aa-coders -- Mitra Technology Consulting - www.mitra.biz - mi...@mi... 02-6684-8096 or 0414-648-0722 Life is a Mystery to be Lived, not a Problem to be Solved |
From: Mitra <mi...@mi...> - 2003-01-17 21:46:01
|
I'm doing some work on the flexible Ids that we discussed. Looking at view.php3, it is very strange in the way it Counts hits - where parameters are passed with cmd[]=x-vid-123-456 - it increments the first item in the view, but not the others, this is going to make the first item look much more popular than the others? Maybe this should be a parameter of the view, overridable in the code? So for example as a site editor I might consider that showing a list of headlines didn't count as a "display", but showing the abstracts did? - Mitra -- Mitra Technology Consulting - www.mitra.biz - mi...@mi... 02-6684-8096 or 0414-648-0722 Life is a Mystery to be Lived, not a Problem to be Solved |
From: Norbert B. <br...@ch...> - 2003-01-17 20:12:09
|
From: "Honza Malik" <hon...@ec...> > The regular expression for not empty field is '.+', so > {switch({text...........8}).+:{text...........8}:none}=20 > should work. It seems there is some problem in the script. It tries to expand content = of the field if it contains (). Here is url to the debug information" http://www.changenet.sk/aa/view.php3?vid=3D229&cmd[229]=3Dx-229-44119&noc= ache=3D1&debug=3D1 Here is the interesting part of it: ... Expanding:1:0:'text...........8' Expanded:0:'Pa=B9t=FAnovia (44 %), Tad=BEikovia (25 %), Hazarovia (10 = %), Uzbeci (8 %)' Continue = with:0:'_#HEADLINE_#FULLTEXT_#ECONOMY_{switch({text...........1})[a-zA-Z0= -9]: Politick=FD syst=E9m {text...........1} :} = {switch({loc_city.......1})[a-zA-Z0-9]: Hlavn=E9 mesto = {loc_city.......1} :} {switch({text...........2})[a-zA-Z0-9]: Rozloha = {text...........2} :} {switch({text...........3})[a-zA-Z0-9]: Po=E8et = obyvate=B5ov {text...........3} :} = {switch({text...........4})[a-zA-Z0-9]: =DAradn=FD jazyk = {text...........4} :} {switch({text...........8})[a-zA-Z0-9]: Rasov=E9 a = n=E1rodnostn=E9 zlo=BEenie Pa=B9t=FAnovia (44 %), Tad=BEikovia (25 %), = Hazarovia (10 %), Uzbeci (8 %) :}' Expanding:1:0:'text...........8' Expanded:0:'Pa=B9t=FAnovia (44 %), Tad=BEikovia (25 %), Hazarovia (10 = %), Uzbeci (8 %)' Continue = with:0:'_#HEADLINE_#FULLTEXT_#ECONOMY_{switch({text...........1})[a-zA-Z0= -9]: Politick=FD syst=E9m {text...........1} :} = {switch({loc_city.......1})[a-zA-Z0-9]: Hlavn=E9 mesto = {loc_city.......1} :} {switch({text...........2})[a-zA-Z0-9]: Rozloha = {text...........2} :} {switch({text...........3})[a-zA-Z0-9]: Po=E8et = obyvate=B5ov {text...........3} :} = {switch({text...........4})[a-zA-Z0-9]: =DAradn=FD jazyk = {text...........4} :} {switch(Pa=B9t=FAnovia (44 %), Tad=BEikovia (25 = %), Hazarovia (10 %), Uzbeci (8 %))[a-zA-Z0-9]: Rasov=E9 a = n=E1rodnostn=E9 zlo=BEenie Pa=B9t=FAnovia (44 %), Tad=BEikovia (25 %), = Hazarovia (10 %), Uzbeci (8 %) :} ' Expanding:1:0:'switch(Pa=B9t=FAnovia (44 %), Tad=BEikovia (25 %), = Hazarovia (10 %), Uzbeci (8 %))[a-zA-Z0-9]:Rasov=E9 a n=E1rodnostn=E9 = zlo=BEeniePa=B9t=FAnovia (44 %), Tad=BEikovia (25 %), Hazarovia (10 %), = Uzbeci (8 %):' Expanded:0:'' Continue with:0:' ... norbert br...@ch... |
From: Norbert B. <br...@ch...> - 2003-01-17 19:46:29
|
From: "Jakub Ad=E1mek" <jak...@se...> > I have made the big change and moved all AA scripts to using the > mini-gettext language environment.=20 > I hope everything will work. If you made any changes in old type > language files, please send them to me and I will merge them into the > new language files. There seems to be a bug in formutil.php3 script (more closing quotes = than opening ones).=20 Here is the diff of my changes: # diff formutil.php3 formutil.php3.old 586a587 > 640c641 < --- > } norbert br...@ch... |
From: <jak...@se...> - 2003-01-17 10:14:11
|
Please don't use tabs in any sources nor in the CHANGES file. I have just found a misformed text in CHANGES due to another tab width than I am using. Set "insert Tabs as spaces" and "indent by using spaces" or similar options in your editors. The text are than much better to share. And I repeat: always use \n Unix line ends (this means you cannot use Notepad to edit the files in Windows), CVS can't handle the difference between \n and \r\n and hopefully now all files are with \n only. Jakub |
From: Honza M. <hon...@ec...> - 2003-01-17 08:28:13
|
The regular expression for not empty field is '.+', so {switch({text...........8}).+:{text...........8}:none}=20 should work. Honza On =C8t, 2003-01-16 at 23:32, Norbert Brazda wrote: > I am not sure if my regexp is wrong (I am not very familiar with it) or= is there an bug in regular expression implementation in the switch{} com= mand.=20 >=20 >=20 > I have this command in my view definition (test whether the field is em= pty or not): >=20 > {switch({text...........8})[a-zA-Z0-9]:{text...........8}:none}=20 >=20 > It work well until the text...........8 contains parenthesis "(" or ")"= . The switch will display "none" even if the filed is not empty (e.g. it = contains string "Pastunovia (44 %), Tadzikovia (25 %), Hazarovia (10 %), = Uzbeci (8 %)". >=20 >=20 >=20 >=20 >=20 > Norbert Brazda > br...@ch... > tel: 0905-729359 >=20 > ChangeNet - informacny servis o obcianskej spolocnosti > Mlynske nivy 41, 821 09 Bratislava, Slovakia > tel/fax: 02-55560026, eMail: in...@ch... > http://www.changenet.sk >=20 > SPAJAME LUDI, KTORI MENIA SVET >=20 >=20 >=20 >=20 > ------------------------------------------------------- > This SF.NET email is sponsored by: Thawte.com > Understand how to protect your customers personal information by implem= enting > SSL on your Apache Web Server. Click here to get our FREE Thawte Apache= =20 > Guide: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0029en > _______________________________________________ > Apc-aa-coders mailing list > Apc...@li... > https://lists.sourceforge.net/lists/listinfo/apc-aa-coders >=20 |
From: Mitra <mi...@mi...> - 2003-01-16 22:27:19
|
What you are testing below should I think match anything that contains at least one alpha-numeric character (unless implemented strangely in which cae it would matche anything with EXACTLY one character). It would help with looking at this bug if you 1: Make sure you are running the latest CVS version, since there has been work with string expansion, though not specifically on "switch". 2: Set up a slice with two items, the first working - i.e. no parenthesis, the second with parenthesis. Then run the view with "debug=1" in the URL, so that we can see detailed of what exactly is getting expanded into what - and how this changes between good and bad results. - Mitra At 11:32 PM +0100 16/1/03, Norbert Brazda wrote: >I am not sure if my regexp is wrong (I am not very familiar with it) >or is there an bug in regular expression implementation in the >switch{} command. > > >I have this command in my view definition (test whether the field is >empty or not): > > {switch({text...........8})[a-zA-Z0-9]:{text...........8}:none} > >It work well until the text...........8 contains parenthesis "(" or >")". The switch will display "none" even if the filed is not empty >(e.g. it contains string "Pastunovia (44 %), Tadzikovia (25 %), >Hazarovia (10 %), Uzbeci (8 %)". > > > > > >Norbert Brazda >br...@ch... >tel: 0905-729359 > >ChangeNet - informacny servis o obcianskej spolocnosti >Mlynske nivy 41, 821 09 Bratislava, Slovakia >tel/fax: 02-55560026, eMail: in...@ch... >http://www.changenet.sk > >SPAJAME LUDI, KTORI MENIA SVET > > > > >------------------------------------------------------- >This SF.NET email is sponsored by: Thawte.com >Understand how to protect your customers personal information by implementing >SSL on your Apache Web Server. Click here to get our FREE Thawte Apache >Guide: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0029en >_______________________________________________ >Apc-aa-coders mailing list >Apc...@li... >https://lists.sourceforge.net/lists/listinfo/apc-aa-coders -- Mitra Technology Consulting - www.mitra.biz - mi...@mi... 02-6684-8096 or 0414-648-0722 Life is a Mystery to be Lived, not a Problem to be Solved |
From: Norbert B. <br...@ch...> - 2003-01-16 22:12:16
|
I am not sure if my regexp is wrong (I am not very familiar with it) or = is there an bug in regular expression implementation in the switch{} = command.=20 I have this command in my view definition (test whether the field is = empty or not): {switch({text...........8})[a-zA-Z0-9]:{text...........8}:none}=20 It work well until the text...........8 contains parenthesis "(" or ")". = The switch will display "none" even if the filed is not empty (e.g. it = contains string "Pastunovia (44 %), Tadzikovia (25 %), Hazarovia (10 %), = Uzbeci (8 %)". Norbert Brazda br...@ch... tel: 0905-729359 ChangeNet - informacny servis o obcianskej spolocnosti Mlynske nivy 41, 821 09 Bratislava, Slovakia tel/fax: 02-55560026, eMail: in...@ch... http://www.changenet.sk SPAJAME LUDI, KTORI MENIA SVET |
From: Mitra <mi...@mi...> - 2003-01-16 08:40:10
|
Honza, Jakub I have checked in everything I've got complete, but .... I'm actively debugging and developing at the moment. What is the best way to stay integrated with the changes to string handling. Most of my changes are pretty local, but I'd like to do something with that id change, and that would involve changing things in a number of files. Since we are on opposite time zones, it might be fine if we are all carefull to do a "cvs update" each day before editing, then CVS should handle most of the collisions ok. I am not familiar with how to use the CVS branches. A few pointers would be useful if I need to work with them. - Mitra -- Mitra Technology Consulting - www.mitra.biz - mi...@mi... 02-6684-8096 or 0414-648-0722 Life is a Mystery to be Lived, not a Problem to be Solved |
From: Mitra <mi...@mi...> - 2003-01-16 00:01:21
|
I've updated site.php3, added some functions to support shorter more functional site files, specifically 01/16/02 - added functions to module/site/site.php3 for site_* files (mitra) -- ModW_id2item - convert id to item enabling aliases etc -- ModW_arr2str - convert array back to string -- ModW_str2arr - convert apc= parameter string to array -- pass apc_state[item] on to unaliasing id2item is useful in that if your site parameters contain a single item id (a common case) you can setup $apc_state[item] = id2item($i,true); and then use expansion like {headline........} or {_#HEADLINE} The arr2str and str2arr are to provide simple conversion between a string parameter and the apc_state format of separated variables. - Mitra -- Mitra Technology Consulting - www.mitra.biz - mi...@mi... 02-6684-8096 or 0414-648-0722 Life is a Mystery to be Lived, not a Problem to be Solved |
From: Honza M. <hon...@ec...> - 2003-01-15 18:04:26
|
Fixed in CVS. Honza On St, 2003-01-15 at 17:20, Marek Tichy wrote: > Hi, > I had two problems with the image uploads in latest CVS >=20 > 1) Calls GD function imagetypes() even if GD isn't installed >=20 > Fix: >=20 > # diff apc-aa/include/imagefunc.php3 /var/www/apc-aa/include/imagefunc.= php3 > 12c12,19 > < > --- > > if (!extension_loaded('gd')) > > { > > // if (!dl('gd.so')) > > // { > > return(false); > > // } > > } > > return(true); > 92a100 > > if (!GDInstalled()) return(false); >=20 >=20 > 2) Echoes some debug ? info which causes > Warning: Cannot add header information - headers already sent by (outpu= t started at /var/www/apc-aa/include/itemfunc.php3:830) in /v > ar/www/apc-aa/include/util.php3 on line 71 >=20 > Fix: >=20 > diff apc-aa/include/itemfunc.php3 /var/www/apc-aa/include/itemfunc.php3 > 830,831c830,832 > < echo $fid;print_r($arr_stop); > < echo $stop=3Dfalse; > --- > > // echo $fid; > > print_r($arr_stop); > > // echo $stop=3Dfalse; > 843c844 > < { echo "tu"; > --- > > { // echo "tu"; >=20 > Could someone fix it in cvs please ? >=20 > Best > Marek >=20 >=20 > > -----Original Message----- > > From: apc...@li... [mailto:apc-aa-coders= -a...@li...]On Behalf Of Honza Malik > > Sent: 15 January 2003 11:01 > > To: apc...@so... > > Subject: Re: [Apc-aa-coders] Creating an instance of class item > > > > > > Described functions are already there (grabbed from slice.php3): > > > > // 'slice_aliases' - is splited to two functions > > list($fields,) =3D GetSliceFields($slice_id); > > $aliases =3D GetAliasesFromFields($fields); > > > > // read_content_from_db - axactly what does GetItemContent() > > // the $ids could be array of ids or single $id, $use_short_id is > > // boolean indicating type of $ids (default is false =3D> unpacked) > > $content =3D GetItemContent($ids, $use_short_ids) > > > > Honza > > > > On St, 2003-01-15 at 09:16, Mitra wrote: > > > So should we have a generic function that takes an itemid, reads th= e > > > aliases from the slice's info, and then the content from the db and > > > then creates an item? > > > > > > That function itself is easy, but needs two functions to make it wo= rk i.e. > > > > > > > > > $aliases =3D slice_aliases($sliceid); > > > $content =3D read_content_from_db($itemid); > > > new $item("","",$aliases,"",""); > > > $item->columns =3D read_content_from_db($itemid); > > > > > > I don't think the format string is needed? Since we are going to be > > > expanding a view. > > > > > > The two functions I'm using above - i.e. slice_aliases($sliceid) an= d > > > read_content_from_db($itemid) both seem to be missing, although the= y > > > both seem pretty generic to me. > > > > > > > > > - Mitra > > > > > > At 1:22 AM +0100 15/1/03, Honza Malik wrote: > > > >Grabbed from admin/discedit.php3: > > > > > > > >// $dcontent - well known "Abstract Data Structure": > > > >// $dcontent[$d_id]["d_state........."][0][value] > > > >// $dcontent[$d_id]["d_state........."][0][flag] > > > >$dcontent =3D GetDiscussionContent($item_id, "", "", false); > > > > > > > >// aliases array in standard form: > > > >// $aliases["_#SUBJECT_"] =3D array( "fce" =3D> "f_h", > > > >// "param" =3D> "d_subject......."= , > > > >// "hlp" =3D> "L_D_SUBJECT_ALIAS= " ); > > > > > > > >// prepare > > > >$item =3D new item("","",$aliases,"","",""); > > > > > > > >// format string > > > >$text =3D "<tr><td> ..._#SUBJECT# </td> > > > > <td>_#AUTHOR## .._#DATE####</td></tr>"; > > > > > > > >// assign format > > > >$item->setformat($text); > > > > > > > >// assign item data > > > >$item->columns =3D $dcontent[$d_id]; > > > > > > > >// print > > > >echo $item->get_item(); > > > > > > > > > > > > Honza > > > > > > > > > > > >On =DAt, 2003-01-14 at 01:10, Mitra wrote: > > > >> > > > > >> >> P.S. I'd still like a hint on how to create a new "item" re= fering to > > > >> > > an item id, this would be very useful for use of the site = module, but > > > >> >> I can't figure out if this is possible. > > > >> > > > > >> >I'm not sure I understand, what you need. > > > >> > > > >> > > > >> In the site, I have a parameter like --m1234 > > > >> > > > >> So I have an id of an item, - (actually a short id, but it does= n't > > > >> really matter. ) > > > >> > > > >> What I would like to do is in module/site/sites/site_greenpages= .php3 > > > >> create an instance of the class "item" (as in include/item.php3= ) so > > > >> that I can then do my unaliasing in that context. This would m= ean > > > >> that within the site definition I could put > > > >> > > > >> _#HEADLINE or {headline........} or > > > >> {alias:related........1:f_v:view.php3?vid=3D23&cmd[]=3Dx-23-_#t= his} > > > >> > > > >> etc etc > > > >> > > > >> But the code for creating the instance of the class item is pre= tty > > > >> obscure, it is tightly coupled to the places it is used now, I'= m > > > >> looking for some guidelines to creating an instance of the clas= s item > > > > > starting with an id. > > > > > > > > > > - Mitra > > > > > > > > > > > > > > > >------------------------------------------------------- > > > >This SF.NET email is sponsored by: Take your first step towards gi= ving > > > >your online business a competitive advantage. Test-drive a Thawte = SSL > > > >certificate - our easy online guide will show you how. Click here = to get > > > >started: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0027en > > > >_______________________________________________ > > > >Apc-aa-coders mailing list > > > >Apc...@li... > > > >https://lists.sourceforge.net/lists/listinfo/apc-aa-coders > > > > > > > > > > > ------------------------------------------------------- > > This SF.NET email is sponsored by: Take your first step towards givin= g > > your online business a competitive advantage. Test-drive a Thawte SSL > > certificate - our easy online guide will show you how. Click here to = get > > started: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0027en > > _______________________________________________ > > Apc-aa-coders mailing list > > Apc...@li... > > https://lists.sourceforge.net/lists/listinfo/apc-aa-coders > > >=20 >=20 >=20 > ------------------------------------------------------- > This SF.NET email is sponsored by: Take your first step towards giving=20 > your online business a competitive advantage. Test-drive a Thawte SSL=20 > certificate - our easy online guide will show you how. Click here to ge= t=20 > started: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0027en > _______________________________________________ > Apc-aa-coders mailing list > Apc...@li... > https://lists.sourceforge.net/lists/listinfo/apc-aa-coders >=20 |
From: Marek T. <ma...@gn...> - 2003-01-15 16:19:38
|
Hi, I had two problems with the image uploads in latest CVS 1) Calls GD function imagetypes() even if GD isn't installed Fix: # diff apc-aa/include/imagefunc.php3 /var/www/apc-aa/include/imagefunc.php3 12c12,19 < --- > if (!extension_loaded('gd')) > { > // if (!dl('gd.so')) > // { > return(false); > // } > } > return(true); 92a100 > if (!GDInstalled()) return(false); 2) Echoes some debug ? info which causes Warning: Cannot add header information - headers already sent by (output started at /var/www/apc-aa/include/itemfunc.php3:830) in /v ar/www/apc-aa/include/util.php3 on line 71 Fix: diff apc-aa/include/itemfunc.php3 /var/www/apc-aa/include/itemfunc.php3 830,831c830,832 < echo $fid;print_r($arr_stop); < echo $stop=false; --- > // echo $fid; > print_r($arr_stop); > // echo $stop=false; 843c844 < { echo "tu"; --- > { // echo "tu"; Could someone fix it in cvs please ? Best Marek > -----Original Message----- > From: apc...@li... [mailto:apc...@li...]On Behalf Of Honza Malik > Sent: 15 January 2003 11:01 > To: apc...@so... > Subject: Re: [Apc-aa-coders] Creating an instance of class item > > > Described functions are already there (grabbed from slice.php3): > > // 'slice_aliases' - is splited to two functions > list($fields,) = GetSliceFields($slice_id); > $aliases = GetAliasesFromFields($fields); > > // read_content_from_db - axactly what does GetItemContent() > // the $ids could be array of ids or single $id, $use_short_id is > // boolean indicating type of $ids (default is false => unpacked) > $content = GetItemContent($ids, $use_short_ids) > > Honza > > On St, 2003-01-15 at 09:16, Mitra wrote: > > So should we have a generic function that takes an itemid, reads the > > aliases from the slice's info, and then the content from the db and > > then creates an item? > > > > That function itself is easy, but needs two functions to make it work i.e. > > > > > > $aliases = slice_aliases($sliceid); > > $content = read_content_from_db($itemid); > > new $item("","",$aliases,"",""); > > $item->columns = read_content_from_db($itemid); > > > > I don't think the format string is needed? Since we are going to be > > expanding a view. > > > > The two functions I'm using above - i.e. slice_aliases($sliceid) and > > read_content_from_db($itemid) both seem to be missing, although they > > both seem pretty generic to me. > > > > > > - Mitra > > > > At 1:22 AM +0100 15/1/03, Honza Malik wrote: > > >Grabbed from admin/discedit.php3: > > > > > >// $dcontent - well known "Abstract Data Structure": > > >// $dcontent[$d_id]["d_state........."][0][value] > > >// $dcontent[$d_id]["d_state........."][0][flag] > > >$dcontent = GetDiscussionContent($item_id, "", "", false); > > > > > >// aliases array in standard form: > > >// $aliases["_#SUBJECT_"] = array( "fce" => "f_h", > > >// "param" => "d_subject.......", > > >// "hlp" => "L_D_SUBJECT_ALIAS" ); > > > > > >// prepare > > >$item = new item("","",$aliases,"","",""); > > > > > >// format string > > >$text = "<tr><td> ..._#SUBJECT# </td> > > > <td>_#AUTHOR## .._#DATE####</td></tr>"; > > > > > >// assign format > > >$item->setformat($text); > > > > > >// assign item data > > >$item->columns = $dcontent[$d_id]; > > > > > >// print > > >echo $item->get_item(); > > > > > > > > > Honza > > > > > > > > >On Út, 2003-01-14 at 01:10, Mitra wrote: > > >> > > > >> >> P.S. I'd still like a hint on how to create a new "item" refering to > > >> > > an item id, this would be very useful for use of the site module, but > > >> >> I can't figure out if this is possible. > > >> > > > >> >I'm not sure I understand, what you need. > > >> > > >> > > >> In the site, I have a parameter like --m1234 > > >> > > >> So I have an id of an item, - (actually a short id, but it doesn't > > >> really matter. ) > > >> > > >> What I would like to do is in module/site/sites/site_greenpages.php3 > > >> create an instance of the class "item" (as in include/item.php3) so > > >> that I can then do my unaliasing in that context. This would mean > > >> that within the site definition I could put > > >> > > >> _#HEADLINE or {headline........} or > > >> {alias:related........1:f_v:view.php3?vid=23&cmd[]=x-23-_#this} > > >> > > >> etc etc > > >> > > >> But the code for creating the instance of the class item is pretty > > >> obscure, it is tightly coupled to the places it is used now, I'm > > >> looking for some guidelines to creating an instance of the class item > > > > starting with an id. > > > > > > > > - Mitra > > > > > > > > > > > >------------------------------------------------------- > > >This SF.NET email is sponsored by: Take your first step towards giving > > >your online business a competitive advantage. Test-drive a Thawte SSL > > >certificate - our easy online guide will show you how. Click here to get > > >started: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0027en > > >_______________________________________________ > > >Apc-aa-coders mailing list > > >Apc...@li... > > >https://lists.sourceforge.net/lists/listinfo/apc-aa-coders > > > > > > ------------------------------------------------------- > This SF.NET email is sponsored by: Take your first step towards giving > your online business a competitive advantage. Test-drive a Thawte SSL > certificate - our easy online guide will show you how. Click here to get > started: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0027en > _______________________________________________ > Apc-aa-coders mailing list > Apc...@li... > https://lists.sourceforge.net/lists/listinfo/apc-aa-coders > |
From: Honza M. <hon...@ec...> - 2003-01-15 09:44:37
|
Described functions are already there (grabbed from slice.php3): // 'slice_aliases' - is splited to two functions=20 list($fields,) =3D GetSliceFields($slice_id); $aliases =3D GetAliasesFromFields($fields); // read_content_from_db - axactly what does GetItemContent() // the $ids could be array of ids or single $id, $use_short_id is=20 // boolean indicating type of $ids (default is false =3D> unpacked) $content =3D GetItemContent($ids, $use_short_ids) Honza On St, 2003-01-15 at 09:16, Mitra wrote: > So should we have a generic function that takes an itemid, reads the=20 > aliases from the slice's info, and then the content from the db and=20 > then creates an item? >=20 > That function itself is easy, but needs two functions to make it work i= .e. >=20 >=20 > $aliases =3D slice_aliases($sliceid); > $content =3D read_content_from_db($itemid); > new $item("","",$aliases,"",""); > $item->columns =3D read_content_from_db($itemid); >=20 > I don't think the format string is needed? Since we are going to be=20 > expanding a view. >=20 > The two functions I'm using above - i.e. slice_aliases($sliceid) and=20 > read_content_from_db($itemid) both seem to be missing, although they=20 > both seem pretty generic to me. >=20 >=20 > - Mitra >=20 > At 1:22 AM +0100 15/1/03, Honza Malik wrote: > >Grabbed from admin/discedit.php3: > > > >// $dcontent - well known "Abstract Data Structure": > >// $dcontent[$d_id]["d_state........."][0][value] > >// $dcontent[$d_id]["d_state........."][0][flag] > >$dcontent =3D GetDiscussionContent($item_id, "", "", false); > > > >// aliases array in standard form: > >// $aliases["_#SUBJECT_"] =3D array( "fce" =3D> "f_h", > >// "param" =3D> "d_subject.......", > >// "hlp" =3D> "L_D_SUBJECT_ALIAS" ); > > > >// prepare > >$item =3D new item("","",$aliases,"","",""); > > > >// format string > >$text =3D "<tr><td> ..._#SUBJECT# </td> > > <td>_#AUTHOR## .._#DATE####</td></tr>"; > > > >// assign format > >$item->setformat($text); > > > >// assign item data > >$item->columns =3D $dcontent[$d_id]; > > > >// print > >echo $item->get_item(); > > > > > > Honza > > > > > >On =DAt, 2003-01-14 at 01:10, Mitra wrote: > >> > > >> >> P.S. I'd still like a hint on how to create a new "item" referi= ng to > >> > > an item id, this would be very useful for use of the site modu= le, but > >> >> I can't figure out if this is possible. > >> > > >> >I'm not sure I understand, what you need. > >> > >> > >> In the site, I have a parameter like --m1234 > >> > >> So I have an id of an item, - (actually a short id, but it doesn't > >> really matter. ) > >> > >> What I would like to do is in module/site/sites/site_greenpages.php= 3 > >> create an instance of the class "item" (as in include/item.php3) so > >> that I can then do my unaliasing in that context. This would mean > >> that within the site definition I could put > >> > >> _#HEADLINE or {headline........} or > >> {alias:related........1:f_v:view.php3?vid=3D23&cmd[]=3Dx-23-_#this} > >> > >> etc etc > >> > >> But the code for creating the instance of the class item is pretty > >> obscure, it is tightly coupled to the places it is used now, I'm > >> looking for some guidelines to creating an instance of the class it= em > > > starting with an id. > > > > > > - Mitra > > > > > > > >------------------------------------------------------- > >This SF.NET email is sponsored by: Take your first step towards giving > >your online business a competitive advantage. Test-drive a Thawte SSL > >certificate - our easy online guide will show you how. Click here to g= et > >started: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0027en > >_______________________________________________ > >Apc-aa-coders mailing list > >Apc...@li... > >https://lists.sourceforge.net/lists/listinfo/apc-aa-coders >=20 |
From: Mitra <mi...@mi...> - 2003-01-15 08:23:53
|
So should we have a generic function that takes an itemid, reads the aliases from the slice's info, and then the content from the db and then creates an item? That function itself is easy, but needs two functions to make it work i.e. $aliases =3D slice_aliases($sliceid); $content =3D read_content_from_db($itemid); new $item("","",$aliases,"",""); $item->columns =3D read_content_from_db($itemid); I don't think the format string is needed? Since we are going to be expanding a view. The two functions I'm using above - i.e. slice_aliases($sliceid) and read_content_from_db($itemid) both seem to be missing, although they both seem pretty generic to me. - Mitra At 1:22 AM +0100 15/1/03, Honza Malik wrote: >Grabbed from admin/discedit.php3: > >// $dcontent - well known "Abstract Data Structure": >// $dcontent[$d_id]["d_state........."][0][value] >// $dcontent[$d_id]["d_state........."][0][flag] >$dcontent =3D GetDiscussionContent($item_id, "", "", false); > >// aliases array in standard form: >// $aliases["_#SUBJECT_"] =3D array( "fce" =3D> "f_h", >// "param" =3D> "d_subject.......", >// "hlp" =3D> "L_D_SUBJECT_ALIAS" ); > >// prepare >$item =3D new item("","",$aliases,"","",""); > >// format string >$text =3D "<tr><td> ..._#SUBJECT# </td> > <td>_#AUTHOR## .._#DATE####</td></tr>"; > >// assign format >$item->setformat($text); > >// assign item data >$item->columns =3D $dcontent[$d_id]; > >// print >echo $item->get_item(); > > > Honza > > >On =DAt, 2003-01-14 at 01:10, Mitra wrote: >> > >> >> P.S. I'd still like a hint on how to create a new "item" refering to >> > > an item id, this would be very useful for use of the site module, b= ut >> >> I can't figure out if this is possible. >> > >> >I'm not sure I understand, what you need. >> >> >> In the site, I have a parameter like --m1234 >> >> So I have an id of an item, - (actually a short id, but it doesn't >> really matter. ) >> >> What I would like to do is in module/site/sites/site_greenpages.php3 >> create an instance of the class "item" (as in include/item.php3) so >> that I can then do my unaliasing in that context. This would mean >> that within the site definition I could put >> >> _#HEADLINE or {headline........} or >> {alias:related........1:f_v:view.php3?vid=3D23&cmd[]=3Dx-23-_#this} >> >> etc etc >> >> But the code for creating the instance of the class item is pretty >> obscure, it is tightly coupled to the places it is used now, I'm >> looking for some guidelines to creating an instance of the class item > > starting with an id. > > > > - Mitra > > > >------------------------------------------------------- >This SF.NET email is sponsored by: Take your first step towards giving >your online business a competitive advantage. Test-drive a Thawte SSL >certificate - our easy online guide will show you how. Click here to get >started: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0027en >_______________________________________________ >Apc-aa-coders mailing list >Apc...@li... >https://lists.sourceforge.net/lists/listinfo/apc-aa-coders -- Mitra Technology Consulting - www.mitra.biz - mi...@mi... 02-6684-8096 or 0414-648-0722 Life is a Mystery to be Lived, not a Problem to be Solved |
From: Honza M. <hon...@ec...> - 2003-01-15 00:05:10
|
Grabbed from admin/discedit.php3: // $dcontent - well known "Abstract Data Structure": // $dcontent[$d_id]["d_state........."][0][value] // $dcontent[$d_id]["d_state........."][0][flag] $dcontent =3D GetDiscussionContent($item_id, "", "", false); // aliases array in standard form: // $aliases["_#SUBJECT_"] =3D array( "fce" =3D> "f_h", // "param" =3D> "d_subject.......", // "hlp" =3D> "L_D_SUBJECT_ALIAS" ); // prepare $item =3D new item("","",$aliases,"","",""); // format string $text =3D "<tr><td> ..._#SUBJECT# </td> <td>_#AUTHOR## .._#DATE####</td></tr>"; // assign format $item->setformat($text); // assign item data $item->columns =3D $dcontent[$d_id]; // print echo $item->get_item(); Honza On =DAt, 2003-01-14 at 01:10, Mitra wrote: > > > >> P.S. I'd still like a hint on how to create a new "item" refering t= o > > > an item id, this would be very useful for use of the site module, = but > >> I can't figure out if this is possible. > > > >I'm not sure I understand, what you need. >=20 >=20 > In the site, I have a parameter like --m1234 >=20 > So I have an id of an item, - (actually a short id, but it doesn't=20 > really matter. ) >=20 > What I would like to do is in module/site/sites/site_greenpages.php3=20 > create an instance of the class "item" (as in include/item.php3) so=20 > that I can then do my unaliasing in that context. This would mean=20 > that within the site definition I could put >=20 > _#HEADLINE or {headline........} or=20 > {alias:related........1:f_v:view.php3?vid=3D23&cmd[]=3Dx-23-_#this} >=20 > etc etc >=20 > But the code for creating the instance of the class item is pretty=20 > obscure, it is tightly coupled to the places it is used now, I'm=20 > looking for some guidelines to creating an instance of the class item=20 > starting with an id. >=20 > - Mitra |
From: Honza M. <hon...@ec...> - 2003-01-14 23:44:53
|
On =DAt, 2003-01-14 at 07:22, Zoltan Varady wrote: > > I would suggest we need two classes, "id" for handling a single id,=20 > > and "idarray" for handling arrays of ids? The interface should=20 > > allow for returning results directly from an "idarray" WITHOUT=20 > > neccessarily instantiating an "id" for example: > > > > $url .=3D $myid->longid; to return the long id . > > OR > > $url .=3D $myarray->longid(10); to return the long id of the 10th id = in=20 > > the array > > > > but not requiring > > $url .=3D $myarray->id(10)->longid. > > > > Am i on the right direction? >=20 > Sounds great!=20 Yes. Only inner implementation of "idarray" will not be array of "id" objects, because it is probably not memory efficient. > I also saw it as a problem that we have all these=20 > different types of ID's. What is the reason for this, is it historical?= =20 Yes, historical reasons. > Shouldn't just short ID's be enough? Yes, we can use short_ids as much as possible. The new fetures could be based on short_ids. > Or do we need long ID's for portability and feeding between databases? It is easier, but not necessary to use long ids. On the other hand, we already use it and who have the time to rewrite the code. > I suppose the difference between quoted packed and unquoted packed is=20 > that any character can appear in a packed ID, even quotes, so you need=20 > to addslashes and stripslashes... Yes - quoted for storing into database or not. > Maybe we could do something similar with slice ID's (packed, unpacked,=20 > quoted, unquoted), and field names (packed, unpacked....)? For slice ids we can use the same class - it is exactly the same as item ids. Field names we allways use in unpacked - 16 character long form. > I also think this is important because it makes the programming=20 > interface clearer. During my work for FoEI (I'm just finishing now) we=20 > tried using APC-AA as a back-end for storing data, and we used a=20 > different template engine, we haven't used the fulltext view, index=20 > view, etc. directly. Looking back, I'm not sure that this was a good=20 > idea, but in the future I'd like to create a kind of API to APC-AA, so=20 > that it could interoperate more easily with external PHP code. This=20 > looks like a step in that direction. Sounds good. Please consult the API before you will do it. We found very usefull to have only one way, how to get items from database (QueryIDs(), GetItemContent()). The database changes and new feature implementation (like password protected items, ...) are much easier with one set of functions used. > BTW one more thing: is there a specific reason why field names _must_=20 > be 16 (or however many) characters long? And do they have to have the=20 > name.............3 syntax with the dots? It annoys me, because whenever= =20 > I need to put the headline field into an inline alias, for example,=20 > whenever I need to type the field name, I have to copy & paste it from=20 > the "fields" section of the admin interface - I cannot just type=20 > "headline.........." because I will surely screw up the number of dots.= =20 > Can't field names be just normal names like "headline",=20 > "uploaded_image", or whatever? Yes, it is 16 character long - exactly. When we do it, we don't think users will ever write the field ids. Now they do. The id consist of field type, counter and dots between. We use the id to get type of field on some (not so many) spots - mainly for 'category' field. I think we should not change the field ids - we rather have to think about some alternative shortcuts (like headline.......2 =3D headline-2 or such). Honza >=20 >=20 > cheers! >=20 > Zoltan. >=20 >=20 >=20 > ------------------------------------------------------- > This SF.NET email is sponsored by: FREE SSL Guide from Thawte > are you planning your Web Server Security? Click here to get a FREE > Thawte SSL guide and find the answers to all your SSL security issues. > http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en > _______________________________________________ > Apc-aa-coders mailing list > Apc...@li... > https://lists.sourceforge.net/lists/listinfo/apc-aa-coders >=20 |
From: Honza M. <hon...@ec...> - 2003-01-14 14:38:16
|
It looks like there will be bigger changes in the AA code, so there is a good chance the AA code will be not so stable for some time. Before we commit such changes to CVS I want to tag current version as stable apc-aa version 2.4.1. If anybody have any changes which should be part of the 2.4.1, please commit the changes (today or tomorrow). FYI - planed changes after the release includes: 1) switching language environment to mgettext 2) new polls module 3) alerts improvements 4) user management improvement 5) converting ItemManager to new - generalized object implementation with improved searching, which will be used also for related items and discussion administration 6) new links module (Yahoo like link manager (see ekolink.cz)) 7) maybe some fulltext search improvements 8) maybe feeding filtering 9) ... add your planed changes, please Honza On =DAt, 2003-01-14 at 12:12, Jakub Adamek wrote: > Hello, coders, >=20 > I would like to change all the AA code to mgettext. If you are working > on some code containing language constants, there would possibly be som= e > CVS conflicts, so please commit everything you can. Honza wants to make > some versioning before this is done, he will write about it. >=20 > I will also document the mgettex module and create a web interface to > use it. >=20 > Jakub >=20 >=20 >=20 > ------------------------------------------------------- > This SF.NET email is sponsored by: FREE SSL Guide from Thawte > are you planning your Web Server Security? Click here to get a FREE > Thawte SSL guide and find the answers to all your SSL security issues. > http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en > _______________________________________________ > Apc-aa-coders mailing list > Apc...@li... > https://lists.sourceforge.net/lists/listinfo/apc-aa-coders >=20 |
From: Ram P. <ra...@pa...> - 2003-01-14 13:14:36
|
Mitra .. I checked out the file to send it to you for review. We need to discuss. - Ram ----- Original Message ----- From: "Mitra" <mi...@mi...> To: "Ram Prasad" <ra...@pa...> Cc: <apc...@so...> Sent: Sunday, January 05, 2003 2:59 PM Subject: Re: [Apc-aa-coders] anonymous form filling > Yes, if you check it back into CVS ! > > If you don't know how, or don't have permissions to submit something > back to CVS (and make sure to just submit the changed file, or like > me you'll make the mistake of submitting config.php3! ) then you can > send me the changed file and I'll submit it. > > - Mitra > > At 9:37 AM +0530 5/1/03, Ram Prasad wrote: > >Okay. But will this change be incorporated into the > >existing code so that everyone could make use of this ? > > > >- Ram > >Ram Says .... Mitra > >> Ram > >> > >> I suggest changing the entries to use an entry from > >> include/config.php > >> > >> I think it should be > >> > >> $AA_BASE_PATH . "misc/wysiwyg/" > >> > >> - Mitra > >> > >> > >> > >> > >> At 3:36 PM +0530 4/1/03, Ram Prasad wrote: > >>>Hi > >>> > >>>I tried the "anonymous posting from public website". > >>> When using the Richtext area, and using the form, the > >>> form does not render properly ( it does not load the > >>> images in the RichText box) and was throwing up > >>> Javascript errors. I checked the required files, and > >>> found that the script used "../misc/wysiwyg/" to > >>> reference the javascript and the images required to > >>> render the richtext box. This does not work fine when > >>> we use our custom forms to add records. So, I changed > >>> all the > >>>"../misc/wysiwyg/" to "/apc-aa/misc/wysiwyg/" and it > >>> started working fine. > >>> > >>>Now, > >>>1) I would like to know if this is a feature or a bug > >>>2) If bug, can we change the code to have > >>> "/apc-aa/misc/wysiwyg/" instead of "../misc/wysiwyg/" ( > >>> there could be a problem here: many may not be using > >>> apc-aa as their ActionApps directory.) > >>> > >>>- Ram > >>> > >>> > >>> > >>> > >>>------------------------------------------------------- > >>>This sf.net email is sponsored by:ThinkGeek > >>>Welcome to geek heaven. > >>>http://thinkgeek.com/sf > >>>_______________________________________________ > >>>Apc-aa-coders mailing list > >>>Apc...@li... > >>>https://lists.sourceforge.net/lists/listinfo/apc-aa-coders > >> > >> > >> -- > >> Mitra Technology Consulting - www.mitra.biz - > >> mi...@mi... > >> 02-6684-8096 or 0414-648-0722 > >> > >> Life is a Mystery to be Lived, not a Problem to be > > > Solved > > > > > >------------------ > >Ram Prasad > >www.megalinux.net > > > -- > Mitra Technology Consulting - www.mitra.biz - mi...@mi... > 02-6684-8096 or 0414-648-0722 > > Life is a Mystery to be Lived, not a Problem to be Solved > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Apc-aa-coders mailing list > Apc...@li... > https://lists.sourceforge.net/lists/listinfo/apc-aa-coders > > |
From: <jak...@se...> - 2003-01-14 11:10:19
|
Hello, coders, I would like to change all the AA code to mgettext. If you are working on some code containing language constants, there would possibly be some CVS conflicts, so please commit everything you can. Honza wants to make some versioning before this is done, he will write about it. I will also document the mgettex module and create a web interface to use it. Jakub |
From: Zoltan V. <dr...@zp...> - 2003-01-14 06:23:15
|
> > $url .= $myid->longid; to return the long id . > OR > $url .= $myarray->longid(10); to return the long id of the 10th id in > the array > > but not requiring > $url .= $myarray->id(10)->longid. > > Am i on the right direction? Sounds great! I also saw it as a problem that we have all these different types of ID's. What is the reason for this, is it historical? Shouldn't just short ID's be enough? Or do we need long ID's for portability and feeding between databases? I suppose the difference between quoted packed and unquoted packed is that any character can appear in a packed ID, even quotes, so you need to addslashes and stripslashes... Maybe we could do something similar with slice ID's (packed, unpacked, quoted, unquoted), and field names (packed, unpacked....)? I also think this is important because it makes the programming interface clearer. During my work for FoEI (I'm just finishing now) we tried using APC-AA as a back-end for storing data, and we used a different template engine, we haven't used the fulltext view, index view, etc. directly. Looking back, I'm not sure that this was a good idea, but in the future I'd like to create a kind of API to APC-AA, so that it could interoperate more easily with external PHP code. This looks like a step in that direction. BTW one more thing: is there a specific reason why field names _must_ be 16 (or however many) characters long? And do they have to have the name.............3 syntax with the dots? It annoys me, because whenever I need to put the headline field into an inline alias, for example, whenever I need to type the field name, I have to copy & paste it from the "fields" section of the admin interface - I cannot just type "headline.........." because I will surely screw up the number of dots. Can't field names be just normal names like "headline", "uploaded_image", or whatever? cheers! Zoltan. |
From: Mitra <mi...@mi...> - 2003-01-14 00:23:45
|
Ok - so I'm understanding that you think this is a good idea, but that it needs to have some extended functionality, specifically: a: handling arrays of ids in different formats. b: Handling quoted and unquoted packedids (I don't understand the difference here - maybe another source of errors) So it seems we have two separate things to decide. 1: External Interface - the series of methods applied to the class 2: Internal implementation. If we do our job correctly then we can start with a simple internal implementation which can then be changed to handle the more complex case of very large arrays of ids WITHOUT changing the external interface that the rest of the code uses. I would suggest we need two classes, "id" for handling a single id, and "idarray" for handling arrays of ids? The interface should allow for returning results directly from an "idarray" WITHOUT neccessarily instantiating an "id" for example: $url .= $myid->longid; to return the long id . OR $url .= $myarray->longid(10); to return the long id of the 10th id in the array but not requiring $url .= $myarray->id(10)->longid. Am i on the right direction? - Mitra At 12:26 AM +0100 14/1/03, Honza Malik wrote: >On Po, 2003-01-13 at 14:45, Mitra wrote: >> Hi >> >> There is a lot of code, and a lot of mistakes, that happen around the >> different representations for item ids. We have at least four that I >> know of: >> Short id: Sequence of Item in database, used in shorter urls >> especially in views >> Packed id: 128 bit packed, stored in database >> Unpacked id: 32 character, used in urls >> Tagged ids: For example where an x is on the front of a packed id to >> indicate bidirectional. > >1) >In some cases it is unfortunately needed to distinguish between >packed"ed and packed&unquoted :-( > >2) >The 'x' ('y' and 'z' resp.) characters are there not only as the flag of >relation direction. There was some problem with 32 characters long >hexadecimal numbers in array index (a[54637ac9bec645...]) when posted to >PHP from HTML form. I think the problem was, that if the hexadecimal >number begins with digits, PHP thinks the index in decimal so it >produces a[54637] in our example. The begining 'x' tells PHP to >interpret index as string. > >> An example of a Sysadmin mistake was where recently I used related >> items window and stored the string, which then broke something using >> it as a related items link. I had to switch to store item ids. >> >> The reason this came up for me, is that I need a way to add a meaning >> to related item links, which is hard with since a multi-value field >> (like a related item) can only contain one piece of data. I was >> thinking of extending the related item window to allow me to redefine >> the buttons. >> >> What I'm thinking is to add a "class itemid" which would refer to an >> item. This could be initialised with either shortid, packed, >> unpacked or tagged, and then could - via methods - return any of the >> alternatives e.g. > > > > foo = new itemid(123) > > #new itemid(1234567890abcdef1234567890abcdef) > > > > and then foo->packed; > > > > I would use lazy evaluation to do the conversion, i.e. only > > generating the flavors needed. > > >> What do you think? > >I had very simillar idea, only the reason is another. In my thoughts it >was not object for storing single item_id, but it was rather >item_ids_set (foo->short(4) gives you fourth short_id from the set). > >Reason: >There are several places where we works with the sets of ids. Very >important function QueryIDs() returns IDs as a numbered array of 32 >characters long hexadecimal ids (= unpacked). When we have slice with >50.000 items, the storage of all item ids in the slice exceeds 1MB. >- We already encounter some memory limit problem. >- It is for example impossible to call serialize() on such array (as > PHPLib sessions does to cache the result) - it is too big. > >I thought about implementation it as classic C-like array of 4B integers >in one memory block (string), where we would store short_ids: > >function short($n) { > return transform4B_2_short( substr($this->heap, $n*4, 4))); >} >Which should be quick and memory efective. The inner implementation is >just detail. > >> If we like the idea, I would see it programmed in gradually, i.e. I >> define the class, and its methods and then it can be integrated only >> when we are working on some part of the code. > >Agree. > >> - Mitra >> >> P.S. I'd still like a hint on how to create a new "item" refering to >> an item id, this would be very useful for use of the site module, but >> I can't figure out if this is possible. > >I'm not sure I understand, what you need. > > Honza > > > >------------------------------------------------------- >This SF.NET email is sponsored by: FREE SSL Guide from Thawte >are you planning your Web Server Security? Click here to get a FREE >Thawte SSL guide and find the answers to all your SSL security issues. >http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en >_______________________________________________ >Apc-aa-coders mailing list >Apc...@li... >https://lists.sourceforge.net/lists/listinfo/apc-aa-coders -- Mitra Technology Consulting - www.mitra.biz - mi...@mi... 02-6684-8096 or 0414-648-0722 Life is a Mystery to be Lived, not a Problem to be Solved |
From: Mitra <mi...@mi...> - 2003-01-14 00:14:33
|
> >> P.S. I'd still like a hint on how to create a new "item" refering to > > an item id, this would be very useful for use of the site module, but >> I can't figure out if this is possible. > >I'm not sure I understand, what you need. In the site, I have a parameter like --m1234 So I have an id of an item, - (actually a short id, but it doesn't really matter. ) What I would like to do is in module/site/sites/site_greenpages.php3 create an instance of the class "item" (as in include/item.php3) so that I can then do my unaliasing in that context. This would mean that within the site definition I could put _#HEADLINE or {headline........} or {alias:related........1:f_v:view.php3?vid=23&cmd[]=x-23-_#this} etc etc But the code for creating the instance of the class item is pretty obscure, it is tightly coupled to the places it is used now, I'm looking for some guidelines to creating an instance of the class item starting with an id. - Mitra -- Mitra Technology Consulting - www.mitra.biz - mi...@mi... 02-6684-8096 or 0414-648-0722 Life is a Mystery to be Lived, not a Problem to be Solved |
From: Honza M. <hon...@ec...> - 2003-01-13 23:09:37
|
On Po, 2003-01-13 at 14:45, Mitra wrote: > Hi > > There is a lot of code, and a lot of mistakes, that happen around the > different representations for item ids. We have at least four that I > know of: > Short id: Sequence of Item in database, used in shorter urls > especially in views > Packed id: 128 bit packed, stored in database > Unpacked id: 32 character, used in urls > Tagged ids: For example where an x is on the front of a packed id to > indicate bidirectional. 1) In some cases it is unfortunately needed to distinguish between packed"ed and packed&unquoted :-( 2) The 'x' ('y' and 'z' resp.) characters are there not only as the flag of relation direction. There was some problem with 32 characters long hexadecimal numbers in array index (a[54637ac9bec645...]) when posted to PHP from HTML form. I think the problem was, that if the hexadecimal number begins with digits, PHP thinks the index in decimal so it produces a[54637] in our example. The begining 'x' tells PHP to interpret index as string. > An example of a Sysadmin mistake was where recently I used related > items window and stored the string, which then broke something using > it as a related items link. I had to switch to store item ids. > > The reason this came up for me, is that I need a way to add a meaning > to related item links, which is hard with since a multi-value field > (like a related item) can only contain one piece of data. I was > thinking of extending the related item window to allow me to redefine > the buttons. > > What I'm thinking is to add a "class itemid" which would refer to an > item. This could be initialised with either shortid, packed, > unpacked or tagged, and then could - via methods - return any of the > alternatives e.g. > > foo = new itemid(123) > #new itemid(1234567890abcdef1234567890abcdef) > > and then foo->packed; > > I would use lazy evaluation to do the conversion, i.e. only > generating the flavors needed. > > What do you think? I had very simillar idea, only the reason is another. In my thoughts it was not object for storing single item_id, but it was rather item_ids_set (foo->short(4) gives you fourth short_id from the set). Reason: There are several places where we works with the sets of ids. Very important function QueryIDs() returns IDs as a numbered array of 32 characters long hexadecimal ids (= unpacked). When we have slice with 50.000 items, the storage of all item ids in the slice exceeds 1MB. - We already encounter some memory limit problem. - It is for example impossible to call serialize() on such array (as PHPLib sessions does to cache the result) - it is too big. I thought about implementation it as classic C-like array of 4B integers in one memory block (string), where we would store short_ids: function short($n) { return transform4B_2_short( substr($this->heap, $n*4, 4))); } Which should be quick and memory efective. The inner implementation is just detail. > If we like the idea, I would see it programmed in gradually, i.e. I > define the class, and its methods and then it can be integrated only > when we are working on some part of the code. Agree. > - Mitra > > P.S. I'd still like a hint on how to create a new "item" refering to > an item id, this would be very useful for use of the site module, but > I can't figure out if this is possible. I'm not sure I understand, what you need. Honza |