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 |