Welcome To Snipplr
Everyone's Recent PHP Snippets
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
Just a custom function i use to have formated var_dump while debugging
0
415
posted 12 years ago by fabienthomas
Just a short little script that takes a mysql query and turns it into a csv file that downloads automatically. If your interested in the details you can hit up the link.
0
733
posted 12 years ago by FatFolderDesigner
I use this to toss all the junk from the header, add a favicon, remove useless admin elements, and block WordPress' ancient jQuery file from embedding.
0
576
posted 12 years ago by ethicka
Lastly, in order to make magento connect to work correctly edit the pear.ini (downloader/pearlib/pear.ini) and update al the paths that you see in this file. Otherwise magentoconnect will try to upgrade your old site when you use it.
(the files do...
0
560
posted 12 years ago by hotdiggity
Add this to the functions.php file. Make sure the Admin Bar is set to show when viewing site. You will see in the Admin Bar the current page template that is being used.
0
637
posted 12 years ago by jeremyjared74
Usage:
<?php>post_excerpt; if($textin == ""){ $textin = $post->post_content; } echo TruncateText($textin, 150); ?>
0
495
posted 12 years ago by tcelestino
Comes in handy for php magic functions such as __get and __set. This behaviour is fixed in php 5.3. Returns true also for private and protected properties using a reflectionclass
0
755
posted 12 years ago by Roen
Useful snippet for getting a specific number of posts from a specific category, useful for news listing in sidebar
0
547
posted 12 years ago by i-am-andy