我是网络开发的新手,我需要创建一个用于公文包目的的网站,在其中我需要显示缩略图和下面我的项目的一点描述,所有内容都应该动态显示。我对PHP、wordpress、javascript、jquery、python和HTML/CSS有基本的了解,所以我这样做是为了学习。
我希望你们能告诉我该怎么做,只是指导我剩下的事情我会处理的。
就是一些类似的例子
http://themes.themepunch.com/?theme=megafoliopro_jq
http://codecanyon.net/item/dzs-scroller-gallery-cool-jquery-media-gallery/full_screen_preview/457913?ref=ibrandstudio
我是这个论坛的新手,希望有人能回答我的问题
非常感谢,伙计们。
下载CMS Made Simple并获取相册或图库模块。这是完成这项工作的多种方法之一。
您可以glob()
一个目录来使用PHP生成缩略图。我在我的摄影网站上使用这种方法:
<?php
$counter = 0; // Set counter to 0
foreach (glob("images/photo-strip/thumb/*.jpg") as $pathToThumb) { // Grab files from the thumbnail path and save them to variable
$th_filename = basename($pathToThumb); // Strip the thumbnail filename from the path
$filename = str_replace('th_', '', $th_filename); // Strip th_ from the filename and save it to a different variable
$pathToFull = 'images/photo-strip/' . $filename; // Rebuild the path to the full-size image
echo ("<section class="photo-box"><a href="$pathToFull"><img src="$pathToThumb" /></a></section>"); // Echo the photobox
$counter++; // Increment counter by 1 until no file exists
}
?>
您可以对该代码进行一些扩展,以便生成您的"标题",甚至可以将标题样式设置为<img>
标记内的title=""
属性。如何将这些标题与文件相匹配取决于您。