added correct paths
git-svn-id: http://yolanda.mister-muffin.de/svn@135 7eef14d0-6ed0-489d-bf55-20463b2d70db
This commit is contained in:
parent
b6cac05c7b
commit
cd2518d9e3
4 changed files with 28 additions and 24 deletions
|
@ -17,10 +17,11 @@ $database = 'gnutube';
|
||||||
$dbhost = 'localhost';
|
$dbhost = 'localhost';
|
||||||
$dbuser = 'root';
|
$dbuser = 'root';
|
||||||
$dbpass = '';
|
$dbpass = '';
|
||||||
|
$domain = 'http://localhost';
|
||||||
$session_name = 'sid';
|
$session_name = 'sid';
|
||||||
$XMLDecl = '<?xml version="1.0" encoding="UTF-8" ?><?xml-stylesheet type="text/xsl" href="./xsl/xhtml.xsl" ?>';
|
$XMLDecl = qq{<?xml version="1.0" encoding="UTF-8" ?><?xml-stylesheet type="text/xsl" href="/xsl/xhtml.xsl" ?>};
|
||||||
$locale = "en-US";
|
$locale = "en-US";
|
||||||
$stylesheet = "./style/gnutube.css";
|
$stylesheet = "/style/gnutube.css";
|
||||||
$xmlns_dc = "http://purl.org/dc/elements/1.1/";
|
$xmlns_dc = "http://purl.org/dc/elements/1.1/";
|
||||||
$xmlns_cc = "http://web.resource.org/cc/";
|
$xmlns_cc = "http://web.resource.org/cc/";
|
||||||
$xmlns_rdf = "http://www.w3.org/1999/02/22-rdf-syntax-ns#";
|
$xmlns_rdf = "http://www.w3.org/1999/02/22-rdf-syntax-ns#";
|
||||||
|
|
|
@ -46,7 +46,7 @@ if($query->param('action'))
|
||||||
cache => undef, # or File::Cache->new,
|
cache => undef, # or File::Cache->new,
|
||||||
args => $query,
|
args => $query,
|
||||||
consumer_secret => $session->id, #is this save? don't know...
|
consumer_secret => $session->id, #is this save? don't know...
|
||||||
required_root => "http://localhost/" );
|
required_root => $domain );
|
||||||
|
|
||||||
#is an openid passed?
|
#is an openid passed?
|
||||||
if($query->param('user'))
|
if($query->param('user'))
|
||||||
|
@ -60,7 +60,7 @@ if($query->param('action'))
|
||||||
}
|
}
|
||||||
$check_url = $claimed->check_url(
|
$check_url = $claimed->check_url(
|
||||||
return_to => "http://localhost/gnutube/login.pl?action=openid&ret=true", #on success return to this address
|
return_to => "http://localhost/gnutube/login.pl?action=openid&ret=true", #on success return to this address
|
||||||
trust_root => "http://localhost/"); #this is the string the user will be asked to trust
|
trust_root => $domain); #this is the string the user will be asked to trust
|
||||||
|
|
||||||
#redirect to openid server to check claim
|
#redirect to openid server to check claim
|
||||||
print $query->redirect($check_url);
|
print $query->redirect($check_url);
|
||||||
|
|
|
@ -114,7 +114,7 @@ if($query->url_param('title') or $query->url_param('id'))
|
||||||
#before code cleanup, this was a really obfuscated array/hash creation
|
#before code cleanup, this was a really obfuscated array/hash creation
|
||||||
push @{ $page->{'video'} },
|
push @{ $page->{'video'} },
|
||||||
{
|
{
|
||||||
'thumbnail' => "./video-stills/$id",
|
'thumbnail' => "$domain/video-stills/$id",
|
||||||
'filesize' => $filesize,
|
'filesize' => $filesize,
|
||||||
'duration' => $duration,
|
'duration' => $duration,
|
||||||
'width' => $width,
|
'width' => $width,
|
||||||
|
@ -126,7 +126,7 @@ if($query->url_param('title') or $query->url_param('id'))
|
||||||
{
|
{
|
||||||
'cc:Work' =>
|
'cc:Work' =>
|
||||||
{
|
{
|
||||||
'rdf:about' => "download.pl?id=$id&view=true",
|
'rdf:about' => "$domain/download/$id",
|
||||||
'dc:title' => [$title],
|
'dc:title' => [$title],
|
||||||
'dc:creator' => [$creator],
|
'dc:creator' => [$creator],
|
||||||
'dc:subject' => [$subject],
|
'dc:subject' => [$subject],
|
||||||
|
@ -134,7 +134,7 @@ if($query->url_param('title') or $query->url_param('id'))
|
||||||
'dc:publisher' => [$username],
|
'dc:publisher' => [$username],
|
||||||
'dc:contributor' => [$contributor],
|
'dc:contributor' => [$contributor],
|
||||||
'dc:date' => [$timestamp],
|
'dc:date' => [$timestamp],
|
||||||
'dc:identifier' => ["video.pl?title=$title&id=$id"],
|
'dc:identifier' => ["$domain/video/$title/$id"],
|
||||||
'dc:source' => [$source],
|
'dc:source' => [$source],
|
||||||
'dc:language' => [$language],
|
'dc:language' => [$language],
|
||||||
'dc:coverage' => [$coverage],
|
'dc:coverage' => [$coverage],
|
||||||
|
@ -148,16 +148,17 @@ if($query->url_param('title') or $query->url_param('id'))
|
||||||
};
|
};
|
||||||
|
|
||||||
#get comments
|
#get comments
|
||||||
$sth = $dbh->prepare(qq{select comments.text, users.username, from_unixtime( comments.timestamp )
|
$sth = $dbh->prepare(qq{select comments.id, comments.text, users.username, from_unixtime( comments.timestamp )
|
||||||
from comments, users where
|
from comments, users where
|
||||||
comments.videoid=? and users.id=comments.userid}) or die $dbh->errstr;
|
comments.videoid=? and users.id=comments.userid}) or die $dbh->errstr;
|
||||||
$sth->execute($id) or die $dbh->errstr;
|
$sth->execute($id) or die $dbh->errstr;
|
||||||
while (my ($text, $username, $timestamp) = $sth->fetchrow_array())
|
while (my ($commentid, $text, $username, $timestamp) = $sth->fetchrow_array())
|
||||||
{
|
{
|
||||||
push @{ $page->{'comments'}->{'comment'} }, {
|
push @{ $page->{'comments'}->{'comment'} }, {
|
||||||
'text' => [decode_utf8($text)],
|
'text' => [decode_utf8($text)],
|
||||||
'username' => [$username],
|
'username' => $username,
|
||||||
'timestamp' => [$timestamp]
|
'timestamp' => $timestamp,
|
||||||
|
'id' => $commentid
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -212,10 +213,12 @@ if($query->url_param('title') or $query->url_param('id'))
|
||||||
print $session->header(-type=>'text/xml');
|
print $session->header(-type=>'text/xml');
|
||||||
|
|
||||||
#print xml
|
#print xml
|
||||||
print XMLout($page, KeyAttr => {}, XMLDecl => $XMLDecl, RootName => 'page');
|
print XMLout($page, KeyAttr => {}, XMLDecl => $XMLDecl, RootName => 'page', AttrIndent => 1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{ foreach $key (sort keys(%ENV)) {
|
||||||
|
print "$key = $ENV{$key}<p>";
|
||||||
|
}
|
||||||
%page = ();
|
%page = ();
|
||||||
|
|
||||||
#if a username is associated with session id, username is nonempty
|
#if a username is associated with session id, username is nonempty
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-Type" content="application/xhtml+xml" />
|
<meta http-equiv="Content-Type" content="application/xhtml+xml" />
|
||||||
<link rel="shortcut icon" type="image/x-icon" href="./images/favicon.ico" />
|
<link rel="shortcut icon" type="image/x-icon" href="/images/favicon.ico" />
|
||||||
<link rel="stylesheet" type="text/css">
|
<link rel="stylesheet" type="text/css">
|
||||||
<xsl:attribute name="href">
|
<xsl:attribute name="href">
|
||||||
<xsl:value-of select="//@stylesheet" />
|
<xsl:value-of select="//@stylesheet" />
|
||||||
|
@ -80,7 +80,7 @@
|
||||||
<xsl:value-of select="$locale_strings/str[@id='login']" />
|
<xsl:value-of select="$locale_strings/str[@id='login']" />
|
||||||
</a>
|
</a>
|
||||||
<xsl:value-of select="$locale_strings/str[@id='separator']" />
|
<xsl:value-of select="$locale_strings/str[@id='separator']" />
|
||||||
<img class="openid-icon" src="./images/openid-icon.png" alt="open id logo" />
|
<img class="openid-icon" src="/images/openid-icon.png" alt="open id logo" />
|
||||||
<a>
|
<a>
|
||||||
<xsl:attribute name="href">
|
<xsl:attribute name="href">
|
||||||
<xsl:value-of select="$site_strings/str[@id='page_login-openid']" />
|
<xsl:value-of select="$site_strings/str[@id='page_login-openid']" />
|
||||||
|
@ -166,7 +166,7 @@
|
||||||
<xsl:template match="frontpage">
|
<xsl:template match="frontpage">
|
||||||
|
|
||||||
<div class="logo-big">
|
<div class="logo-big">
|
||||||
<img src="./images/logo-big.png" alt="GNUtube logo (320x100)" />
|
<img src="/images/logo-big.png" alt="GNUtube logo (320x100)" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="search">
|
<div class="search">
|
||||||
|
@ -208,7 +208,7 @@
|
||||||
<xsl:template name="searchbar">
|
<xsl:template name="searchbar">
|
||||||
|
|
||||||
<div class="logo-small-top">
|
<div class="logo-small-top">
|
||||||
<img src="./images/logo-small-top.png" alt="GNUtube logo top (160x25)" />
|
<img src="/images/logo-small-top.png" alt="GNUtube logo top (160x25)" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="search-small">
|
<div class="search-small">
|
||||||
|
@ -224,7 +224,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="logo-small-bottom">
|
<div class="logo-small-bottom">
|
||||||
<img src="./images/logo-small-bottom.png" alt="GNUtube logo top (160x25)" />
|
<img src="/images/logo-small-bottom.png" alt="GNUtube logo top (160x25)" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
@ -237,13 +237,13 @@
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="@type='error'">
|
<xsl:when test="@type='error'">
|
||||||
<img src="./images/tango/dialog-error.png" />
|
<img src="/images/tango/dialog-error.png" />
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="@type='information'">
|
<xsl:when test="@type='information'">
|
||||||
<img src="./images/tango/dialog-information.png" />
|
<img src="/images/tango/dialog-information.png" />
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="@type='warning'">
|
<xsl:when test="@type='warning'">
|
||||||
<img src="./images/tango/dialog-warning.png" />
|
<img src="/images/tango/dialog-warning.png" />
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
<xsl:variable name="messagetext" select="@text" />
|
<xsl:variable name="messagetext" select="@text" />
|
||||||
|
@ -323,13 +323,13 @@
|
||||||
<div class="video">
|
<div class="video">
|
||||||
<applet
|
<applet
|
||||||
code="com.fluendo.player.Cortado.class"
|
code="com.fluendo.player.Cortado.class"
|
||||||
archive="./java/cortado-ovt-stripped-0.2.2.jar"
|
archive="/java/cortado-ovt-stripped-0.2.2.jar"
|
||||||
width="350"
|
width="350"
|
||||||
height="250"
|
height="250"
|
||||||
>
|
>
|
||||||
<param name="url">
|
<param name="url">
|
||||||
<xsl:attribute name="value">
|
<xsl:attribute name="value">
|
||||||
<xsl:value-of select="concat(rdf:RDF/cc:Work/@rdf:about,'&view=true')" />
|
<xsl:value-of select="concat(rdf:RDF/cc:Work/@rdf:about,'/view=true')" />
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
</param>
|
</param>
|
||||||
<param name="seekable" value="true"/>
|
<param name="seekable" value="true"/>
|
||||||
|
@ -349,7 +349,7 @@
|
||||||
<xsl:attribute name="href">
|
<xsl:attribute name="href">
|
||||||
<xsl:value-of select="rdf:RDF/cc:Work/@rdf:about" />
|
<xsl:value-of select="rdf:RDF/cc:Work/@rdf:about" />
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<img src="./images/tango/document-save.png" />
|
<img src="/images/tango/document-save.png" />
|
||||||
</a>
|
</a>
|
||||||
<a>
|
<a>
|
||||||
<xsl:attribute name="href">
|
<xsl:attribute name="href">
|
||||||
|
|
Loading…
Reference in a new issue