First attempt at an AVOD widget, displayed when the user is logged
in. For SSL concerns, a custom proxy cgi is used. The proxy cgi
decides if it should display the widget or a static thumbnail.
In theory, this could be used for other content providers as well.
Add a "Resident patrons click here to view content" link for widgets
when not logged in.
Signed-off-by: Jeff Godin <jgodin@tadl.org>
args.ezproxy = 1;
IF (avod_xtid = res.href.match('url=http://avod.films.com/PortalPlaylists.aspx\?aid=\d+&xtid=(\d+)'));
args.cover_url = 'https://secure.films.com/Common/FMGimages/' _ avod_xtid.0 _ '_full.jpg';
+ args.widget_html = "<iframe height='310' frameborder='0' width='348' src='https://www.tadl.org/avod/play.cgi?xtid=" _ avod_xtid.0 _ "' > </iframe>";
END;
END;
END;
jacket_src = ctx.media_prefix _ '/opac/extras/ac/jacket/' _ record.summary.jacket_size _ '/r/' _ bre_id_urisafe;
jacket_href = ctx.media_prefix _ '/opac/extras/ac/jacket/large/r/' _ bre_id_urisafe;
END;
+
+ IF args.widget_html;
+ jacket_href = mkurl(ctx.opac_root _ '/login');
+ login_teaser = "Resident patrons click here to view content";
+ END;
%]
- [% IF jacket_href %]<a href='[% jacket_href | html %]'>[% END %]<img
+
+ [% IF args.widget_html && ctx.user %]
+ [% args.widget_html %]
+ [% ELSE %]
+ [% IF jacket_href %]<a href='[% jacket_href | html %]'>[% END %]
+ [% IF login_teaser %]<p>[% login_teaser %]</p>[% END %]<img
alt="[% l('Image of item') %]" id='rdetail_image'
onerror="this.style.display='none';"
src='[% jacket_src | html %]' />[% IF jacket_href %]</a>[% END %]
+ [% END %]
<br />
</div>