ANDREWDJOHNSON
Forum Replies Created
-
Thanks – unfortunately, this is not an option for me. Not sure why the plugin would require so much memory?
Forum: Plugins
In reply to: [Postie] YouTube video is not embedding in my postI have been having this problem for a while now, so decided to have a look at the PHP code and have something that works, but needs improving.
In the “filter_CleanHtml” function of postie-filters.php, I have modified some of the code as shown below, so that it looks for “a” tags and then modifies the outertext accordingly and adds “embed” around the link. I could not get it to work any other way.I am using Outlook 365 as my email client.
I had set “plain text” emails to get the links to embed properly, but any link that was over 75 or 80 characters would then end up getting broken in my post (a common problem for me). This (below) converts Youtube and MP3 links to embeds. Perhaps this can be added in the next update – and improved slightly to draw on WordPress’s current list of embeddable types of links/things (Dailymotion etc)
foreach ($html->find('script, style, head,a') as $node) { //DebugEcho("filter_CleanHtml: Removing: " . $node->tagname . "=" .$node->nodename . "=" . $node->nodetype . "=" . $node->nodevalue . "=" . $node->innertext); if(isset($node->href)) { if (strstr($node->innertext, "youtube.com") || (strstr($node->innertext, ".mp3"))) { DebugEcho("filter_CleanHtml: Setting Link so that it will embed."); $node->outertext="[embed]" . $node->innertext . "[/embed]"; } } else { DebugEcho("filter_CleanHtml: Removing: " . $node->innertext); $node->outertext = ''; }- This reply was modified 7 years, 4 months ago by ANDREWDJOHNSON.
Forum: Reviews
In reply to: [Disable Cart Fragments] Pretty good…Hi
My mods seemed to work for my PHP 5 site – I only changed about 5 lines of code.
I am not sure if this is against “Netiquette” etc, but here is a link to the modded version I made, provided with no guarantees!! Try installing and activating (you need to “Upload” the plugin having downloaded it from this link:
http://www.checktheevidence.com/disable-cart-fragments-littlebizzy-php5.zip
Good luck!
- This reply was modified 7 years, 10 months ago by ANDREWDJOHNSON.