API update to ComLuv info panel display

Post Views for Mar :
I am the creator of CommentLuv Premium
You can get your own content published on this site as long as you have CommentLuv installed on your site.

Doing so means you get exposure to thousands and thousands of other CommentLuv users and your posts get sent out to the massive subscriber list.

Google loves this site and indexes it multiple times per day and posts always get lots of comments so you can be sure of some excellent exposure.

See the Write For Us page for more details

btw.. you can get this author box here

I made a small update to the ComLuv API so it will show the info panel properly when a user has special characters like © in their bio description or post titles.

Replace it with nothing!

I did have some rather complex search and replace code in the api to try and prevent special characters from killing the returned data but it wasn’t always working. It’s been there for quite some time and I’d almost forgotten about it until I saw a tutorial on regular expressions.

I’ve now come up with this to replace all instances of characters that shouldn’t be there..

; notranslate" title=""> function clean_it($string){ $text = preg_replace("/[^a-zA-Z0-9\s\"\'<>\/=\.:\-]/", "",$string); return $text; }

call it with $clean_string = clean_it($dirty_string);
All it does is replace any characters that aren’t alphanumeric or quotes,equals,dots,hyphens colons and forward slashes with nothing. This means you can have your description contain a link but nothing too fancy.

More code?

Now that guest blogging is open for all subjects, I will be putting up code snippets when I get the chance or when I discover something new. It helps me keep a record of what I’ve done and it might just help someone out there.

Are you ok with an occasional geeky php post or two? Let me know in the comments…