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 |