Commit 380452a7 authored by Gabor Hudiczius's avatar Gabor Hudiczius
Browse files

rtwi-070912

parent 686303f1
......@@ -11,7 +11,7 @@ installation:
to install xmlrpc, get the source from here: http://sourceforge.net/project/showfiles.php?group_id=16847
in my case, i could only compile the 1.11.00 version (due to a known bug, you may try to configure with --disable-cplusplus)
of course, you can try any version, over 1.07
follow the next steps, as root:
follow the next steps, as root (this step is not needed, if you're upgrading from a pervious version):
cd /usr/src
wget http://dfn.dl.sourceforge.net/sourceforge/xmlrpc-c/xmlrpc-c-1.11.00.tgz
tar xvf xmlrpc-c-1.11.00.tgz
......@@ -20,28 +20,27 @@ follow the next steps, as root:
make
make install
to get the svn for libtorrent, and rtorrent, you have to previously installed svn (apt-get install svn, ford debian, ubuntu)
to install libtorrent, follow the next steps, as a root:
mkdir /usr/src/libtorrent
svn co svn://rakshasa.no/libtorrent/trunk/libtorrent /usr/src/libtorrent
cd /usr/src/libtorrent
./autogen.sh
wget http://libtorrent.rakshasa.no/downloads/libtorrent-0.11.8.tar.gz
tar xvf libtorrent-0.11.8.tar.gz
cd /usr/src/libtorrent-0.11.8
./configure
make
make install
to install rtorrent, follow the next steps, as a root:
mkdir /usr/src/rtorrent
svn co svn://rakshasa.no/libtorrent/trunk/rtorrent /usr/src/rtorrent
cd /usr/src/rtorrent
./autogen.sh
wget http://libtorrent.rakshasa.no/downloads/rtorrent-0.7.8.tar.gz
tar xvf rtorrent-0.7.8.tar.gz
cd /usr/src/rtorrent-0.7.8
./configure --with-xmlrpc-c
make
make install
now, after everything's done
-extract the rtwi-xxxxxx.tar.gz to some place where your webserver can see it
-open the includes/config.php.inc, and edit the next lines:
-open the includes/config.php.inc, and edit the next lines (this step is not needed, if you're upgrading from a pervious version):
-$abs_path (the absolute path of your webroot, i.e.: "/var/www")
-$domain (your domain, i.e.: "example.com")
-$site_path (the relative path of the rtwi-xxxx directory, or whatever you renamed it, within your webroot, i.e.: "/rtwi/", if it's absolute path is /var/www/rtwi/)
......@@ -49,15 +48,14 @@ now, after everything's done
-if your php interpreter does not handle .html files (only .php) set the $default_ext variable to "php", and rename the index.html to index.php
-you can find an example .rtorrent.rc file here: http://libtorrent.rakshasa.no/browser/trunk/rtorrent/doc/rtorrent.rc?rev=latest
-if you don't have a .rtorrent.rc file, create one in each user's home directory
-open .rtorrent.rc, and edit them (for each user)
-add this line to your .rtorrent.rc "scgi_port = 127.0.0.1:12345" where 12345 can be replaced by your choice, and restart rtorrent
-if you have more than one user, set a different port for each user's .rtorrent.rc file (be aware, to set different session directories for the users)
-adding users:
-adding users (this step is not needed, if you're upgrading from a pervious version):
-find row 44, and change it:
-replace "userX" with the actual linux username (keep the quotes)
-replace "1234567890abcdef1234567890abcdef12345678" with the sha1 hash of the choosen password for the webui (you can generate the sha1 hash here => http://www.johnmaguire.us/tools/hashcalc/index.php)
-replace "1234567890abcdef1234567890abcdef12345678" with the hash of the choosen password for the webui (you can generate the sha1 hash here => http://www.johnmaguire.us/tools/hashcalc/index.php)
-replace "12345", with the port, you've set in the user's .rtorrent.rc file
-keep the quotes in the last three steps
-if you have more than one user, you have to do these steps, for each one of them, sop you'll get something like this:
......
......@@ -42,6 +42,8 @@ $home_path = "/home/";
$users = array(
// "username" => array( "pass" => "7e240de74fb1ed08fa08d38063f6a6a91462a815", "port" => "36100" ),
"cyla" => array( "pass" => "5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8", "port" => "36100" ),
"freez" => array( "pass" => "3c6ac60db4ea17076ddd3e044799e70832916837", "port" => "36099" ),
"pilok" => array( "pass" => "bbe31b37f154f7eadbc657d4187e79122592cd13", "port" => "36098" ),
);
/*******************************
......
......@@ -71,16 +71,18 @@ $message = array(
"d_connection_current_seed" => "Seeding",
"d_ignore_commands_0" => "Not ignoring commands",
"d_ignore_commands_1" => "Ignoring commands",
"d_is_active_0" => "Stopped",
"d_is_active_1" => "Started",
"d_is_hash_checked_0" => "Hash not checked",
"d_is_hash_checked_1" => "Hash checked",
"d_is_multi_file_multi" => "Multi",
"d_is_multi_file_single" => "Single",
"d_is_open_0" => "Closed",
"d_is_open_1" => "Open",
"d_active_0" => "Stopped",
"d_active_1" => "Started",
"d_hash_checked_0" => "Hash not checked",
"d_hash_checked_1" => "Hash checked",
"d_multi_file_multi" => "Multi",
"d_multi_file_single" => "Single",
"d_open_0" => "Closed",
"d_open_1" => "Open",
"d_complete_0" => "Incomplete",
"d_complete_1" => "Completed",
"d_hash_checking_0" => "Not hashing",
"d_hash_checking_1" => "Hashing",
"d_hashing_0" => "Not hashing",
"d_hashing_1" => "Normal hashing",
"d_hashing_2" => "Download finished, hashing",
......@@ -98,14 +100,14 @@ $message = array(
"f_priority_2" => "High",
"t_enabled_0" => "Disabled",
"t_enabled_1" => "Enabled",
"t_is_open_0" => "Closed",
"t_is_open_1" => "Open",
"t_open_0" => "Closed",
"t_open_1" => "Open",
"t_type_1" => "TCP",
"t_type_2" => "UDP",
"bind_0000" => "Not set",
"ip_0000" => "All IP addresses",
"proxy_address_000" => "Not set",
"proxy_address_0000" => "Not set",
"pics" => "rTWi - The rTorrent Web interface",
......
This diff is collapsed.
......@@ -65,7 +65,7 @@ $root = $xml->appendChild( $xml->createElement( "root" ) );
switch ( $_REQUEST["mod"] ) {
case "login" : { // login
if ( isset( $_REQUEST["loginname"] ) && isset( $_REQUEST["loginpass"] ) && $_REQUEST["loginname"] != "" && $_REQUEST["loginpass"] != "" && $users[$_REQUEST["loginname"]]["pass"] == sha1( $_REQUEST["loginpass"] ) ) {
if ( isset( $_REQUEST["loginname"] ) && isset( $_REQUEST["loginpass"] ) && $_REQUEST["loginname"] != "" && $_REQUEST["loginpass"] != "" && array_key_exists( $_REQUEST["loginname"], $users ) && $users[$_REQUEST["loginname"]]["pass"] == sha1( $_REQUEST["loginpass"] ) ) {
$_SESSION["rtwi_auth"] = 1;
$_SESSION["rtwi_nick"] = $_REQUEST["loginname"];
$_SESSION["rtwi_port"] = $users[$_REQUEST["loginname"]];
......@@ -184,8 +184,11 @@ switch ( $_REQUEST["mod"] ) {
$request = xmlrpc_encode_request( "get_directory", array() );
$response = xmlrpc_call( $xmlrpc_array, $request );
$response = str_replace( "i8", "double", $response );
$directory = xmlrpc_decode( $response );
$request = xmlrpc_encode_request( "system.get_cwd", array() );
$response = xmlrpc_call( $xmlrpc_array, $request );
$cwd = xmlrpc_decode( $response );
if ( substr( $directory, -1 ) == "/" ) {
$directory = substr( $directory, 0, -1 );
}
......@@ -194,6 +197,9 @@ switch ( $_REQUEST["mod"] ) {
header( "location: {$url["index"]}?mod=addtorrent" );
exit;
} elseif ( substr( $directory, 0, 2 ) == "./" ) {
$directory = substr( $directory, 2 );
$directory = "{$cwd}/{$directory}";
} elseif ( substr( $directory, 0, 2 ) == "~/" ) {
$directory = substr( $directory, 2 );
$directory = "{$home_path}{$_SESSION["rtwi_nick"]}/{$directory}";
} elseif ( substr( $directory, 0, strlen( "{$home_path}{$_SESSION["rtwi_nick"]}" ) ) == "{$home_path}{$_SESSION["rtwi_nick"]}" ) {
......
......@@ -139,11 +139,6 @@ select.whiteselect {
overflow: hidden;
}
img.icon {
width: 1em;
height: 1em;
}
.submit {
margin: 0 0 0 .3em;
}
......@@ -179,8 +174,18 @@ img.icon {
float: left;
}
.ticon {
float: left;
width: 1em;
}
.ticon img {
width: .8125em;
}
.tname {
float: left;
margin: 0;
}
.tops {
......@@ -244,8 +249,8 @@ img.icon {
font-size: smaller;
}
.changepriorityform {
float: left;
.tpriority .submit {
font-size: smaller;
}
.tratio {
......@@ -257,6 +262,13 @@ img.icon {
text-align: right;
}
.tmessage {
float: left;
margin: 0 .5em 0 1.2em;
background: #eeeeee;
font-size: smaller;
}
.tcontainer {
margin: 0 0 0 1.2em;
font-size: smaller;
......@@ -359,7 +371,7 @@ img.icon {
.fpriority {
float: right;
width: 7em;
width: 8em;
margin: 0 0 0 .5em;
text-align: right;
background: #eeeeee;
......@@ -367,7 +379,7 @@ img.icon {
.tcontent .fpriority {
float: right;
width: 5.5em;
width: 6em;
margin: 0 0 0 .5em;
text-align: right;
background: #eeeeee;
......@@ -410,12 +422,16 @@ img.icon {
.tenabled {
float: left;
width: 10.5em;
width: 11.5em;
margin: 0 0 0 .5em;
font-size: smaller;
background: #eeeeee;
}
.tenabled .submit {
font-size: smaller;
}
.tenabled select {
font-size: smaller;
}
......
......@@ -65,7 +65,7 @@
<div class="inforight">
<xsl:choose>
<xsl:when test="d_tied_to_file != ''">
<xsl:value-of select="d_tied_to_file" />
<xsl:value-of select="d_tied_to_file/@value" />
</xsl:when>
<xsl:otherwise>
<xsl:text>No</xsl:text>
......@@ -79,9 +79,9 @@
<xsl:text>File stats:</xsl:text>
</div>
<div class="inforight">
<xsl:value-of select="d_is_multi_file/@value" />
<xsl:value-of select="d_multi_file/@value" />
<xsl:choose>
<xsl:when test="d_is_multi_file != 0">
<xsl:when test="d_multi_file != 0">
<xsl:text> </xsl:text>
<xsl:value-of select="d_size_files" />
<xsl:text> files</xsl:text>
......
......@@ -144,7 +144,7 @@
<div class="clr"></div>
</li>
<li class="formsend">
<input class="inputok" type="image" src="themes/default_ajax/pics/btn_ok.gif" title="Add torrent" alt="[OK]" value="ok" />
<input class="inputok" type="submit" name="addtorrent" title="Add torrent" value="Add torrent" />
</li>
</ul>
</form>
......@@ -220,7 +220,7 @@
</select>
<xsl:text>]</xsl:text>
<noscript>
<input class="submit" id="vtsubmit" type="image" src="themes/default_ajax/pics/btn_ok.gif" name="vtsubmit" alt="[OK]" value="ok" />
<input class="submit" id="vtsubmit" type="submit" name="vtsubmit" title="OK" value="OK" />
</noscript>
</form>
</xsl:template>
......@@ -244,7 +244,7 @@
</select>
<xsl:text>]</xsl:text>
<noscript>
<input class="submit" id="rrsubmit" type="image" src="themes/default_ajax/pics/btn_ok.gif" name="rrsubmit" alt="[OK]" value="ok" />
<input class="submit" id="rrsubmit" type="submit" name="rrsubmit" title="OK" value="OK" />
</noscript>
</form>
</xsl:template>
......@@ -262,21 +262,26 @@
<xsl:template match="torrent">
<li class="tline">
<div class="tname">
<div class="ticon">
<xsl:choose>
<xsl:when test="d_is_active != 0">
<img class="icon" src="themes/default_ajax/pics/{d_connection_current}.gif" alt="{d_connection_current}" title="{d_connection_current/@value} since {d_state_changed/@value}" />
<xsl:when test="d_active != 0">
<img class="icon" src="themes/default_ajax/pics/{d_connection_current}ing.png" alt="{d_connection_current}" title="{d_connection_current/@value} since {d_state_changed/@value}" />
</xsl:when>
<xsl:when test="d_hashing != 0">
<img class="icon" src="themes/default_ajax/pics/hashing.gif" alt="hashing" title="Hashing since {d_state_changed/@value}" />
<img class="icon" src="themes/default_ajax/pics/hashing.png" alt="hashing" title="Hashing since {d_state_changed/@value}" />
</xsl:when>
<xsl:when test="d_complete != 0">
<img class="icon" src="themes/default_ajax/pics/finished.png" alt="finished" title="Finished since {d_state_changed/@value}" />
</xsl:when>
<xsl:when test="d_is_open != 0">
<img class="icon" src="themes/default_ajax/pics/stopped.gif" alt="stopped" title="Stopped since {d_state_changed/@value}" />
<xsl:when test="d_open != 0">
<img class="icon" src="themes/default_ajax/pics/stopped.png" alt="stopped" title="Stopped since {d_state_changed/@value}" />
</xsl:when>
<xsl:otherwise>
<img class="icon" src="themes/default_ajax/pics/closed.gif" alt="closed" title="Closed since {d_state_changed/@value}" />
<img class="icon" src="themes/default_ajax/pics/closed.png" alt="closed" title="Closed since {d_state_changed/@value}" />
</xsl:otherwise>
</xsl:choose>
</div>
<div class="tname">
<a href="?mod=torrent&amp;hash={d_hash}" title="Details" onclick="if ( document.getElementById( 'torrent_{d_hash}' ).style.display == '' ) {{ document.getElementById( 'torrent_{d_hash}' ).style.display = 'none' }} else {{ document.getElementById( 'torrent_{d_hash}' ).style.display = ''}} return false;"><xsl:value-of select="d_name" /></a>
</div>
<div class="tops">
......@@ -289,7 +294,7 @@
</xsl:otherwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="d_is_active != 0">
<xsl:when test="d_active != 0">
<a href="{/root/iurl}?mod=torrentstop&amp;hash={d_hash}" title="Stop">Stop</a>
</xsl:when>
<xsl:otherwise>
......@@ -304,7 +309,7 @@
</xsl:otherwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="d_is_open = 0">
<xsl:when test="d_open = 0">
<a href="{/root/iurl}?mod=torrentopen&amp;hash={d_hash}" title="Open">Open</a>
</xsl:when>
<xsl:otherwise>
......@@ -427,11 +432,15 @@
</select>
<xsl:text>]</xsl:text>
<noscript>
<input class="submit" type="image" src="themes/default_ajax/pics/btn_ok.gif" name="submit" value="ok" />
<input class="submit" type="submit" name="submit" value="OK" title="OK" />
</noscript>
</form>
</div>
<div class="clr"></div>
<div class="tmessage">
<span>Message: <xsl:value-of select="d_message" /></span>
</div>
<div class="clr"></div>
<div class="tcontainer" id="torrent_{d_hash}" style="display: none;">
<a class="info" href="?mod=torrent&amp;hash={d_hash}&amp;page=info" title="Info" onclick="loadcontent( '{d_hash}', 'info' ); return false;">Info</a>
<a class="files" href="?mod=torrent&amp;hash={d_hash}&amp;page=files" title="File list" onclick="loadcontent( '{d_hash}', 'files' ); return false;">File list</a>
......@@ -448,7 +457,7 @@
</xsl:template>
<xsl:template match="torrent_info">
<li class="line">
<li class="line spacer">
<div class="infoleft">
<xsl:text>Name:</xsl:text>
</div>
......@@ -457,7 +466,7 @@
</div>
<div class="clr"></div>
</li>
<li class="line spacer">
<li class="line">
<div class="infoleft">
<xsl:text>Info hash:</xsl:text>
</div>
......@@ -466,6 +475,24 @@
</div>
<div class="clr"></div>
</li>
<li class="line">
<div class="infoleft">
<xsl:text>Local ID:</xsl:text>
</div>
<div class="inforight">
<xsl:value-of select="d_local_id" />
</div>
<div class="clr"></div>
</li>
<li class="line spacer">
<div class="infoleft">
<xsl:text>Local ID (html):</xsl:text>
</div>
<div class="inforight">
<xsl:value-of select="d_local_id_html" />
</div>
<div class="clr"></div>
</li>
<li class="line">
<div class="infoleft">
<xsl:text>Directory:</xsl:text>
......@@ -482,7 +509,7 @@
<div class="inforight">
<xsl:choose>
<xsl:when test="d_tied_to_file != ''">
<xsl:value-of select="d_tied_to_file" />
<xsl:value-of select="d_tied_to_file/@value" />
</xsl:when>
<xsl:otherwise>
<xsl:text>No</xsl:text>
......@@ -491,14 +518,14 @@
</div>
<div class="clr"></div>
</li>
<li class="line spacer">
<li class="line">
<div class="infoleft">
<xsl:text>File stats:</xsl:text>
</div>
<div class="inforight">
<xsl:value-of select="d_is_multi_file/@value" />
<xsl:value-of select="d_multi_file/@value" />
<xsl:choose>
<xsl:when test="d_is_multi_file != 0">
<xsl:when test="d_multi_file != 0">
<xsl:text> </xsl:text>
<xsl:value-of select="d_size_files" />
<xsl:text> files</xsl:text>
......@@ -507,6 +534,15 @@
</div>
<div class="clr"></div>
</li>
<li class="line spacer">
<div class="infoleft">
<xsl:text>Private:</xsl:text>
</div>
<div class="inforight">
<xsl:value-of select="d_private/@value" />
</div>
<div class="clr"></div>
</li>
<li class="line">
<div class="infoleft">
<xsl:text>Chunks:</xsl:text>
......@@ -560,6 +596,15 @@
</div>
<div class="clr"></div>
</li>
<li class="line">
<div class="infoleft">
<xsl:text>Trackers:</xsl:text>
</div>
<div class="inforight">
<xsl:value-of select="d_tracker_size" />
</div>
<div class="clr"></div>
</li>
<li class="line">
<div class="infoleft">
<xsl:text>Leechers:</xsl:text>
......@@ -651,7 +696,7 @@
</div>
<div class="clr"></div>
</li>
<li class="line">
<li class="line spacer">
<div class="infoleft">
<xsl:text>Library version:</xsl:text>
</div>
......@@ -660,15 +705,33 @@
</div>
<div class="clr"></div>
</li>
<li class="line spacer">
<li class="line">
<div class="infoleft">
<xsl:text>Directory:</xsl:text>
<xsl:text>Working directory:</xsl:text>
</div>
<div class="inforight">
<xsl:value-of select="get_cwd" />
</div>
<div class="clr"></div>
</li>
<li class="line">
<div class="infoleft">
<xsl:text>Download directory:</xsl:text>
</div>
<div class="inforight">
<xsl:value-of select="directory/@value" />
</div>
<div class="clr"></div>
</li>
<li class="line spacer">
<div class="infoleft">
<xsl:text>Session directory:</xsl:text>
</div>
<div class="inforight">
<xsl:value-of select="session/@value" />
</div>
<div class="clr"></div>
</li>
<li class="line">
<div class="infoleft">
<xsl:text>Hostname:</xsl:text>
......@@ -856,7 +919,7 @@
</select>
<xsl:text>]</xsl:text>
<noscript>
<input class="submit" type="image" src="themes/default_ajax/pics/btn_ok.gif" name="submit" value="ok" />
<input class="submit" type="submit" name="OK" value="OK" title="OK" />
</noscript>
</form>
</div>
......@@ -937,9 +1000,9 @@
</xsl:choose>
</div>
<div class="tenabled">
<form class="changetrackerenabledform" name="changetrackerenabledfor_{@id}" method="post" action="{/root/iurl}?mod=changetrackerenabled&amp;hash={/root/hash}&amp;id={@id}">
<form class="changetrackerenabledform" name="changetrackerenabledform_{@id}" method="post" action="{/root/iurl}?mod=changetrackerenabled&amp;hash={/root/hash}&amp;id={@id}">
<xsl:text>Enabled: </xsl:text>
<select class="whiteselect" name="rackerenabled" title="Select if tracker is enabled" onchange="window.location='{/root/iurl}?mod=changetrackerenabled&amp;hash={/root/hash}&amp;id={@id}&amp;trackerenabled='+this.value;">
<select class="whiteselect" name="trackerenabled" title="Select if tracker is enabled" onchange="window.location='{/root/iurl}?mod=changetrackerenabled&amp;hash={/root/hash}&amp;id={@id}&amp;trackerenabled='+this.value;">
<xsl:choose>
<xsl:when test="t_enabled = 0">
<option value="1" title="Yes">Yes</option>
......@@ -952,7 +1015,7 @@
</xsl:choose>
</select>
<noscript>
<input class="submit" type="image" src="themes/default_ajax/pics/btn_ok.gif" name="submit" value="ok" />
<input class="submit" type="submit" name="submit" value="OK" title="OK" />
</noscript>
</form>
</div>
......
......@@ -45,7 +45,7 @@
</div>
</li>
<li class="formsend">
<input class="inputok" type="image" src="themes/default_ajax/pics/btn_ok.gif" title="Login" alt="[OK]" value="ok" />
<input class="inputok" type="submit" title="Login" name="Login" value="Login" />
</li>
</ul>
</form>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment