Featured video and dailymotion

Posted in: Newspaper
Post count: 61

Hi,

Please see here for previous
http://themeforest.net/item/newspaper/discussion/5489609?page=29&filter=All%20Discussion#comment_5112159

I want to be able to use this plugin which requires the theme to use native core wordpress get_the_post_thumbnail() or the_post_thumbnail() functions.
http://wordpress.org/plugins/featured-video-plus/

Is this something you are working on? I found this in helpers.php

 if ( is_string($thumb_size) && ((!empty($_wp_additional_image_sizes[$thumb_size]) && is_array($_wp_additional_image_sizes[$thumb_size])) || in_array($thumb_size, array('thumbnail', 'thumb', 'medium', 'large', 'full') ) ) ) {
        //$thumbnail = get_the_post_thumbnail( $post_id, $thumb_size );
        $thumbnail = wp_get_attachment_image( $attach_id, $thumb_size );
        //TODO APPLY FILTER
    }

Why are u using wp_get_attachment_image?

I need this featured video plus plugin to be able to hook into the single post and replace the image with any of its 3 options

  1. Replace featured image automatically if possible (default)
  2. Open video overlay when featured image is clicked. Define width below!
  3. Replace featured image with video on click and auto play if possible

You told me its temporary until you add dailymotion support, will you have these options, will you also have support for dailymotion publisher id

http://publisher.dailymotion.com/en/backoffice/developer-kit#tracking_example

When do you think you will release these features? would it not be better to just make your theme use native core wordpress featured image functions and make it compatible/integrated with the existing featured image plus plugin?

https://codex.wordpress.org/Post_Thumbnails

thank you

  • This topic was modified 12 years by dalandau.
Post count: 61

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

Post count: 61

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.
Post count: 61

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.
Post count: 61

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

Post count: 780

Hello,

I’m sorry for the long delay but our support agreement states that we don’t offer custom work and custom modifications. We took note of your feature requests and if they are requested by other we will implement them.

I would have gladly do the modifications for you but I am working very hard to support everyone and I’m also working to improve our products.

I hope you can understand us but anyways I can give you a refund.

Radu from tagDiv

Post count: 61

Hi,

I believe you are confusing this thread with another one.

  1. your theme does not support child themes and does not have an option to make modifications without them being overidden when updating the theme
  2. You are not using core wordpress functions to get the thumbnails, therefore plugins cannot hook into your featured images
  3. You have told me and others before that you will add dailymotion support
  4. I am not asking for custom work! I am asking for a way to display the thumbnail in the video post and the video at the bottom with an onclick scroll to video. And just said that if you would add the video icon as a watermark it would be better and faster
  5. I have given you the solution, just need you to make a few switches in the theme options so everyone could have this option and it would not break upon update, I am not one of those who waits until he is fed
  6. ….. please read my questions again

Like the theme in general and I am one of those who is willing to help others, so please help me

https://forum.tagdiv.com/topic/problem-with-visual-editor/

Thank you

Post count: 61

I am still a bit shocked by what you said

I would have gladly do the modifications for you but I am working very hard to support everyone and I’m also working to improve our products.

please see

https://forum.tagdiv.com/topic/featured-video-and-dailymotion/#post-1614

I have done the customization work, just need you to include them as options in the theme, to improve you product for everyone

Post count: 61

I still do not understand you, have you read the code I edited?
Or did you outsource support now you have sold 1500 theme and you feel too confident that you start giving refunds instead of helping with theme related only the developer can help with (unlike the many same mostly stupid questions you answer over and over again because of using the comment system on theme forest where the community cannot colmment on someone elses thread or because of that same comment system not being searchable). Its ok but you should have hired a coder for support. Because your answer shows me that you do not understand or that you just did not read this thread

https://forum.tagdiv.com/topic/featured-video-and-dailymotion/#post-1614

