Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 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:)

    Short answer: Yes. It is possible.

    Normal answer: It is possible, but your question is in fact not related to the plugin itself. You just have to work with your WordPress theme. If you are familiar with WordPress and the WordPress ‘Loop’, this shouldn’t be a problem.

    Here’s the way I would do it:

    • Create a new theme template file, for example ‘video_yt.php’ (copy existing one, rename it, upload it, CHMOD)
    • When you uploaded the new template, use theme editor to edit the template
    • Copy the code from index.php (the part from the WP loop that generates the Youtube video embedding code) into the video_yt.php template
    • Create a new page (for example, called ‘videos’) and select the new created and modified template as template for that page
    • That’s all I guess …
    • I would do this by creating a new template, as by default WordPress doesn’t allow PHP to be posted within a page. There are plugins for PHP though …

      That’s the way I would do it, and I hope your familiar with some basic coding and the WordPress Loop, otherwise these instructions are by war not detailed enough. I don’t have enough time to go into details here. Maybe somebody else can help you out if you have problems with my instructions.

Viewing 2 replies - 1 through 2 (of 2 total)