Welcome To Snipplr


Everyone's Recent PHP Snippets



1 ... 66 67 68 69 70 ... 147
0 467 posted 13 years ago by baires
Only this portion needed // Add page template suggestions based on node type, if we aren't editing the node. if ($vars['node'] && arg(2) != 'edit') { $vars['template_files'][] = 'page-nodetype-'. $vars['node']->type;...
1 604 posted 13 years ago by resting
This will make all errors be shown and logged. Useful for when you want to figure out what's wrong but the production server doesn't display any errors.
1 574 posted 13 years ago by BrunoDeBarros
Как сделать вывод из нескольких таблиц (php mysql) Итак, имеем: Три таблицы - articles, categories и sections. По иерархии - в sections включаются categories, а в catego...
0 615 posted 13 years ago by graceman9
0 557 posted 13 years ago by dmistriotis
You can use this code under MIT licence.
0 874 posted 13 years ago by digitalzoomstudio
0 295 posted 13 years ago by recipient
Used in Wordpress to get the post Thumbnail. Thumb url goes to $img
0 416 posted 13 years ago by RWolford
For Wordpress. Used to get the url of the post Thumbnail.
0 380 posted 13 years ago by jazzikins
0 950 posted 13 years ago by wnasich
Example from New Play Map
0 499 posted 13 years ago by mimlee
Example used in New Play Map
0 452 posted 13 years ago by mimlee
This snippet is a PHP function that checks if an email address is valid
2 752 posted 13 years ago by visudex
Useful for copyright. Keeps date current.
0 567 posted 13 years ago by bombadda
Replace 'position' with 'your-position-name'.
0 558 posted 13 years ago by bombadda
After an attempt to more a live site to a personal server for further work I ran across the problem of a mix of absolut and relative links making the local copy not work. Not wanting to manually have to change every single absolute to a relative (bec...
0 593 posted 13 years ago by FatFolderDesigner
Use Mage::register() to add an entry into registry, Mage::registry() to retrieve data and Mage::unregister() to delete registry entry.
0 446 posted 13 years ago by vrnet
Use this to grab the first image in a post
0 610 posted 13 years ago by howardpanton
Add custom logo to the login and dashboard of wordpress. More customization functions at: http://sixrevisions.com/wordpress/how-to-customize-the-wordpress-admin-area/
1 532 posted 13 years ago by rliverman
Code for the wordpress functions file to add a custom post type. Full doc at: http://codex.wordpress.org/Function_Reference/register_post_type http://justintadlock.com/archives/2010/04/29/custom-post-types-in-wordpress
0 756 posted 13 years ago by rliverman
Suppress button to "split summary at cursor" on node bodies that are generally short and won't ever be displayed as teasers. (These lines go in hook_form_alter functions.)
0 597 posted 13 years ago by tgbdad
Suppress the input format section of a node form when you don't really want users (even admin) to change it. Particularly handy for uncluttering forms with lots of CCK fields on them.
0 487 posted 13 years ago by tgbdad
1 ... 66 67 68 69 70 ... 147