Changeset 131
- Timestamp:
- 08/28/07 21:47:46 (17 months ago)
- Location:
- trunk
- Files:
-
- 3 removed
- 5 modified
- 1 copied
-
CHANGELOG (modified) (1 diff)
-
README (modified) (2 diffs)
-
config-sample.php (modified) (1 diff)
-
index.php (modified) (1 diff)
-
js/hellaworld.js (copied) (copied from trunk/js/hellaworld.js)
-
js/hellaworld.php (deleted)
-
js/printf.js (deleted)
-
languages (deleted)
-
templates/default.php (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/CHANGELOG
r130 r131 17 17 * Updated JQuery and its plugins to their latest versions, this will 18 18 improve performance for large queues slightly. 19 20 * Added support for localisation into different languages. This adds a new21 option to config.php, please check the sample config file for info.22 23 * Added Dutch translation (Thank you stevuu for translating it)24 25 * Added Swedish translation (Thank you toxik for translating it)26 19 27 20 * Added multi-call support to HellaController. -
trunk/README
r123 r131 8 8 Then upload and view the site within your web browser. That should 9 9 be all that's necessary. 10 11 *Supported Languages*12 13 HellaWorld currently supports the following language prefixes:14 en == English15 nl == Dutch16 17 If you wish to help translate HellaWorld into your native language, please18 take a look at the english language file languages/en.php19 10 20 11 *Tracking Finished Items* … … 48 39 for new features and modification of existing features. 49 40 50 stevuu in #php on quakenet for the Dutch translation.51 52 41 "dannyp" in #hellanzb on freenode for suggesting the bookmarklet. 53 42 -
trunk/config-sample.php
r126 r131 16 16 'password' => 'changeme', // The password specified in hellanzb.conf 17 17 'showfinished' => true, // Show finished items, see README for details 18 'language' => 'en' // Language to present HellaWorld in19 18 ); 20 19 -
trunk/index.php
r119 r131 50 50 $hellaworldversion = "1.8-SVN"; 51 51 $protocol = (($_SERVER['SERVER_PORT'] == 443) ? 'https' : 'http'); 52 53 require 'languages/' . $config['language'] . '.php';54 52 55 53 require_once 'classes/HellaController.php'; -
trunk/templates/default.php
r128 r131 54 54 <script src="js/interface.js" type="text/javascript"></script> 55 55 <script src="js/tabs.js" type="text/javascript"></script> 56 <script src="js/printf.js" type="text/javascript"></script> 57 <script src="js/hellaworld.php" type="text/javascript"></script> 56 <script src="js/hellaworld.js" type="text/javascript"></script> 58 57 </head> 59 58 <body onload="init();"> … … 61 60 <h1>HellaWorld</h1> 62 61 <div> 63 <p> <?php printf($lang['stat1'], $c->version, $c->uptime); ?></p>64 <p> <?php printf($lang['stat2'], $c->totalFiles, $c->totalSegments, $c->totalMB, $c->totalNZBs); ?></p>62 <p>HellaNZB v<?php echo $c->version; ?> - Uptime: <?php echo $c->uptime; ?></p> 63 <p>Downloaded: <?php echo $c->totalFiles; ?> files in <?php echo $c->totalSegments; ?> segments totalling <?php echo $c->totalMB; ?>MB via <?php echo $c->totalNZBs; ?> NZB files</p> 65 64 </div> 66 65 </div> 67 66 <div id="container"> 68 67 <div id="modules"> 69 <h2> <?php echo $lang['module1']; ?></h2>68 <h2>Add NZB Via Newzbin ID Or URL</h2> 70 69 <div> 71 70 <form method="get" action="<?php echo $self; ?>"> 72 71 <fieldset> 73 72 <input type="submit" value="Go" style="float:right;" /> 74 <label for="nzbdownload"> <?php echo $lang['module1label']; ?><input type="text" name="nzbdownload" id="nzbdownload" /></label>73 <label for="nzbdownload">Article ID or URL: <input type="text" name="nzbdownload" id="nzbdownload" /></label> 75 74 </fieldset> 76 75 </form> 77 76 </div> 78 <h2> <?php echo $lang['module2']; ?></h2>77 <h2>Set Rate Limit</h2> 79 78 <div> 80 79 <form method="get" action="<?php echo $self; ?>"> 81 80 <fieldset> 82 81 <input type="submit" value="Go" style="float:right" /> 83 <label for="maxrate"> <?php echo $lang['module2label']; ?><input type="text" name="maxrate" id="maxrate" value="<?php echo $c->rateLimit; ?>" /></label>82 <label for="maxrate">Limit (KB/s): <input type="text" name="maxrate" id="maxrate" value="<?php echo $c->rateLimit; ?>" /></label> 84 83 </fieldset> 85 84 </form> … … 90 89 <ul> 91 90 <?php if ($c->paused): ?> 92 <li><a href="<?php echo $self; ?>?action=8" title=" <?php echo $lang['command1']; ?>"><?php echo $lang['command1']; ?></a></li>91 <li><a href="<?php echo $self; ?>?action=8" title="Resume">Resume downloading</a></li> 93 92 <?php else: ?> 94 <li><a href="<?php echo $self; ?>?action=7" title=" <?php echo $lang['command2']; ?>"><?php echo $lang['command2']; ?></a></li>93 <li><a href="<?php echo $self; ?>?action=7" title="Pause">Pause current download</a></li> 95 94 <?php endif; ?> 96 <li><a href="<?php echo $self; ?>?action=9" title=" <?php echo $lang['command3']; ?>" onclick="return confirm('<?php echo $lang['command3msg']; ?>');"><?php echo $lang['command3']; ?></a></li>97 <li><a href="<?php echo $self; ?>?action=11" title=" <?php echo $lang['command4']; ?>" onclick="return confirm('<?php echo $lang['command4msg']; ?>');"><?php echo $lang['command4']; ?></a></li>98 <li><a href="<?php echo $self; ?>?action=10" title=" <?php echo $lang['command5']; ?>" onclick="return confirm('<?php echo $lang['command5msg']; ?>');"><?php echo $lang['command5']; ?></a></li>95 <li><a href="<?php echo $self; ?>?action=9" title="Cancel" onclick="return confirm('This will cancel the current download and remove it from the queue, continue?');">Cancel current download</a></li> 96 <li><a href="<?php echo $self; ?>?action=11" title="Shut down" onclick="return confirm('HellaNZB cannot be restarted without shell access, continue?');">Shut down HellaNZB</a></li> 97 <li><a href="<?php echo $self; ?>?action=10" title="Clear queue" onclick="return confirm('This cannot be undone, continue?');">Clear the queue</a></li> 99 98 </ul> 100 99 </div> 101 100 <div id="info"> 102 <h2> <?php echo $lang['downloadtitle']; ?></h2>101 <h2>Currently Downloading</h2> 103 102 <?php if ($c->downloadCount > 0): foreach($c->downloads as $download): ?> 104 103 <div><?php echo htmlspecialchars($download['nzbName']); ?></div> 105 <div class="queuestats"><img src="progress.php?percentage=<?php echo $c->completed; ?>" alt="progress bar" /> <?php printf($lang['complete'], $c->completed); ?></div> 106 <div class="queuestats"><?php printf($lang['remaining'], $c->remaining, $download['total_mb']); ?></div> 107 <div class="queuestats" style="margin-bottom: 5px;"><?php 108 if (!$c->paused) { 109 printf($lang['eta'], $c->formatTimeStamp($c->eta), $c->transferRate); 110 } else { 111 echo $lang['paused']; 112 } 113 ?></div> 104 <div class="queuestats"><img src="progress.php?percentage=<?php echo $c->completed; ?>" alt="progress bar" /> <?php echo $c->completed; ?>% complete</div> 105 <div class="queuestats"><?php echo $c->remaining; ?>MB of <?php echo $download['total_mb']; ?>MB remaining</div> 106 <div class="queuestats" style="margin-bottom: 5px;"><?php echo ((!$c->paused) ? 'ETA ' . $c->formatTimeStamp($c->eta) . ' at ' . $c->transferRate . 'KB/s' : 'PAUSED'); ?></div> 114 107 <?php endforeach; else: ?> 115 <div style="margin-bottom: 5px;"> <?php echo $lang['nothing']; ?></div>108 <div style="margin-bottom: 5px;">Nothing</div> 116 109 <?php endif; ?> 117 <h2> <?php echo $lang['processtitle']; ?></h2>110 <h2>Currently Processing</h2> 118 111 <?php if ($c->processCount > 0): foreach($c->processing as $processing): ?> 119 112 <div><?php echo htmlspecialchars($processing); ?></div> 120 113 <?php endforeach; else: ?> 121 <div> <?php echo $lang['nothing']; ?></div>114 <div>Nothing</div> 122 115 <?php endif; ?> 123 116 </div> … … 125 118 <div id="content"> 126 119 <div class="queuebox first"> 127 <?php printf($lang['queuestats'], $c->queueLength, $c->queueSize); ?>120 Queued: <?php echo $c->queueLength; ?> items totalling <?php echo $c->queueSize; ?>MB 128 121 </div> 129 122 <?php if ($c->queueLength > 0): ?> … … 135 128 <div class="queuetitle"><?php echo htmlspecialchars($queue['nzbName']); ?></div> 136 129 <ul class="queuecontrols"> 130 <<<<<<< .working 131 <li class="handle">Drag me</li><li class="control"><a href="index.php?info=<?php echo $i; ?>&KeepThis=true&TB_iframe=true&height=200&width=500" class="thickbox"><img src="images/information.png" alt="Info" /></a></li></li><li class="control"><a title="Cancel" href="<?php echo $self; ?>?action=1&id=<?php echo $queue['id']; ?>"><img src="images/delete.png" alt="Cancel" /></a></li><li class="control"><a title="Up" href="<?php echo $self; ?>?action=2&id=<?php echo $queue['id']; ?>"><img src="images/up.png" alt="Up" /></a></li><li class="control"><a title="Down" href="<?php echo $self; ?>?action=3&id=<?php echo $queue['id']; ?>"><img src="images/down.png" alt="Down" /></a></li><li class="control"><a title="Top" href="<?php echo $self; ?>?action=4&id=<?php echo $queue['id']; ?>"><img src="images/top.png" alt="Top" /></a></li><li class="control"><a title="Bottom" href="<?php echo $self; ?>?action=5&id=<?php echo $queue['id']; ?>"><img src="images/bottom.png" alt="Bottom" /></a></li><li class="control"><a title="Force" href="<?php echo $self; ?>?action=6&id=<?php echo $queue['id']; ?>"><img src="images/force.png" alt="Force" /></a></li> 132 ======= 137 133 <li class="handle"><?php echo $lang['drag']; ?></li><li class="control"><a href="index.php?info=<?php echo $i; ?>&KeepThis=true&TB_iframe=true&height=200&width=500" class="thickbox"><img src="images/information.png" alt="Info" /></a></li><li class="control"><a title="Cancel" href="<?php echo $self; ?>?action=1&id=<?php echo $queue['id']; ?>"><img src="images/delete.png" alt="Cancel" /></a></li><li class="control"><a title="Up" href="<?php echo $self; ?>?action=2&id=<?php echo $queue['id']; ?>"><img src="images/up.png" alt="Up" /></a></li><li class="control"><a title="Down" href="<?php echo $self; ?>?action=3&id=<?php echo $queue['id']; ?>"><img src="images/down.png" alt="Down" /></a></li><li class="control"><a title="Top" href="<?php echo $self; ?>?action=4&id=<?php echo $queue['id']; ?>"><img src="images/top.png" alt="Top" /></a></li><li class="control"><a title="Bottom" href="<?php echo $self; ?>?action=5&id=<?php echo $queue['id']; ?>"><img src="images/bottom.png" alt="Bottom" /></a></li><li class="control"><a title="Force" href="<?php echo $self; ?>?action=6&id=<?php echo $queue['id']; ?>"><img src="images/force.png" alt="Force" /></a></li> 134 >>>>>>> .merge-right.r125 138 135 </ul> 139 <div class="queuestats"><?php printf($lang['queuemb'], $queue['total_mb'], (($c->transferRate > 0) ? sprintf($lang['queueeta'], $c->formatTimeStamp($queue['eta'])) : '')); ?></div>136 <div class="queuestats"><?php echo $queue['total_mb']; ?>MB<?php echo ($c->transferRate > 0) ? ' ETA: ' . $c->formatTimeStamp($queue['eta']) : ''; ?></div> 140 137 </li> 141 138 <?php endforeach; ?> … … 144 141 <div id="controls"> 145 142 <span id="refresher"> 146 <input type="checkbox" name="refresh" id="refresh" onclick="if (this.checked) { createCookie('HHRefresh', 1, 30);startRefresher(); } else { createCookie('HHRefresh', 0, 30);stopRefresher(); }" /> <label for="refresh" class="refresher"> <?php echo $lang['refresh']; ?></label>143 <input type="checkbox" name="refresh" id="refresh" onclick="if (this.checked) { createCookie('HHRefresh', 1, 30);startRefresher(); } else { createCookie('HHRefresh', 0, 30);stopRefresher(); }" /> <label for="refresh" class="refresher">Refresh every 15 seconds</label> 147 144 </span> 148 145 <?php if ($c->queueLength > 0): ?> 149 <input type="submit" name="reorder" value=" <?php echo $lang['reorder']; ?>" /> <?php echo $lang['reorderjoiner']; ?> <select name="sorttype" id="sorttype" onchange="showstatus(this);"><option value="1"><?php echo $lang['provided']; ?></option><option value="2"><?php echo $lang['name']; ?></option><option value="3"><?php echo $lang['size']; ?></option></select> <select name="sortdirection" id="sortdirection"><option value="1"><?php echo $lang['ascending']; ?></option><option value="2"><?php echo $lang['descending']; ?></option></select>146 <input type="submit" name="reorder" value="Reorder Items" /> by <select name="sorttype" id="sorttype" onchange="showstatus(this);"><option value="1">Provided Order</option><option value="2">Name</option><option value="3">Size</option></select> <select name="sortdirection" id="sortdirection"><option value="1">Ascending</option><option value="2">Descending</option></select> 150 147 <?php endif; ?> 151 148 </div> … … 157 154 <div id="tabcontainer"> 158 155 <ul> 159 <li><a accesskey="1" href="#fragment-1"><span> <?php echo $lang['logentries']; ?></span></a></li>160 <?php if (isset($config['showfinished']) && $config['showfinished']): ?><li><a accesskey="2" href="#fragment-2"><span> <?php echo $lang['finished']; ?></span></a></li><?php endif; ?>161 <li><a accesskey="3" href="#fragment-3"><span> <?php echo $lang['bookmark']; ?></span></a></li>156 <li><a accesskey="1" href="#fragment-1"><span>Log entries</span></a></li> 157 <?php if (isset($config['showfinished']) && $config['showfinished']): ?><li><a accesskey="2" href="#fragment-2"><span>Finished Items</span></a></li><?php endif; ?> 158 <li><a accesskey="3" href="#fragment-3"><span>Bookmarklet</span></a></li> 162 159 </ul> 163 160 <div id="fragment-1"> … … 169 166 <form action="<?php echo $self; ?>" method="post"> 170 167 <div id="finishedcontrols"> 171 <span id="finishedcount"> <?php printf($lang['finisheditems'], $finishedcount); ?></span>168 <span id="finishedcount">Finished items: <?php echo $finishedcount; ?></span> 172 169 <?php if ($finishedcount > 0): ?> 173 <input type="submit" name="clearnzbs" value=" <?php echo $lang['clearfinished']; ?>" />170 <input type="submit" name="clearnzbs" value="Clear Finished NZBs" /> 174 171 <?php endif; ?> 175 172 </div> … … 185 182 <li class="control"><a href="<?php echo $self; ?>?removefinished=<?php echo $i; ?>">Remove</a></li> 186 183 </ul> 187 <div class="queuestats"> <?php printf($lang['finisheditem'], date('M dS - H:i:s', (int)$item->finishedTime), $time->elapsedTime); if (trim($item->parMessage) != ""): printf($lang['parmessage'], $item->parMessage); endif; ?></div>184 <div class="queuestats">Finished on: <?php echo date('M dS - H:i:s', (int)$item->finishedTime); ?> Processing Time: <?php echo $item->elapsedTime; ?><?php if (trim($item->parMessage) != ""): ?> Par message: <?php echo $item->parMessage; endif; ?></div> 188 185 </li> 189 186 <?php endforeach; ?> … … 194 191 <?php endif; ?> 195 192 <div id="fragment-3"> 196 <h2> <?php echo $lang['bookmarktitle']; ?></h2>197 <p class="bkmark"> <?php echo $lang['bookmarktext']; ?></p>198 <p class="bkmark"><a href="javascript:c=location.href;if(document.title.indexOf('Newzbin'+String.fromCharCode(32)+'-'+String.fromCharCode(32)+'Report')!=-1){location.href='<?php echo $protocol . '://' . htmlentities($_SERVER['HTTP_HOST']) . $self ?>?bookmarklet='+encodeURIComponent(c);}else{void(0);}"> <?php echo $lang['bookmarklink']; ?></a></p>193 <h2>HellaWorld Bookmarklet</h2> 194 <p class="bkmark">Right click on this link and bookmark it, or drag it to your bookmarks/favorites to create a Newzbin shortcut. Clicking on this shortcut when on a Newzbin article will add the NZB to HellaNZB's queue.</p> 195 <p class="bkmark"><a href="javascript:c=location.href;if(document.title.indexOf('Newzbin'+String.fromCharCode(32)+'-'+String.fromCharCode(32)+'Report')!=-1){location.href='<?php echo $protocol . '://' . htmlentities($_SERVER['HTTP_HOST']) . $self ?>?bookmarklet='+encodeURIComponent(c);}else{void(0);}">Send to HellaWorld</a></p> 199 196 </div> 200 197 </div>
