I have developed a new extension for the DNBE platform. This feature will replace certain key words with a link to a site you specify. I have named it "Quicker Links", and using it is rather easy.
After following the README.txt file in the zip file you will see a new tab in your administrative section of your site.
In that page you can specify what words to replace with what links. For example, I have specified the short cut dnbe to be replaced with a link to Dot Net Blog Engine's website.
This works pretty easily, you enter the text on the left and it will be made into a link.
So download it for yourself!
QuickerLinks.zip (6.01 kb) - Version 1.0 - December 1, 2007
Now I have tried to account for many different ways for this text to appear in HTML, but I'm sure it could use some improvement. So if you have a code change let me know! Here what the code should be able to replace in version one. Lets assume that you have ckurl defined in your entry to be replaced with a link.
- If you just have it normally in a sentence, like above it will become a link.
- I also allow for certain punctuation to follow the word (!.,?:).
- I check for a leading or trailing HTML bracket <, or >. This is mainly if the word appears after a paragraph or line break.
- I allow it if the word is followed by a space. So lets say I have ckurl at the beginning of a sentence it will be replaced with a link.
- NOTE: This introduced the only known bug. If your word is in the end of a word it will break that word and give you a link. For example if I have this wordckurl, the ckurl part of that will become a link. Would love some better regular expressions for this, so I'm all ears.
- One last note, I ignore case here. So if you type cKuRl, it will make that word... just as it is a link.
Well I hope you enjoy!