added correct paths

git-svn-id: http://yolanda.mister-muffin.de/svn@135 7eef14d0-6ed0-489d-bf55-20463b2d70db
main
josch 17 years ago
parent b6cac05c7b
commit cd2518d9e3

@ -17,10 +17,11 @@ $database = 'gnutube';
$dbhost = 'localhost';
$dbuser = 'root';
$dbpass = '';
$domain = 'http://localhost';
$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";
$stylesheet = "./style/gnutube.css";
$stylesheet = "/style/gnutube.css";
$xmlns_dc = "http://purl.org/dc/elements/1.1/";
$xmlns_cc = "http://web.resource.org/cc/";
$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,
args => $query,
consumer_secret => $session->id, #is this save? don't know...
required_root => "http://localhost/" );
required_root => $domain );
#is an openid passed?
if($query->param('user'))
@ -60,7 +60,7 @@ if($query->param('action'))
}
$check_url = $claimed->check_url(
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
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
push @{ $page->{'video'} },
{
'thumbnail' => "./video-stills/$id",
'thumbnail' => "$domain/video-stills/$id",
'filesize' => $filesize,
'duration' => $duration,
'width' => $width,
@ -126,7 +126,7 @@ if($query->url_param('title') or $query->url_param('id'))
{
'cc:Work' =>
{
'rdf:about' => "download.pl?id=$id&view=true",
'rdf:about' => "$domain/download/$id",
'dc:title' => [$title],
'dc:creator' => [$creator],
'dc:subject' => [$subject],
@ -134,7 +134,7 @@ if($query->url_param('title') or $query->url_param('id'))
'dc:publisher' => [$username],
'dc:contributor' => [$contributor],
'dc:date' => [$timestamp],
'dc:identifier' => ["video.pl?title=$title&id=$id"],
'dc:identifier' => ["$domain/video/$title/$id"],
'dc:source' => [$source],
'dc:language' => [$language],
'dc:coverage' => [$coverage],
@ -148,16 +148,17 @@ if($query->url_param('title') or $query->url_param('id'))
};
#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
comments.videoid=? and users.id=comments.userid}) 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'} }, {
'text' => [decode_utf8($text)],
'username' => [$username],
'timestamp' => [$timestamp]
'username' => $username,
'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 xml
print XMLout($page, KeyAttr => {}, XMLDecl => $XMLDecl, RootName => 'page');
print XMLout($page, KeyAttr => {}, XMLDecl => $XMLDecl, RootName => 'page', AttrIndent => 1);
}
else
{
{ foreach $key (sort keys(%ENV)) {
print "$key = $ENV{$key}<p>";
}
%page = ();
#if a username is associated with session id, username is nonempty

@ -25,7 +25,7 @@
<head>
<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">
<xsl:attribute name="href">
<xsl:value-of select="//@stylesheet" />
@ -80,7 +80,7 @@
<xsl:value-of select="$locale_strings/str[@id='login']" />
</a>
<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>
<xsl:attribute name="href">
<xsl:value-of select="$site_strings/str[@id='page_login-openid']" />
@ -166,7 +166,7 @@
<xsl:template match="frontpage">
<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 class="search">
@ -208,7 +208,7 @@
<xsl:template name="searchbar">
<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 class="search-small">
@ -224,7 +224,7 @@
</div>
<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>
</xsl:template>
@ -237,13 +237,13 @@
</xsl:attribute>
<xsl:choose>
<xsl:when test="@type='error'">
<img src="./images/tango/dialog-error.png" />
<img src="/images/tango/dialog-error.png" />
</xsl:when>
<xsl:when test="@type='information'">
<img src="./images/tango/dialog-information.png" />
<img src="/images/tango/dialog-information.png" />
</xsl:when>
<xsl:when test="@type='warning'">
<img src="./images/tango/dialog-warning.png" />
<img src="/images/tango/dialog-warning.png" />
</xsl:when>
</xsl:choose>
<xsl:variable name="messagetext" select="@text" />
@ -323,13 +323,13 @@
<div class="video">
<applet
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"
height="250"
>
<param name="url">
<xsl:attribute name="value">
<xsl:value-of select="concat(rdf:RDF/cc:Work/@rdf:about,'&amp;view=true')" />
<xsl:value-of select="concat(rdf:RDF/cc:Work/@rdf:about,'/view=true')" />
</xsl:attribute>
</param>
<param name="seekable" value="true"/>
@ -349,7 +349,7 @@
<xsl:attribute name="href">
<xsl:value-of select="rdf:RDF/cc:Work/@rdf:about" />
</xsl:attribute>
<img src="./images/tango/document-save.png" />
<img src="/images/tango/document-save.png" />
</a>
<a>
<xsl:attribute name="href">

Loading…
Cancel
Save