embedded mode fuck yeah

git-svn-id: http://yolanda.mister-muffin.de/svn@191 7eef14d0-6ed0-489d-bf55-20463b2d70db
This commit is contained in:
erlehmann 2007-12-01 04:43:13 +00:00
parent 91ee099c00
commit 08766cbc93
5 changed files with 176 additions and 125 deletions

View file

@ -3,148 +3,150 @@
<strings> <strings>
<str id="separator">&#160;|&#160;</str> <string id="separator">&#160;|&#160;</string>
<!-- header --> <!-- header -->
<str id="login_to_upload">to upload videos, log in first.</str> <string id="login_to_upload">to upload videos, log in first.</string>
<str id="register">register</str> <string id="register">register</string>
<str id="login">login</str> <string id="login">login</string>
<str id="login_openid">login with OpenID</str> <string id="login_openid">login with OpenID</string>
<str id="upload_video">upload video</str> <string id="upload_video">upload video</string>
<str id="bookmarks">bookmarks</str> <string id="bookmarks">bookmarks</string>
<str id="account_details">account details</str> <string id="account_details">account details</string>
<str id="logged_in_as">logged in as</str> <string id="logged_in_as">logged in as</string>
<str id="logout">logout</str> <string id="logout">logout</string>
<!-- footer --> <!-- footer -->
<str id="authors">&#169; 2007 Yolanda team</str> <string id="authors">&#169; 2007 Yolanda team</string>
<str id="license">license</str> <string id="license">license</string>
<str id="source_code">download source code</str> <string id="source_code">download source code</string>
<!-- front page --> <!-- front page -->
<str id="button_find">Find</str> <string id="button_find">Find</string>
<str id="button_lucky">Instant Access</str> <string id="button_lucky">Instant Access</string>
<str id="query_latestadditions">latest additions</str> <string id="query_latestadditions">latest additions</string>
<str id="query_mostdownloads">most downloads</str> <string id="query_mostdownloads">most downloads</string>
<str id="query_mostviews">most views</str> <string id="query_mostviews">most views</string>
<!-- errors --> <!-- errors -->
<str id="error_202c">Error 202c - Access forbidden by government.</str> <string id="error_202c">Error 202c - Access forbidden by government.</string>
<str id="error_missing_file">You did not supply a file.</str> <string id="error_missing_file">You did not supply a file.</string>
<str id="error_missing_DC.Title">You did not supply a title.</str> <string id="error_missing_DC.Title">You did not supply a title.</string>
<str id="error_missing_DC.Creator">You did not supply a creator.</str> <string id="error_missing_DC.Creator">You did not supply a creator.</string>
<str id="error_missing_DC.Subject">You did not supply any keywords.</str> <string id="error_missing_DC.Subject">You did not supply any keywords.</string>
<str id="error_missing_DC.Description">You did not supply a description.</str> <string id="error_missing_DC.Description">You did not supply a description.</string>
<str id="error_missing_DC.Publisher">You did not supply a publisher.</str> <string id="error_missing_DC.Publisher">You did not supply a publisher.</string>
<str id="error_missing_DC.Title">You did not supply a title.</str> <string id="error_missing_DC.Title">You did not supply a title.</string>
<str id="error_missing_DC.Source">You did not supply a source.</str> <string id="error_missing_DC.Source">You did not supply a source.</string>
<str id="error_missing_DC.Language">You did not supply a language.</str> <string id="error_missing_DC.Language">You did not supply a language.</string>
<str id="error_missing_DC.Coverage">You did not supply a coverage.</str> <string id="error_missing_DC.Coverage">You did not supply a coverage.</string>
<str id="error_missing_DC.Rights">You did not supply a rights holder.</str> <string id="error_missing_DC.Rights">You did not supply a rights holder.</string>
<str id="error_already_registered">You seem to be already registered. Please log out to create a new account.</str> <string id="error_already_registered">You seem to be already registered. Please log out to create a new account.</string>
<str id="error_already_logged_in">You seem to be already logged in. Please log out to log in again.</str> <string id="error_already_logged_in">You seem to be already logged in. Please log out to log in again.</string>
<str id="error_username_password_do_not_match">Username and password do not match.</str> <string id="error_username_password_do_not_match">Username and password do not match.</string>
<str id="error_passwords_do_not_match">Passwords do not match.</str> <string id="error_passwords_do_not_match">Passwords do not match.</string>
<str id="error_insert_username">Please insert a username.</str> <string id="error_insert_username">Please insert a username.</string>
<str id="error_insert_password">Please insert a password.</str> <string id="error_insert_password">Please insert a password.</string>
<str id="error_repeat_password">Please repeat your password.</str> <string id="error_repeat_password">Please repeat your password.</string>
<str id=""></str> <string id=""></string>
<!-- information --> <!-- information -->
<str id="information_logged_in">You are now logged in.</str> <string id="information_logged_in">You are now logged in.</string>
<str id="information_logged_out">You are now logged out.</str> <string id="information_logged_out">You are now logged out.</string>
<str id="information_metainformation_needed">To put the video into context, additional metainformation is needed.</str> <string id="information_metainformation_needed">To put the video into context, additional metainformation is needed.</string>
<str id="information_metainformation_rights"></str> <string id="information_metainformation_rights"></string>
<str id="information_comment_created">Your comment has been submitted.</str> <string id="information_comment_created">Your comment has been submitted.</string>
<str id="information_registered">Your account has been created.</str> <string id="information_registered">Your account has been created.</string>
<str id="information_uploaded">Your file has been uploaded.</str> <string id="information_uploaded">Your file has been uploaded.</string>
<!-- warnings --> <!-- warnings -->
<!-- results page--> <!-- results page-->
<str id="results_for_query">results for query</str> <string id="results_for_query">results for query</string>
<str id="ordered_by">ordered by </str> <string id="ordered_by">ordered by </string>
<str id="ascending"> ascending</str> <string id="ascending"> ascending</string>
<str id="descending"> descending</str> <string id="descending"> descending</string>
<str id="results_on">results on</str> <string id="results_on">results on</string>
<str id="pages">pages</str> <string id="pages">pages</string>
<str id="relevance">relevance</str> <string id="relevance">relevance</string>
<str id="duration">duration</str> <string id="duration">duration</string>
<str id="filesize">filesize</str> <string id="filesize">filesize</string>
<str id="viewcount">viewcount</str> <string id="viewcount">viewcount</string>
<str id="downloadcount">downloadcount</str> <string id="downloadcount">downloadcount</string>
<str id="timestamp">timestamp</str> <string id="timestamp">timestamp</string>
<!-- search bar--> <!-- search bar-->
<str id="search">search</str> <string id="search">search</string>
<!-- login / register page --> <!-- login / register page -->
<str id="username">username</str> <string id="username">username</string>
<str id="password">password</str> <string id="password">password</string>
<str id="password_repeat">repeat password</str> <string id="password_repeat">repeat password</string>
<str id="button_register">register</str> <string id="button_register">register</string>
<str id="button_login">login</str> <string id="button_login">login</string>
<!-- upload page --> <!-- upload page -->
<str id="file">file</str> <string id="file">file</string>
<str id="button_next_page">next page</str> <string id="button_next_page">next page</string>
<str id="button_previous_page">previous page</str> <string id="button_previous_page">previous page</string>
<str id="button_upload">upload</str> <string id="button_upload">upload</string>
<str id="instruction_file">Specify the file you want to upload.</str> <string id="instringuction_file">Specify the file you want to upload.</string>
<str id="instruction_title">State the title of the video.</str> <string id="instringuction_title">State the title of the video.</string>
<str id="instruction_creator">Specify the creator of the video.</str> <string id="instringuction_creator">Specify the creator of the video.</string>
<str id="instruction_subject">State some keywords, separated by commas.</str> <string id="instringuction_subject">State some keywords, separated by commas.</string>
<str id="instruction_description">Describe the video in natural language.</str> <string id="instringuction_description">Describe the video in natural language.</string>
<str id="instruction_source">Specify the source, preferably by URL.</str> <string id="instringuction_source">Specify the source, preferably by URL.</string>
<str id="instruction_language">State the language of the video.</str> <string id="instringuction_language">State the language of the video.</string>
<str id="instruction_coverage">Specify the time and location covered.</str> <string id="instringuction_coverage">Specify the time and location covered.</string>
<str id="this_is_page_1">This is page 1 of 6.</str> <string id="this_is_page_1">This is page 1 of 6.</string>
<str id="this_is_page_2">This is page 2 of 6.</str> <string id="this_is_page_2">This is page 2 of 6.</string>
<str id="this_is_page_3">This is page 3 of 6.</str> <string id="this_is_page_3">This is page 3 of 6.</string>
<str id="this_is_page_4">This is page 4 of 6.</str> <string id="this_is_page_4">This is page 4 of 6.</string>
<str id="this_is_page_5">This is page 5 of 6.</str> <string id="this_is_page_5">This is page 5 of 6.</string>
<str id="this_is_page_6">This is page 6 of 6.</str> <string id="this_is_page_6">This is page 6 of 6.</string>
<str id="button_page_1">Page 1</str> <string id="button_page_1">Page 1</string>
<str id="button_page_3">Page 3</str> <string id="button_page_3">Page 3</string>
<str id="button_page_4">Page 4</str> <string id="button_page_4">Page 4</string>
<!-- video page --> <!-- video page -->
<str id="download_video">Download</str> <string id="download_video">Download</string>
<str id="megabytes">MB</str> <string id="megabytes">MB</string>
<str id="watch_browserplugin">use browser plugin</str> <string id="watch_browserplugin">use browser plugin</string>
<str id="watch_cortadoapplet">use java applet</str> <string id="watch_cortadoapplet">use java applet</string>
<str id="edit_video">Edit</str> <string id="edit_video">Edit</string>
<str id="bookmark_video">Bookmark</str> <string id="bookmark_video">Bookmark</string>
<str id="license_conditions">License Conditions</str> <string id="license_conditions">License Conditions</string>
<str id="comment_on_video">Flamewar area below. Proceed with caution.</str> <string id="protip_embed">To embed the video on another web page, use the following HTML code:</string>
<str id="comment_post">Post</str> <string id="comment_on_video">Flamewar area below. Proceed with caution.</string>
<string id="comment_post">Post</string>
<!-- embedded video page-->
<string id="backlink">backlink</string>
<!-- dublin core entities --> <!-- dublin core entities -->
<str id="DC.Title">title</str> <string id="DC.Title">title</string>
<str id="DC.Creator">author</str> <string id="DC.Creator">author</string>
<str id="DC.Subject">subject</str> <string id="DC.Subject">subject</string>
<str id="DC.Description">description</str> <string id="DC.Description">description</string>
<str id="DC.Publisher">uploader</str> <string id="DC.Publisher">uploader</string>
<str id="DC.Contributor">contributor</str> <string id="DC.Contributor">contributor</string>
<str id="DC.Date">date</str> <string id="DC.Date">date</string>
<str id="DC.Source">source</str> <string id="DC.Source">source</string>
<str id="DC.Language">language</str> <string id="DC.Language">language</string>
<str id="DC.Coverage">coverage</str> <string id="DC.Coverage">coverage</string>
<str id="DC.Rights">righs holder</str> <string id="DC.Rights">righs holder</string>
<str id="duration">duration</str> <string id="duration">duration</string>
<str id="viewcount">viewcount</str> <string id="viewcount">viewcount</string>
<!-- account page --> <!-- account page -->
<str id="account_uploads">my uploads</str> <string id="account_uploads">my uploads</string>
<str id="account_settings">edit my settings</str> <string id="account_settings">edit my settings</string>
<str id="account_bookmarks">my bookmarks</str> <string id="account_bookmarks">my bookmarks</string>
<str id=""></str>
</strings> </strings>

