php

php

Add your own title separator characters using Yoast SEO’s wpseo_separator_options filter

Despite Yoast’s discouragement of using the wpseo_separator_options filter to add more separator options to the configuration page (SEO > Search Appearance), I really wanted to give it a shot so my URLs would have a neat separator that’s not commonly seen. Hookr.io had a great breakdown of how wpseo_separator_options can be implemented. I added the …

Add your own title separator characters using Yoast SEO’s wpseo_separator_options filter Read More »

Parse an uploaded CSV file in 2 lines in PHP/CakePHP

Nasty but gets it done: $delim = ‘,’; $enc = ‘”‘; $line = “\n”; foreach( str_getcsv ( file_get_contents( $tmpname ), $line ) as $row ) $csv[] = str_getcsv( $row, $delim, $enc ); // print_r( $csv ); or, if you want to be even more crazy, in 1 (note, config options are inline but I left …

Parse an uploaded CSV file in 2 lines in PHP/CakePHP Read More »

CakePHP 1.1.x, Vendors, and domPDF

Wow – for a built in feature, this sure was a pain in the ass to get working.  I’m talking about using the ‘vendors’ functionality in CakePHP 1.1.x (I’m at .19), of course, and in this case, my external class was domPDF. First of all, they never really cover how to use the vendor function …

CakePHP 1.1.x, Vendors, and domPDF Read More »