Sean Cribbs wrote: > >> 1. Automatically create links for URL. >> I'd like to be able to type in http://example.org or [EMAIL PROTECTED] >> and have a link created to it. If I use Textile, I need to do this >> as "http://example.org":http://example.org - just wondering if >> there's a tag I can use (else, I think I should just write it up). I >> think Rails has a function called auto_link that can do this for text >> content - just need to think about any vulnerabilities that this may >> have. I imagine that this would only be a tag, no database backend >> needed. >> >> > This sounds like a good candidate for a filter. You could probably > harness the helper modules in ActionView to use auto_link or > simple_format in a filter. >> 2. Create links for known entities >> It would be good to have a mechanism that automatically creates links >> to known entities. For example, I'd like to set up SampleSite as >> being http://example.org and then every time, I include SampleSite, >> it automatically creates a link to http://example.org. I don't want >> it to be automatic (so we don't need to parse all the text) - it's >> good enough if I have to pass the name to a tag. I imagine that this >> would be 2 parts - 1 part would be a tab in the admin section >> allowing the user to set up any of the pre-defined entities (I think >> the link_roll extension points in the correct direction) and then a >> tag that allows the user to get back the link. >> >> > This sounds like an extension... take a look at the wiki on How to > Create an Extension. It explains how to create a LinkRoll, but the > concepts are very similar. > > Sean > > > Thanks for the reply, Sean. I'm sure that the second one can be modeled directly on your (excelent) LinkRoll extension tutorial. The concept is quite similar. As for the first one, umm, I need to look up on filters again - since I've spent some time with extensions, admittedly an extension seems easier! But, I shall take a look on using a filter instead..
Cheers, Mohit. 8/14/2007 | 12:08 AM. _______________________________________________ Radiant mailing list Post: [email protected] Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
