Установлена последняя версия Халявы. Код брала с форума, на старой версии у другого сайта все работало. А тут изображение не выводится.
Вывод случайной картинки на главной из фотогаллереи:
<?
$InformationSystem = new InformationSystem();
$external_propertys=array();
$property = array();
$property['OrderField'] = "RAND()";
$information_system_id = 4;
$InformationSystem->ShowInformationSystem($information_system_id,false,'СписокКартинокСлучайно',1,0,$external_propertys,$property);
?>
XSL шаблон "СписокКартинокСлучайно"
<?xml version="1.0" encoding="windows-1251"?>
<!DOCTYPE xsl:stylesheet>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" indent="yes" encoding="Windows-1251"/>
<xsl:template match="/">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="/document">
<xsl:text disable-output-escaping="yes">
<![CDATA[
<SCRIPT LANGUAGE="JavaScript">
function ShowImgWindow(title, src, width, height)
{
obj = window.open("", "", "scrollbars=0,dialog=0,minimizable=1,modal=1,width="+width+",height="+height+",resizable=0" ) ;
obj.document.write("<html>" ) ;
obj.document.write("<head>" ) ;
obj.document.write("<title>"+title+"</title>" ) ;
obj.document.write("</head>" ) ;
obj.document.write("<body topmargin=0 leftmargin=0 marginwidth=0 marginheight=0>" ) ;
obj.document.write("<img src=\""+src+"\" />" ) ;
obj.document.write("</body>" ) ;
obj.document.write("</html>" ) ;
}
</SCRIPT>
]]>
</xsl:text>
<!-- Получаем ID родительской группы и записываем в переменную $parent_group_id -->
<xsl:variable name="parent_group_id" select="blocks/parent_group_id"/>
<h2><xsl:value-of disable-output-escaping="yes" select="blocks/name"/></h2>
<!-- Отображение записи информационного блока -->
<table border="0" cellspacing="0" cellpadding="0" class="news_table">
<tr>
<xsl:apply-templates select="blocks/items/item[item_status=1]">
</xsl:apply-templates>
</tr>
</table>
</xsl:template>
<xsl:template match="blocks/items/item">
<td>
<center>
<xsl:if test="item_small_image!=''">
<!-- Проверяем задан ли путь к файлу большого изображения -->
<xsl:if test="item_image!=''">
<xsl:variable name="srcpath" select="item_image" />
<!-- <a href="{/document/blocks/url}"><xsl:value-of disable-output-escaping="yes" select="/document/blocks/name"/></a>-->
<a href="{/document/blocks/url}{fullpath}"><img src="/{item_small_image}" style="border: 3px solid #ffffff"/></a>
</xsl:if>
<xsl:if test="item_image =''">
<img src="/{item_small_image}" style="padding-right:10px; padding-bottom:10px;"/>
</xsl:if>
</xsl:if>
<!--<br/>
<xsl:value-of disable-output-escaping="yes" select="item_datetime"/>
<br/>
<a href="{item_path}"><b><xsl:value-of disable-output-escaping="yes" select="item_name"/></b></a>
<br/>
<xsl:value-of disable-output-escaping="yes" select="item_description"/>-->
</center>
</td>
<xsl:if test="position() mod 1= 0">
<tr/>
</xsl:if>
</xsl:template>
</xsl:stylesheet>