News:

Dear forum visitors, if the support forum is not available, please try again a few minutes later. Thanks!

Main Menu
Support-Forum

Recent posts

#1
Bugs! / Error in Joomla 5, when upload...
Last post by MikaelBjors - Yesterday at 23:50:32
I get this error when trying to upload a pdf, after upgrading site to Joomla 5:
499 attempt to perform an operation not allowed by the security policy `PDF' @ error/constitute.c/IsCoderAuthorized/426
Is it a known bug?
#2
General / 4SEF Hook for Jdownloads URLs
Last post by Zoom - Yesterday at 21:26:11
Hi,

I'm trying to upgrade from Joomla 3 to Joomla 4.

The main issue I've had is that I was using JoomSEF before, and it does not support Joomla 4.

So I'm using 4SEF instead, but it does not support jdownloads in the same way as JoomSEF could.

I reached out to the developer of 4SEF, and they created a hook that would filter the URL to the desired effect before it was registered. This stripped out the /download, category ID, and download ID from the URL. My designed SEF URL is: categoryname/downloadname.

This works great when the URL is from something in Jdownloads, but it does not work from things like tag pages.

That's because the non-SEF URL for tags does not include the category ID of Jdownloads and, therefore, can't be added to the URL.

I contacted the SEF developer again, who said they could not fix it. To quote them:

QuoteHowever, 4SEF is not going to be able to ADD the category. This would require knowing how JDownloads stores categories and being able to identify the category an item belongs to (plus read that category title from the database).

I'd suggest talking to the JDownloads developer here: if you provide them this code, they should be able to modify it to provide the category where it's missing.

Also, they should be able to add the category in the non-sef URL, which may solve the issue from the start.

So, the question is, do you think you can fix this code to add the category ID of Jdownloads for the URL?

I'm desperate for this to work, and will gladly compensate for any time spent on it!

Here's the hook code:

<?php
/**
 * 4SEF hooks file
 *
 * You can use 2 variables to access 4SEO content:
 *
 * $factory: access variables
 * $hooks: add handlers
 */

use Weeblr\Wblib\Forsef\Wb;

// no direct access
defined('WBLIB_EXEC') || die;

/**
 * Filter the built URL pair (sef + nonSef) object just before it's stored to the database. Pagination and suffix has been attached
 * but dynamic variables are not present as they are not stored to DB. This currently includes:
 *
 * - /feed/rss and /feed/atom suffixes
 * - print suffix
 *
 * @version 1.0.1
 * @date    2023-11-08 16:43:24
 *
 * @api     forsef
 * @package 4SEF\filter\build
 * @var forsef_before_store_url
 * @since   1.0.0
 *
 * @param Data\Urlpair $urlPair
 * @param Uri\Uri      $uriToBuild
 * @param Uri\Uri      $platformUri
 *
 * @return Data\Urlpair $urlPair
 *
 */

function wblTranformSefUrlPath($originalPath$catid$id)
{
    
// separate into segments at each / sign
    
$urlSegments explode(
        
'/',
        
$originalPath
    
);

    
// drop the leading segment, the menu item: download
    
array_shift($urlSegments);

    
// put back together the remaining segment 
    
$modifiedPath implode('/'$urlSegments);

    
// remove the category id from the beginning of the string
    
$modifiedPath Wb\lTrim(
        
$modifiedPath,
        
$catid '-'
    
);

    
// remove the download id from the beginning of the string
    
if ($id)
    {
        
$modifiedPath str_replace(
            
'/' $id '-',
            
'/',
            
$modifiedPath
        
);
    }

    return 
$modifiedPath;
}

$hooks->add(
    
'forsef_before_store_url',
    function (
$urlPair$uriToBuild$platformUri) {

        
$option $uriToBuild->getVar('option');
        
$view   $uriToBuild->getVar('view');
        
$id     = (int)$uriToBuild->getVar('id');
        
$catid  = (int)$uriToBuild->getVar('catid');
        if (
'com_jdownloads' !== $option)
        {
            return 
$urlPair;
        }

        if (!
in_array(
            
$view,
            [
                
'download',
                
'category'
            
]
        )
        )
        {
            return 
$urlPair;
        }

        
// the SEF as built by 4SEF: download/category/download-name
        
$modifiedSef  wblTranformSefUrlPath($urlPair->get('sef'), $catid$id);
        
$modifiedPath wblTranformSefUrlPath($urlPair->get('base_path'), $catid$id);

        
// set the modified SEF into the URL pair
        
$urlPair->set(
            
'sef',
            
$modifiedSef
        
);
        
$urlPair->set(
            
'base_path',
            
$modifiedPath
        
);

        return 
$urlPair;
    }
);

#3
Hi
jDownloads alresdy supports SVG files in Downloads.  Create a Download just as you would normally.  When the Download is shown in either the Front end or Backend it will have  an SVG symbol as illustrated in the attached images.
For the images I selected in options - Pictures and Buttons tab in Option 'Select File Type Icon Set' the Modern Icon set 1.
If you want to upload your own symbol let me know.

Colin
PS you can also select symbols for categories
#4
Hi JDownloads Team,

I am wondering that can it be possible to use SVG files as symbol? or place a field for determining font awesome icons?
Actually SVG are more modern to use, because they can be styled with the css in the frontend.
I put my svg icons in the mywebsite.com/images/jdownloads/catimages/ directory, but they don't appear in the Category Symbol dropdown.

I think it would be wonderful to give the authority to select box to pick from SVG files too.
#5
General / Re: How do I insert placeholde...
Last post by ColinM - 10.05.2024 16:49:30
Ibrahim
There are no place holders for Price or Category in the Download Email.

Maybe you could add to suggestions
Colin
#6
Bugs! / Re: Move items via Batch proce...
Last post by Arno - 10.05.2024 10:29:41
Sorry, but it seems not to be so simple. So I need a day more to fix this. But I'll hurry.
#7
General / How do I insert placeholders i...
Last post by ibrahim - 09.05.2024 23:04:08
Hello!
How do I insert placeholders in download email layouts for notification like price or category? ?

The Available placeholder variables for E-Mail Configuration for Downloads:
{file_list} {ip_address} {date_time} {user_name} {user_group}
So, I wish to add "Price" and "Category"
#8
Bugs! / Re: on the general category pa...
Last post by ColinM - 09.05.2024 16:46:27
Hi
The link should be
https://www.jdownloads.com/index.php/downloads/category/21-extra-downloads-layouts-3-9-and-4-x.html

There are four layouts you need the last one 4 column subcats layout
Colin
PS Ifyou need assistance with importing a layout see
https://www.jdownloads.net/documentation/layouts-v3-9/import-and-export-of-layouts-and-css-files
#9
Bugs! / Re: on the general category pa...
Last post by ColinM - 09.05.2024 14:06:46
Hi
think the version you have is not quite upto date.
I have added it to the Extra Downloads Layouts 3.9 and 4.x in jdownloads.com
4 Column Subcategory Layout


https://www.jdownloads.com/index.php/downloads/category/21-extra-downloads-layouts-3-9-and-4-x.html
#10
Bugs! / Re: Move items via Batch proce...
Last post by Arno - 09.05.2024 13:39:44
Okay, seems to be a bug for me. :-\
I will try to fix it today.