Keyword
Please note that official support for commercial extensions & templates is provided in the Subscriber Help Desk.
Support requests should ONLY be directed there and require an active subscription plan.
This forum board is to be used for archive purposes and knowledge exchange ONLY.

Problem with the download link

More
15 years 3 months ago #24571 by EmmanuelZ
Replied by EmmanuelZ on topic Re: Problem with the download link
Hi,

I have the latest version of K2 and SIG Pro ... I'm disappointed to see that there is not the download link (I buy SIG PRO only for this  8)).

Do you think you can find a "custom" solution ?

Thanks,
Regards.

Please Log in or Create an account to join the conversation.

More
15 years 2 months ago #24572 by Mark Bos
Replied by Mark Bos on topic Re: Problem with the download link
I'm not using K2 and have this exact same problem.  Thumbnails and full size works, but download does not.  From the above post it seems like this is an issue with some hard coding of the path "images/stories" within the plugin.  It stopped working after I moved my content, and yes I did change the path within the plugin.  I don;t want my content in images/stories, so what needs to change, code wise, etc. to get the download link to work again with the new path?

Please Log in or Create an account to join the conversation.

More
15 years 2 months ago #24573 by Mark Bos
Replied by Mark Bos on topic Re: Problem with the download link
A fix...  Anyone?

Please Log in or Create an account to join the conversation.

More
15 years 4 weeks ago #24574 by kees janisse
Replied by kees janisse on topic Re: Problem with the download link
Hi there,
the problem is indeed related to hardcoding of the plugin
to be specifick: on line 34 of sigpro.download.php

// block any attempt to explore the filesystem - check if images are included in the "images" folder
$ref = $mosConfig_live_site.'/'.substr($_GET,0,strlen('images/'));
$check = $mosConfig_live_site."/images/";

Quickfix: if you replace "/image/" (twice) with the correct root folder your download will work again!

Also for K2 media you can fix this (on line 31 , 32)

Of course this is only a quick&dirty,
plugin should not refer to the absolute path. but that's something for the  developers
;D

Please Log in or Create an account to join the conversation.

More
14 years 11 months ago #24575 by dcarskadon
Replied by dcarskadon on topic Re: Problem with the download link
It seems that whenever the option was added to allow us to change the root folder, this was never propegated to the sigpro.download php script...

Also the $database global does not appear to be allowed here....
Below is some quick and dirty raw mysql code... I didn't bother to take the time to at least read Joomla's configuration to determine the DB prefix... I would recommend that you do... but the below code (at least update your DB prefix as appropriate) will work...

Again... the below code is me being lazy... this could be much cleaner :)

$query = "SELECT params FROM test_mambots WHERE element = 'jw_sigpro' AND folder = 'content'";
$q = mysql_query($query);
$row = mysql_fetch_row($q);
$Params = $row[0];
$Params = explode("\n",$Params);
$galleries_rootfolder = '';
foreach ($Params as $value)
{
$tmp = explode("=",$value);

if ($tmp[0] == 'galleries_rootfolder')
{
$galleries_rootfolder = $tmp[1];
}


}

#$ref = $mosConfig_live_site.'/'.substr($_GET,0,strlen('images/'));
#$check = $mosConfig_live_site."/images/";
$ref = $mosConfig_live_site.'/'.substr($_GET,0,strlen($galleries_rootfolder));
$check = $mosConfig_live_site."/".$galleries_rootfolder;

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum