jeeman
Forum Replies Created
-
Hi David, thanks for the response. I did fix it by deleting the entry from the database that had the -1 in it. I’m not sure why you can’t see the picture…I was having a few problems with the site back a week ago.
Once I removed the -1, it was working fine. Also, I changed the code to this in td_module.php…this prevented issue when there was a -1, with this code:
if ( function_exists( ‘uses_nelioefi’ ) && uses_nelioefi( $this->post->ID ) ) {
$td_thumb_parameters = td_api_thumb::get_by_id($thumbType);
$td_temp_image_url[1] = $td_thumb_parameters[‘width’];
$td_temp_image_url[2] = $td_thumb_parameters[‘height’];
$img_src = nelioefi_get_thumbnail_src($this->post->ID);
$buffy .= ‘<div style=”width: ‘. $td_temp_image_url[1] .’px;height: ‘.$td_temp_image_url[2].’px;background-position: center; background-image: url(‘.nelioefi_get_thumbnail_src($this->post->ID).’); background-repeat: no-repeat;background-size: cover;”></div>’;
}
else {
$buffy .= ‘<img width=”‘ . $td_temp_image_url[1] . ‘” height=”‘ . $td_temp_image_url[2] . ‘” class=”entry-thumb” src=”‘ . $td_temp_image_url[0] . ‘” ‘ . $attachment_alt . $attachment_title . ‘/>’;}
and in td_module_single_base.php:
if (!is_null($this->post_thumb_id)) {
if ( function_exists( ‘uses_nelioefi’ ) && uses_nelioefi( $this->post->ID ) ) {
$td_thumb_parameters = td_api_thumb::get_by_id($thumbType);
$width = $td_thumb_parameters[‘width’];
$height = $td_thumb_parameters[‘height’];
$img_src = nelioefi_get_thumbnail_src($this->post->ID);
$alt = $alt = get_post_meta( $id, ‘_nelioefi_alt’, true );
$full_size_src = $img_src;
//$buffy .= ‘<div style=”width: 100%;height: 100%;background-position: center; background-image: url(‘.nelioefi_get_thumbnail_src($this->post->ID).’); background-repeat: no-repeat;background-size: cover;”></div>’;
}
else { …Thanks, Vijay. It worked well!
How did you change the theme to use the plugin?