• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

MG 1.1 Default alerts

#1
I have a very busy gallery. When a user uploads to the member gallery, the default preferences are that they now get alerts any time something is uploaded to that gallery because it's automatically "watched." This is resulting in 1200-1400 alerts per user. It's really frustrating people. Is there a way for me to change the default alert settings in the gallery as there is in the forum?
 

Chris D

XenForo developer
Staff member
#2
A category or album is automatically watched when a user adds media to that category / album.

They can change that themselves in their preferences:

upload_2016-1-20_22-21-26.png

They can also unwatch their existing categories / albums on the Watched Categories and Watched Albums management pages.

That allows them to control the behaviour of this themselves with a few clicks.

The following steps are not recommended, but if you did want to manage this all for them and for new users...

To set the default for existing users you need to run the following query:
Code:
UPDATE xf_user_option
SET xengallery_default_album_watch_state = '',
xengallery_default_category_watch_state = ''
To set the default for new registrations, you need to run the following query:
Code:
ALTER TABLE xf_user_option
ALTER COLUMN xengallery_default_album_watch_state SET DEFAULT '',
ALTER COLUMN xengallery_default_category_watch_state SET DEFAULT ''
To delete the current watch records:
Code:
TRUNCATE xengallery_album_watch
Code:
TRUNCATE xengallery_category_watch
 
Last edited:
#3
The following steps are not recommended,
Can you please explain why this is not recommended? I would like to run these as defaults from new registrations only as I don't want to upset users who have already worked through their settings. But I would certainly like to know if there some risk involved from a technical standpoint before doing so.

Also, I do think these defaults should be reconsidered in future versions of XFMG. Looking at this from the perspective of customer experience and community building, it's not positive to have a new user inundated with alerts. Opt-IN is always more well received than opt-OUT. This allows a user to increase their alerts as they become more engaged rather than having a confusing experience at the beginning before they understand the alerts. Most users will not make their first stop at a new site the control panel to customize their settings.
 

Chris D

XenForo developer
Staff member
#4
It's not recommended mostly from the point of view that it's manipulating the database directly, and we never recommend that but you can certainly mitigate any risks by taking a back up first.
 

estranged

Well-known member
#5
Admins can choose the default user settings when watching forums etc. So they should also be able to do this with media gallery. The reality is most users use the forums with default settings and if you have a
busy gallery this becomes really frustrating as the OP says.

and I'm getting this error with the sql query.

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SET xengallery_default_category_watch_state = ''' at line 3

Thanks.
 

estranged

Well-known member
#6
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SET xengallery_default_category_watch_state = ''' at line 3
Can anyone post the correct syntax for this please?

Thank you.
 

Chris D

XenForo developer
Staff member
#7
Sorry, my bad:
Code:
UPDATE xf_user_option
SET xengallery_default_album_watch_state = '',
xengallery_default_category_watch_state = ''