[RegAPIList] limit to estate / displaying either success or failure upon form completion

Alan Levine alan at nmc.org
Mon Jul 2 16:11:44 PDT 2007


Many ways to skin the same cat. URI_GET_LAST_NAMES returns an  
associative array where the keys are the ids and the values are the  
last names. The PHP asort function will sort based on the values:

   $last_names = llsd_get(URI_GET_LAST_NAMES);
   asort($last_names);



On Jul 2, 2007, at 3:38 PM, Ron Blechner wrote:

> Scratch that, wrong again, but this time I nailed it.
>
> Okay, the array_multisort() wants two lists, in other words, two  
> long rows.
>
> Since the data is essentially pairs that make two long columns, we  
> can do some quick dimension swapping into two new
> arrays, $names and $ids.
>
>     foreach ($last_names as $key => $row)
>     {
>         $names[$key] = $row;
>         $ids[$key] = $key;
>     }
>     array_multisort($names, $ids);
>
>     foreach ($names as $key => $row)
>       {
>               print '<option value="'.$ids[$key].'">'.$row.'</ 
> option>';
>       }
>
>
> On 7/2/07, Ron Blechner <ron at infinitevisionmedia.com> wrote:
> Sorry, misspoke:
>
> array_multisort($last_names);
>
> // is correct
>
>
> On 7/2/07, Ron Blechner < ron at infinitevisionmedia.com > wrote:
> array_multisort($last_names, $last_name_id);
>
> // works in both PHP 4 and 5
> // http://us.php.net/manual/en/function.array-multisort.php
>
>
> On 5/25/07, Alan Levine <alan at nmc.org> wrote:
>
> On May 25, 2007, at 11:41 AM, Ron Blechner wrote:
>
> > Sure, but at the very least, he was asking for a yes/no  
> confirmation.
> > If you don't get the UUID, then at least he knows whether or not it
> > failed.
> >
> > "provide feedback to the user as to whether or not the request was
> > successful"
> >
> > But my PHP seems to be working ... though I edited it myself from  
> the
> > original non-working version.
> >
> > Oops, should I have said that? Now everyone will want my code,  
> heh. :D
>
> It wasn't all that much to do; the example code was really just about
> the minimum to test it and lacked many things one would want in a
> publicly used web form.
>
> If the result does not content a value for agent_id, then it was not
> created, and thus contains an array of error codes. You have to fetch
> the error codes via llsd_get(URI_GET_ERROR_CODES) and then just do
> some array wrangling to extract the corresponding strings to report
> back to the browser. Not science of rockets at all.
>
>
>
> >
> > On 5/25/07, Peter Haik < peter at metaversatility.com> wrote:
> >> As I understand it, there are issues with the PHP script not
> >> receiving and
> >> parsing the error code.
> >>
> >> --
> >> Peter Haik
> >> Co-Founder
> >> Metaversatility, Inc.
> >>
> >>
> >> On 5/25/07, Ron Blechner < ron at infinitevisionmedia.com> wrote:
> >> > There already is a confirmation - when you submit your data to
> >> create
> >> > a user, you are provided one of two responses:
> >> >
> >> > 1. A key of the new user.
> >> > 2. An error code.
> >> >
> >> > In the case of (2), one of the capability urls that we are all
> >> > assigned is to retrieve the text of error messages based on the
> >> error
> >> > code.
> >> >
> >> > -Ron / Hiro
> >> >
> >> > On 5/22/07, FWord Utorid < fword.utorid at yahoo.com> wrote:
> >> > >
> >> > >
> >> > > 1. In implementing the regapi with php, it seems there is not
> >> a simple
> >> way
> >> > > to provide feedback to the user as to whether or not the
> >> request was
> >> > > successful, and isolating on the specific problem in the event
> >> the error
> >> > > occurs.
> >> > >
> >> > > It would be useful if LL could provide the functionality here
> >> to easily
> >> > > display success or failure and the associated error message. I
> >> will be
> >> > > figuring this out myself but one should be able expect this
> >> functionality
> >> > > out of the box without contorting.
> >> > >
> >> > > 2. i would like to implement limit to estate, it is unclear
> >> what value
> >> to
> >> > > provide here, is this the region ID?
> >> > >
> >> > >  Fussy? Opinionated? Impossible to please? Perfect. Join
> >> Yahoo!'s user
> >> panel
> >> > > and lay it on us.
> >> > >
> >> http://us.rd.yahoo.com/evt=48516/*http://surveylink.yahoo.com/gmrs/
> >> yahoo_panel_invite.asp?a=7
> >> > > hot CTA = Join Yahoo!'s user panel
> >> > > _______________________________________________
> >> > > Click here to unsubscribe or manage your list subscription:
> >> > >
> >> https://lists.secondlife.com/cgi-bin/mailman/listinfo/regapi
> >> > >
> >> > >
> >> > _______________________________________________
> >> > Click here to unsubscribe or manage your list subscription:
> >> >
> >> https://lists.secondlife.com/cgi-bin/mailman/listinfo/regapi
> >> >
> >>
> >>
> > _______________________________________________
> > Click here to unsubscribe or manage your list subscription:
> > https://lists.secondlife.com/cgi-bin/mailman/listinfo/regapi
> >
>
> ------------------------------------------------------------
> Alan Levine ✪
> Vice President, NMC Community and CTO
> ------------------------------------------------------------
> NMC: The New Media Consortium: sparking innovative learning and
> creativity
> 2499 S, Capital of Texas Highway. Bldg. A, Suite 202 Austin, TX  78746
>          (512) 445-4200  |          (512) 445-4205  fax
> http://www.nmc.org
>
> NMC Campus Observer: Second Life http://sl.nmc.org/
> NMC Virtual Worlds: http://virtualworlds.nmc.org
>
> Educators in Second Life Survey http://tinyurl.com/2csr8v
>
> Upcoming NMC events:
> * NMC Summer Conference- Jun 6-9, 2007 Indianapolis, Indiana, hosted
> by IUPUI
> * Pachyderm Users Conference- Sep 18-20, 2007 Austin
> * Fall Regional Conference- Nov 7-9, 2007 New Orleans, hosted by
> Tulane University
> * Fall 2007 Online Conference- Dec 4-5, 2007 Something new, not to be
> missed
>
> For details see http://www.nmc.org/cal
>
>
>
>
> _______________________________________________
> Click here to unsubscribe or manage your list subscription:
> https://lists.secondlife.com/cgi-bin/mailman/listinfo/regapi
>
>
>
> _______________________________________________
> Click here to unsubscribe or manage your list subscription:
> https://lists.secondlife.com/cgi-bin/mailman/listinfo/regapi



------------------------------------------------------------
Alan Levine ✪
Vice President, NMC Community and CTO
------------------------------------------------------------
NMC: The New Media Consortium: sparking innovative learning and  
creativity
2499 S, Capital of Texas Highway. Bldg. A, Suite 202 Austin, TX  78746
(512) 445-4200 | (512) 445-4205 fax
http://www.nmc.org

NMC Campus Observer: Second Life http://sl.nmc.org/
NMC Virtual Worlds: http://virtualworlds.nmc.org

Upcoming NMC events:
* Pachyderm Users Conference- Sep 18-20, 2007 Austin
* Fall Regional Conference- Nov 7-9, 2007 New Orleans, hosted by  
Tulane University
* Fall 2007 Online Conference- Dec 4-5, 2007 Something new, not to be  
missed

For details see http://www.nmc.org/cal




-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.secondlife.com/pipermail/regapi/attachments/20070702/599aa3b5/attachment-0001.htm


More information about the Regapi mailing list