Welcome To Snipplr


Everyone's Recent PHP Snippets



1 ... 64 65 66 67 68 ... 147
Script used to access the Envato API, and get extra details using Curl. This script will only work on PHP5 on a Linux hosting account (with safe mode / openbasedir disabled). Will need slight adjustment if trying to run it otherwise. You are w...
1 2069 posted 15 years ago by dtbaker
0 1375 posted 15 years ago by dmertl
CSS: <pre><code>div.pagination { padding: 3px; margin: 3px; } div.pagination a { padding: 2px 5px 2px 5px; margin: 2px; border: 1px solid #AAAADD; text-decoration: none; /* no underline */ color: #000099; } div.pagination a:...
1 1066 posted 15 years ago by Alexxandar
0 1169 posted 15 years ago by karmacode
Prints an array (recursive) as PHP code (can be pasted into a php file and it will work). Note: This function can process arrays with integers/strings/sub-arrays. It is impossible to process resources (they have a state), and while it is possible...
1 1647 posted 15 years ago by BrunoDeBarros
Add block in anywhere in the content, node in drupal
2 1286 posted 15 years ago by jesudasjj
This was a fix for the form that allowed me to automatically replace the text when I focused on area. Find the file text.php inside modules. Replace line 89 with this code.
0 1541 posted 15 years ago by gera3d
I edit this from tylerhall on 11/30/-1
0 1358 posted 15 years ago by redoc
0 1377 posted 15 years ago by kidmizere
0 1186 posted 15 years ago by Joergermeister
0 1378 posted 15 years ago by focal55
Put in /sites/default/settings.php
0 1281 posted 15 years ago by resting
1 1360 posted 15 years ago by focal55
Automatically add a class to the body tag on each page. Remember to add <?php> to your body tag in the page.tpl.php file. You can also override or insert PHPTemplate variables into the templates with this function.
1 1283 posted 15 years ago by focal55
0 1117 posted 15 years ago by focal55
When adding a link to a form say for instance a login form you can use drupal_get_destination() to return the user to the page they were on when they finish loging in. This show you how to do this programatically in a link l(); function.
0 1441 posted 15 years ago by Onfire60
0 1201 posted 15 years ago by hejaaa
0 1429 posted 15 years ago by whak
1 2022 posted 15 years ago by fackz
If post thumbnail doesn't exist, then get the first uploaded image. Change sizes as needed.
0 1724 posted 15 years ago by vagrantradio
0 1306 posted 15 years ago by Waldio
Using shortcode to retrieve the author page url (ex. abc.com/?author=123), using the WP Shortcode API as reference.
1 1153 posted 15 years ago by sdxxx
With this customizable code you can add google weather showing current temps, conditions, and forecast for any location to your website. User prompts are included to allow the user to change the default location easily then hit the "go" button. Auto...
0 1214 posted 15 years ago by stevethomas2011
0 1321 posted 15 years ago by Farhan
1 ... 64 65 66 67 68 ... 147