Virtuemart Dica para este código .php como faço?

  • rcflash
  • Avatar de rcflash Autor do Tópico
  • Offline
  • JCB! Senior
  • JCB! Senior
Mais
16 anos 2 meses atrás #11152 por rcflash
rcflash created the topic: Virtuemart Dica para este código .php como faço?
Boa Noite, Gelara
Tem um bug no virtuemart versão 1.1.3 que dependendo do host de hopedagem da um erro nas imagens, eu andei pesquisando e tem como resolver mudando umas linas no código, mas eu estou tentando fazer como achei no forum do virtuemart e não estou conseguindo, alguem pode analisar?
O amigo do fórum do virtuemart diz que temos que fazer assim:
O arquivo é o ps_product.php

Received an error message from ps_product.php when thumbnail graphic was missing.
getimagesize() reported error when file was not found.
Fixed problem by adding a simple check to see if the file exists before calling getimagesize()

Replaced line 1381:

$arr = getimagesize(str_replace( IMAGEURL, IMAGEPATH, $url ));

With this:

$f = str_replace( IMAGEURL, IMAGEPATH, $url );

if ( file_exists($f) ) {

$arr = getimagesize( $f );

$width = $arr[0]; $height = $arr[1];

} else {

$width = 100; $height = 100;
}



Dai eu mudei como diz este tuto e o meu ficou assim:
} elseif( file_exists($mosConfig_absolute_path.'/'.$image)) {
$url = $mosConfig_live_site.'/'.$image;
}

if( !strpos( $args, "height=" ) ) {
$ f = str_replace (ImageURL, ImagePath, $ url);
if (file_exists ($ f)) (
$ arr = getimagesize ($ f);
$ width = $ arr

* ; $ height = $ arr [1];

) Else (
$ width = 100; $ height = 100; )
}
if( $resize ) {
if( $height < $width ) {
$width = round($width / ($height / PSHOP_IMG_HEIGHT));
$height = PSHOP_IMG_HEIGHT;


Mas não funcionou esta dando este erro, acredito que é erro no código:
Parse error: syntax error, unexpected T_STRING, expecting T_VARIABLE or '$' in J:\wamp\www\test\Site\administrator\components\com_virtuemart\classes\ps_product.php on line 1380

Alguém sabe onde estou errando?

vlw
Fonte:
http://forum.virtuemart.net/index.php?topic=52081.0

Tim3g - Um mundo de tecnologia
<!-- m --><a class="postlink" href=" www.tim3g.com.br " onclick="window.open(this.href);return false;"> www.tim3g.com.br </a><!-- m -->

Please Entrar ou Registrar to join the conversation.