1
我的内容类型为“company_profile”,图像字段名称为“field_cp_logo”。现在,我使用Views CustomField选项将imagecache预设名称打印为“jobsearch_company”。我正在使用下面的代码,但它没有向我显示任何内容。任何帮助在这里赞赏。在视图中使用Imagecache打印图像CustomField
<?php
$fid = db_fetch_object(db_query("SELECT f.field_cp_logo_fid FROM {content_type_company_profile} f WHERE nid = %d", $n_nid));
$img_path = db_fetch_object(db_query("SELECT f.filepath FROM {files} f WHERE fid = %d", $fid->field_cp_logo_fid));
$img_path = file_create_path($img_path->filepath);
$image = theme('imagecache', 'jobsearch_company', $img_path);
print $image;
?>
http://chat.stackoverflow.com/rooms/70243/farsi-programming-discussion – Kasramvd 2015-02-04 22:10:29