Thanks Alan again, but it seems to me that height of iframe can be 
controlled only when creating it in protolinks_simple(). Changing width 
worked fine.

Would we be able to extend protolinks_simple to accept the width and height 
as parameters to control the size of iframe? I don't know the bigger scope 
of this function, and possibility to add extra parameters... 

def protolinks_simple(proto, url, width, height):
    """
    it converts url to html-string using appropriate proto-prefix:
    Uses for construction "proto:url", e.g.:
        "iframe:http://www.example.com/path"; will call protolinks()
        with parameters:
            proto="iframe"
            url="http://www.example.com/path";
    """
    if proto in ('iframe','embed'): #== 'iframe':
        return '<iframe src="%s" *width="**%s" **height="%s"* frameborder="0" 
allowfullscreen></iframe>'%[url,width, height]
    #elif proto == 'embed':  # NOTE: embed is a synonym to iframe now
    #    return '<a href="%s" class="%sembed
">%s></a>'%(url,class_prefix,url)
    elif proto == 'qr':
        return '<img width="80px" 
src="http://qrcode.kaywa.com/img.php?s=8&amp;d=%s"; 
alt="qr code" />'%url
    return proto+':'+url












On Wednesday, January 2, 2013 10:44:58 AM UTC-5, Alan Etkin wrote:
>
> On Wednesday, January 2, 2013 1:44:39 AM UTC-3, Adi wrote:
>>
>> Thanks Alan for your help. 
>>
>> Have two more questions related to this: 
>>
>>
> Maybe in the view you can do something like:
>
> {{=DIV(MARKMIN(mm), _id="videoframe"))}}
>
> An then use CSS for adding the size to the content
>
> div#videoframe{
>   width="640px";
>   height="480px";
> }
>
>

-- 



Reply via email to