You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ive installed h5ai on a MR3040 but modified the 'options.json' file so none of the fancy features are on. Doing testing now. It seems to be running really well so far without making it a slow user experience.
This download of _h5ai from BibleBox.org contains an "options.json" file with options already set for use on the TP MR3040 router.
NOTE: testing various options in the options.json file of _h5ai lead to the modified settings in this file. If you want to modify it yourself go ahead, but know that showing file previews, enabling selected downloads as packages, displaying folder trees, all makes browsing files on the BibleBox S......L....O.....W)
Unzip the "installing_h5ai.zip" file and copy the contents to the root folder on your USB
Plug the USB into your MR3040 and power it on
Connect the MR3040 ethernet to your computer (remember to manually set an IP address on your computer as 192.168.1.2)
Connect to the MR3040 using SSH
After logging in, from PuTTY or Terminal (OS X) run the following commands:
cd /mnt/usb/
cp -fr _h5ai /opt/piratebox/www/ (this copies the _h5ai folder to the root www folder on the MR3040)
cp -f mime.types /opt/piratebox/conf/lighttpd/
cp -f lighttpd.conf /opt/piratebox/conf/lighttpd/
reboot -f (this command will reboot the MR3040)
You can then put the USB back into your computer and delete the _h5ai folder, mime.types file and lighttpd.conf file from the root folder on the USB as they have all been copied to the MR3040 itself.
I had forgotten about File Download count though...... h5ai looks good, but I really need the counter to be working also. Am on it.
Appreciate the work on h5ai gang. It's weird timing, as we already have
code in the 2.1beta to handle a pretty directory listing (i got it working
some time back, just working on bug fixes), but h5ai is a great system as
well. :-/ Unsure whether to stick with our existing solution or wait until
we get h5ai working and tested for the 2.1 beta release...
I've added _h5ai support to the image build in my fork, and I love the way it's working. I'll hold off on a polished PR unless/until @griffey expresses interest, but I'm happy with it so far. 😄
@mbklein thank you. I like h5ai, too. I used it for two other webpage-project until now. These questions about h5ai is important:
Did you included the download counter display?
Did you included the redirect to count downloads?
How does it perform on OpenWrt devices? Are the CPU intensive functions already disabled, or has the LibraryBox team tweak on it? @silvyn managed to get it working with some performance, AFAIK
We have fixed the download counters. It is based on a change as follows, update "client/js/scripts.js" at the section w=function(e,f){e.attr(:href:,t.absHref)... which in un-obfuscated code is:
setLink = function ($el,item{
$el.attr("href",item.absHref);
Where the 'item.absHref' is the raw URL of the item in question Changing this to:
This updates the download counter when clicking on the files. We've made the change inside the h5ai_installer.tar so that you don't have to edit it on the device post-install. We have made this available on GitHub at: https://github.com/kirkdwilson/LibraryBox-h5ai-Interface for version 0.24.1 The later versions are not working as of yet.
Unfortunately, it also calls 'dl_statistics_counter.php' when clicking on directories and or directories with index.html files in them. However, thankfully , this doesn't seem to actually be reflected in the statistics displayed except that for directories with index.html files it will enter a 'null' file name and count it.
We have updated the java script files-top.js and downloads.js to skip null entry file names:
files-top.js
var $j = jQuery.noConflict();
$j.getJSON("/dl_statistics_display.php?sortBy=counter&sortOrder=DESC&list_type=top&top-max=10&output_type=json" , function(data) {
var files_top = $j('p#files-top-default');
var tbl_body = '
Activity
WorldsBlankiestBlank commentedon Mar 1, 2014
Oh yes, please implement this! LibraryBox would look so much better with something like h5ai!
cdsmythe commentedon Apr 11, 2014
Yeah this looks really good. Ive been thinking on how this could be achieved! Great find, well done!
cdsmythe commentedon May 22, 2014
Ive installed h5ai on a MR3040 but modified the 'options.json' file so none of the fancy features are on. Doing testing now. It seems to be running really well so far without making it a slow user experience.
MaStr commentedon May 22, 2014
Thanks for your feedback! (Something like that was my intuition.
Can you provide any details about:
Did you figure out, how it is possible to integrate the download-counter display and the counting itself?
cdsmythe commentedon May 22, 2014
Ok will do.
But I forgot all about the download counter.......will get onto that now! ;)
cdsmythe commentedon May 22, 2014
Heres a list of instructions on installing h5ai, but NOTE that after doing this the Download-counter function doesnt work.
Download the http://biblebox.org/BB/installing_h5ai.zip file which includes the _h5ai 0.24.1 folder, and 2 files - "mime.types" and "lighttpd.conf".
This download of _h5ai from BibleBox.org contains an "options.json" file with options already set for use on the TP MR3040 router.
NOTE: testing various options in the options.json file of _h5ai lead to the modified settings in this file. If you want to modify it yourself go ahead, but know that showing file previews, enabling selected downloads as packages, displaying folder trees, all makes browsing files on the BibleBox S......L....O.....W)
Unzip the "installing_h5ai.zip" file and copy the contents to the root folder on your USB
Plug the USB into your MR3040 and power it on
Connect the MR3040 ethernet to your computer (remember to manually set an IP address on your computer as 192.168.1.2)
Connect to the MR3040 using SSH
After logging in, from PuTTY or Terminal (OS X) run the following commands:
cd /mnt/usb/
cp -fr _h5ai /opt/piratebox/www/ (this copies the _h5ai folder to the root www folder on the MR3040)
cp -f mime.types /opt/piratebox/conf/lighttpd/
cp -f lighttpd.conf /opt/piratebox/conf/lighttpd/
reboot -f (this command will reboot the MR3040)
You can then put the USB back into your computer and delete the _h5ai folder, mime.types file and lighttpd.conf file from the root folder on the USB as they have all been copied to the MR3040 itself.
I had forgotten about File Download count though...... h5ai looks good, but I really need the counter to be working also. Am on it.
silvyn commentedon Nov 27, 2014
Succeed with latest h5ai 0.26.1, but had to install php5-mod-session IPK packages.
Blog post I've wrote in french on BiblioBox.net : http://bibliobox.net/blog/post/2014/11/20/installer-h5ai-v0261-sur-une-librarybox
griffey commentedon Nov 28, 2014
Appreciate the work on h5ai gang. It's weird timing, as we already have
code in the 2.1beta to handle a pretty directory listing (i got it working
some time back, just working on bug fixes), but h5ai is a great system as
well. :-/ Unsure whether to stick with our existing solution or wait until
we get h5ai working and tested for the 2.1 beta release...
Jason
On Thu Nov 27 2014 at 4:46:02 PM Sylvain Naudin notifications@github.com
wrote:
mbklein commentedon Aug 20, 2015
I've added _h5ai support to the image build in my fork, and I love the way it's working. I'll hold off on a polished PR unless/until @griffey expresses interest, but I'm happy with it so far. 😄
MaStr commentedon Aug 21, 2015
@mbklein thank you. I like h5ai, too. I used it for two other webpage-project until now. These questions about h5ai is important:
mbklein commentedon Aug 22, 2015
I didn't do anything with the download counters, but it doesn't look difficult. I'll try to find some time to work on it next week.
kirkdwilson commentedon Apr 19, 2016
We have fixed the download counters. It is based on a change as follows, update "client/js/scripts.js" at the section w=function(e,f){e.attr(:href:,t.absHref)... which in un-obfuscated code is:
setLink = function ($el,item{
$el.attr("href",item.absHref);
Where the 'item.absHref' is the raw URL of the item in question Changing this to:
w=function(e,t){e.attr("href","/dl_statistics_counter.php?DL_URL="+t.absHref)
This updates the download counter when clicking on the files. We've made the change inside the h5ai_installer.tar so that you don't have to edit it on the device post-install. We have made this available on GitHub at:
https://github.com/kirkdwilson/LibraryBox-h5ai-Interface for version 0.24.1 The later versions are not working as of yet.
Unfortunately, it also calls 'dl_statistics_counter.php' when clicking on directories and or directories with index.html files in them. However, thankfully , this doesn't seem to actually be reflected in the statistics displayed except that for directories with index.html files it will enter a 'null' file name and count it.
We have updated the java script files-top.js and downloads.js to skip null entry file names:
files-top.js
var $j = jQuery.noConflict();
$j.getJSON("/dl_statistics_display.php?sortBy=counter&sortOrder=DESC&list_type=top&top-max=10&output_type=json" , function(data) {
var files_top = $j('p#files-top-default');
var tbl_body = '
';- "+tbl_row+"
";
"$j.each(data, function() {
if (decodeURIComponent( this.filename_encoded ) != '') {
var tbl_row = "";
tbl_row += '' + decodeURIComponent( this.filename_encoded ) + '
' + this.counter + ' download(s)';
tbl_body += "
}
})
tbl_body += "
files_top.html(tbl_body);
});
and download.js:
// $.get(
// "/dl_statistics_display.php?sortOrder=DESC&sortBy=counter&list_type=top&top-max=50",
// );
var $j_d = jQuery.noConflict();
$j_d.getJSON("/dl_statistics_display.php?sortBy=counter&sortOrder=DESC&list_type=all&top-max=10&output_type=json" , function(data) {
var files_top = $j_d('p#files-top-statspage');
var tbl_body = '
';- " + tbl_row + "
";
"$j_d.each(data, function() {
if (decodeURIComponent( this.filename_encoded ) != '') {
var tbl_row = "";
tbl_row += '' + decodeURIComponent ( this.filename_encoded ) + '
' + this.counter + ' download(s)';
tbl_body += "
}
})
tbl_body += "
files_top.html(tbl_body);
});
MaStr commentedon May 15, 2017
Did some testing with that today... to avoid the counting of directories, the correct way would be:
(used on the 0.27 version from @kirkdwilson )
This avoids the URL change for folders. The next way would be to make that optional vial configuration.
And the Download counts aren't displayed in the listing, but I do not think this is easy to be implemented
Add h5ai 0.27 support