?

Log in

No account? Create an account
January 21st, 2006 - LiveJournal Client Discussions — LiveJournal [entries|archive|friends|userinfo]
LiveJournal Client Discussions

[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

January 21st, 2006

Allowmask problem [Jan. 21st, 2006|02:06 pm]
LiveJournal Client Discussions
lj_clients
[peasant_]
I am using XML-RPC postevent and want to post to either all friends or a specific custom friends group.

Having read the postevent docs

security(optional):
[scalar](required) Specifies who can read this post. Valid values are public (default), private and usemask. When value is usemask, viewability is controlled by the allowmask.

allowmask(optional):
[scalar](required) Relevant when security is usemask. A 32-bit unsigned integer representing which of the user's groups of friends are allowed to view this post. Turn bit 0 on to allow any defined friend to read it. Otherwise, turn bit 1-30 on for every friend group that should be allowed to read it. Bit 31 is reserved.

I assumed I just had to send 0 for all friends and 1 for the first friend group, 2 for the second friend group and so on. But I am clearly misunderstanding the allowmask.

If I send

<member><name>security</name><value><string>usemask</string></value></member>
<member><name>allowmask</name><value><int>0</int></value></member>

LJ shows the post with the security set to 'custom' but no specified groups (so in fact no-one but me can see it).

While if I send

<member><name>security</name><value><string>usemask</string></value></member>
<member><name>allowmask</name><value><int>1</int></value></member>

LJ shows the post with security set to friends only, not just group 1.

Can anyone explain what I should be doing?
link3 comments|post comment

Greasemonkey script: Warn when posting anonymously [Jan. 21st, 2006|09:18 pm]
LiveJournal Client Discussions

lj_clients

[clayfoot]
Every day, it seems somebody accidentally posts anonymously and quickly follows up with a "That was me" logged-in post. This GreaseMonkey script pops up a 'confirm' dialog and asks you to click 'OK' to continue posting anonymously. It works by adding an event listener to the 'click' event on the submit button. When you click the 'Post Comment' submit button, the event handler looks for the session cookie and a username inside the session cookie. If it finds the cookie and a username, no problem. If not, the dialog pops up to confirm.

Look it over and see if I've missed anything important. If all is well, I'll formally submit it to UserScripts.org.

LJ Anonymous Comment Warning

Of course, you'll need FireFox and the Greasemonkey extension.
link5 comments|post comment

navigation
[ viewing | January 21st, 2006 ]
[ go | Previous Day|Next Day ]