you could at least have answered

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

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
how to make the scroll to video nicer, also your scroll to comments (so that it scrolls and doesn’t jump)
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
why have you added this
.format-video p {
padding-top: 11px !important;
}

Post count: 61

once more, I am not asking for you todo special customization for me.

I am asking you to help me, and tell me if my code is correct or if it could have been done better.

And I am stuck because your theme does not let me create a childtheme for customization, is not using core wordpress functions to get the images, that is the only reason I really need support.

Why are you not compatible with wordpress core? and why when asked about these non pleasant questions do you flee?

http://codex.wordpress.org/Child_Themes

Post count: 61

many of the features I am asking for were already promised by you a long time ago:

http://themeforest.net/item/newspaper/discussion/5489609?page=3#comment_4713830

authorsontheair 2 months ago Flag
Ok, thank you for your reply. Current theme supports the input via custom field to video as featured image. So embed fuction takes code from custom field (where also code / link for youtube video and others can go) which is then inserted where with image posts you get featured image in post.

tagDiv
tagDiv AUTHOR 2 months ago Flag
I’ve added this to the todo list – we already have a custom field that works with youtube, vimeo, daily motion but it also pulls the thumb automatically. I will make it work with embed codes also.

Radu from tagDiv

Default-user
authorsontheair 2 months ago Flag
Awesome!

http://themeforest.net/item/newspaper/discussion/5489609?page=27#comment_5038037

diegonavland PURCHASED 19 days ago Flag
Hi, when do you think that the dailymotion videos would work with the site, I saw a comment like a month ago telling that you were going to implement it.

Thanks

tagDiv
tagDiv AUTHOR 18 days ago Flag
Hello,

We will make it for the following updates. Sorry for delay.

Marius from tagDiv

http://themeforest.net/item/newspaper/discussion/5489609?page=3#comment_4693696

tagDiv AUTHOR 2 months ago Flag
Hello, I’ve fixed the child theme – basically I forgot to update the theme name. Here is the latest version: http://import.tagdiv.com/newspaper/Newspaper-child.zip

Sorry for the inconvenience and btw I’m working to improve the child theme experience. If you have any sugestions let me know. I plan to add hooks and filters in the theme that can be used via child themes. Radu from tagDiv

http://themeforest.net/item/newspaper/discussion/5489609?page=26#comment_5018275

jazzclubjury 20 days ago Flag
Hi,

Pre purchase question
is this theme child theme friendly?

Looking great and want to give you my coin


tagDiv
tagDiv AUTHOR 20 days ago Flag
Hello,

Yes the theme have a Child theme ready to be used.

Thanks for your message, Marius from tagDiv

Post count: 61

please help

Post count: 61

As I said before this theme is great, but if you keep working 1,5 hours a day on support and you take 3 day long breaks in the middle, promise features but yet do not deliver them in your updates, you will see many refunds soon.

And if you keep ignoring legitimate questions then you will see people getting really mad for you having wasted their time.

PS: and when you work for 1,5 hours please give your customers answers that will not get them into google spam, why ruin such a great theme because of lousy support?

https://forum.tagdiv.com/topic/how-to-remove-category-link-from-single-page/#post-2019

Post count: 780

Hello,

I don’t know what to say. You are constantly asking us to integrate the theme with the feature video plus plugin. From our support agreement http://themeforest.net/item/newspaper/5489609/support , we don’t offer customization services.

Thanks for understanding,
Radu from tagDiv

  • This reply was modified 12 years by Radu.
Post count: 61

no, I am not asking to integrate with the plugin.

please read

https://forum.tagdiv.com/topic/featured-video-and-dailymotion/#post-1614

This has nothing todo with integrating the videoplus plugin

Post count: 780
Post count: 61

what about it has todo with integrating the plugin?

Post count: 61

and yes, I still have to use the plugin because you still dont have support for dailymotion like you said you would 2 months ago

http://themeforest.net/item/newspaper/discussion/5489609?page=3#comment_4713830

tagDiv
tagDiv AUTHOR 2 months ago Flag
I’ve added this to the todo list – we already have a custom field that works with youtube, vimeo, daily motion but it also pulls the thumb automatically. I will make it work with embed codes also.

Radu from tagDiv

And yes, I might have told you before that instead of promising for more than 2 month to have support for dailymotion that you might be better off using native get image functiions and use the plugin insted of promising to develop your own solution.

But this has nothing todo with what I did and asked about later on, now I am asking other things, I am using the shortcode and dont need you to be compatible with the get image function anymore.

Please read again and help me

https://forum.tagdiv.com/topic/featured-video-and-dailymotion/#post-1614

Thank you

Post count: 780

You talked on the forum/email with Marius and it was pointed out to me that you requested a lot of things / modifications. From my first look I believed that you want those thing made to work with your plugin. Also the messages before that requested modifications that would have been incompatible with our existing install base.

Regarding your message here:
https://forum.tagdiv.com/topic/featured-video-and-dailymotion/#post-1614

1. in general they are good suggestions but I can’t promise you that we will do the.
2. the scroll script is custom made by us. It’s much better than other themes, one of the only ones that listens to mouse scroll and touch to stop the scrolling when you want. I don’t know if it’s possible to use it on comment too but we will try it out.
3. that is difficult to make (to work on all the the different hosting environments that our clients have)
4. this is a bug, will be fixed asap

https://forum.tagdiv.com/topic/featured-video-and-dailymotion/#post-1915
1. Child themes are partially supported. You can override the css and the template files. You can’t override our code.
2. A lot of the themes don’t use the core wordpress functions for seo reasons and customization.
3. It’s still on our todo list.
4. that is a custom request. We will not do that.
5. “just need you to make a few switches in the theme options” our theme would have been a giant spaghetti code if we would have done that with all of the suggestions / customization requests from our clients.

Please know that we have to reply to over 50-60 request per day (email tf and here). We try our best to help all the people but when it comes to feature request/custom work we have to pick carefully what gets included in the theme and what not. We also have to set priorities – daily motion integration is not a top priority issue – I already tryed some time before to integrate it (you can still see old code in our file /includes/class/td_video_support.php) and it was not working very well due to the small thumbnails served by them (not useable on any of our sliders and form what I can remember smaller than our thumbs as well).

I do think that the single page and a lot of the templates can be improved… I realized that after seeing your problem with our theme some time ago.

In general once people are abusing our support system we don’t reply anymore since we are not obligated to but I do believe that you came here with good intentions and if it wasnt for the miscommunication with my colleague we would have started off with a much friendlier vibe 😐 . Please accept my apologies and if you want we can start all over again.

I am going to sleep now, it’s 1.07 AM here

~ Radu ~

Post count: 61

Hi thank you for taking the time to answer.

I am sorry we had a misunderstanding, I really love your theme

Good night

Post count: 61

Hi,

I understand you were confused, I therefore opened new threads, each problem separated.

https://forum.tagdiv.com/topic/video-icon-as-watermark/

https://forum.tagdiv.com/topic/how-to-show-featured-image-on-video-pages/

https://forum.tagdiv.com/topic/featured-image-on-single-post-wrapped-left-or-right-of-text/

https://forum.tagdiv.com/topic/how-to-use-your-scroll-script/

Thank you

PS: I still do not understand how to make (non-css) customizations that will not be erased when updating, so I still do not understand how not to ask you to make on and off switches

Post count: 61

What does this mean

1. Child themes are partially supported. You can override the css and the template files. You can’t override our code.

what can I override, what can’t I, I do not understand

can I use child theme for?

functions.php

/wp-content/themes/Newspaper/includes/app/modules/module_modifier/td_module_blog.php

/wp-content/themes/Newspaper/includes/content_builder/td_module.php

