MG 1.1 Default alerts

Lmccandless

Member
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?
 
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.webp

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:
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.
 
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.
 
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.
 
Top Bottom