dreyg9
Forum Replies Created
-
Forum: Plugins
In reply to: [.TUBE Video Curator] Store youtube thumbnail link to custom field?Great! Thank you!
May be do you know how to solve my problem?
https://ww.wp.xz.cn/support/topic/subtitles-7/Forum: Plugins
In reply to: [.TUBE Video Curator] Store youtube thumbnail link to custom field?Solved it.
How?
Forum: Plugins
In reply to: [.TUBE Video Curator] Video lengthCorrect code:
<?php $hms = get_post_meta( $post->ID, 'tube_video_duration_hms', true ); echo sprintf( 'Duration: %1$d Hours %2$d Minutes %3$d Seconds', $hms['h'], $hms['m'], $hms['s'] ); ?>Thank you very much!
Best plugin π Best support π
Forum: Plugins
In reply to: [.TUBE Video Curator] Video lengthWell,
<?php echo $hms = get_post_meta( $post->ID, 'tube_video_duration_hms', true ); echo sprintf( 'Duration: %1$d Hours %2$d Minutes %3$d Seconds', $hms['h'], $hms['m'], $hms['s'] ); ?>this code is work, but I have little unpleasant problem
ArrayDuration: 0 Hours 6 Minutes 20 Seconds
screenshot: http://funkyimg.com/i/2xiMv.jpgHow to remove “Array”?
- This reply was modified 8 years, 9 months ago by dreyg9.
Forum: Plugins
In reply to: [.TUBE Video Curator] Video lengthOk. Now
Duration: 0 Hours 0 Minutes 0 Seconds
Forum: Plugins
In reply to: [.TUBE Video Curator] Video lengthtube_video_duration_seconds – display numbers (seconds)
tube_video_duration_hms – display “Array”screenshot: http://imagestun.com/hosting/kartinki/array.jpg
video https://www.youtube.com/watch?v=ySNM2GCq_BE
(but this happens to all videos)Forum: Plugins
In reply to: [.TUBE Video Curator] Video lengthForum: Plugins
In reply to: [.TUBE Video Curator] CustomizeI did it π
Forum: Plugins
In reply to: [.TUBE Video Curator] CustomizeIt works :)))
Thank you,
thank you,
thank you very much!5 stars!
- This reply was modified 8 years, 10 months ago by dreyg9.
Forum: Plugins
In reply to: [.TUBE Video Curator] CustomizeDon’t work :(((
Author add as Default Author π
Forum: Plugins
In reply to: [.TUBE Video Curator] CustomizeOk, now I have not errors, but author do not add.
for example
channel https://www.youtube.com/channel/UCvh7M2BvWW1cabkELmIYUAQ/featured
http://imagestun.com/hosting/?v=slugvjv.jpg
Is it correct?
- This reply was modified 8 years, 10 months ago by dreyg9.
Forum: Plugins
In reply to: [.TUBE Video Curator] CustomizeMissing a dot. Fix below.
Parse error: syntax error, unexpected ‘if’ (T_IF) in /var/www/u0247738/data/www/youpolitics.ru/wp-content/themes/xcel/functions.php on line 427
now π
line 427: if ( $users ):
Forum: Plugins
In reply to: [.TUBE Video Curator] CustomizeParse error: syntax error, unexpected ‘$creator_name’ (T_VARIABLE), expecting ‘,’ or ‘)’ in /var/www/u0247738/data/www/youpolitics.ru/wp-content/themes/xcel/functions.php on line 423
π
add_filter( ‘tube_vc_filter_post_pre_insert’ , ‘my_custom_tube_import_post’, 10, 3 );
function my_custom_tube_import_post( $my_post, $source_site, $creator_name ) {
$my_post[‘post_content’] = ‘[spoiler]’ . $my_post[‘post_content’] . ‘[/spoiler]’;
$users = get_users(
array(
‘meta_key’ => ‘user_channel_slug’,
‘meta_value’ => sanitize_title( $source_site . ‘ ‘ $creator_name ),
)
)if ( $users ):
$my_post[‘post_author’] = $users[0]->ID;
endif;return $my_post;
}
add_filter( ‘tube_vc_filter_import_term’ , ‘my_custom_tube_import_terms’, 10, 3 );
function my_custom_tube_import_terms( $default_term, $source_site, $creator_name ) {
$my_terms = array( 9, 34, 50, 72 ); // McMahon, Paton, Singletary, Perry
return $my_terms;
}
https://drive.google.com/file/d/0BzoaSvJgni2HTHFzRUROSTNzNm8/view?usp=sharing
Forum: Plugins
In reply to: [.TUBE Video Curator] CustomizeHello! Spoiler is working! Thank you very much!
But author don’t work π
Parse error: syntax error, unexpected ‘$creator_name’ (T_VARIABLE), expecting ‘,’ or ‘)’ in /var/www/u0247738/data/www/youpolitics.ru/wp-content/themes/xcel/functions.php on line 439
Forum: Plugins
In reply to: [.TUBE Video Curator] CustomizeHello! Thank you!
Do you mean you want to βauto-assignβ some pre-determined tags and a specific author for each new video that comes in from a specific channel?
Yes.
Or Tube_video_creator_name as post author.Or, better yet, Iβve added a new filter which will go live with the next push. In the meantime, you can replace the content of βtube-video-curator.phpβ with thisβ¦ https://pastebin.com/Qpeu8eBk
I replaced
Then, you can drop this in a functions fileβ¦
add_filter( ‘tube_vc_filter_post_pre_insert’ , ‘add_spoilers’ );
function add_spoilers( $my_post ) {
$my_post[‘post_content’] = ‘[spoiler]’ . $my_post[‘post_content’] . ‘[/spoiler]’;
return $data;
}In functions.php?
I added in functions.php, but It don’t work π