Thema zum Download Download Extension

Support für Extensions für phpBB 3.3.x von Entwickler OXPUS
Antworten
Benutzeravatar
oxpus
Chief handy-man
Beiträge: 2601
Registriert: Do 13. Dez 2007, 23:06
Wohnort: Irgendwo im I-Net
Kontaktdaten:

Re: Thema zum Download Download Extension

Beitrag von oxpus »

Extension patched: Refix listener.php for replace download links with download title.
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!
Benutzeravatar
TazDevilBZH
Beiträge: 4
Registriert: Fr 7. Aug 2020, 00:45
Wohnort: Redon - Brittany (France)

Re: Thema zum Download Download Extension

Beitrag von TazDevilBZH »

Hi,

Since the upgrade to phpBB 3.3.1 on Apache 2.4 servers the new .htaccess file in root/files folder conflicts with the .htaccess file in root/files/dlext/thumbs because this one uses the old syntax for .htaccess and mod_access_compat could not handle the two syntaxes at the same time.

So, if you have problem viewing thumbnails, here is the new .htaccess file content that you have to put in /root/files/dlext/thumbs :

Code: Alles auswählen

# With Apache 2.4 the "Order, Deny" syntax has been deprecated and moved from
# module mod_authz_host to a new module called mod_access_compat (which may be
# disabled) and a new "Require" syntax has been introduced to mod_authz_host.
# We could just conditionally provide both versions, but unfortunately Apache
# does not explicitly tell us its version if the module mod_version is not
# available. In this case, we check for the availability of module
# mod_authz_core (which should be on 2.4 or higher only) as a best guess.
<IfModule mod_version.c>
	<IfVersion < 2.4>
		<Files "*">
			Order Allow,Deny
			Allow from All
		</Files>
	</IfVersion>
	<IfVersion >= 2.4>
		<Files "*">
			Require all granted
		</Files>
	</IfVersion>
</IfModule>
<IfModule !mod_version.c>
	<IfModule !mod_authz_core.c>
		<Files "*">
			Order Allow,Deny
			Allow from All
		</Files>
	</IfModule>
	<IfModule mod_authz_core.c>
		<Files "*">
			Require all granted
		</Files>
	</IfModule>
</IfModule>
To be more secure you can also restrict access to your domain name only, by replacing "Allow from All" by "Allow from your domain name" (ie. Allow from oxpus.net) and "Require all granted" by "Require host your domain name" (ie. Require host oxpus.net)
Benutzeravatar
oxpus
Chief handy-man
Beiträge: 2601
Registriert: Do 13. Dez 2007, 23:06
Wohnort: Irgendwo im I-Net
Kontaktdaten:

Re: Thema zum Download Download Extension

Beitrag von oxpus »

Thanks for this.
I'll update the package as soon as possible with the new .htaccess file.
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!
Benutzeravatar
TazDevilBZH
Beiträge: 4
Registriert: Fr 7. Aug 2020, 00:45
Wohnort: Redon - Brittany (France)

Re: Thema zum Download Download Extension

Beitrag von TazDevilBZH »

oxpus hat geschrieben: So 16. Aug 2020, 08:33 Thanks for this.
I'll update the package as soon as possible with the new .htaccess file.
You're welcome ;-)

I'll test your new package ASAP.
Fred BOURHIS
Benutzeravatar
TazDevilBZH
Beiträge: 4
Registriert: Fr 7. Aug 2020, 00:45
Wohnort: Redon - Brittany (France)

Re: Thema zum Download Download Extension

Beitrag von TazDevilBZH »

The new package works very fine :-)

But, I have a problem, which already exists before the update, this problem is about permissions. I have several categories with sub-categories, and when I edit the sub-categories, it always goes on copy permissions from the main category instead of "Do not copy / keep current permissions"
Category edit
Category edit
firefox_2020-08-16_23-26-03.png (52.1 KiB) 538 mal betrachtet
, so if I do not take care, the permissions from the main category is copied to the sub-category. That the first problem, but the second one is the fact that permissions from the main category are not only copied but they are added on permissions for the sub-category, and the result is very crappy :
Permission visualization
Permission visualization
firefox_2020-08-16_23-16-55.png (47.77 KiB) 538 mal betrachtet
The only way, to get rid about these multiples permissions is to reset permissions for the category and manually set it one more time or copy it from another sub-category (if they are similar), but you must not do the copy twice or you'll get double permissions entries.

