Gossamer Forum
Home : Products : Gossamer Forum : Discussion :

Write user_show_user_icons ="1"

Quote Reply
Write user_show_user_icons ="1"
FYI:

When checking my user database I realized that all of the users subscribed prior to version 1.1.6 have user.user_show_user_icons = "NULL". The default is "1".

If I have time later I'll tinker with a simple query to correct that.

Last edited by:

ArmyAirForces: Sep 27, 2002, 9:54 AM
Quote Reply
Re: [ArmyAirForces] Write user_show_user_icons ="1" In reply to
Did you get this fixed up? If not, this query will do it:

UPDATE gforum_User SET user_show_user_icons = 1 WHERE user_show_user_icons IS NULL;

Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com
Quote Reply
Re: [Jagerman] Write user_show_user_icons ="1" In reply to
Thanks Jason, my week got busy on me and I didn't get back around to it.

I've gotta go take a SQL course so I'll be able to write simple queries like that on my own.

Wink
Quote Reply
Re: [Jagerman] Write user_show_user_icons ="1" In reply to
Hi Jason,

Can a default image be added the same way?



Thanks!
Quote Reply
Re: [Teambldr] Write user_show_user_icons ="1" In reply to
Hi Brian,

Yes, you should be able to add a default image like this, but you might want to change:

user_image IS NULL

to

(user_image IS NULL OR user_image = '')

because I believe the user_image can be an empty string, which is treated as no image being set.

Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com
Quote Reply
Re: [Jagerman] Write user_show_user_icons ="1" In reply to
So like this then:

UPDATE gforum_User SET user_show_user_icons = 1 WHERE user_show_user_icons (user_image IS NULL OR user_image = '');

How do you tell it what image to use and where to pull it from, in the =1 part?

UPDATE gforum_User SET user_show_user_icons = path/to/noimage.gif WHERE user_show_user_icons (user_image IS NULL OR user_image = '');
Quote Reply
Re: [Teambldr] Write user_show_user_icons ="1" In reply to
Hi Brian, I think this should do what you're looking for:

UPDATE gforum_User SET user_image = "blank_user.gif" WHERE user_image IS NULL OR user_image = '';

Then just update a generic blank_user.gif image (attached is one Gossamer Forum used many moons ago)

Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com
Quote Reply
Re: [Jagerman] Write user_show_user_icons ="1" In reply to
Jason,

While you are cranking out sql statements I would like to do 2 things:

1) I'd like a statement I can run regularly to set post_reply_notify = 0 on all posts in the forum_Post table for all users where user_email is "invalid@email.address" in the forum_User table.

I was thinking of the statement below but I'm not sure it will check against the forum_User table:

UPDATE forum_Post SET post_reply_notify = 0 WHERE user_email IS "invalid@email.address";

2) I would like to remove all subscriptions from forum_ForumSubscriber for all users where user_email is "invalid@email.address" in the forum_User table.

I'm know very little to nothing about sql so I thought I'd ask. I unfortunately have a lot of users with invalid email addresses that came over with a migration and my mail server is being flooded with bounced notifications to this address.

Thanks for the help! Smile

Safe swoops
Sangiro