Using Zenphotopress with GraphPaper Press Theme
-
First, I’m not a programmer, so I’m already in way over my head. Sorry if this appears to be a stupid question.
I’m trying to get things working between my wordpress and zenphoto installs.
I am trying to make use of a graphpaper press theme (F8) which pulls an image from a post and uses that for a thumbnails to display the posts.
It works great if the image is embedded using an <img> tag that points to a particular file, but because I’m using zenphoto and the WP plugin zenphoto press, my <img> aren’t really in the post, they hare there with short code that looks like this:
I dug around and I think I found the code in the modularity theme that gets the thumbnail, and it looks like this:
function image_by_scan( $args = array() ) {
/* Search the post’s content for the <img /> tag and get its URL. */
preg_match_all( ‘|<img.*?src=['”](.*?)['”].*?>|i’, get_post_field( ‘post_content’, $args[‘post_id’] ), $matches );/* If there is a match for the image, return its URL. */
if ( isset( $matches ) && $matches[1][0] ) {
$scan_finds_image = true;
$matchset = array( ‘url’ => $matches[1][0] );
$matchurl = $matchset[‘url’];
$height = $args[‘height’];
$width = $args[‘width’];
$timthumbprefix = get_bloginfo(‘template_url’).”/includes/timthumb.php?src=”;
$timthumbsuffix = “&h=$height&w=$width&zc=1”;
$timthumbimage = “<img src=’$timthumbprefix$matchurl$timthumbsuffix’ alt=” height=’$height’ width=’$width’ class=’timthumbnail’ />”;
$link_to_post = $args[‘link_to_post’]; if ( $link_to_post ) {
echo ‘‘ . $timthumbimage . ‘‘;
} else { echo $timthumbimage; } }
return $scan_finds_image;
}What I think his happening is that the URL is being built to include a call to more php code, so php code is being sent php code, not a link to an image URL, and the result is that no image is displayed. But being as I’m not a programmer, I don’t know how to alter things so that the image_by_scan function will return a valid img url?
Any ideas? -
Sorry, you need to head over to http://wordpress.ORG/support/ as that is where self-hosted wordpress blogs using the software from wordpress.ORG are supported.
These forums are for those hosted here on the wordpress.COM free hosting service and things here work differently.
If you are not familiar with the differences, see this support document: http://en.support.wordpress.com/com-vs-org/ .
- The topic ‘Using Zenphotopress with GraphPaper Press Theme’ is closed to new replies.