Post count: 61

Hi,

You said about dailymotion

I already tryed some time before to integrate it (you can still see old code in our file /includes/class/td_video_support.php) and it was not working very well due to the small thumbnails served by them (not useable on any of our sliders and form what I can remember smaller than our thumbs as well).

can this help? (I think your problem can be solved by using thumbnail_large_url )

	// dailymotion.com
			case 'dailymotion':
				//				domain 							 video ID
				preg_match('/dailymotion.com\/(?:embed\/)?video\/([^_#\?]+)/', $url, $url_data);
				if( !isset($url_data[1]) )
					break;

				$video_id = $url_data[1];

				// access API: http://www.dailymotion.com/doc/api/obj-video.html
				$url = 'https://api.dailymotion.com/video/'.$video_id.'?fields=title,description,created_time,owner.screenname,tags,thumbnail_url,thumbnail_large_url,url,aspect_ratio';
				$request = new WP_Http;
				$response = $request->request( $url, array( 'method' => 'GET', 'sslverify' => false) );
				if( is_wp_error($response) )
					break;
				$result = json_decode($response['body'], true);
				if( !isset($result) || (isset($result['error']['code']) && ($result['error']['code'] == 501 || $result['error']['code'] == 400) ) )
					break;

				// extract info of a time-link
				preg_match('/t=(?:(\d+)m)?(?:(\d+)s)?/', $url, $attr);
				if( !empty($attr[1] ) || !empty($attr[2]) ) {
					$min = !empty($attr[1]) ? $attr[1]*60 	: 0;
					$sek = !empty($attr[2]) ? $attr[2] 		: 0;
					$video_time = $min + $sek;
				} else {
					preg_match('/start=(\d+)/', $url, $attr);
					if( !empty($attr[1] ) )
						$video_time = $attr[1];
					else
						$video_time = 0;
				}

				// generate video metadata
				$data = array(
					'id' 			=> $video_id,
					'provider' 		=> $provider,
					'time' 			=> $video_time,
					'title' 		=> $result['title'],
					'description' 	=> $result['description'],
					'filename' 		=> sanitize_file_name($result['title']),
					'timestamp' 	=> $result['created_time'],
					'author' 		=> $result['owner.screenname'],
					'tags' 			=> implode(', ', $result['tags']),
					'img' 			=> ( isset($result['thumbnail_url']) && !empty($result['thumbnail_url']) ) ? $result['thumbnail_url'] : $result['thumbnail_large_url'],
					'url' 			=> 'http://dailymotion.com/video/'.$video_id. ( $video_time>0 ? '#t='.floor($video_time/60).'m'.($video_time%60).'s' : '')
				);

				break;

I found this code in the featuredvideoplus plugin

http://wordpress.org/plugins/featured-video-plus/

This is what I mean, these features you promised along time ago already exist. Why reinvent the wheel. Why waste your time stuck on this feature when you can look into opensource code and learn from it? Why reinvent the wheel when you can look at one for inspiration and make a better one for your racecar 😉

Is that not why wordpress is so good?

Once more, this theme has the potential of becoming the best theme ever.

Thank you

Post count: 61

The reason dailymotion support is important and is a feature that if advertised will generate sales for your theme is that dailymotion lets you monetize on embedding there videos.

MAKE MONEY SHARING DAILYMOTION VIDEOS

Boost your website, blog and social pages with quality content and receive advertising revenues along the way!

Isnt that what newspaper/magazine owners are here for?

http://publisher.dailymotion.com/en/

http://publisher.dailymotion.com/en/backoffice/developer-kit

Post count: 780

Hello,

This is the kind of video thumbnails daily motion provides: http://s1.dmcdn.net//CddhO//x240-dQS.jpg

a bit too small for the theme but we can add support for it.

Viewing 25 posts - 1 through 25 (of 28 total)
The forum ‘Newspaper’ is closed to new topics and replies.