Difference between revisions of "LlAllowInventoryDrop"

From Second Life Wiki
Jump to navigation Jump to search
m (some better highlighting)
m (added some comments... phew)
Line 86: Line 86:
}
}
</lsl>
</lsl>
== DROPBOX - Configuration Notecard ==
== CONFIGURATION NOTECARD FOR DROPBOX (name it dropbox.txt) ==
<pre>
<pre>
// Floattext (optional setting)
// Floattext (optional setting)
//
//
// can either be enabled (1, true, on, yes) or disabled (0, false, off, no)
// can either be enabled (1, true, on, yes) or disabled (0, false, off, no)


floattext || 1
floattext || 1


// List of admins (optional setting)
// List of admins (optional setting)
//
//
// You can either add legacy names of avatars (i.e. llKey2Name) or their  avatar key (UUID).
// You can either add legacy names of avatars (i.e. llKey2Name) or their  avatar key (UUID).
// If someone's lastname is Resident, you can add the lastname but don't necessarily have to.
// If someone's lastname is Resident, you can add the lastname but don't necessarily have to.
// i.e.: John for John Resident would be fine, too
// i.e.: John for John Resident would be fine, too


admin || John Doe
admin || John Doe
Line 104: Line 104:
admin || Jane Doe
admin || Jane Doe
admin || Jane
admin || Jane
//  Template
//
//  the notecard you want people to fill out
//  for example use this to give people a questionaire
//  which they can then drop back into your dropbox when
//  they are done
template || template.txt
</pre>
</pre>
== DROPBOX - Script ==
== SCRIPT FOR DROPBOX (name it dropbox.lsl)==
<lsl>
<lsl>
string notecardName;
string notecardName;
Line 124: Line 133:
init()
init()
{
{
     notecardName = "";
     notecardName = "dropbox.txt";
     template = "template.txt";
     template = "";


     hasBeenConfigured = FALSE;
     hasBeenConfigured = FALSE;
Line 229: Line 238:
//      {
//      {
             admins += [variableValue];
             admins += [variableValue];
//      }
        else if (llToLower(variableName) == "template")
//      {
            template = variableValue;
//      }
//      }
     }
     }

Revision as of 07:50, 1 November 2012

Summary

Function: llAllowInventoryDrop( integer add );
0.0 Forced Delay
10.0 Energy

Allows for all users without modify permissions to add inventory items to a prim.

• integer add boolean, if TRUE, it allows anyone, even if they don't have modify rights to a prim, regardless of whether they are the owner or not, to drop items into that prim. If FALSE, inventory dropping can still be done, but it is restricted only to people with modify permissions to that prim.

To actually do the dropping, you need to drag an item from your inventory and drop it onto the prim WHILE holding down your Ctrl key. If you've got everything right, then just before you release it, you will see the prim framed in red.

Ownership of the dropped inventory item changes to the owner of the prim. Next owner permissions kick in on the item that was dropped in. Non-transfer items cannot be dropped into a prim owned by someone else.

An application might be a public "suggestion box" that you want to let people drop notecards into.

Caveats

  • Scripts are an exception to what is allowed to be dropped in. If a user without modify permissions to a prim attempts to drop a script into it, the inventory addition is rejected and the prim shouts (sic -- shouts, not says) "Not permitted to edit this!" This is for obvious security reasons. If you own the prim and have mod rights to it, you can drop a script in. Friends who have mod rights to your stuff can also drop scripts in.
  • Will not work if, under the Object tab on the prim, "Locked" is ticked.
  • Bear in mind when dropping a texture into a prim to be sure (a) that you see a red box framing the target prim, and (b) not to release the Ctrl button until you are sure that the texture is actually inside the box. If you see a white frame instead, or release Ctrl too soon, the texture will instead be applied to the prim face that you were on.
  • There is no way to tell who dropped the item in. If you really need to know, consider making the user touch the prim first to turn the llAllowInventoryDrop on, and then grab the user's information from the touch event, and then set it back to FALSE through a timer.
  • Nor is there any way based on just llAllowInventoryDrop to tell *what* the user dropped in. See WhoAddedWhat script to handle that.
  • Ordinary end-users may face challenges when confronted with actually performing the drag and drop. See the section below.
  • People with modify rights to your (modifiable) stuff can do this anyway, as can you, even without the presence of llAllowInventoryDrop.
  • Even if you own the prim, but don't have modify rights to it, you cannot drop anything at all into it, ever, unless the creator put in it an llAllowInventoryDrop(TRUE) first before passing it to you.
  • If you have a prim that you don't have mod rights to, but that the creator did set an llAllowInventoryDrop(TRUE) in, that even though you can drop stuff in, you will never be able to delete it! You can however move it to your inventory.

llAllowInventoryDrop and Everyday Users

  • If you want someone to drag and drop notecards into a suggestion box, say, or whatever, you have to both invite them to do so, and explain how to do it (the holding down of the Ctrl key being essential to communicate.)
  • A fair bit of fine motor skill is required to do this. Someone who doesn't have this, either because of failing or unsteady hands, or using a trackpad on a laptop in an awkward seated position, may not be able to perform this operation accurately.
  • If you sell a user something such as, say, a gift box, which you instruct them to fill via inventory drag and drop, bear in mind that there is often many a slip betwixt inventory and prim, and the user may by mistake (in this example) drag the gifts in question into a piece of the bow instead, and then panic when s/he doesn't see them in the main part of the giftbox. (Remember: if they have mod rights to the prim, they can drag and drop stuff into any part of the prim, regardless of whether there is an llAllowInventoryDrop in it or not.) You may wish to suggest instead that the user right-click the prim, choose open, and drag and drop stuff onto the "Open" Object Contents window -- a much larger, safer target.

Examples

When llAllowInventoryDrop is set to TRUE, the event that occurs is:

<lsl> changed(integer change) {

   //PUBLIC_CHANNEL has the integer value 0
   if (change & CHANGED_ALLOWED_DROP)
       llSay(PUBLIC_CHANNEL, "Your contribution is appreciated, o ye non-permitted modifier!");

} </lsl>

When llAllowInventoryDrop is set to FALSE, the event that occurs is:

<lsl> changed(integer change) {

   //PUBLIC_CHANNEL has the integer value 0
   if (change & CHANGED_INVENTORY)
       llSay(PUBLIC_CHANNEL, "Your contribution is appreciated, o ye permitted modifier!");

} </lsl>

Tip! To test for either changed event, the proper syntax is:

<lsl> changed(integer change) {

   //PUBLIC_CHANNEL has the integer value 0
if (change & (CHANGED_ALLOWED_DROP

See Also

Events

•  changed CHANGED_ALLOWED_DROP

Deep Notes

Signature

function void llAllowInventoryDrop( integer add );