Eléphanteau du PHP |
33 Messages
16 janv. 2013, 19:06
Oui avec des //
Tu mets ma ligne de code en dessous (ou au dessus ou où tu veux tant que c'est dans le case 3 et avant le break)
Bin j'ai pas d'erreur dans le site, mais c'est le même résultat qu'avant,
par contre je sais pas si tu a vue dans ma réponse que je t'ai envoyée juste avant j'avais rajouté :
echo '<pre>';
print_r($website);
echo '</pre>';
j'obtiens ceci :
mFieldType_corewebsite Object
(
[name] => website
[id] => 12
[value] => http://www.leflair.fr
[size] => 0
[arrayFieldElements] => Array
(
[0] =>
)
[searchFields] =>
[params] => JRegistry Object
(
[data:protected] => stdClass Object
(
[openNewWindow] => 1
[useMTVisitRedirect] => 0
[text] =>
[maxUrlLength] => 60
[clippedSymbol] => ...
[hideProtocolOutput] => 1
[showGo] => 1
[showSpider] => 0
)
)
[isCore] => 1
[numOfInputFields] => 1
[numOfSearchFields] => 1
[allowHTML] =>
[counter] => 0
[isFile] =>
[linkId] => 53
[fieldType] => corewebsite
[caption] => Site web
[defaultValue] =>
[prefixTextMod] =>
[suffixTextMod] =>
[prefixTextDisplay] =>
[suffixTextDisplay] =>
[catId] => 0
[ordering] => 12
[hidden] => 0
[requiredField] => 1
[hideCaption] => 0
[tagSearch] => 0
[simpleSearch] => 1
[advancedSearch] => 1
[searchCaption] =>
[detailsView] => 1
[summaryView] => 1
[class] => class mFieldType_corewebsite extends mFieldType_weblink {
var $name = 'website';
function getOutput() {
$maxUrlLength = $this->getParam('maxUrlLength',60);
$text = $this->getParam('text','');
$openNewWindow = $this->getParam('openNewWindow',1);
$useMTVisitRedirect = $this->getParam('useMTVisitRedirect',1);
$hideProtocolOutput = $this->getParam('hideProtocolOutput',1);
$html = '';
$html .= 'getValue();
if(strpos($value,'://') !== false && $hideProtocolOutput) {
$value = substr($value,(strpos($value,'://')+3));
// If $value has a single slash and this is at the end of the string, we can safely remove this.
if( substr($value,-1) == '/' && substr_count($value,'/') == 1 )
{
$value = substr($value,0,-1);
}
}
if( empty($maxUrlLength) || $maxUrlLength == 0 ) {
$html .= $value;
} else {
$html .= substr($value,0,$maxUrlLength);
if( strlen($value) > $maxUrlLength ) {
$html .= $this->getParam('clippedSymbol');
}
}
}
$html .= '';
return $html;
}
function getInputHTML() {
$showGo = $this->getParam('showGo',1);
$showSpider = $this->getParam('showSpider',0);
$inBackEnd = (substr(dirname($_SERVER['PHP_SELF']),-13) == 'administrator') ? true : false;
$html = '';
$html .= '';
if($showGo && $inBackEnd) {
$html .= ' ';
$html .= '';
}
if($showSpider && $inBackEnd) {
$html .= ' ';
$html .= '';
$html .= '';
}
return $html;
}
}
[attachment] =>
)
Je sais pas si ça peux t'aider