• 1) Example code: Building a text-only video list
    Place the following code inside the WordPress loop:

    <?php query_posts('posts_per_page=100'); ?>
    <?php while (have_posts()) : the_post(); ?>
    <a href="<?php the_permalink() ?>" title="<?php the_title() ?>"><?php the_title() ?></a><br>
    <?php endwhile;?>

    In this case, a maximum of 100 links will appear in the list. Use CSS for styling.

    2) Example code: Building a thumbnail-gallery
    Place the following code inside the WordPress loop:

    <?php query_posts('posts_per_page=100'); ?>
    <?php while (have_posts()) : the_post(); ?>
    <a href="<?php the_permalink() ?>" title="<?php the_title() ?>"><?php tern_wp_youtube_image(); ?></a>
    <?php endwhile;?>

    Again, a maximum of 100 thumbnails will appear per page. Use of CSS highly recommended, otherwise all thumbnails might appear in a single row.

    3) Fix: The full screen button does not appear ?
    In /core/video.php change
    <param name="movie" value="'.tern_wp_youtube_video_link($v,false).'"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="'.tern_wp_youtube_video_link($v,false).'" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="'.$o['dims'][0].'" height="'.$o['dims'][1].'"></embed>
    to
    <param name="movie" value="'.tern_wp_youtube_video_link($v,false).'&fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="'.tern_wp_youtube_video_link($v,false).'&fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="'.$o['dims'][0].'" height="'.$o['dims'][1].'"></embed>
    (add &fs=1 twice).

    4) Suggestion: Changing the thumbnail image title
    When using the tern_wp_youtube_image function, the thumbnail images have the video ID as title. When using a thumbnail-only gallery, it might be useful to use the video title instead of the video ID.
    In /core/video.php, in function tern_wp_youtube_image change
    $l = '<img src="http://i.ytimg.com/vi/'.$i.'/default.jpg" alt="" title="'.$i.'" />';
    to
    $l = '<img src="http://i.ytimg.com/vi/'.$i.'/default.jpg" alt="'.$v.'" title="'.$v.'" />';

    5) Problem: Youtube video description without URLs and loses original format
    The plugin takes the video description from Youtube and writes it to the post, below the video. But when the description contains URLs, everything following the ‘/’ is just deleted. Additionally, all line breaks are filtered and don’t appear in the WordPress post.
    Example:

    http://www.helloworld.com/have/a_nice/day
    
    1. Good morning
    2. Have fun

    changes to
    http://www.helloworld.com 1. Good morning 2. Have fun
    Could someone please help me to fix this ?

    6) Question: How do I separate video and post content ?
    How do I get video only, without the Youtube video description ?
    On the main page (index.php) I want only the videos to appear. On the post page (single.php) I want the video AND the text to appear.

    7) Problem: ‘Video Posts’ entries in the WordPress administration
    With added videos, you have the option to either Delete or Draft the video. But videos are never really deleted from the video list. They remain in the list, but with the options Publish and Draft. When I select Publish, I get the error
    There was an error whil processing your request. Please try again.
    Yes, the error text contains a little typo.
    So once I deleted a video from the list, but want it back, what can I do ? When I select import videos, the aren’t re-imported as they are already in the list.
    Or if I imported videos from an additional Youtube username, and then deleted those videos, how to I get completely rid of their entries in the list ?
    I guess the only way right now, would be to manually edit the database. Where in the database are the deleted videos listed ?
    I couldn’t find them using phpMyAdmin. wp_posts contains the posts, but not the imported but deleted videos …

    Thanks a lot for your work so far !

    http://wordpress.org/extend/plugins/automatic-youtube-video-posts/

Viewing 1 replies (of 1 total)
  • Thread Starter iBug

    (@ibug)

    I wonder why nobody is commenting on this post. Is there anybody who could help me out with my questions (5 & 6) ?

    1) Forget this code, it’s perfectly working, but not related to the Youtube plugin.
    2) Just some example code, maybe somebody may want to use it.
    3) Fix, fullscreen is working.
    4) Suggestion.

    5) Needs fix, not working properly, content grabbed from the Youtube video description is not formatted properly.
    6) Needs fix, I think this should be integrated as an option. I need a solution as fast as possible …

    7) The video IDs are located in the wp_options table, option_name “tern_wp_youtube_videos”. If problems with deleting videos or importing new videos appear, I would suggest deleting the whole content of “tern_wp_youtube_videos”. After that, all videos have to be imported from scratch. The format of that field is:

    a:3:{s:11:”xyzxyzxyz1″;i:101;s:11:”xyzxyzxyz2″;i:102;s:11:”xyzxyzxyz3″;i:103;}

    In this case (a:3:) the number of videos is 3.
    I don’t know what s:11: means, maybe category of the post or so …
    The video ID is saved between quotation marks.
    i: indicates the post ID.

    So when a single specific video should be completely removed from the plugin, locate the Youtube ID and delete it, including s:11: (before the Youtube ID) and i: (following the Youtube ID).

    And adjust the value of a (e.g. from a:3: to a:2:)

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Automatic Youtube Video Posts Plugin] Questions about the plugin and fixes’ is closed to new replies.