I think, that there is a bug in copy permission function. It should be better to delete permission from the database at first and then update the database with copied permissions.

I think that the issue came from acp_categories_controller.php because there is only an INSERT SQL function in the code regardless if there is or not previous records for the selected category, so if there is already permissions for this category, new permissions are added instead of being updated.

Code: Alles auswählen

					// And now copy all permissions for usergroups
					$sql = 'SELECT * FROM ' . DL_AUTH_TABLE . '
						WHERE cat_id = ' . (int) $copy_from;
					$result = $this->db->sql_query($sql);
		
					while ($row = $this->db->sql_fetchrow($result))
					{
						$group_id	= $row['group_id'];
						$auth_view	= $row['auth_view'];
						$auth_dl	= $row['auth_dl'];
						$auth_up	= $row['auth_up'];
						$auth_mod	= $row['auth_mod'];
		
						$sql = 'INSERT INTO ' . DL_AUTH_TABLE . ' ' . $this->db->sql_build_array('INSERT', [
							'cat_id'	=> $cat_id,
							'group_id'	=> $group_id,
							'auth_view'	=> $auth_view,
							'auth_dl'	=> $auth_dl,
							'auth_up'	=> $auth_up,
							'auth_mod'	=> $auth_mod]);
						$this->db->sql_query($sql);
I hope that my message is clear enough to understand my problem.

Fred
Zuletzt geändert von TazDevilBZH am Mo 17. Aug 2020, 19:54, insgesamt 1-mal geändert.
Fred BOURHIS
Benutzeravatar
oxpus
Chief handy-man
Beiträge: 2601
Registriert: Do 13. Dez 2007, 23:06
Wohnort: Irgendwo im I-Net
Kontaktdaten:

Re: Thema zum Download Download Extension

Beitrag von oxpus »

I've fixed this.

Please use the attached file and copy it unzipped to /forumroot/ext/oxpus/dlext/controller/acp/
Dateianhänge
acp_categories_controller.zip
(8.29 KiB) 19-mal heruntergeladen
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!
Benutzeravatar
TazDevilBZH
Beiträge: 4
Registriert: Fr 7. Aug 2020, 00:45
Wohnort: Redon - Brittany (France)

Re: Thema zum Download Download Extension

Beitrag von TazDevilBZH »

Thanks a lot for this fix, it works very fine now :-)

I'm still continuing tests for this great extension, and will continue to notify if I find some new bugs.

In fact I've seen another possible issue. When you change category for a file, the fisrt thumbnail uploaded at the same time as the file is lost (deleted from root/files/thumbs) but that's not a big issue as for now I know this fact and I previously save the thumbnail and restore it after changing category)

This extension is the best extension ever seen on phpBB for managing downloads !!!
Fred BOURHIS
Benutzeravatar
oxpus
Chief handy-man
Beiträge: 2601
Registriert: Do 13. Dez 2007, 23:06
Wohnort: Irgendwo im I-Net
Kontaktdaten:

Re: Thema zum Download Download Extension

Beitrag von oxpus »

The new release 8.1.4 will fix the thumbnail dropping error.
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!
Bermúdez
Beiträge: 29
Registriert: Mo 25. Nov 2013, 18:55
Kontaktdaten:

Re: Thema zum Download Download Extension

Beitrag von Bermúdez »

Hello.
How can I change the dimensions of the thumbnails (width, height)?
Since the last updates they are deformed (they are shown stretched or shrunk).
Benutzeravatar
oxpus
Chief handy-man
Beiträge: 2601
Registriert: Do 13. Dez 2007, 23:06
Wohnort: Irgendwo im I-Net
Kontaktdaten:

Re: Thema zum Download Download Extension

Beitrag von oxpus »

I*ve updated the package.
Just replace all files and the thumbs will be resized with the right dimensions.
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