Home User profile
tagDiv Member
This user did not write anything. So we are just showing here some random text to make the profile page look nice :)
dalandau
tagDiv Member

Its been 4 days, I found myself already at page 3. I have sent you emails too, to remind you about this thread.

Please help me today

Thank you

dalandau
tagDiv Member

Hi,

Here is what I have been able todo so far:
http://staging1.wp.gem-diamonds.com/news/one-of-a-kind-10-carat-royal-blue-diamond-for-sale-in-new-orleans

1) re-sized the image in functions.php

//featured image
$td_crop_features_image = td_util::get_customizer_option('crop_features_image');
if ($td_crop_features_image == '') {
 //add_image_size('featured-image', 700, 0, true); 
 add_image_size('featured-image', 320, 0, true);
} else {
 //add_image_size('featured-image', 700, 357, true); 
 add_image_size('featured-image', 320, 180, true);
}

2) added some custom css in wp-admin/themes.php?page=editcss
To make the image float on the right (not a good way does not play nice responsive, please tell me a better way)

.post .thumb-wrap {
	text-align: center;
	margin-bottom: 5px;
	background-color: #f2f2f2;
	float: right;
	margin-left: 10px;
}

3) edited /wp-content/themes/Newspaper/includes/app/modules/module_modifier/td_module_blog.php
so that video pages show featured image

function get_image($thumbType, $image_link = '', $image_excerpt = '') {
        global $page;
        if (!empty($page) and $page > 1) {
            return;
        }
        //echo 'raxxx' . $page;

        if (td_util::get_option('tds_show_featured_image') == 'hide') {
            return;
        }

        if (get_post_format($this->post->ID) == 'gallery') {
            return;
  //      }

 //       if (get_post_format($this->post->ID) == 'video') {
            //if it's a video post...
  //          $td_post_video = get_post_meta($this->post->ID, 'td_post_video', true);
 //           $td_video_support = new td_video_support();
 //           if (!empty($td_post_video['td_video'])) {
 //               return $td_video_support->renderVideo($td_post_video['td_video']);
 //           }
        } else {
            //if it's a normal post, show the default thumb

            //get the full url
            $attachment_id = get_post_thumbnail_id($this->post->ID);

            $td_temp_image_url = wp_get_attachment_image_src($attachment_id, 'full');

            $image_excerpt = get_post_field('post_excerpt', $attachment_id);
            if (!empty($image_excerpt)) {
                $image_excerpt = '<p class="wp-caption-text td-featured-image-caption">' . $image_excerpt . '</p>';
            }

            $post_image = '';

            if (!empty($td_temp_image_url[0])) { //if we have a full url, link the image to that
                $post_image = parent::get_image($thumbType, $td_temp_image_url[0], $image_excerpt);
            } else {
                $post_image = parent::get_image($thumbType, '', $image_excerpt);
            }

            return $post_image;

        }
    }

4) edited /wp-content/themes/Newspaper/includes/content_builder/td_module.php
so that only on single video pages a click on image would scroll to video

$buffy .= '<div class="thumb-wrap">';

            if (current_user_can('edit_posts')) {

                $buffy .= '<a class="td-admin-edit" href="' . get_edit_post_link($this->post->ID) . '">edit</a>';

            }
			
			if ((get_post_format($this->post->ID) == 'video') and (is_single($post))){
			
			$buffy .='<a  href="#video" rel="bookmark" title="' . $this->title_attribute . '">';
			
			} else {

            $buffy .='<a ' . td_util::if_show($show_colorbox_class, 'class="td-featured-img"') . ' href="' .

                $image_link . '" rel="bookmark" title="' . $this->title_attribute . '">';

			}

Can you please help me with the following and tell me if I could have done it better

  1. to make these things template features/options so that when I update it will not break, its just a few on and off switches
    • option to make featured image float left or right, while being nicely responsive
    • option to show featured image on video pages instead of replacing it with featured video
    • option to have featured image of single video pages to scroll to video when clicked
  2. how to make the scroll to video nicer, also your scroll to comments (so that it scrolls and doesn’t jump)
  3. a feature to have the video icon as a image watermark so that we will have to call one less image in template, will be faster and also for facebook thumnail the video icon will be in the image
  4. why have you added this
    .format-video p {
    padding-top: 11px !important;
    }

Thank you

  • This reply was modified 12 years by dalandau.
  • This reply was modified 12 years by dalandau.
  • This reply was modified 12 years by dalandau.
  • This reply was modified 12 years by dalandau.
  • This reply was modified 12 years by dalandau.
  • This reply was modified 12 years by dalandau.
  • This reply was modified 12 years by dalandau.
  • This reply was modified 12 years by dalandau.
dalandau
tagDiv Member

After playing around I have been able to achieve what I would want to do for pages without video by hardcoding

http://wp.gem-diamonds.com/news/one-of-a-kind-10-carat-royal-blue-diamond-for-sale-in-new-orleans

<a href="#video"><img class="alignright size-medium wp-image-236" alt="withvideothumbnail" src="http://wp.gem-diamonds.com/wp-content/uploads/2013/09/withvideothumbnail-300x219.jpg" width="300" height="219" /></a><span style="font-size: 13px;">If you are looking for something to help you stand out,...

<h3><a id="video">Featured Video:</a></h3>
[featured-video-plus]

But as you see its not practical and my coding skills are not that good just basic, can you help me achieve a similar user experience?

Thank you

  • This reply was modified 12 years by dalandau.
dalandau
tagDiv Member

would it be possible for me to add the get_the_post_thumbnail() or the_post_thumbnail() functions on the video format posts? So to basically have it remove your get image function and add the get_the_post_thumbnail() or the_post_thumbnail() functions so that the plugin would replace that on video format posts.

You told me that the video format post were used to remove the image and to add the video icon on thumbnail, but I notice it messes with some css (see margin of text). Is that intentional?

Thank you

Viewing 4 posts - 51 through 54 (of 54 total)