|
Henryk Allen
Registered User
Join date: 16 Mar 2007
Posts: 5
|
03-16-2007 05:06
I'd like to create a picture slideshow on a wall and allow avatars to comment on the pictures. The comments should then somehow be gathered so that I can later read them. Would that be possible in SL? Or is the only option to add a link to a website containing the feedback form?
|
|
Little Gray
Registered User
Join date: 16 Oct 2006
Posts: 48
|
03-16-2007 06:43
well a simple way to start would be to look at the open source script, 'reminder list' in the scripting library. Replace the folowing line, towards the bottom,
gRemindtext = llDeleteSubString(message, 0, gDigits1);
with
string gJustText = llDeleteSubString(message, 0, gDigits1); gRemindtext = llKey2Name(id) + ":" + gJustText;
Ok, what your doing here, if thats not right, is grabbing the name of the person saying a comment in addition to just the comment, because you probably want to know who said wha Even if you don't edit 'Reminder List' to include folks names, you can use it as is, just tell them to say their comments on a channel the script is listening too, eg. /1 [comment]. Its relatively simple to add strings to a list, e.g. list SlideComments; then your llLsten in your default in state_entry, and then your listen state which will say something like SlideComments += message; in its most basic form.
Then, your going to need something to regurgiate the comments in the lsl list, which you could do within a touch event if you really want to keep simple, i.e.
touch_start { integer len = llGetListLength( SlideComments );//Pull list length integer i; for( i = 0; i < len; i++ )//List stepping { llOwnerSay(llList2String(SlideComments, i) ); } }
Ok this is the most basic way of taking comments from chat in SL .. using LSL lists. There are significant drawbacks in that lists can only be so long .. if its a long slideshow or you have lots of guests, your probably going to run out of room in the list .. later items will replace earlier ones. You could have it backup the list to e-mail, or, have it also e-mail each comment as it comes in. If you put the script in the slideshow viewer, its would be pretty simple to also record the number (or even name) of the particular slide that's being commented on (provided a slide is not changed while someone is commenting on it .. buy you could even fix that by requiring people to touch the slide then say their comment so you can capture what slide they are looking at when they comment .. this feature is used in one of the 'online tracker's in teh library .. the one that has the instant message ability .. you click on the tracker to send an im .. its the same principle .. it caputures what you say after you click on the object.
generally, and im not expert, your probably safe if you have 20 people making two comments during the whole slide show, 40 making 1, 5 making 9 comments, etc. If you expect more than that .. your going to have to go the e-mail route which can be cumbersome, if, if its that important to you, you can go the more robust route and send the comments to an exernal php/mysql server.
ugh everyone wants short answers.. . the short answer is:
Yes. The scripting library is your friend.
|
|
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
|
03-16-2007 06:55
2 or 3 different ways to do this. 1) Allow avatars to drop notecards of theiir comments onto the object or another object. 2) allow chat based comments to be left.
If using chat based commenting I'd suggest that you require that the avatar touch the object first to leave comments, that way you can include additional information such as which picture was on display automatically. It also makes your listen a bit more sim friendly since you can close teh listen off when not in use.
In both cases teh comments left can be emailed to an external address if required or stored locally.
We covered something similar a while ago but i dont remember the thread name (sorry).
|
|
Henryk Allen
Registered User
Join date: 16 Mar 2007
Posts: 5
|
03-16-2007 07:01
Firstly, thank you mates.
The functionality and interface could be such that the user changes the slides manually. Then the slides wouldn't change while commenting. Including the slide number (or name or what ever) in the comments is crucial. Of course automatic slideshow and touching the slide before commenting would be ok, too.
Is the maximum length of a list only 40 elements? I could create one list for each slide, couldn't I? The comments don't have to stay saved for ages. Once I read them they may be removed. Emailing sounds good as well. Of course uploading the comments to web would be a great feature.
Can you give a bit more details of this notecard option, please? How would it work in practice and on scripting level?
I'm really not a strong scripter but we'll see...
|
|
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
|
03-16-2007 07:18
From: Henryk Allen Firstly, thank you mates.
The functionality and interface could be such that the user changes the slides manually. Then the slides wouldn't change while commenting. Including the slide number (or name or what ever) in the comments is crucial. Of course automatic slideshow and touching the slide before commenting would be ok, too.
Is the maximum length of a list only 40 elements? I could create one list for each slide, couldn't I? The comments don't have to stay saved for ages. Once I read them they may be removed. Emailing sounds good as well. Of course uploading the comments to web would be a great feature.
Can you give a bit more details of this notecard option, please? How would it work in practice and on scripting level?
I'm really not a strong scripter but we'll see... Avatars create a notecard of comments on a particular picture, you could even have it so when clicked the system issues them with a correct notecard? The avatar then fills in tehir commenst and drops the noetcard back onto the object. The object could store it or read it and email you details. How big your list would be would be dependant upon how much data you stored. Your script only has 16K for both code and data. This gets eaten up pretty quickly with lists and strings, but with carful management I think you would probably get at least 40 entries ina script. You could extend this by having multiple scripts to act as a memoryt buffer, or have the data immediately emailed to yourself so the memory requirements are kept to a minimum.
|
|
Henryk Allen
Registered User
Join date: 16 Mar 2007
Posts: 5
|
03-19-2007 02:41
From: Newgate Ludd In both cases teh comments left can be emailed to an external address if required or stored locally.
Is the email address the one that is associated with my account or can I define the address?
|
|
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
|
03-19-2007 04:11
From: Henryk Allen Is the email address the one that is associated with my account or can I define the address? Can be any email address you like.
|
|
Henryk Allen
Registered User
Join date: 16 Mar 2007
Posts: 5
|
03-21-2007 04:12
Ok guys I have more questions. If I want to make the given comments available for everyone (not just me), is it possible in SL? Reading a list in SL would be somewhat cumbersome, right? Can I upload the comments to web _easily_ (= automatically, not copy-pasting all the comments I have in my email to web)? From: Little Gray If you expect more than that .. your going to have to go the e-mail route which can be cumbersome, if, if its that important to you, you can go the more robust route and send the comments to an exernal php/mysql server.
Tell me more about this php/mysql thing. Would it enable sending the comments straight to web? How?
|