WordPress.org

Plugin Directory

Changeset 896999


Ignore:
Timestamp:
04/18/14 03:11:02 (4 years ago)
Author:
GwynethLlewelyn
Message:
  • Changed the way avatar names are selected: now it's by object key, not avatar name (to allow avatars on OpenSim grids to be tracked)
  • Because 1.3.7 didn't fix the deletion error, new code was developed using the above changes; this might invalidate previous versions! (Because objects are now tracked by object key and not avatar name, previous settings might have invalid data)
  • Avatar profile pictures do not use align=XXX tags but instead the class gets aligncenter, alignleft, alignright for consistency with WP, current themes, and recent CSS versions
  • When selecting an avatar name on the Widget, it displays region and position (to allow avatars with the same name in different grids to be easily selected)
  • Added *objectkey* option for the shortcode (to deal with avatars with the same name in different grids)
  • Added fancy banner
  • Added a few extra translations (they only appeared on in-world HTTP-in responses, not on WP)
  • Confirmed compatibility with WP 3.9
  • Users upgrading directly from 1.0 (or earlier versions) should now manually delete the *channel.inc* file under *wp-content/uploads*
Location:
online-status-insl
Files:
10 added
19 deleted
7 edited
1 copied

Legend:

Unmodified
Added
Removed
  • online-status-insl/tags/1.3.8/online-status-insl-en.po

    r401869 r896999  
    33"Project-Id-Version: Online Status inSL\n" 
    44"Report-Msgid-Bugs-To: \n" 
    5 "POT-Creation-Date: 2011-06-27 23:05+0100\n" 
    6 "PO-Revision-Date: 2011-06-27 23:05+0100\n" 
     5"POT-Creation-Date: 2014-04-18 03:52-0000\n" 
     6"PO-Revision-Date: 2014-04-18 03:52-0000\n" 
    77"Last-Translator: Gwyneth Llewelyn <gwyneth.llewelyn@gwynethllewelyn.net>\n" 
    88"Language-Team: Gwyneth Llewelyn <gwyneth.llewelyn@gwynethllewelyn.net>\n" 
     9"Language: en_PT\n" 
    910"MIME-Version: 1.0\n" 
    1011"Content-Type: text/plain; charset=UTF-8\n" 
     
    1314"X-Poedit-Basepath: .\n" 
    1415"Plural-Forms: nplurals=2; plural=n != 1;\n" 
    15 "X-Poedit-Language: English\n" 
    16 "X-Poedit-Country: PORTUGAL\n" 
    1716"X-Poedit-SourceCharset: utf-8\n" 
     17"X-Generator: Poedit 1.6.4\n" 
    1818"X-Poedit-SearchPath-0: .\n" 
    1919 
    20 #: online-status-insl.php:79 
    21 #: online-status-insl.php:268 
    22 #: online-status-insl.php:276 
     20#: online-status-insl.php:80 online-status-insl.php:305 
    2321msgid "Online Status inSL" 
    2422msgstr "" 
    2523 
    26 #: online-status-insl.php:80 
     24#: online-status-insl.php:81 
    2725msgid "Online Status inSL Widget" 
    2826msgstr "" 
    2927 
    30 #: online-status-insl.php:155 
     28#: online-status-insl.php:165 
    3129msgid "Second Life Online Status" 
    3230msgstr "" 
    3331 
    34 #: online-status-insl.php:157 
     32#: online-status-insl.php:168 
    3533msgid "I am " 
    3634msgstr "" 
    3735 
    38 #: online-status-insl.php:158 
     36#: online-status-insl.php:169 
    3937msgid " in Second Life." 
    4038msgstr "" 
    4139 
    42 #: online-status-insl.php:159 
     40#: online-status-insl.php:170 
    4341msgid "having problems contacting RPC server..." 
    4442msgstr "" 
    4543 
    46 #: online-status-insl.php:160 
     44#: online-status-insl.php:171 
    4745msgid "Please set up your in-world object first" 
    4846msgstr "" 
    4947 
    50 #: online-status-insl.php:161 
     48#: online-status-insl.php:172 
    5149msgid "none" 
    5250msgstr "" 
    5351 
    54 #: online-status-insl.php:176 
     52#: online-status-insl.php:196 
    5553msgid "Title" 
    5654msgstr "" 
    5755 
    58 #: online-status-insl.php:183 
     56#: online-status-insl.php:203 online-status-insl.php:204 
    5957msgid "Avatar Name" 
    6058msgstr "" 
    6159 
    62 #: online-status-insl.php:200 
     60#: online-status-insl.php:230 
    6361msgid "Unconfigured" 
    6462msgstr "" 
    6563 
    66 #: online-status-insl.php:205 
     64#: online-status-insl.php:235 
    6765msgid "Before status message" 
    6866msgstr "" 
    6967 
    70 #: online-status-insl.php:212 
     68#: online-status-insl.php:242 
    7169msgid "After status message" 
    7270msgstr "" 
    7371 
    74 #: online-status-insl.php:219 
     72#: online-status-insl.php:249 
    7573msgid "Error message when communicating with SL" 
    7674msgstr "" 
    7775 
    78 #: online-status-insl.php:226 
     76#: online-status-insl.php:256 
    7977msgid "Widget not configured message" 
    8078msgstr "" 
    8179 
    82 #: online-status-insl.php:233 
     80#: online-status-insl.php:263 
    8381msgid "Profile picture?" 
    8482msgstr "" 
    8583 
    86 #: online-status-insl.php:241 
     84#: online-status-insl.php:330 
     85msgid "Deleting " 
     86msgstr "" 
     87 
     88#: online-status-insl.php:332 
     89msgid "Object Name: " 
     90msgstr "" 
     91 
     92#: online-status-insl.php:334 
     93msgid "Location: " 
     94msgstr "" 
     95 
     96#: online-status-insl.php:352 
     97#, php-format 
     98msgid "No online status indicators for %s found" 
     99msgstr "" 
     100 
     101#: online-status-insl.php:360 
     102msgid "<strong>Deletion not saved!!</strong><br \\>\n" 
     103msgstr "" 
     104 
     105#: online-status-insl.php:369 
    87106msgid "" 
    88 "\n" 
    89 "<!-- Widget instance is " 
    90 msgstr "" 
    91  
    92 #: online-status-insl.php:294 
    93 msgid "Deleting " 
    94 msgstr "" 
    95  
    96 #: online-status-insl.php:296 
    97 msgid "Object Name: " 
    98 msgstr "" 
    99  
    100 #: online-status-insl.php:298 
    101 msgid "Location: " 
    102 msgstr "" 
    103  
    104 #: online-status-insl.php:306 
    105 msgid "<strong>Not saved!!</strong><br \\>\n" 
    106 msgstr "" 
    107  
    108 #: online-status-insl.php:312 
    109 msgid "Online status indicators <strong>deleted</strong>" 
    110 msgstr "" 
    111  
    112 #: online-status-insl.php:323 
    113 msgid "Please create an object in Second Life on a plot owned by you, and drop the following script inside:" 
    114 msgstr "" 
    115  
    116 #: online-status-insl.php:509 
     107"Please create an object in Second Life on a plot owned by you, and drop the " 
     108"following script inside:" 
     109msgstr "" 
     110 
     111#: online-status-insl.php:555 
    117112msgid "Then you can drag the appropriate widget on your sidebar." 
    118113msgstr "" 
    119114 
    120 #: online-status-insl.php:515 
     115#: online-status-insl.php:561 
    121116msgid "Current avatars being tracked" 
    122117msgstr "" 
    123118 
    124 #: online-status-insl.php:529 
     119#: online-status-insl.php:575 
    125120msgid "Avatar Display Name" 
    126121msgstr "" 
    127122 
    128 #: online-status-insl.php:530 
     123#: online-status-insl.php:576 
    129124msgid "Status" 
    130125msgstr "" 
    131126 
    132 #: online-status-insl.php:531 
     127#: online-status-insl.php:577 
    133128msgid "PermURL" 
    134129msgstr "" 
    135130 
    136 #: online-status-insl.php:532 
     131#: online-status-insl.php:578 
    137132msgid "Avatar Key" 
    138133msgstr "" 
    139134 
    140 #: online-status-insl.php:533 
     135#: online-status-insl.php:579 
    141136msgid "Object Name" 
    142137msgstr "" 
    143138 
    144 #: online-status-insl.php:534 
     139#: online-status-insl.php:580 
    145140msgid "Object Key" 
    146141msgstr "" 
    147142 
    148 #: online-status-insl.php:535 
     143#: online-status-insl.php:581 
    149144msgid "Object Version" 
    150145msgstr "" 
    151146 
    152 #: online-status-insl.php:536 
     147#: online-status-insl.php:582 
    153148msgid "Location" 
    154149msgstr "" 
    155150 
    156 #: online-status-insl.php:537 
     151#: online-status-insl.php:583 
    157152msgid "Last time checked" 
    158153msgstr "" 
    159154 
    160 #: online-status-insl.php:567 
     155#: online-status-insl.php:613 
    161156msgid "Online Status Indicator for " 
    162157msgstr "" 
    163158 
    164 #: online-status-insl.php:572 
     159#: online-status-insl.php:618 
    165160msgid "Y M j H:i:s" 
    166161msgstr "" 
    167162 
    168 #: online-status-insl.php:580 
     163#: online-status-insl.php:626 
    169164msgid "Delete" 
    170165msgstr "" 
    171166 
    172 #: online-status-insl.php:589 
     167#: online-status-insl.php:635 
    173168msgid "No avatars are being tracked." 
    174169msgstr "" 
    175170 
    176 #: online-status-insl.php:639 
     171#: online-status-insl.php:698 
     172msgid "Invalid object key: " 
     173msgstr "" 
     174 
     175#: online-status-insl.php:729 
    177176msgid "No widget configured for " 
    178177msgstr "" 
    179178 
    180 #: online-status-insl.php:641 
     179#: online-status-insl.php:732 
    181180msgid "No avatars being tracked" 
    182181msgstr "" 
    183182 
     183#: save-channel.php:11 
     184msgid "Request has to come from Second Life or OpenSimulator" 
     185msgstr "" 
     186 
     187#: save-channel.php:34 
     188#, php-format 
     189msgid "Status '%s' set for '%s' (%s)" 
     190msgstr "" 
     191 
     192#: save-channel.php:39 
     193msgid " is not yet registered!" 
     194msgstr "" 
     195 
     196#: save-channel.php:75 
     197#, php-format 
     198msgid "PermURL <%s> saved for user <%s> using object named %s (%s)" 
     199msgstr "" 
     200 
     201#: save-channel.php:80 
     202msgid "No PermURL specified on registration" 
     203msgstr "" 
  • online-status-insl/tags/1.3.8/online-status-insl-pt_PT.po

    r401869 r896999  
    33"Project-Id-Version: Online Status inSL\n" 
    44"Report-Msgid-Bugs-To: \n" 
    5 "POT-Creation-Date: 2011-06-27 23:07+0100\n" 
    6 "PO-Revision-Date: 2011-06-27 23:08+0100\n" 
     5"POT-Creation-Date: 2014-04-18 03:52-0000\n" 
     6"PO-Revision-Date: 2014-04-18 03:52-0000\n" 
    77"Last-Translator: Gwyneth Llewelyn <gwyneth.llewelyn@gwynethllewelyn.net>\n" 
    88"Language-Team: Gwyneth Llewelyn <gwyneth.llewelyn@gwynethllewelyn.net>\n" 
     9"Language: pt_PT\n" 
    910"MIME-Version: 1.0\n" 
    1011"Content-Type: text/plain; charset=UTF-8\n" 
     
    1314"X-Poedit-Basepath: .\n" 
    1415"Plural-Forms: nplurals=2; plural=n != 1;\n" 
    15 "X-Poedit-Language: Portuguese\n" 
    16 "X-Poedit-Country: PORTUGAL\n" 
    1716"X-Poedit-SourceCharset: utf-8\n" 
     17"X-Generator: Poedit 1.6.4\n" 
    1818"X-Poedit-SearchPath-0: .\n" 
    1919 
    20 #: online-status-insl.php:79 
    21 #: online-status-insl.php:268 
    22 #: online-status-insl.php:276 
     20#: online-status-insl.php:80 online-status-insl.php:305 
    2321msgid "Online Status inSL" 
    24 msgstr "" 
    25  
    26 #: online-status-insl.php:80 
     22msgstr "Online Status inSL" 
     23 
     24#: online-status-insl.php:81 
    2725msgid "Online Status inSL Widget" 
    28 msgstr "" 
    29  
    30 #: online-status-insl.php:155 
     26msgstr "Online Status inSL Widget" 
     27 
     28#: online-status-insl.php:165 
    3129msgid "Second Life Online Status" 
    32 msgstr "" 
    33  
    34 #: online-status-insl.php:157 
     30msgstr "Second Life Online Status" 
     31 
     32#: online-status-insl.php:168 
    3533msgid "I am " 
    3634msgstr "Estou " 
    3735 
    38 #: online-status-insl.php:158 
     36#: online-status-insl.php:169 
    3937msgid " in Second Life." 
    4038msgstr " no Second Life." 
    4139 
    42 #: online-status-insl.php:159 
     40#: online-status-insl.php:170 
    4341msgid "having problems contacting RPC server..." 
    4442msgstr "com problemas a contactar o servidor..." 
    4543 
    46 #: online-status-insl.php:160 
     44#: online-status-insl.php:171 
    4745msgid "Please set up your in-world object first" 
    4846msgstr "Por favor configure o seu objecto primeiro no SL" 
    4947 
    50 #: online-status-insl.php:161 
     48#: online-status-insl.php:172 
    5149msgid "none" 
    5250msgstr "nenhum" 
    5351 
    54 #: online-status-insl.php:176 
     52#: online-status-insl.php:196 
    5553msgid "Title" 
    5654msgstr "Título" 
    5755 
    58 #: online-status-insl.php:183 
     56#: online-status-insl.php:203 online-status-insl.php:204 
    5957msgid "Avatar Name" 
    6058msgstr "Nome do avatar" 
    6159 
    62 #: online-status-insl.php:200 
     60#: online-status-insl.php:230 
    6361msgid "Unconfigured" 
    6462msgstr "Não configurado" 
    6563 
    66 #: online-status-insl.php:205 
     64#: online-status-insl.php:235 
    6765msgid "Before status message" 
    6866msgstr "Antes da mensagem de status" 
    6967 
    70 #: online-status-insl.php:212 
     68#: online-status-insl.php:242 
    7169msgid "After status message" 
    7270msgstr "Depois da mensagem de status" 
    7371 
    74 #: online-status-insl.php:219 
     72#: online-status-insl.php:249 
    7573msgid "Error message when communicating with SL" 
    7674msgstr "Mensagem de erro na comunicação com o SL" 
    7775 
    78 #: online-status-insl.php:226 
     76#: online-status-insl.php:256 
    7977msgid "Widget not configured message" 
    8078msgstr "Mensagem de widget não configurado" 
    8179 
    82 #: online-status-insl.php:233 
     80#: online-status-insl.php:263 
    8381msgid "Profile picture?" 
    8482msgstr "Imagem de perfil?" 
    8583 
    86 #: online-status-insl.php:294 
     84#: online-status-insl.php:330 
    8785msgid "Deleting " 
    88 msgstr "Apagando" 
    89  
    90 #: online-status-insl.php:296 
     86msgstr "Apagando " 
     87 
     88#: online-status-insl.php:332 
    9189msgid "Object Name: " 
    92 msgstr "Nome do objecto:" 
    93  
    94 #: online-status-insl.php:298 
     90msgstr "Nome do objecto: " 
     91 
     92#: online-status-insl.php:334 
    9593msgid "Location: " 
    96 msgstr "Localização:" 
    97  
    98 #: online-status-insl.php:306 
    99 msgid "<strong>Not saved!!</strong><br \\>\n" 
    100 msgstr "" 
    101 "<strong>Não gravado!!</strong><br \\>\n" 
    102 " " 
    103  
    104 #: online-status-insl.php:312 
    105 msgid "Online status indicators <strong>deleted</strong>" 
    106 msgstr "Indicador de status online <strong>apagado</strong>" 
    107  
    108 #: online-status-insl.php:323 
    109 msgid "Please create an object in Second Life on a plot owned by you, and drop the following script inside:" 
    110 msgstr "Por favor crie um objecto no Second Life numa parcela de que seja o dono, e coloque o seguinte script no seu interior:" 
    111  
    112 #: online-status-insl.php:509 
     94msgstr "Localização: " 
     95 
     96#: online-status-insl.php:352 
     97#, php-format 
     98msgid "No online status indicators for %s found" 
     99msgstr "Não se encontraram indicadores de status online para %s" 
     100 
     101#: online-status-insl.php:360 
     102msgid "<strong>Deletion not saved!!</strong><br \\>\n" 
     103msgstr "<strong>Remoção não gravada!!</strong><br \\>\n" 
     104 
     105#: online-status-insl.php:369 
     106msgid "" 
     107"Please create an object in Second Life on a plot owned by you, and drop the " 
     108"following script inside:" 
     109msgstr "" 
     110"Por favor crie um objecto no Second Life numa parcela de que seja o dono, e " 
     111"coloque o seguinte script no seu interior:" 
     112 
     113#: online-status-insl.php:555 
    113114msgid "Then you can drag the appropriate widget on your sidebar." 
    114115msgstr "Depois pode arrastar o widget correspondente para o painel lateral." 
    115116 
    116 #: online-status-insl.php:515 
     117#: online-status-insl.php:561 
    117118msgid "Current avatars being tracked" 
    118119msgstr "Avatars registados" 
    119120 
    120 #: online-status-insl.php:529 
     121#: online-status-insl.php:575 
    121122msgid "Avatar Display Name" 
    122123msgstr "\"Display Name\" do avatar" 
    123124 
    124 #: online-status-insl.php:530 
     125#: online-status-insl.php:576 
    125126msgid "Status" 
    126 msgstr "" 
    127  
    128 #: online-status-insl.php:531 
     127msgstr "Status" 
     128 
     129#: online-status-insl.php:577 
    129130msgid "PermURL" 
    130 msgstr "" 
    131  
    132 #: online-status-insl.php:532 
     131msgstr "PermURL" 
     132 
     133#: online-status-insl.php:578 
    133134msgid "Avatar Key" 
    134135msgstr "Chave do avatar" 
    135136 
    136 #: online-status-insl.php:533 
     137#: online-status-insl.php:579 
    137138msgid "Object Name" 
    138139msgstr "Nome do objecto" 
    139140 
    140 #: online-status-insl.php:534 
     141#: online-status-insl.php:580 
    141142msgid "Object Key" 
    142143msgstr "Chave do objecto" 
    143144 
    144 #: online-status-insl.php:535 
     145#: online-status-insl.php:581 
    145146msgid "Object Version" 
    146147msgstr "Versão do objecto" 
    147148 
    148 #: online-status-insl.php:536 
     149#: online-status-insl.php:582 
    149150msgid "Location" 
    150151msgstr "Localização" 
    151152 
    152 #: online-status-insl.php:537 
     153#: online-status-insl.php:583 
    153154msgid "Last time checked" 
    154155msgstr "Última verificação" 
    155156 
    156 #: online-status-insl.php:567 
     157#: online-status-insl.php:613 
    157158msgid "Online Status Indicator for " 
    158159msgstr "Indicador de status online para " 
    159160 
    160 #: online-status-insl.php:572 
     161#: online-status-insl.php:618 
    161162msgid "Y M j H:i:s" 
    162163msgstr "" 
    163164 
    164 #: online-status-insl.php:580 
     165#: online-status-insl.php:626 
    165166msgid "Delete" 
    166167msgstr "Apagar" 
    167168 
    168 #: online-status-insl.php:589 
     169#: online-status-insl.php:635 
    169170msgid "No avatars are being tracked." 
    170171msgstr "Nenhum avatar configurado." 
    171172 
    172 #: online-status-insl.php:639 
     173#: online-status-insl.php:698 
     174msgid "Invalid object key: " 
     175msgstr "Chave do objecto inválida: " 
     176 
     177#: online-status-insl.php:729 
    173178msgid "No widget configured for " 
    174179msgstr "Não há widget configurado para " 
    175180 
    176 #: online-status-insl.php:641 
     181#: online-status-insl.php:732 
    177182msgid "No avatars being tracked" 
    178183msgstr "Nenhum avatar configurado" 
     184 
     185#: save-channel.php:11 
     186msgid "Request has to come from Second Life or OpenSimulator" 
     187msgstr "O pedido tem de vir do Second Life ou OpenSimulator" 
     188 
     189#: save-channel.php:34 
     190#, php-format 
     191msgid "Status '%s' set for '%s' (%s)" 
     192msgstr "Status '%s' modificado para '%s' (%s)" 
     193 
     194#: save-channel.php:39 
     195msgid " is not yet registered!" 
     196msgstr " ainda não foi registado!" 
     197 
     198#: save-channel.php:75 
     199#, php-format 
     200msgid "PermURL <%s> saved for user <%s> using object named %s (%s)" 
     201msgstr "" 
     202"PermURL <%s> gravado para o utilizador <%s> usando o object chamado %s (%s)." 
     203 
     204#: save-channel.php:80 
     205msgid "No PermURL specified on registration" 
     206msgstr "Não foi especificado nenhum PermURL no registo" 
     207 
     208#~ msgid "Online status indicators %s <strong>deleted</strong>" 
     209#~ msgstr "Indicador(es) de status online %s <strong>apagado(s)</strong>" 
    179210 
    180211#~ msgid "" 
  • online-status-insl/tags/1.3.8/online-status-insl.php

    r401869 r896999  
    33Plugin Name: Online Status inSL 
    44Plugin URI: http://gwynethllewelyn.net/online-status-insl/ 
    5 Version: 1.3.7 
     5Version: 1.3.8 
    66License: Simplified BSD License 
    77Author: Gwyneth Llewelyn 
     
    99Description: Shows your online status in the Second Life® world on a widget  
    1010 
    11 Copyright 2011 Gwyneth Llewelyn. All rights reserved. 
     11Copyright 2011-2014 Gwyneth Llewelyn. All rights reserved. 
    1212 
    1313Some tweaks by SignpostMarv 
     
    4343*/ 
    4444 
     45define('NULL_KEY', "00000000-0000-0000-0000-000000000000"); 
    4546 
    4647if (!class_exists("online_status_insl")) 
     
    100101            $settings = maybe_unserialize(get_option('online_status_insl_settings')); 
    101102             
    102             $avatarLegacyName = $instance['avatar_name']; 
    103             $PermURL = $settings[$avatarLegacyName]["PermURL"]; 
     103            // Objects in settings are now indexed by object key 
     104            $objectKey = $instance['object_key']; 
     105             
     106            // echo "<!-- This instance is: " . print_r($instance, TRUE) . " -->"; 
     107             
     108            //$avatarLegacyName = $instance['avatar_name']; 
     109            // To get the avatar name for this object, we need to use its key: 
     110            $avatarDisplayName = $settings[$objectKey]["avatarDisplayName"]; 
     111            // Similar for PermURL: 
     112            $PermURL = $settings[$objectKey]["PermURL"]; 
    104113             
    105114            print "<div class='osinsl'>"; 
     
    108117            if ($instance['profile_picture'] != 'none') 
    109118            { 
    110                 $avatarNameSanitised = sanitise_avatarname($avatarLegacyName); 
    111 ?>          <a href='http://my.secondlife.com/<?php echo $avatarNameSanitised; ?>' target='_blank'><img class="osinsl-profile-picture" src="https://my-secondlife.s3.amazonaws.com/users/<?php echo $avatarNameSanitised; ?>/thumb_sl_image.png" width="80" height="80" alt="<?php echo $avatarLegacyName; ?>" title="<?php echo $avatarLegacyName; ?>" align="<?php echo $instance['profile_picture']; ?>" valign="top"></a><br /> 
     119                $avatarNameSanitised = sanitise_avatarname($avatarDisplayName); 
     120?>          <a href='http://my.secondlife.com/<?php echo $avatarNameSanitised; ?>' target='_blank'><img class="osinsl-profile-picture align<?php echo $instance['profile_picture']; ?>" src="https://my-secondlife.s3.amazonaws.com/users/<?php echo $avatarNameSanitised; ?>/thumb_sl_image.png" width="80" height="80" alt="<?php echo $avatarDisplayName; ?>" title="<?php echo $avatarDisplayName; ?>" valign="top"></a><br /> 
    112121<?php 
    113122            } 
    114123                         
    115124            // does this widget have an associated in-world object? 
    116             if (!$settings || !isset($settings[$avatarLegacyName]["Status"]))  
     125            if (!$settings || !isset($settings[$objectKey]["Status"]))  
    117126            { 
    118127                echo "<span class='osinsl-unconfigured'>", 
     
    125134                    $instance['before_status'],  
    126135                    "</span><span class='osinsl-status'>", 
    127                     $settings[$avatarLegacyName]["Status"], 
     136                    $settings[$objectKey]["Status"], 
    128137                    "</span><span class='osinsl-after-status'>", 
    129138                    $instance['after_status'], "</span>"; 
     
    138147        function update($new_instance, $old_instance) { 
    139148            $instance = $old_instance; 
    140             $instance['title'] = strip_tags($new_instance['title']); 
    141             $instance['avatar_name'] = strip_tags($new_instance['avatar_name']); 
    142             $instance['before_status'] = strip_tags($new_instance['before_status']); 
    143             $instance['after_status'] = strip_tags($new_instance['after_status']); 
    144             $instance['having_problems'] = strip_tags($new_instance['having_problems']); 
    145             $instance['unconfigured'] = strip_tags($new_instance['unconfigured']); 
    146             $instance['profile_picture'] = strip_tags($new_instance['profile_picture']); 
     149            $instance['title']              = strip_tags($new_instance['title']); 
     150            $instance['avatar_name']        = strip_tags($new_instance['avatar_name']); // probably not needed 
     151            $instance['object_key']         = strip_tags($new_instance['object_key']); 
     152            $instance['before_status']      = strip_tags($new_instance['before_status']); 
     153            $instance['after_status']       = strip_tags($new_instance['after_status']); 
     154            $instance['having_problems']    = strip_tags($new_instance['having_problems']); 
     155            $instance['unconfigured']       = strip_tags($new_instance['unconfigured']); 
     156            $instance['profile_picture']    = strip_tags($new_instance['profile_picture']); 
    147157            return $instance; 
    148158        } 
     
    154164            $defaults = array( 
    155165                'title' => __('Second Life Online Status', 'online-status-insl'), 
    156                 'avatar_name' => __('', 'online-status-insl'),  
     166                'avatar_name' => __('', 'online-status-insl'), // probably not needed, we get this from the settings 
     167                'object_key' => NULL_KEY, 
    157168                'before_status' => __('I am ', 'online-status-insl'),  
    158169                'after_status' => __(' in Second Life.', 'online-status-insl'), 
     
    166177            $title = strip_tags($instance['title']); 
    167178             
    168             // get the saved options; this will allow us to choose avatar names with 
    169             //  registered in-world objects 
     179            // get the saved options; this will allow us to choose avatar names from 
     180            //  registered in-world objects (which are indexed by object key) 
    170181            //  and assign this widget to one avatar name 
    171182             
    172183            $settings = maybe_unserialize(get_option('online_status_insl_settings')); 
     184             
     185            // The obvious problem is selecting avatars that have the same name on different grids; 
     186            //  thus we try to get the location as well, to help the user 
     187             
     188            if (empty($instance['avatar_name']) && (!empty($instance['object_key']) && 
     189                $instance['object_key'] != NULL_KEY)) 
     190                $instance['avatar_name'] = $settings[$instance['object_key']]['avatarName']; 
     191            // try to fill in something  
     192             
    173193            ?> 
    174194  
    175195<p> 
    176 <label for="<?php esc_attr_e($this->get_field_id('title'), 'online-status-insl'); ?>"><?php _e("Title", 'online-status-insl'); ?>:  
     196<label for="<?php esc_attr_e($this->get_field_id('title'), 'online-status-insl'); ?>"><?php _e("Title", 'online-status-insl'); ?>:   
    177197    <input 
    178198       class="widefat" id="<?php esc_attr_e($this->get_field_id('title'), 'online-status-insl'); ?>" 
     
    181201    /> 
    182202</label> 
    183 <label for="<?php esc_attr_e($this->get_field_id('avatar_name'), 'online-status-insl'); ?>"><?php _e("Avatar Name", 'online-status-insl'); ?>:</label> 
    184 <select id="<?php esc_attr_e($this->get_field_id('avatar_name'), 'online-status-insl'); ?>" name="<?php esc_attr_e($this->get_field_name('avatar_name'), 'online-status-insl'); ?>" class="widefat" style="width:100%;"> 
     203<!--<label for="<?php esc_attr_e($this->get_field_id('avatar_name'), 'online-status-insl'); ?>"><?php _e("Avatar Name", 'online-status-insl'); ?>:</label>--> 
     204<label for="<?php esc_attr_e($this->get_field_id('object_key'), 'online-status-insl'); ?>"><?php _e("Avatar Name", 'online-status-insl'); ?>:</label> 
     205<!--<select id="<?php esc_attr_e($this->get_field_id('avatar_name'), 'online-status-insl'); ?>" name="<?php esc_attr_e($this->get_field_name('avatar_name'), 'online-status-insl'); ?>" class="widefat" style="width:100%;">--> 
     206<select id="<?php esc_attr_e($this->get_field_id('object_key'), 'online-status-insl'); ?>" name="<?php esc_attr_e($this->get_field_name('object_key'), 'online-status-insl'); ?>" class="widefat" style="width:100%;"> 
    185207<?php 
    186208    // now loop through all avatar names 
    187209     
    188     if ($settings && count($settings)) 
    189     { 
    190         // POSSIBLE BUG: this might not work for legacy names != display names!!!! 
    191         foreach ($settings as $oneWidget) 
     210    if ($settings) 
     211    { 
     212        // echo "<!-- All settings: " . print_r($settings, TRUE) . " -->\n"; 
     213        foreach ($settings as $oneTrackedObject) 
    192214        { 
    193     ?><option <?php if ( $oneWidget["avatarDisplayName"] == $instance['avatar_name'] ) echo 'selected="selected"'; ?>><?php esc_attr_e($oneWidget["avatarDisplayName"], 'online-status-insl'); ?></option> 
    194     <?php 
     215            // parse name of the region and coordinates to help to identify tracked object 
     216            $regionName = substr($oneTrackedObject["objectRegion"], 0, strpos($oneTrackedObject["objectRegion"], "(") - 1); 
     217            $coords = trim($oneTrackedObject["objectLocalPosition"], "() \t\n\r"); 
     218            $xyz = explode(",", $coords); 
     219         
     220            // Output a dropbox option with "Avatar Name [Region (x,y,z)]"  
     221            echo "\t<option " . ($oneTrackedObject['objectKey'] == $instance['object_key'] ? 'selected="selected" ' : '') 
     222                . "value=\"". esc_attr($oneTrackedObject['objectKey']) . "\">"  
     223                . esc_attr($oneTrackedObject['avatarDisplayName']) . sprintf(' [%s (%d,%d,%d)]', $regionName, $xyz[0], $xyz[1], $xyz[2]) . "</option>\n"; 
     224            // echo "<!-- This stupid object is at position: " . $oneTrackedObject['objectLocalPosition'] . "-->\n"; 
    195225        } 
    196226    } 
    197     else // never configured before 
     227    else // never configured before; moved to have a "disabled" setting 
    198228    { 
    199229    ?> 
    200     <option 'selected="selected"'>--<?php _e("Unconfigured", 'online-status-insl'); ?>--</option> 
     230    <option disabled="disabled">--<?php _e("Unconfigured", 'online-status-insl'); ?>--</option> 
    201231    <?php 
    202232    } 
     
    239269</select> 
    240270</p> 
    241             <?php /* _e("\n<!-- Widget instance is ", 'online-status-insl'); var_dump($instance); echo "-->\n"; */ 
    242         }            
     271<?php 
     272        } 
    243273    } 
    244274  
     
    261291        // sanitize 
    262292        unregister_setting( 'online_status_insl', 'online_status_insl_settings' ); 
    263         unlink(ABSPATH . 'wp-content/uploads/channel.inc'); // keep it tidy 
     293        // unlink(ABSPATH . 'wp-content/uploads/channel.inc'); // keep it tidy 
    264294    } 
    265295     
     
    276306<h2><?php _e('Online Status inSL', 'online-status-insl'); ?></h2> 
    277307<?php    
    278     $settings = maybe_unserialize(get_option('online_status_insl_settings')); 
     308        $settings = maybe_unserialize(get_option('online_status_insl_settings')); 
     309 
     310        // echo "<!-- Settings: " . print_r($settings, TRUE) . " -->\n"; 
    279311 
    280312        // Check if we have to delete some of the online indicators 
     
    287319             
    288320            $statusMessage = ""; // add to this string as we find objects to delete  
     321//          $i = 0; 
     322             
     323 
     324//          echo "<!-- Allegedly to delete: " . $_POST["deletedStatusIndicators"] . "-->\n"; 
    289325             
    290326            foreach ($settings as $onlineStatusIndicator) 
    291327            { 
    292                 if (in_array($onlineStatusIndicator["objectKey"], $_POST["deletedStatusIndicators"])) 
     328//              echo "<!-- " . $i++ . " - " . print_r($onlineStatusIndicator, TRUE) . " -->\n"; 
     329                if (in_array($onlineStatusIndicator['objectKey'], $_POST["deletedStatusIndicators"])) 
    293330                { 
    294331                    $statusMessage .= __("Deleting ", 'online-status-insl') . 
    295                         $onlineStatusIndicator["avatarDisplayName"] . ", " . 
    296                         __("Object Name: ", 'online-status-insl') . $onlineStatusIndicator["objectName"] . 
     332                        $onlineStatusIndicator['avatarDisplayName'] . ", " . 
     333                        __("Object Name: ", 'online-status-insl') . $onlineStatusIndicator['objectName'] . 
    297334                        " (" . $onlineStatusIndicator["objectKey"] . "), " . 
    298                         __("Location: ", 'online-status-insl') . $onlineStatusIndicator["objectRegion"] . 
     335                        __("Location: ", 'online-status-insl') . $onlineStatusIndicator['objectRegion'] . 
    299336                        "<br />"; 
    300                     unset($settings[$onlineStatusIndicator["avatarDisplayName"]]); 
     337                    unset($settings[$onlineStatusIndicator['objectKey']]); 
    301338                } 
     339                 
     340            } 
     341             
     342 
     343            // emit "updated" class showing we have deleted some things; error if we haven't managed to delete anything 
     344            if ($statusMessage) 
     345            { 
     346?> 
     347    <div id="message" class="updated"><p><?php echo $statusMessage; ?></p></div> 
     348<?php 
     349            } // endif ($statusMessage) 
     350            else 
     351            { 
     352?> 
     353    <div id="message" class="error"><p><?php printf(__("No online status indicators for %s found", 'online-status-insl'), print_r($_POST["deletedStatusIndicators"], TRUE)); ?></p></div> 
     354<?php 
    302355            } 
    303356             
    304357            // update options with new settings; gets serialized automatically 
    305358            if (!update_option('online_status_insl_settings', $settings)) 
    306                 $statusMessage .= __("<strong>Not saved!!</strong><br \>\n", 'online-status-insl'); 
    307              
    308             // emit "updated" class showing we have deleted some things 
    309             if ($statusMessage) 
    310359            { 
    311360?> 
    312     <div id="message-updated" class="updated"><p><?php _e("Online status indicators <strong>deleted</strong>", 'online-status-insl'); ?><br /><br /> 
    313      
    314             </p></div> 
    315 <?php 
    316             } // endif ($statusMessage) 
     361    <div id="message" class="error"><p><?php __("<strong>Deletion not saved!!</strong><br \>\n", 'online-status-insl'); ?></p></div> 
     362<?php 
     363            } // endif update options 
    317364        } // endif ($_POST[...]) 
    318365 
     
    510557 
    511558<?php  
    512     if (count($settings) > 0) 
     559    if ($settings && count($settings) > 0) 
    513560    { 
    514561?> 
     
    548595    <tr class="format-default <?php echo ($alternate ? "" : "alternate"); $alternate = !$alternate; ?>"> 
    549596        <td><a href='http://my.secondlife.com/<?php echo $avatarNameSanitised; ?>' target='_blank'><?php echo $oneWidget["avatarDisplayName"]; ?> 
    550         <img src="https://my-secondlife.s3.amazonaws.com/users/<?php echo $avatarNameSanitised; ?>/thumb_sl_image.png" width="80" height="80" alt="<?php echo $oneWidget["avatarDisplayName"]; ?>" title="<?php echo $oneWidget["avatarDisplayName"]; ?>" align="center" valign="bottom"></a></td> 
     597        <img src="https://my-secondlife.s3.amazonaws.com/users/<?php echo $avatarNameSanitised; ?>/thumb_sl_image.png" width="80" height="80" alt="<?php echo $oneWidget["avatarDisplayName"]; ?>" title="<?php echo $oneWidget["avatarDisplayName"]; ?>" class="aligncenter" valign="bottom"></a></td> 
    551598        <td><?php echo $oneWidget["Status"]; ?></td> 
    552599        <td><?php echo $oneWidget["PermURL"]; ?></td> 
     
    582629<?php 
    583630    } // if settings not empty 
    584     else 
     631    else // no settings 
    585632    { 
    586633?> 
     
    606653        extract( shortcode_atts( array( 
    607654            'avatar' => '(???)',    // assigns $avatar to name if it exists, and provides a default of (???) which is supposed *not* to exist 
     655            'objectkey' => NULL_KEY, 
    608656            'picture' => 'none',    // emits picture tags, can be center/right/left/ etc. 
    609657            'status'  => 'on',      // emits no status, just the picture (or nothing) 
     
    613661        $settings = maybe_unserialize(get_option('online_status_insl_settings')); 
    614662         
     663        // figure out stupid id for nice formatting 
     664        if ($avatar != '(???)') 
     665        { 
     666            $osinslID = strtolower(strtr($avatar, " ", "-")); 
     667        } 
     668        else if ($objectkey != NULL_KEY)  
     669        { 
     670            $osinslID = $objectkey; 
     671        } 
     672        else  
     673        { 
     674            $osinslID = "broken"; 
     675        } 
     676         
    615677        // store things in a return value; add class attributes to allow styling 
    616         $returnValue = "<span class='osinsl-shortcode' id='osinsl-shortcode-" 
    617             . strtolower(strtr($avatar, " ", "-")) 
    618             . "'>"; 
     678        $returnValue = "<span class='osinsl-shortcode' id='osinsl-shortcode-" . $osinslID . "'>"; 
     679             
     680        // echo "<!-- Object Key: " . $objectkey . " -->\n"; 
    619681         
    620         $avatarNameSanitised = sanitise_avatarname($avatar); 
    621          
    622         if ($settings) // did we find anything at all?? 
     682        if ($settings && count($settings) > 0) // did we find anything at all?? 
    623683        { 
    624             if ($settings[$avatar]) // just see if we have an entry for this 
     684            // See if objectkey is set. If yes, instead of using avatar names, we use object UUIDs (guaranteed to 
     685            //  be unique, even across grids) 
     686            if ($objectkey != NULL_KEY) 
    625687            { 
    626                 if ($picture != "none") 
     688                if (isset($settings[$objectkey])) 
    627689                { 
    628                     if ($profilelink != 'off') 
    629                         $returnValue .= "<a href='http://my.secondlife.com/" . $avatarNameSanitised . "' target='_blank'>"; 
    630                     $returnValue .= '<img class="osinsl-profile-picture" alt="' . $avatarNameSanitised . '" title="' . $avatarNameSanitised . '" src="https://my-secondlife.s3.amazonaws.com/users/'  
    631                         . $avatarNameSanitised . '/thumb_sl_image.png" width="80" height="80" alt="' 
    632                         . $avatar . '" align="'  
    633                         . $picture. '" valign="bottom">'; 
    634                     if ($profilelink != 'off') 
    635                         $returnValue .= "</a>"; 
    636                 } 
    637                 if ($status != "off") $returnValue .= $settings[$avatar]['Status']; 
     690                    $avatarNameSanitised = sanitise_avatarname($settings[$objectkey]['avatarDisplayName']); 
     691                     
     692                    if ($picture != "none") 
     693                    { 
     694                        if ($profilelink != 'off') 
     695                            $returnValue .= "<a href='http://my.secondlife.com/" . $avatarNameSanitised . "' target='_blank'>"; 
     696                        $returnValue .= '<img class="osinsl-profile-picture align' . $picture . '" alt="' . $avatarNameSanitised . '" title="' . $avatarNameSanitised . '" src="https://my-secondlife.s3.amazonaws.com/users/'  
     697                                . $avatarNameSanitised . '/thumb_sl_image.png" width="80" height="80" alt="' 
     698                                . $avatar . '" valign="bottom">'; 
     699                        if ($profilelink != 'off') 
     700                            $returnValue .= "</a>"; 
     701                    } 
     702                    if ($status != "off") $returnValue .= $settings[$objectkey]['Status']; 
     703                } 
     704                else // no such object being tracked! 
     705                { 
     706                    $returnValue .= __("Invalid object key: ", 'online-status-insl') . $objectkey; 
     707                }            
    638708            } 
    639             else $returnValue .= __("No widget configured for ", 'online-status-insl') . $avatar; 
     709            else 
     710            {    
     711                $avatarNameSanitised = sanitise_avatarname($avatar); 
     712                         
     713                // Search through settings; retrieve first tracked object with this avatar name 
     714                 
     715                $foundAvatar = FALSE; 
     716                 
     717                foreach($settings as $trackedAvatar) 
     718                { 
     719                    if ($trackedAvatar['avatarDisplayName'] == $avatar)  
     720                    { 
     721                        if ($picture != "none") 
     722                        { 
     723                            if ($profilelink != 'off') 
     724                                $returnValue .= "<a href='http://my.secondlife.com/" . $avatarNameSanitised . "' target='_blank'>"; 
     725                            $returnValue .= '<img class="osinsl-profile-picture align' . $picture . '" alt="' . $avatarNameSanitised . '" title="' . $avatarNameSanitised . '" src="https://my-secondlife.s3.amazonaws.com/users/'  
     726                                . $avatarNameSanitised . '/thumb_sl_image.png" width="80" height="80" alt="' 
     727                                . $avatar . '" valign="bottom">'; 
     728                            if ($profilelink != 'off') 
     729                                $returnValue .= "</a>"; 
     730                        } 
     731                        if ($status != "off") $returnValue .= $trackedAvatar['Status']; 
     732                        $foundAvatar = TRUE; 
     733                        break; 
     734                    } 
     735                } 
     736                if (!$foundAvatar) 
     737                    $returnValue .= __("No widget configured for ", 'online-status-insl') . $avatar; 
     738            } // else 
    640739        } 
    641740        else $returnValue .=  __("No avatars being tracked", 'online-status-insl'); 
  • online-status-insl/tags/1.3.8/readme.txt

    r401869 r896999  
    44Tags: second life, online, status, profile, sl 
    55Requires at least: 3.0 
    6 Tested up to: 3.2 RC1 
     6Tested up to: 3.9 
    77Stable tag: trunk 
     8License: GPLv2 or later 
     9License URI: http://www.gnu.org/licenses/gpl-2.0.html 
    810 
    911Allows you to show your Second Life online status on any WordPress blog (multiple widgets and shortcodes are possible) 
     
    111113Starting with 1.3.5, you can. A default English .po file is supplied, so you can tweak it to your own language. I've added Portuguese as an example. More translations are welcome! 
    112114 
     115= Will this work for OpenSimulator-based grids? = 
     116 
     117Not quite, but almost. Basically, you can certainly track if an avatar is online/offline on any grid (the tracking code is grid-independent). However, each OpenSimulator grid operator stores avatar profiles differently. This means that you won't get any fancy pictures, links to profiles, or to location — these are hard-coded to work with the Second Life grid. 
     118 
     119If you just wish to have a text message saying "my avatar is online on grid X", then this plugin will certainly work. 
     120 
     121In future versions, the options to extract profile data from OpenSimulator grids might have some extra settings, but it still won't work with every grid. Each really does this differently! 
     122 
     123= I installed 1.3.9 (or a newer version) over my old installation, and now I cannot delete old objects! = 
     124 
     125There was a very nasty bug on the code, which searched the list of tracked objects using the wrong index. I've corrected the code, but unfortunately that means that objects tracked with a previous version of this plugin simply might not find them (although they get displayed!), so you will probably not be able to delete the old entries. Sorry about that. I might add a "delete all" button in a future version. 
     126 
    113127== Screenshots == 
    114128 
     
    121135 
    122136== Changelog == 
     137 
     138= 1.3.8 = 
     139* Changed the way avatar names are selected: now it's by object key, not avatar name (to allow avatars on OpenSim grids to be tracked) 
     140* Because 1.3.7 didn't fix the deletion error, new code was developed using the above changes; this might invalidate previous versions! (Because objects are now tracked by object key and not avatar name, previous settings might have invalid data) 
     141* Avatar profile pictures do not use align=XXX tags but instead the class gets aligncenter, alignleft, alignright for consistency with WP, current themes, and recent CSS versions 
     142* When selecting an avatar name on the Widget, it displays region and position (to allow avatars with the same name in different grids to be easily selected) 
     143* Added *objectkey* option for the shortcode (to deal with avatars with the same name in different grids) 
     144* Added fancy banner 
     145* Added a few extra translations (they only appeared on in-world HTTP-in responses, not on WP) 
     146* Confirmed compatibility with WP 3.9 
     147* Users upgrading directly from 1.0 (or earlier versions) should now manually delete the *channel.inc* file under *wp-content/uploads* 
    123148 
    124149= 1.3.7 = 
     
    179204== Upgrade Notice == 
    180205 
    181 Minor retweaking of the logic for deleting online status indicators from the admin page 
     206= 1.3.9 = 
     207If you had problems in deleting unused items, this version might fix them for you. Notice that things changed in the way the list of objects/avatars are tracked. You might have problems when upgrading this plugin and trying to delete previous objects! Sorry for that, there was a nasty bug in the code. 
    182208 
    183209== CSS == 
     
    191217Status unknown (i.e. SL dataserver issues) is styled as `osinsl-problems` and the text for an unconfigured widget is styled `osinsl-unconfigured`. 
    192218 
    193 The profile picture (if visible) will have the class `osinsl-profile-picture`. Users can set the horizontal alignment but nothing else. Size is limited to 80x80 (all this might be changed). 
     219The profile picture (if visible) will have the class `osinsl-profile-picture`. Users can set the horizontal alignment (using the standard *alignleft*, *aligncenter*, *alignright* classes) but nothing else. Size is limited to 80x80 (all this might be changed). 
    194220 
    195221To style embedded shortcode, change the CSS class for `osinsl-shortcode`. 
     
    202228 
    203229`[osinsl avatar="<avatar name>" picture="[none|center|right|left]" status="[on|off]" profilelink="[on|off]"]` 
    204  
    205 **avatar** is mandatory and should have a valid Second Life avatar name which has an associated online status indicator in SL. This will expand to show the online status (e.g. usually *online*, *offline*, or an error message if no widget was configured or if the avatar is not being tracked). 
    206  
    207 **picture** is optional and defaults to *none* (i.e. profile picture is not shown); if the user has set the SL web profile to be visible, this will retrieve their profile picture, and resize it to 80x80. Options are *left*, *right*, and *center* which will provide minimal formatting (additional styling requires CSS; image size is fixed for now). 
     230or 
     231`[osinsl objectkey="<UUID>" picture="[none|center|right|left]" status="[on|off]" profilelink="[on|off]"]` 
     232 
     233**avatar** should have a valid Second Life/OpenSimulator avatar name which has an associated online status indicator in SL/OpenSimulator. This will expand to show the online status (e.g. usually *online*, *offline*, or an error message if no widget was configured or if the avatar is not being tracked). Note that if you have avatars with the same name on different grids, this will just get you one of them. 
     234 
     235**objectkey** should be the Object Key of an in-world online status tracking object. This should be used alternatively to **avatar** and is useful if you have several objects tracking your avatar across different grids, all for the same avatar name. Note that object keys may change over time (when they get copied, duplicated, taken back to inventory and rezzed again, etc.) so this should be used only as a last alternative, when you really have several avatars in different grids, all with the same name. 
     236 
     237**picture** is optional and defaults to *none* (i.e. profile picture is not shown); if the user has set the SL web profile to be visible, this will retrieve their profile picture, and resize it to 80x80. Options are *left*, *right*, and *center* which will provide minimal formatting (additional styling requires CSS; image size is fixed for now; see the **CSS** section for more information). 
    208238 
    209239If the **picture** is set, **status** can be set to *off* (just show the picture but not the actual status). 
  • online-status-insl/tags/1.3.8/save-channel.php

    r401869 r896999  
    99{ 
    1010    header("HTTP/1.0 405 Method Not Allowed"); 
    11     die("Request has to come from Second Life"); 
     11    die(__("Request has to come from Second Life or OpenSimulator", 'online-status-insl')); 
    1212} 
    1313 
     
    1818    $settings = maybe_unserialize(get_option('online_status_insl_settings')); 
    1919     
    20     // change settings just for this avatar 
    21     $avatarLegacyName = $_SERVER['HTTP_X_SECONDLIFE_OWNER_NAME']; 
     20    // change settings just for this OBJECT 
     21//  $avatarLegacyName = $_SERVER['HTTP_X_SECONDLIFE_OWNER_NAME']; 
     22    $objectKey = $_SERVER['HTTP_X_SECONDLIFE_OBJECT_KEY']; 
    2223 
    23     if ($settings[$avatarLegacyName]) // do we have this avatar on the tracked list? 
     24    if ($settings[$objectKey]) // do we have this object on the tracked list? 
    2425    { 
    25         $settings[$avatarLegacyName]["Status"] = $_REQUEST['status']; 
    26         $settings[$avatarLegacyName]["avatarDisplayName"] = $_REQUEST['avatar_name']; 
    27         $settings[$avatarLegacyName]["timeStamp"] = time(); 
     26        $settings[$objectKey]["Status"] = $_REQUEST['status']; 
     27        $settings[$objectKey]["avatarDisplayName"] = $_REQUEST['avatar_name']; 
     28        $settings[$objectKey]["timeStamp"] = time(); 
    2829         
    2930        update_option('online_status_insl_settings', $settings); 
     
    3132        header("HTTP/1.0 200 OK"); 
    3233        header("Content-type: text/plain; charset=utf-8"); 
    33         echo "Status '" . $_REQUEST['status'] . "' set for '" 
    34             . $avatarLegacyName . "' (" . $_REQUEST['avatar_name'] . ")"; 
     34        printf(__("Status '%s' set for '%s' (%s)", 'online-status-insl'), $_REQUEST['status'], $settings[$objectKey]["avatarDisplayName"], $settings[$objectKey]["avatarKey"]); 
    3535    } 
    3636    else 
    3737    { 
    3838        header("HTTP/1.0 404 Avatar not found"); 
    39         echo($_REQUEST['avatar_name'] . " is not yet registered!"); 
     39        echo($_REQUEST['avatar_name'] . __(" is not yet registered!", 'online-status-insl')); 
    4040    } 
    4141     
     
    5656    $settings = maybe_unserialize(get_option('online_status_insl_settings')); 
    5757 
    58     $settings[$avatarLegacyName] = array( 
     58    $settings[$objectKey] = array( 
    5959        "Status"                => $_REQUEST['status'] ? $_REQUEST['status'] : 'state unknown',  
    6060        "PermURL"               => $_REQUEST['PermURL'],  
     
    7373    header("HTTP/1.0 200 OK"); 
    7474    header("Content-type: text/plain; charset=utf-8"); 
    75     echo "PermURL <" . $settings[$avatarLegacyName]["PermURL"] . "> saved for user $avatarLegacyName."; 
     75    printf(__('PermURL <%s> saved for user <%s> using object named %s (%s)', 'online-status-insl'), $settings[$objectKey]["PermURL"], $settings[$objectKey]["avatarDisplayName"], $settings[$objectKey]["objectName"], $settings[$objectKey]["objectKey"]); 
    7676} 
    7777else 
    7878{ 
    7979    header("HTTP/1.0 405 Method Not Allowed"); 
    80     echo "No PermURL specified on registration"; 
     80    _e("No PermURL specified on registration", 'online-status-insl'); 
    8181} 
    8282?> 
Note: See TracChangeset for help on using the changeset viewer.