DL MOD Autotransfer for group

Support zu den Modifikationen (MODs) von Entwickler OXPUS für das phpBB 3.0.x
Antworten
Pico
Beiträge: 26
Registriert: Do 30. Dez 2010, 11:53

DL MOD Autotransfer for group

Beitrag von Pico »

I have a suggestion for little change in function "autotransfer for group".
Now DL MOD each first day of the month sets the highest transfer for user form group to whom he/she belongs to.
It will be much better if the user gets the amount of transfer from default group, which is set in users_table.

So there will be change in class_dlmod.php from

Code: Alles auswählen

				$sql = 'SELECT max(g.group_dl_auto_traffic) AS max_traffic FROM ' . GROUPS_TABLE . ' g, ' . USER_GROUP_TABLE . ' ug
					WHERE g.group_id = ug.group_id
						AND ug.user_id = ' . $this->user_id . '
						AND ug.user_pending <> ' . true;
to

Code: Alles auswählen

				$sql = 'SELECT g.group_dl_auto_traffic AS max_traffic FROM ' . GROUPS_TABLE . ' g, ' . USERS_TABLE . ' u
					WHERE g.group_id = u.group_id
						AND u.user_id = ' . $this->user_id;
Benutzeravatar
oxpus
Chief handy-man
Beiträge: 2719
Registriert: Do 13. Dez 2007, 23:06
Wohnort: Irgendwo im I-Net
Kontaktdaten:

Re: DL MOD Autotransfer for group

Beitrag von oxpus »

Sorry, but this is not the intention of this function.
The user should get the highest traffic from all groups he/she is a member of and not just the traffic from the default group!!

For example:
The user is member of the following groups
1. Registered Users
2. Special Group 1
3. Forum Group 2

The traffic is given for the groups like
1. 500 MB / month
2. 1000 MB / month
3. 20 MB / month

And at least the default group for this user is group 3.

With your suggestion the user will only get 20 MB traffic per month and not 1000 MB from group 2 until the user was dropped from group 3 or change the main usergroup.
And it's really heavy for an admin to decide which user will get traffic based on default usergroups, but much easier with the existing function which based on the highest traffic from all groups an user can be a member of ;)
Karsten Ude
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
Pico
Beiträge: 26
Registriert: Do 30. Dez 2010, 11:53

Re: DL MOD Autotransfer for group

Beitrag von Pico »

Well i have another example:
1. New registered users - 100MB /month
2. Registered Users - 200 MB / month
First group can't also set avatar etc. so why memebers of that group should get 100 MB / month :?:
In my view, the user should get transfer based on the default group :)
Benutzeravatar
oxpus
Chief handy-man
Beiträge: 2719
Registriert: Do 13. Dez 2007, 23:06
Wohnort: Irgendwo im I-Net
Kontaktdaten:

Re: DL MOD Autotransfer for group

Beitrag von oxpus »

The MOD doesn't differ between the "meanings" of a group.
But you can delay the traffic for new users for x days so they will not get any traffic in this time period...
Karsten Ude
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
Pico
Beiträge: 26
Registriert: Do 30. Dez 2010, 11:53

Re: DL MOD Autotransfer for group

Beitrag von Pico »

I prefer that change :)

Hmm, maybe there could be an option to choose the way how the DL MOD behaves in a such situation :P
Benutzeravatar
oxpus
Chief handy-man
Beiträge: 2719
Registriert: Do 13. Dez 2007, 23:06
Wohnort: Irgendwo im I-Net
Kontaktdaten:

Re: DL MOD Autotransfer for group

Beitrag von oxpus »

Pico hat geschrieben:I prefer that change :)
Well, than just change the mod as you like.
Pico hat geschrieben:Hmm, maybe there could be an option to choose the way how the DL MOD behaves in a such situation :P
No, the mod itself have still enough options...
Karsten Ude
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
Pico
Beiträge: 26
Registriert: Do 30. Dez 2010, 11:53

Re: DL MOD Autotransfer for group

Beitrag von Pico »

BTW, i found a bug in dl_stats.php

Code: Alles auswählen

/*
			* top ten upload traffic
			*/
			unset($sql_array);
	
			$sql = 'SELECT COUNT(s.traffic) AS dl_traffic, s.user_id, s.username, u.user_colour
it should be

Code: Alles auswählen

/*
			* top ten upload traffic
			*/
			unset($sql_array);
	
			$sql = 'SELECT SUM(s.traffic) AS dl_traffic, s.user_id, s.username, u.user_colour
the same is in "top ten download traffic"
Benutzeravatar
oxpus
Chief handy-man
Beiträge: 2719
Registriert: Do 13. Dez 2007, 23:06
Wohnort: Irgendwo im I-Net
Kontaktdaten:

Re: DL MOD Autotransfer for group

Beitrag von oxpus »

Okay, thanks.
I'll fix this in the next release.
Karsten Ude
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
Antworten