{{extend 'layout.html'}}
{{html = """
Did you watch this video?<br/>
http://www.youtube.com/watch?v=HEheh1BH34Q
"""}}
{{form gluon.contrib.autolinks import expand_html}}
{{=XML(expand_html(your_html),cache.ram('mycachekey',lambda:dict(),3600)}}
On Sunday, 3 February 2013 17:40:59 UTC-6, sasogeek wrote:
>
> Can i have an example of the full code... like replace your_html with an
> example code
>
> On Sunday, 3 February 2013 03:16:30 UTC, Massimo Di Pierro wrote:
>>
>> {{form gluon.contrib.autolinks import expand_html}}
>> {{=XML(expand_html(your_html),cache.ram('mycachekey',lambda:dict(),3600)}}
>>
>> will do what you ask. Will expand all links not already tagged using the
>> oembed protocol.
>>
>>
>> On Saturday, 2 February 2013 18:33:42 UTC-6, sasogeek wrote:
>>>
>>> Not sure if I understand your question but I guess I'll say html cos
>>> that's what I'm familiar with... :|
>>>
>>> On Saturday, 2 February 2013 20:44:25 UTC, Massimo Di Pierro wrote:
>>>>
>>>> It depends. In which format is the input? markmin, html?
>>>>
>>>> On Friday, 1 February 2013 22:15:13 UTC-6, sasogeek wrote:
>>>>>
>>>>> I want to do something similar to how facebook reatcs to links...
>>>>> let's say a user makes a post with a link in it (the post is not
>>>>> necessarily just the link)
>>>>> i want to be able to grab the link from the post, make it clickable,
>>>>> as well as a little excerpt from the contents in the page that link is
>>>>> anchored to.
>>>>>
>>>>> eg.
>>>>>
>>>>> blabla bla blablalbal bla blalba blalba crap! this is a link
>>>>> http://domain.com/somepage.html is a cool blog page.
>>>>>
>>>>> when a user posts the above example, i want to make
>>>>> http://domain.com/somepage.html into an actual link which is
>>>>> clickable, as well as show some sort of excerpt from the contents in that
>>>>> page... i used fb as an example so it's easy to understand what i want to
>>>>> accomplish :)
>>>>>
>>>>> help?
>>>>>
>>>>
--
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.