Welcome To Snipplr
Everyone's Recent Snippets Tagged c
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
My [original post](http://drupal.org/node/84895) languished for years before someone pointed out a possible solution [here](http://drupal.org/node/53705).
The following user-submitted code may be useful in redirecting URLs for the /files directory...
0
1997
posted 17 years ago by zachharkey
We wanted to change all /films/example style paths to /film/example (basically remove the 's').
Here was the query that worked:
1
1802
posted 17 years ago by zachharkey
Creating a object that doesn't have any methods in Ruby (regular objects inherit methods from Object class), useful for Proxies that use method missing (http://onestepback.org/index.cgi/Tech/Ruby/BlankSlate.rdoc).
1
2372
posted 17 years ago by narkisr
closes opened tags in text piece.
original code slightly modified to supress PHP warnings
NOTE: need to fix the order of closing tags to get standards compliance
0
1891
posted 17 years ago by kossmoss
Great little snippit to add a <tr> to the bottom of a table. Note the use of the context in the jQuery e.g var n = $('tr:last td', this).length; Will have to use this in the future, very good to know!
4
3685
posted 17 years ago by 1man
Returns last word of a string (words separated by blanks). if string does not have any blanks, it will return the whole string.
1
1989
posted 17 years ago by fischkopp
Will return a string that has any matched URLs wrapped in `<a>` tags.
Example: `"This is a link to http://foobar.com . Please visit !"`
Becomes: `"This is a link to <a href='http://foobar.com'>http://foobar.com</a> . Please visit!"`
Note: Op...
2
6932
posted 17 years ago by jasonseney
Lets you get YouTube video scene images by video id or youtube video url using only javascript OR jQuery.
5
3595
posted 17 years ago by Uzbekjon
include this snippet in your sites to force InternetExplorer 8 to display your site like InternetExplorer 7
In summary, IE7 compatibility support looks as follows:
IE=7
Display in IE7 Standards mode; Already supported in the IE8 Beta 1 relea...
3
3730
posted 17 years ago by tobaco
Here is a small function [[lobo235](http://www.netlobo.com/javascript_tooltips.html "Javascript Tool-tips")] wrote that will parse the window.location.href value and return the value for the parameter you specify. It does this using javascript's buil...
1
4244
posted 17 years ago by nelsnelson
This works with the standard video player component in Flash CS3.
Throw this actionscript in the first frame. Name your video player "videoPlayer" within Flash.
Then in the HTML markup object tag:
param name=FlashVars value="url=PathToVideo.flv...
0
1769
posted 17 years ago by relaxasaurus