21
trunk/style/embedded.css Normal file
View file

@ -0,0 +1,21 @@
body
{
font-family: sans-serif;
font-size: 8pt;
font-weight: bold;
overflow: visible;
}
div.watch-browserplugin, div.watch-cortadoapplet
{
float: left;
text-align: left;
width: 50%;
}
div.embedded-backlink
{
float: right;
text-align: right;
width: 50%;
}

View file

@ -37,7 +37,7 @@
</xsl:variable> </xsl:variable>
<xsl:variable name="site_strings" select="document('../site/main.xml')//strings/str" /> <xsl:variable name="site_strings" select="document('../site/main.xml')//strings/str" />
<xsl:variable name="locale_strings" select="document(concat('../locale/', $locale, '.xml'))//strings/str" /> <xsl:variable name="locale_strings" select="document(concat('../locale/', $locale, '.xml'))//strings/string" />
<!-- this kills 99% of the processed XML... sorry Tim Bray.... --> <!-- this kills 99% of the processed XML... sorry Tim Bray.... -->
<!-- had to look up Bray in Wikipedia, 2 points off my geek score --> <!-- had to look up Bray in Wikipedia, 2 points off my geek score -->
@ -55,14 +55,27 @@
<head> <head>
<meta http-equiv="Content-Type" content="application/xhtml+xml;charset=utf-8" /> <meta http-equiv="Content-Type" content="application/xhtml+xml;charset=utf-8" />
<xsl:if test="not(//@embed='true')"> <xsl:choose>
<link rel="shortcut icon" type="image/x-icon" href="/images/favicon.ico" /> <xsl:when test="not(//@embed='true')">
<link rel="stylesheet" type="text/css"> <link rel="shortcut icon" type="image/x-icon" href="/images/favicon.ico" />
<xsl:attribute name="href"> <link rel="stylesheet" type="text/css">
<xsl:value-of select="//@stylesheet" /> <xsl:attribute name="href">
</xsl:attribute> <xsl:value-of select="//@stylesheet" />
</link> </xsl:attribute>
</xsl:if> </link>
</xsl:when>
<xsl:when test="//@embed='true'">
<!--
embedded stylesheet should rather be done through URL like
"http://localhost/video/4chan%20city/3/embed=true+stylesheet=embedded.css"
-->
<link rel="stylesheet" type="text/css">
<xsl:attribute name="href">
/style/embedded.css
</xsl:attribute>
</link>
</xsl:when>
</xsl:choose>
<title> <title>
<xsl:choose> <xsl:choose>

