Welcome To Snipplr
Everyone's Recent PHP Snippets Tagged links
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
« 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
1093
posted 11 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
4404
posted 11 years ago by haydin
This code removes all special characters from the given URL and make it SEO friendly.
2
909
posted 11 years ago by apphp-snippets
Create navigation links without the need of a plugin, using paginate_links function of wordpress core.
0
1978
posted 11 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
979
posted 12 years ago by crypticsoft
PHP
Remove / Replace - href / anchor /link - in html /string - preg_replace - php - regex - regular expression
Replaces all links within href part of anchor in a HTML-String.
1
3865
posted 12 years ago by rwunsch
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
841
posted 13 years ago by nebojsac
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
884
posted 13 years ago by dubogii
Make sure your URL $_GET variables don't get repeated / duplicated when you are creating links / URLs dynamically.
0
731
posted 13 years ago by prwhitehead
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
782
posted 13 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
786
posted 13 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
1151
posted 14 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
624
posted 14 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
695
posted 14 years ago by mdesilets
You can get hostname from script environment - getenv("HTTP_HOST")
(?!'.$host.') matches URLs always except local links
0
779
posted 15 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
1269
posted 15 years ago by gdvickery
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
926
posted 16 years ago by berkes
« Prev 1 Next »