Previous Thread
Next Thread
Print Thread
Hop To
#223020 02/25/2009 12:36 AM
Joined: Aug 2006
Posts: 46
J
journeyman
journeyman
J Offline
Joined: Aug 2006
Posts: 46
I love this feature if I can only make it work, I have 12 groups and this is a feature I have been waiting to use.

I went into Group Management and clicked on 'Change' under s specific group

I browsed a test file and clicked on 'update group image'

It now shows up in my group editor under the group I selected

the image does not display on any post that group members have posted

great feature, what could I be doing wrong?

Joined: Aug 2006
Posts: 46
J
journeyman
journeyman
J Offline
Joined: Aug 2006
Posts: 46
okay sorry, I found that it was just the member not turning on the toggle for displaying there group icon.

I have thousands of members in several different groups, i just want them all to display without them being able to turn it on or off.

Joined: Aug 2006
Posts: 46
J
journeyman
journeyman
J Offline
Joined: Aug 2006
Posts: 46
is there a script I can run to turn them all on then i can just remove the feature in the profile menu?

Joined: Dec 2006
Posts: 184
member
member
Joined: Dec 2006
Posts: 184
*watches topic with great interest*

laugh

Joined: Apr 2007
Posts: 3,940
Likes: 1
SD Offline
Former Developer
Former Developer
Joined: Apr 2007
Posts: 3,940
Likes: 1
yah, you could run a query.. but there is an issue..

what if a user belongs to multiple groups (very common) and those groups all have images?

which one wins ?

that's why, when i did this as a mod, i added a 'display priority' to sort things out for overlaps..

Joined: Mar 2008
Posts: 326
D
Enthusiast
Enthusiast
D Offline
Joined: Mar 2008
Posts: 326
Well, to take away the option when editing your profile to make changes to the group image(s) you would...

templates/default/editbasic.tpl
find and remove
PHP Code
{if $gimages}
{$lang.GROUP_IMAGES}<br />
{$gimages}<br /><br />
{/if} 

As for updating everyone, that part of the database looks like Cantonese to me; I haven't read into using serialize in PHP yet.

Joined: Apr 2007
Posts: 3,940
Likes: 1
SD Offline
Former Developer
Former Developer
Joined: Apr 2007
Posts: 3,940
Likes: 1
i wouldn't remove the code.. instead, comment it out with '{* xxMod' before the if and '*}' after

matter of fact, i always comment modifications with SD:Mod or the like to keep track smile

SD #223030 02/25/2009 1:19 AM
Joined: Mar 2008
Posts: 326
D
Enthusiast
Enthusiast
D Offline
Joined: Mar 2008
Posts: 326
Where's your sense of adventure? wink

Joined: Apr 2007
Posts: 3,940
Likes: 1
SD Offline
Former Developer
Former Developer
Joined: Apr 2007
Posts: 3,940
Likes: 1
lost with ubbthreads 6.5 wink

SD #223032 02/25/2009 1:30 AM
Joined: Aug 2006
Posts: 46
J
journeyman
journeyman
J Offline
Joined: Aug 2006
Posts: 46
by default I have it set to where a new members becomes a user from a guest.


when a member donates money I upgrade there access to a specific group level, at this point they could have 2 groups toggled whereas the group 'users' and the 'paying level group' maybe toggled on, but the group users has no assignment of group images just the paying group.


you guys are awesome, thanks again.

Hope I can run a query of some sort.

Joined: Mar 2008
Posts: 326
D
Enthusiast
Enthusiast
D Offline
Joined: Mar 2008
Posts: 326
Okay, here are some examples of some queries you can run. Please use caution if you run any of these; they cannot be undone! I would recommend running this on an offline backup first to test things out, unless you don't mind messing up who-has-what for group images, if you were to make a mistake.

SQL Query
UPDATE ubbt_USER_PROFILE
SET USER_GROUP_IMAGES = ''
This one would blank all users' group images, if you wanted to start from a clean slate.

SQL Query
UPDATE ubbt_USER_PROFILE
SET USER_GROUP_IMAGES = 'a:1:{i:1;s:1:"6";}'
WHERE USER_ID = '123'
This would set user 123's group image to be the group image of group 6. This will overwrite any pre-existing group image settings for this user and replace it with only the group 6 image.

SQL Query
UPDATE ubbt_USER_PROFILE AS up, ubbt_USER_GROUPS AS ug
SET up.USER_GROUP_IMAGES = 'a:1:{i:1;s:1:"6";}'
WHERE ug.GROUP_ID = '6'
AND ug.USER_ID = up.USER_ID
This would set the group image to 6 for all users who are in group 6. This will overwrite any pre-existing group image settings for these members and replace it with only the group 6 image.

Joined: Aug 2006
Posts: 46
J
journeyman
journeyman
J Offline
Joined: Aug 2006
Posts: 46
wow, thanks for taking time to help me.

Joined: Mar 2008
Posts: 326
D
Enthusiast
Enthusiast
D Offline
Joined: Mar 2008
Posts: 326
It's my pleasure. grin

SD #223047 02/25/2009 11:11 AM
Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
Originally Posted by Sirdude
yah, you could run a query.. but there is an issue..

what if a user belongs to multiple groups (very common) and those groups all have images?

which one wins ?

that's why, when i did this as a mod, i added a 'display priority' to sort things out for overlaps..

That's why the user's have an option in their profile to choose which images to display (they can display one, or all of them if they choose) wink

Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
Originally Posted by DLWebmaestro
It's my pleasure. grin

You da man! wink Very nice.

Rick #223053 02/25/2009 12:15 PM
Joined: Mar 2008
Posts: 326
D
Enthusiast
Enthusiast
D Offline
Joined: Mar 2008
Posts: 326
blush

Joined: Aug 2006
Posts: 46
J
journeyman
journeyman
J Offline
Joined: Aug 2006
Posts: 46
I ran the query without errors and it put the proper images where they belong,

nothing is still showing up, only under there profile for toggle.

is there any way to run a query to toggle them on now,

Joined: Mar 2008
Posts: 326
D
Enthusiast
Enthusiast
D Offline
Joined: Mar 2008
Posts: 326
That should have done exactly that...


Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Bots
by Outdoorking - 04/13/2024 5:08 PM
Can you add html to language files?
by Baldeagle - 04/07/2024 2:41 PM
Do I need to rebuild my database?
by Baldeagle - 04/07/2024 2:58 AM
This is not a bug, but a suggestion
by Baldeagle - 04/05/2024 11:25 PM
spam issues
by ECNet - 03/19/2024 11:45 PM
Who's Online Now
0 members (), 919 guests, and 149 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)