View file

@ -57,7 +57,7 @@
<param name="showStatus" value="show"/> <param name="showStatus" value="show"/>
<param name="bufferSize" value="200"/> <param name="bufferSize" value="200"/>
</applet> </applet>
<div> <div class="watch-browserplugin">
<a> <a>
<xsl:attribute name="href"> <xsl:attribute name="href">
<xsl:choose> <xsl:choose>
@ -85,7 +85,7 @@
<xsl:value-of select="concat(//video/rdf:RDF/cc:Work/@rdf:about,'/view=true')" /> <xsl:value-of select="concat(//video/rdf:RDF/cc:Work/@rdf:about,'/view=true')" />
</xsl:attribute> </xsl:attribute>
</object> </object>
<div> <div class="watch-cortadoapplet">
<a> <a>
<xsl:attribute name="href"> <xsl:attribute name="href">
<xsl:choose> <xsl:choose>
@ -104,6 +104,17 @@
</xsl:choose> </xsl:choose>
</div> </div>
<xsl:if test="//@embed='true'">
<div class="embedded-backlink">
<a target="_blank">
<xsl:attribute name="href">
<xsl:value-of select="//video/rdf:RDF/cc:Work/dc:identifier" />
</xsl:attribute>
<xsl:value-of select="$locale_strings[@id='backlink']" />
</a>
</div>
</xsl:if>
<xsl:if test="not(//@embed='true')"> <xsl:if test="not(//@embed='true')">
<div class="button-download"> <div class="button-download">
<a> <a>
@ -261,10 +272,14 @@
<div class="videostuff"> <div class="videostuff">
<span class="protip-embed"> <span class="protip-embed">
To embed the video on another web page, use the following HTML code: <xsl:value-of select="$locale_strings[@id='protip_embed']" />
<br /> <br />
<span class="code"> <span class="code">
&lt;iframe src="<xsl:value-of select="concat(//rdf:RDF/cc:Work/dc:identifier, '/embed=true')" />" /&gt; &lt;object data="<xsl:value-of select="concat(//rdf:RDF/cc:Work/dc:identifier, '/embed=true')" />"
type="application/xml"
width=<xsl:value-of select="//video/@width + 24" />
height=<xsl:value-of select="//video/@height + 48" />
/&gt;
</span> </span>
</span> </span>
</div> </div>

View file

@ -18,7 +18,7 @@
/> />
<xsl:variable name="site_strings" select="document('../site/main.xml')//strings" /> <xsl:variable name="site_strings" select="document('../site/main.xml')//strings" />
<xsl:variable name="locale_strings" select="document(concat('../locale/',/page/@locale,'.xml'))//strings" /> <xsl:variable name="locale_strings" select="document(concat('../locale/', $locale, '.xml'))//strings/string" />
<xsl:template match="/"> <xsl:template match="/">
<xsl:apply-templates /> <xsl:apply-templates />