Site Links
Home
Features
Documentation
Pricing & Order
Members Area
Support Options
UBBDev.com
UBBWiki.com
Who's Online
2 registered (Dunny, Ruben), 48 Guests and 14 Spiders online.
Key: Admin, Global Mod, Mod
Featured Member
Registered: 06/05/06
Posts: 709
Top Posters (30 Days)
Ruben 50
DennyP 24
Gizmo 24
Dunny 15
SteveS 13
AllenAyres 12
dbremer 10
SD 10
drkknght00 9
driv 8
Latest Photos
OK Corral Shoot Out
Testing
Basildon Train Station
Basildon Town Centre looking from the rounderbout
Basildon Town Square
Topic Options
#223783 - 03/08/09 01:23 PM 7.5 group images
Basil Offline
addict
Registered: 08/18/06
Posts: 685
Loc: Southwest US
I have modified editbasic.tpl to remove the option for members to pick what group icons are displayed. I have 4 levels of paid service and of course admin and moderator icons to display. I figured out by using a test user how to force the group images I want, for example:
Sql Query:
UPDATE prefix_USER_PROFILE AS up, prefix_USER_GROUPS AS ug
SET up.USER_GROUP_IMAGES = 'a:1:{i:0;s:1:"8";}'
WHERE ug.GROUP_ID = '8' AND ug.USER_ID = up.USER_ID


Will set all users in group 8 (Bronze in my system) to display the bronze group icon (a bronze star).

what I don't understand, but want to, is how to interpret what gets set in USER_GROUP_IMAGES field since I did not study latin crazy

For example:

a:1:{i:0;s:1:"9";} will set a member to silver (group 9)

but

a:1:{i:0;s:2:"10";} will set a member to gold. One has s:1 and the other s:2

Then, if I have a moderator who is also a silver member, it would be:

a:2:{i:0;s:1:"3";i:1;s:1:"9";}
but if he is a gold member it is:

a:2:{i:0;s:1:"3";i:1;s:2:"10";} (again, note s:1 versus s:2??)

Can someone explain how to interpret the different parts of this group image code?

Thanks.
Top
Express Hosting
Express Hosting "We are the official hosting company of UBB.threads. Ask us about our free migration services to migrate your UBB.threads installation."
#223795 - 03/08/09 07:56 PM Re: 7.5 group images [Re: Basil]
DLWebmaestro Offline
enthusiast
Registered: 03/26/08
Posts: 333
Loc: North Carolina
That is an example of PHP Serialize. I only read up on it a little to answer your previous question, so I don't know much about it yet so I probably wouldn't do it justice trying to explain it. The link above will lead you to some links in Google that you can peruse, if you like, whilst you wait for a more edumacated person to chime in.
_________________________
Marching Percussion ( Drumline ) Community
Top
#223797 - 03/08/09 08:17 PM Re: 7.5 group images [Re: DLWebmaestro]
SD Offline
Registered: 04/19/07
Posts: 4056
Loc: SoCal, USA
a -- array
a:1 -- array with 1 element (ie: they are in one group)
a:2 -- array with 2 elements (ie: they are in 2 groups, moderator and another group)

s -- string
s:1 -- string with 1 character (ie: 9)
s:2 -- string with 2 characters (ie: 10)

; -- delimeter between array elements

i:0 -- array index 0
i:1 -- array index 1

wink
_________________________

Threads tutorials . Threads & Wordpress experts . UBB resume

If I you, click this link as to why
Top
#223799 - 03/08/09 10:48 PM Re: 7.5 group images [Re: SD]
Basil Offline
addict
Registered: 08/18/06
Posts: 685
Loc: Southwest US
THANKS! That makes perfect sense!
Top



Moderator:  AllenAyres, Harold, Ian, Ron M 
Shout Box

Today's Birthdays
No Birthdays
Recent Topics
Temporary Password email not being received
by
05/24/12 10:02 PM
Ability to "like" individual posts (not Facebook "likes)
by doug
05/23/12 09:03 AM
Island Permissions
by ThreadsUser
05/22/12 03:03 PM
streaming video
by prkrgrp
05/20/12 07:02 PM
New Posts Corrupted? Can someone help?
by PianoWorld
05/19/12 09:41 AM
Forum Stats
10492 Members
36 Forums
33842 Topics
181709 Posts

Max Online: 978 @ 06/24/07 11:19 PM
Random Image