Internet Marketing, Web Development and Programming Stuff

Posts in the ‘Code Snippets & Examples’ Category

thumbnail

Scrollbar Divs

A while back I realized how easy it is to include massive amounts of crawlable content in a page and in a relatively small section (e.g. a sidebar) without having to use fancy DHTML or anything like that. It’s simple HTML: <div style=”overflow : auto; width : 210px; height : 220px; “> Place content here. …

thumbnail

uri_part: A PHP Function for Working with the Current URI

A PHP function that makes it extremely easy to display dynamic content within your existing Content Management System (CMS), web application framework or standard “PHP-enabled” website. function uri_part($n) { $path = explode(“/”, $_SERVER["REQUEST_URI"]); for ($i = 0; $i <= count($path); $i++) { if(is_null($path[$i]) || $path[$i] == “”) { unset($path[$i]); } } $path = array_values($path); switch($n) …

thumbnail

Remove WordPress Post Revisions for Database Optimization

Ever since WordPress introduced autosaving and revision control features, larger blogs have seen a significant increase in the size of their databases. If your WordPress installation has slowed dramatically or you are simply looking to optimize your database by removing countless records you’ll never end up actually needing, run the following query on your WordPress …