Summernote insert single line break instead of paragraph on pressing enter

I’ve seen a variety of discussions about this and none of them quite worked for me, so here is my version – working on the current (0.8.9) version. $(“#summernote”).summernote({ //your options }).on(“summernote.enter”, function(we, e) { $(this).summernote(“pasteHTML”, “<br><br>”); e.preventDefault(); }); We intercept the enter key, insert 2 breaks (required for new… Continue reading

PHPMailer NTLM (MS Exchange) SMTP authentication

PHPmailer does not work with NTLM authentication and insists on using mhash() which is deprecated – so you need to edit the file in /extras called ntlm_sasl_client.php Find the code that checks if mhash() is installed and replace the 3 mhashes with hash instead: || !function_exists($function = “mhash”) ) {… Continue reading

Add custom fonts to WordPress TinyMCE editor with @font-face

The list of fonts in the WordPress visual editor is quite short. There are plugins available┬áto increase it, but I wanted to add my own custom font to the select dropdown. There’s no plugin hook for this, so it needs a little lateral thinking. Firstly, generate your webfont @font-face in… Continue reading

Process email bounces with PHP

This is a quick script to process email bounces, for example from a mailing list so that users can be flagged up or unsubscribed when they have too many failures. The actual bounce identification will be done by Chris Fortune’s Bounce Handler, which you can download from: We require… Continue reading

PHP Recursive File Copy Function

I couldn’t find a function online that copies folders recursively in PHP and actually works, so I wrote my own: function recursiveCopy($src, $dest) { if (is_dir($src)) $dir = opendir($src); while ($file = readdir($dir)) { if ($file != ‘.’ && $file != ‘..’) { if (!is_dir($src.’/’.$file)) copy($src.’/’.$file, $dest.’/’.$file); else { @mkdir($dest.’/’.$file,… Continue reading

Javascript (JQuery): Social networking feeds – new Facebook authentication

After my previous post, Javascript (JQuery): Social networking feeds all in one place, Facebook went and added authentication to the feed retrieval. After much head-scratching, this is how to enable the Facebook feed under the new OAuth system. You need an access token to get to the data, so what… Continue reading

Javascript (JQuery): Social networking feeds all in one place

Today we are going to get feeds from Twitter, Facebook, Youtube and Flickr all in one place for your website using JSON and the JQuery library: Be careful on this page with wrapped lines! Firstly we declare the jquery library in our head section (obviously download it first and change… Continue reading