?

Log in

No account? Create an account
Stupid Friends Groups - LiveJournal Client Discussions [entries|archive|friends|userinfo]
LiveJournal Client Discussions

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

Stupid Friends Groups [Oct. 18th, 2001|04:32 am]
LiveJournal Client Discussions

lj_clients

[thorshammer]
[mood |frustratedfrustrated]
[music |The Beauty Shop: Lies]

Ok this problem has been kicking the shit out of me. I can't seem to figure out how to derive the bits used for Friends Group posting, at first I thought it was the sort-order, but I was mistaken. I think I may have an idea, but I'm not sure, and right now this is one of the only things preventing the release of the next version of Phoenix

Thanks:)
~Chris
linkReply

Comments:
[User Picture]From: sapphirecat
2001-11-09 09:10 am (UTC)
login mode returns a series of "frgrp_num_name" fields, like "frgrp_1_name"... the number in that field name is the bit number you want to set in the bitmask. bit 31 is reserved, and bit 0 is "all friends".

My client is a mess, and I'm thinking of reworking the friend groupings into a single data structure, but... when the user (that's me, since it's not released) posts, it looks through the list of selected friends groups and pulls out the number, shifts a "1" that many places, and OR's it with the mask (initialized to zero! that was such a stupid bug...)
(Reply) (Thread)
[User Picture]From: sapphirecat
2001-11-09 09:15 am (UTC)
Not like that last paragraph made sense...

$mask=0;
for (($i=0; $i <= $#frgrp_sel; $i++))
{
$mask |= (1 << $frgrp_num[$frgrp_sel[$i]]);
}


Told you it was a mess ;)
(Reply) (Parent) (Thread)