Welcome To Snipplr


Everyone's Recent PHP Snippets Tagged links



« Prev 1 Next »
Configure settings for all external links on your site. Features: * Open external links in new window or tab * Add "nofollow" * Set link title * Set link icon * Set classes (for your own styling) * Set no-icon class * SEO friendly
0 320 posted 8 years ago by freelancephp
Here's the basic principal behind spiders. (ex: <a href="http://giochiflash.123homepage.it">Giochi Flash</a> $html = file_get_contents('http://www.example.com');
6 1357 posted 8 years ago by haydin
This code removes all special characters from the given URL and make it SEO friendly.
2 280 posted 8 years ago by apphp-snippets
Create navigation links without the need of a plugin, using paginate_links function of wordpress core.
0 304 posted 8 years ago by rudwolf
Sometimes you just want a random link to display and outside of the default format, this works perfectly and removes all default html (list items / headings).
0 329 posted 9 years ago by crypticsoft
Replaces all links within href part of anchor in a HTML-String.
1 1013 posted 9 years ago by rwunsch
Add this within the loop:
0 230 posted 9 years ago by xcsteve99
Returns the same string, except with links wrapped in <a href=""> tags. Works on www.snipplr.com and on http://snipplr.com A variation of the script on the attached URL.
0 288 posted 10 years ago by nebojsac
0 248 posted 10 years ago by ronal
the POSIX Regex functions are deprecated in PHP 5.3.0 and removed in PHP 6. http://us2.php.net/manual/en/function.eregi-replace.php
0 282 posted 10 years ago by dubogii
0 273 posted 10 years ago by nico65
Make sure your URL $_GET variables don't get repeated / duplicated when you are creating links / URLs dynamically.
0 222 posted 10 years ago by prwhitehead
This goes in your template.php file
1 297 posted 10 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 250 posted 10 years ago by Onfire60
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 281 posted 10 years ago by FatFolderDesigner
This small function receive a text as input and returns an html text with links if the source text contains urls (http://www… but also ftp://… and every other protocol), emails, twitter’s usernames (with @ at the beginning) and also twitter tag...
0 376 posted 11 years ago by ginoplusio
I didn't like the way my bookmarks came out with wp_list_bookmarks or any other built-in function, so I figured out a way to have total control about the way your wordpress bookmarks are displayed. In this example I wanted a table with the Bookmark...
0 215 posted 11 years ago by zartgesotten
If you have your wordpress subpages organized by parent pages... and you dont want the parent pages "clickable" this will fix you right up...
0 252 posted 11 years ago by mdesilets
1 237 posted 11 years ago by jmiller
3 294 posted 12 years ago by cshaiku
You can get hostname from script environment - getenv("HTTP_HOST") (?!'.$host.') matches URLs always except local links
0 289 posted 12 years ago by kossmoss
These 4 lines of code can be used to extract and return all links from any page using regex patterns. If links are found, an array is returned, else boolean false is returned.
4 461 posted 12 years ago by gdvickery
The basis to a spider.
5 335 posted 12 years ago by Unreal
Nice simple snippet. Great for forum scripts.
1 306 posted 12 years ago by Unreal
Place the first function, phptemplate_links() in your template.php file. Alternatively (and IMO better) is to name the function your_theme_name_links() where your_theme_name is the name of your theme. From here on, you can add theme functions like...
2 330 posted 13 years ago by berkes
« Prev 1 Next »