How to Sync Odysee Channels to Your Wordpress Blog
Tuxfoo | Linux | FOSS | Gaming
A quick tutorial on how to sync odysee posts to a wordpress blog.
This method no longer appears to work, I think its an issue with the sybersyn plugin. I will look into why this is happening.
From my observations, cybersyn.php is consuming lots of memory and times out. I would advise against increasing memory php memory and timeout limits.
EDIT: It appears that the author of the plugin was banned from wordpress.org, I will find another GPL (open-source) plugin that does the same thing. It might still require modifications to embed the video and parse markdown.
EDIT 09/18/2021: I am now using the wpematico rss plugin. To embed the videos add this to the post template for your rss feed campaign.
<script>
var re=/.*odysee.com.(.*):(.*)/
var link="{permalink}"
var embedlink="https://odysee.com/$/embed/"+link.match(re)[1]+"/"+link.match(re)[2]
document.write('<iframe id="lbry-iframe" src="'+embedlink+'" width="640" height="360" allowfullscreen></iframe>');
</script>
{content}
<a href="{permalink}">View on Odysee</a><br />
Will update the video with these new instructions later.
Code snippet For the old way described in this video for embedding videos
elseif (strpos($this->post['link'], '.odysee.com/') !== false || strpos($this->post['link'], '//odysee.com/') !== false) {
preg_match('/.*odysee.com\/(.*):(.*)/', $this->post['link'], $matches);
$this->post['post_content'] = '<p><iframe id="lbry-iframe" src="https://odysee.com/$/embed/' . $matches[1] . '"/"' . $matches[2] . '" width="640" height="360" allowfullscreen></iframe></p>' . $this->post['post_excerpt'];
}
You can use the Auto-hyperlink URL plugin to make hyperlinks from imported posts work.
Follow me on Mastodon: https://social.librem.one/@tuxfoo
191217537 Bytes