1

在此处输入图像描述

随着下面的代码现在可以工作,任何人都可以建议我如何以更大的尺寸从集合中提取图像,这目前仅适用于缩略图。

<?php 
if(!hook("EditorsPick")):
/* ------------ Collections promoted to the home page ------------------- */
$home_collectionsx=get_home_page_promoted_collectionsx(16);
foreach ($home_collectionsx as $home_collectionx)
    {
    ?>
<div class="EditorsPick">
   <div class="HomePanel"><div class="HomePanelINtopEditors">
    <div class="HomePanelINtopHeader">Editors Pick</div>
    <div class="HomePanelINtopText">This is the editors pick of Asset Space...</div>
   <div class="EditorsPicImage"><div style="padding-top:<?php echo floor((155-$home_collectionx["thumb_height"])/2) ?>px; margin-top: -24px; margin-bottom: -15px;">
    <a href="<?php echo $baseurl_short?>pages/search.php?search=!collection<?php echo $home_collectionx["ref"] ?>" onClick="return CentralSpaceLoad(this,true);"><img class="ImageBorder" src="<?php echo get_resource_path($home_collectionx["home_page_image"],false,"thm",false) ?>" width="<?php echo $home_collectionx["thumb_width"] ?>" height="<?php echo $home_collectionx["thumb_height"] ?>" /></div>
    </div></div>
    </div>
    </div>
</div>
    <?php
    }
endif; # end hook homefeaturedcol
?>






function get_home_page_promoted_collectionsx($id=null)
{
    $filterClause = '';
    if(!is_null($id))
    {
        $filterClause = ' AND collection.ref = '.intval($id);
    }
    return sql_query("select collection.ref,collection.home_page_publish,collection.home_page_text,collection.home_page_image,resource.thumb_height,resource.thumb_width from collection left outer join resource on collection.home_page_image=resource.ref where collection.public=1 and collection.home_page_publish=1".$filterClause." order by collection.ref desc");
}
4

1 回答 1

0
    <img class="ImageBorder" src="<?php echo get_resource_path($home_collectionx["home_page_image"],false,"thm",false) ?>" width="<?php echo $home_collectionx["thumb_width"] ?>" height="<?php echo $home_collectionx["thumb_height"] ?>" />

为什么不编辑它来设置你想要的像素大小,比如

    <img class="ImageBorder" src="<?php echo get_resource_path($home_collectionx["home_page_image"],false,"thm",false) ?>" width="1000" height="800" />
于 2013-07-26T11:11:35.327 回答