Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Frank Goossens

    (@futtta)

    So you want Lyte not to be called on normal post and pages, just on the custom archive template loop?

    In that case you’d have to remove the filter added by wp youtube lyte with something like

    remove_filter('the_content', 'lyte_parse');

    and then call lyte_parse inside your custom archive template loop.

    Hope this helps,
    frank

    Thread Starter Simon Barnett

    (@simbasounds)

    Thanks Frank. As of now, my client no longer requires this functionality, so no need to respond unless maybe you think it’s an easy answer and useful to the forum.

    Normal posts are fine as they are (text, video, images), but using a custom archive template, I’d like to strip out any other content (text, images) and display only Lyte videos. So the template would have to “find” or filter only httpv links, and display only the videos embedded in posts, and nothing else.

    I know WordPress has a way of searching-for and oEmbedding youtube links, and maybe Lyte is working within that system so perhaps this is a WordPress question, but worth asking just in case Lyte has it’s own algorithm for spotting httpv links. Something like
    add_filter('the_content', 'lyte_parse');
    but more exclusive to finding only embedded videos.

    Plugin Author Frank Goossens

    (@futtta)

    Ah, I think I understand; you want a page which displays all youtube vids embedded in multiple pages/ posts on one “video archive” page?

    Well; lyte has an index of all lyte cachekeys (used as key in post_meta to store title, description, …) in the lyte_cache_index option. An extract of what I have in mine;

    {"198":["_lyte_zZrtivRKVdg"],"157":["_lyte_hboHPS5XPpM"]}

    So if you would get that option value, json_decode it and iterate over each post id in the resulting array, you would be able to fetch all “cachekey”-s.

    If for each cachekey in the resulting list you would then remove the leading “_lyte_”, you end up with a list of youtube ID’s.

    And once you have the list of video-id’s, you’d only need to call lyte_preparse() on each of the youtube id’s for lyte to render the player.

    If you end up writing this in a more or less generic way (shortcode [lyte_archive] which triggers function lyte_display_archive() which renders a style-able table-like archive?), then I’d be happy to include this in the plugin itself! 🙂

    Thread Starter Simon Barnett

    (@simbasounds)

    That makes total sense. Wow, super-useful, Frank : )
    My client just called to say he no longer needs it on this urgent project (I edited my post while you were writing yours, I think), but we often do need this sort of thing. I’ve had a little experience with JSON encode / decode, so if the need comes up again I’ll certainly forward you the code (unless you beat me to it). Thanks again!

    Hi I am working on a project suddenly I want to create a custom page to display images by auteur.Et when we go select one of these images we can view images of this author, if possible made sort by date and auteur.Jusque there I did not find the code to do this work.aid me please

    Plugin Author Frank Goossens

    (@futtta)

    Images? I’m afraid this support forum is for WP YouTube Lyte Paston. I would start off with the info on this wordpress codex page, but query specificially on images (using some code from this codex page) and then adding a lightbox to make it a little more attractive. Good luck mate! 😉

    Bien à toi,
    frank

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Show only Lyte videos in archive template’ is closed to new replies.