How to add all users with at least 1 post to a group?

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Ideas Centre
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
Locked
no_comment
Registered User
Posts: 67
Joined: Sat Dec 27, 2014 11:17 pm
Location: Hell
Contact:

How to add all users with at least 1 post to a group?

Post by no_comment » Sun Dec 25, 2016 4:33 pm

Hi!

I need the SQL command for adding all users with at least one message to a group.
Thanks.

Regards,
DANIEL

User avatar
Ibedejo
Registered User
Posts: 201
Joined: Tue Feb 21, 2012 12:12 am

Re: How to add all users with at least 1 post to a group?

Post by Ibedejo » Sun Dec 25, 2016 4:49 pm

You may consider checking Auto Groups first.

Edit:
correct URL => https://www.phpbb.com/customise/db/mod/auto_groups/ to the 3.0 MOD.

no_comment
Registered User
Posts: 67
Joined: Sat Dec 27, 2014 11:17 pm
Location: Hell
Contact:

Re: How to add all users with at least 1 post to a group?

Post by no_comment » Sun Dec 25, 2016 5:10 pm

Ibedejo wrote:You may consider checking Auto Groups first.

Edit:
correct URL => https://www.phpbb.com/customise/db/mod/auto_groups/ to the 3.0 MOD.
Hi and thanks for the reply!

I have that MOD, but it seems to add users to the group only after new e-mail, and not the people wich have posted in the past. Only I have posted since MOD instalation, and I am the only member of the group so far.
Please, help me.
Thank you.

Regards,
DANIEL

User avatar
Ibedejo
Registered User
Posts: 201
Joined: Tue Feb 21, 2012 12:12 am

Re: How to add all users with at least 1 post to a group?

Post by Ibedejo » Sun Dec 25, 2016 6:25 pm

IIRC rules were set up based on one of these parameters:
- min/max days of membership
- min/max post count
- min/max warning points

As I no longer run any 3.0 test boards it's hard to give any definite advice, sorry.
It might help re-syncing statistics in ACP > General - at least it can't hurt ;)

btw: what is it you want to achieve by adding each user to a new/separate group with the submission of their very first post?

no_comment
Registered User
Posts: 67
Joined: Sat Dec 27, 2014 11:17 pm
Location: Hell
Contact:

Re: How to add all users with at least 1 post to a group?

Post by no_comment » Sun Dec 25, 2016 6:36 pm

Hi!

I have resynchronized statistics, but no change. :(
I do not want every user in a separate group. I want ALL USERS with at least one message in the SAME GROUP.
I need this because I want to send a mass e-mail to only 2000 users wich have posted and not all my 55.000 members as it is too much.
Are you sure there is no SQL command for doing what I want?

Regards,
DANIEL

User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 47535
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: How to add all users with at least 1 post to a group?

Post by stevemaury » Mon Dec 26, 2016 12:12 am

Create the group. Determine its group_id by hovering over the Settings option in Manage groups and looking in the browser status bar, lower left, for the value of g= at the end of the status bar line. Then Substitute that value for X in this query:

Code: Select all

INSERT INTO phpbb_user_group (group_id, user_id, group_leader, user_pending) SELECT X, user_id, 0, 0 FROM phpbb_users WHERE user_id IN(SELECT user_id FROM phpbb_users WHERE user_lastpost_time > 0);
If your table prefix is not phpbb_, change accordingly. Back up the user_group table first. Not tested.
For REALLY good and VERY inexpensive hosting CLICK HERE

All unsolicited PMs will be ignored.

no_comment
Registered User
Posts: 67
Joined: Sat Dec 27, 2014 11:17 pm
Location: Hell
Contact:

Re: How to add all users with at least 1 post to a group?

Post by no_comment » Mon Dec 26, 2016 12:24 am

Thank you, stevemaury.

The SQL query worked but not completly. It added only 1053 users to the group and not all 2327. What could be the problem?
Here is the MODs I have installed:
Hide Sub-Sub Forums on Index
Increase Forum Rules limit
Latest Topic Title 1.1.6
Instant post redirect 1.0.4
Private Message Moderation 1.5.4
Instant login redirect
BBcode Buttons and Smilies for Quick Reply 1.1.0
Login After Register 1.0.0 [3.0.5]
Display Quick Reply by default
Show quick reply to guests
Site name in e-mai from field 1.0.1
Username and Q&A in Quick Reply
Top Posters on Index 1.0.0.a [3.0.1]
Auto Groups 1.0.2 [3.0.6]

I hope this issue is resolved soon because support for v3.0 will end soon. :(
Regards,
DANIEL

User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 47535
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: How to add all users with at least 1 post to a group?

Post by stevemaury » Mon Dec 26, 2016 12:57 am

Only thing I can think of is they had their post deleted? Because if they have no user_lastpost_time, they have no posts.

How are you determining that there are 2327 users who have at least one post?
For REALLY good and VERY inexpensive hosting CLICK HERE

All unsolicited PMs will be ignored.

no_comment
Registered User
Posts: 67
Joined: Sat Dec 27, 2014 11:17 pm
Location: Hell
Contact:

Re: How to add all users with at least 1 post to a group?

Post by no_comment » Mon Dec 26, 2016 1:05 am

groups.png
Hi!

Because the MOD "Auto Groups" added 2327 users to a group on a test board on my computer (using XAMPP). But, for some reason, the same MOD did not add any users to my live board. I set the group the same way: users with minimum one post.

Regards,
DANIEL

User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 47535
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: How to add all users with at least 1 post to a group?

Post by stevemaury » Mon Dec 26, 2016 1:18 pm

Perhaps Auto group uses some different criterion. If it works on Xampp, it should work live. You need to ask in that MODs support topic.
For REALLY good and VERY inexpensive hosting CLICK HERE

All unsolicited PMs will be ignored.

Locked

Return to “[3.0.x] Support Forum”

Who is online

Users browsing this forum: Bing [Bot], ClassicNancy1 and 66 guests

cron