Link to thumbnail - urlencode problem
Posted: 2024-04-18 07:58
Hi,
I am hoping for some insight of you.
I almost finished my proposed "Multi Path Upload (MPU) / dynamic upload folder" (viewtopic.php?f=12&t=5349) but there seems something weird.
For "problem-only" please see below.
Currently I am still using AG 24.11 but the script will also work with the new 24.12 (and newer) versions.
Please take a look at the following images with this setup in mind:
My MPU script will move uploaded files to subdirectories of the original uploads folder. Example:
Original uploads folder is /images
The MPU might be configured to use a 3 digit subfolder thus uploaded files may reside in folders depending on their primary key (pk)
The MPU script will also include a nice "initialize" to upgrade your current application, e.g. the uploaded files and move them to the correct subfolders. Only absolute minimal changes are needed in a) hooks/tablename.php and b) in one of the generated files ... sorry
The display of thumbnails works just fine, note the link in the status bar:
TV view. Clicking on the thumbnail displays the zoomed image when allowed in AG (from the subdirectory):
TV/DV view combined, here DV. Clicking on the thumbnail displays the zoomed image when allowed in AG (from the subdirectory):
For uploaded PDF it looks pretty much the same (TV/DV combined). Clicking on the thumbnail displays the zoomed image when allowed in AG (from the subdirectory):
When displaying the uploaded PDFs in their parent table's child-view, AG translates it to a "link.php...." URL. Clicking on the link displays/downloads the correct file (remember: which is placed in a subdirectory):
When I have the uploaded child-images displayed in their parent records as child-pages (see image below), and click on the "Anzeigen" (english: display) button on the left, the correct modal sub-page opens and the image is shown correct - and clicking works to zoom it: I need to split my post here to upload another image ...
I am hoping for some insight of you.
I almost finished my proposed "Multi Path Upload (MPU) / dynamic upload folder" (viewtopic.php?f=12&t=5349) but there seems something weird.
For "problem-only" please see below.
Currently I am still using AG 24.11 but the script will also work with the new 24.12 (and newer) versions.
Please take a look at the following images with this setup in mind:
My MPU script will move uploaded files to subdirectories of the original uploads folder. Example:
Original uploads folder is /images
The MPU might be configured to use a 3 digit subfolder thus uploaded files may reside in folders depending on their primary key (pk)
Code: Select all
pk = 1 -> new upload path will be /images/001
pk = 2 -> new upload path will be /images/002
pk = 15 -> new upload path will be /images/015
pk = 370 -> new upload path will be /images/370
pk = 4891 -> new upload path will be /images/891
pk = 94891 -> new upload path will be /images/891
pk = 96001 -> new upload path will be /images/001
pk = 96015 -> new upload path will be /images/015

The display of thumbnails works just fine, note the link in the status bar:
TV view. Clicking on the thumbnail displays the zoomed image when allowed in AG (from the subdirectory):
TV/DV view combined, here DV. Clicking on the thumbnail displays the zoomed image when allowed in AG (from the subdirectory):
For uploaded PDF it looks pretty much the same (TV/DV combined). Clicking on the thumbnail displays the zoomed image when allowed in AG (from the subdirectory):
When displaying the uploaded PDFs in their parent table's child-view, AG translates it to a "link.php...." URL. Clicking on the link displays/downloads the correct file (remember: which is placed in a subdirectory):
When I have the uploaded child-images displayed in their parent records as child-pages (see image below), and click on the "Anzeigen" (english: display) button on the left, the correct modal sub-page opens and the image is shown correct - and clicking works to zoom it: I need to split my post here to upload another image ...