【发布时间】:2009-06-16 13:56:08
【问题描述】:
我目前正在尝试为运行 interspire 购物车平台的现有网站添加 alt img 标签,我相信我已经非常接近了,但我似乎无法做到正确。任何帮助将不胜感激。
// Is there a thumbnail image we can show?
$thumb = $GLOBALS['ISC_CLASS_PRODUCT']->GetThumb();
$alttext = $GLOBALS['ISC_CLASS_PRODUCT']->GetProductName();
if ($thumb == '' && GetConfig('DefaultProductImage') != '') {
if (GetConfig('DefaultProductImage') == 'template') {
$thumb = GetConfig('ShopPath').'/templates/'.GetConfig('template').'/images/ProductDefault.gif';
} else {
$thumb = GetConfig('ShopPath').'/'.GetConfig('DefaultProductImage');
}
$thumbImage = '<img src="'.$thumb.'" alt="->GetProductName" />';
} else if ($thumb != '') {
$thumbImage = '<img src="'.GetConfig('ShopPath').'/'.GetConfig('ImageDirectory').'/'.$thumb.'" alt=""'.$alttext.'" />';
}
我已尝试发布代码,但它说新用户由于某种原因无法发布图像标签
【问题讨论】:
-
你应该可以把它作为一个代码sn-p。只是不要直接复制粘贴。粘贴它,突出显示它,然后查找带有 0 和 1 的图标以将其放置在代码标签中。
-
等一下,我试试把它放进去,你必须把它作为“代码”放进去,这意味着它缩进了四个空格。它正在尝试将您的文本视为 HTML。
-
我试过了,最好是按照原来的格式来做。按照伊恩所说的去做。