Jump to content

Recommended Posts

Posted (edited)

Can anybody help me out with an SQL query to reset all members to take me to comments I haven't read. 

 

Screenshot 2020-07-02 at 08.31.58.png

Edited by day_
Posted

SQL Query? You can't because it's stored like this:

	/**
	 * Get member link preference
	 *
	 * @return	string
	 */
	public function linkPref()
	{
		if ( $this->members_bitoptions['link_pref_unread'] )
		{

In bitoptions. So you need a custom PHP script to achieve this.

Posted

That's not true.

UPDATE core_members SET members_bitoptions=members_bitoptions & ~1048576;
UPDATE core_members SET members_bitoptions=members_bitoptions | 524288;

Something along those lines should do what you are after.

Posted
13 minutes ago, bfarber said:

That's not true.


UPDATE core_members SET members_bitoptions=members_bitoptions & ~1048576;
UPDATE core_members SET members_bitoptions=members_bitoptions | 524288;

Something along those lines should do what you are after.

Thanks, ran the query and it's changed all the bit options but when checking some older members preferences in the admin panel it shows they are still set to from beginning 

Posted
19 hours ago, bfarber said:

We have an open bug report internally to look into that behavior based on another topic here.

 

Re-reviewing the queries I supplied, it should be members_bitoptions2 and not members_bitoptions (note the "2"). Apologies for that.

This worked, thank you so much! 

Posted (edited)
On 7/7/2020 at 2:56 PM, bfarber said:

Re-reviewing the queries I supplied, it should be members_bitoptions2 and not members_bitoptions (note the "2"). Apologies for that.

Will I need to run this or are you planning for the setting in admin cp have the same effect?

Edited by marklcfc
Posted
22 hours ago, marklcfc said:

Will I need to run this or are you planning for the setting in admin cp have the same effect?

We have an open bug report to look into the originally reported issue. I can't promise yet that your use case will be covered (because you're using a custom third party plugin on the current version which changes the default behavior), however we did confirm that it appears the ACP preference may not always work as expected which we'll fix.

21 hours ago, Ocean West said:

curious why IPS stores data as bitoptons vs just a JSON object or array?

We would have had to add a column to the members table, and we try to avoid doing that unless absolutely necessary. The table can be huge.

  • 2 weeks later...
Posted
On 7/9/2020 at 3:12 PM, bfarber said:

however we did confirm that it appears the ACP preference may not always work as expected which we'll fix.

Any news on that, just to mention again I'd like to set all current members and future members to have by default Take me to comments I haven't read

Posted
1 hour ago, marklcfc said:

Any news on that, just to mention again I'd like to set all current members and future members to have by default Take me to comments I haven't read

Yes, this was fixed in beta 9. The admin defined preference is now always used if the end-user hasn't specified their own preference.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...