English (United Kingdom)
Jms Multi Site, formerly joomla multisite.
Create, share multiple joomla sites in few clicks !
Message
  • EU e-Privacy Directive

    This website uses cookies to manage authentication, navigation, and other functions. By using our website, you agree that we can place these types of cookies on your device.

    View e-Privacy Directive Documents

Welcome, Guest
Please Login or Register.    Lost Password?

Product Image Folder in Virtuemart
(1 viewing) (1) Guest
Go to bottomPage: 1
TOPIC: Product Image Folder in Virtuemart
#565
Product Image Folder in Virtuemart 15 Years, 9 Months ago Karma: 0
Hi Edwin,

I was trying to move the product images folder of Virtuemart out of the components/com_virtuemart directory for security reasons.

My client would not accept others seeing their product photos during ftp product image uploads.

However, my method only works for Firefox, IE will display "ie cannot open the internet site JMSMASTER/administrator/index.php?option=com_virtuemart".

My method is outline below:

1. administrator/components/com_virtuemart/virtuemart.cfg.php

Line: 48- 61:

if ( (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off') || $_SERVER['SERVER_PORT'] == '443' ) {
define( 'IMAGEURL', SECUREURL .'components/com_virtuemart/shop_image/' );
define( 'VM_THEMEURL', SECUREURL.'components/com_virtuemart/themes/default/' );
} else {
define( 'IMAGEURL', URL .'components/com_virtuemart/shop_image/' );
define( 'VM_THEMEURL', URL.'components/com_virtuemart/themes/default/' );
}
define( 'VM_THEMEPATH', $mosConfig_absolute_path.'/components/com_virtuemart/themes/default/' );

define( 'COMPONENTURL', URL .'administrator/components/com_virtuemart/' );
define( 'ADMINPATH', $mosConfig_absolute_path.'/administrator/components/com_virtuemart/' );
define( 'CLASSPATH', ADMINPATH.'classes/' );
define( 'PAGEPATH', ADMINPATH.'html/' );
define( 'IMAGEPATH', $mosConfig_absolute_path.'/components/com_virtuemart/shop_image/' );

Replaced by :

if ( (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off') || $_SERVER['SERVER_PORT'] == '443' ) {
define( 'IMAGEURL', SECUREURL .'e_shop/shop_image/' );
define( 'VM_THEMEURL', SECUREURL.'components/com_virtuemart/themes/default/' );
} else {
define( 'IMAGEURL', URL .'e_shop/shop_image/' );
define( 'VM_THEMEURL', URL.'components/com_virtuemart/themes/default/' );
}
define( 'VM_THEMEPATH', $mosConfig_absolute_path.'/components/com_virtuemart/themes/default/' );

define( 'COMPONENTURL', URL .'administrator/components/com_virtuemart/' );
define( 'ADMINPATH', $mosConfig_absolute_path.'/administrator/components/com_virtuemart/' );
define( 'CLASSPATH', ADMINPATH.'classes/' );
define( 'PAGEPATH', ADMINPATH.'html/' );
define( 'IMAGEPATH', $mosConfig_absolute_path.'/e_shop/shop_image/' );


2. administrator/components/com_virtuemart/classes/ps_config.php

Line 234-247

if ( (!empty(\$_SERVER['HTTPS']) && \$_SERVER['HTTPS'] != 'off') || \$_SERVER['SERVER_PORT'] == '443' ) {
define( 'IMAGEURL', SECUREURL .'components/com_virtuemart/shop_image/' );
define( 'VM_THEMEURL', SECUREURL.'components/com_virtuemart/themes/".$db->getEscaped($d['conf_THEME'])."/' );
} else {
define( 'IMAGEURL', URL .'components/com_virtuemart/shop_image/' );
define( 'VM_THEMEURL', URL.'components/com_virtuemart/themes/".$db->getEscaped($d['conf_THEME'])."/' );
}
define( 'VM_THEMEPATH', \$mosConfig_absolute_path.'/components/com_virtuemart/themes/".$db->getEscaped($d['conf_THEME'])."/' );

define( 'COMPONENTURL', URL .'administrator/components/com_virtuemart/' );
define( 'ADMINPATH', \$mosConfig_absolute_path.'/administrator/components/com_virtuemart/' );
define( 'CLASSPATH', ADMINPATH.'classes/' );
define( 'PAGEPATH', ADMINPATH.'html/' );
define( 'IMAGEPATH', \$mosConfig_absolute_path.'/components/com_virtuemart/shop_image/' );\n\n";

replaced by

if ( (!empty(\$_SERVER['HTTPS']) && \$_SERVER['HTTPS'] != 'off') || \$_SERVER['SERVER_PORT'] == '443' ) {
define( 'IMAGEURL', SECUREURL .'e_shop/shop_image/' );
define( 'VM_THEMEURL', SECUREURL.'components/com_virtuemart/themes/".$db->getEscaped($d['conf_THEME'])."/' );
} else {
define( 'IMAGEURL', URL .'e_shop/shop_image/' );
define( 'VM_THEMEURL', URL.'components/com_virtuemart/themes/".$db->getEscaped($d['conf_THEME'])."/' );
}
define( 'VM_THEMEPATH', \$mosConfig_absolute_path.'/components/com_virtuemart/themes/".$db->getEscaped($d['conf_THEME'])."/' );

define( 'COMPONENTURL', URL .'administrator/components/com_virtuemart/' );
define( 'ADMINPATH', \$mosConfig_absolute_path.'/administrator/components/com_virtuemart/' );
define( 'CLASSPATH', ADMINPATH.'classes/' );
define( 'PAGEPATH', ADMINPATH.'html/' );
define( 'IMAGEPATH', \$mosConfig_absolute_path.'/e_shop/shop_image/' );\n\n";


In short, I replace "components/com_virtuemart/shop_image" by "e_shop/shop_image"

And copy folder "components/com_virtuemart/shop_image" to "e_shop/shop_image".

For Firefox, it works perfert. But IE failed. I guess it is some security matter.

May you provide any advices?

Many thanks.

KingoftheRoad
KingoftheRoad
Expert Boarder
Posts: 100
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#567
Re:Product Image Folder in Virtuemart 15 Years, 9 Months ago Karma: 54
No idea.
Check the HTML produced.
edwin2win
Moderator
Posts: 5370
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#6019
Re:Product Image Folder in Virtuemart 14 Years ago Karma: 0
Hi.

I'm trying to achieve exactly the same! Did you manage to find a solution?
A pointer into the right direction would be very appreciated.


Thanks
abemedia
Fresh Boarder
Posts: 7
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 1
get the latest posts directly to your desktop
2Win, Multisite(s) are trademarks of Edwin2Win.
Joomla