rejetto forum

Show files in multiple pages, help

0 Members and 1 Guest are viewing this topic.

Offline mynameiskeeet

  • Occasional poster
  • *
    • Posts: 18
    • View Profile


hi guys. i would like to ask if you know how to code these things..


1. Show 10 files in every page only, so when i have many files, they wont be all showed in a long webpage

2. add an file info about who uploaded it.


ill be waiting for your replies. I need it on my computer class next week. Thanks :D
« Last Edit: September 24, 2012, 04:41:15 AM by mynameiskeeet »


Offline SilentPliz

  • Operator
  • Tireless poster
  • *****
    • Posts: 1298
  • ....... chut ! shh!
    • View Profile
Hi ! :)

Beta versions can satisfy your request (2.3 #xxx).
These versions are very accomplished and stable.

The most recent:

http://www.rejetto.com/forum/beta/testing-build-282/
« Last Edit: September 21, 2012, 12:39:44 PM by SilentPliz »


Offline mynameiskeeet

  • Occasional poster
  • *
    • Posts: 18
    • View Profile
Hi ! :)

Beta versions can satisfy your request (2.3 #xxx).
These versions are very accomplished and stable.

The most recent:

http://www.rejetto.com/forum/beta/testing-build-282/


sorry but i dont know how that build can help me :O more infos pls :D


Offline mynameiskeeet

  • Occasional poster
  • *
    • Posts: 18
    • View Profile
someone help pls. i have done the 2nd one already.

i dont know how to make pages when the files are too many =/


Offline Mars

  • Operator
  • Tireless poster
  • *****
    • Posts: 2063
    • View Profile
Quote

[+special:strings]
option.paged=1
option.items=10
......

......
function pageIt(anim) {
    var rows = $('#files tr');
    if (!rows.size()) return;
   
    page = 0; // this is global
    var pages = $("<div id='pages'>{.!Page.} </div>").css('visibility','hidden').insertBefore('#files');
    var pageSize = 0;
    while (!outsideV(rows[pageSize], 20))
        if (++pageSize >= rows.size())
            return pages.remove();
    if (pageSize == 0) return;

    pageSize ={.if|{.!option.items|pageSize.}|{.!option.items|pageSize.}|pageSize.}

    Npages = Math.ceil(HFS.number / pageSize);
    if (Npages == 1)
        return pages.remove();
    $('#files').width($('#files').width()); // hold it still
....

this is a static items/page, it's possible to use a dynamic variable


Offline SilentPliz

  • Operator
  • Tireless poster
  • *****
    • Posts: 1298
  • ....... chut ! shh!
    • View Profile
Hi !


@ mynameiskeeet


sorry but i dont know how that build can help me :O more infos pls :D

I showed the recent beta because the default template allows what that you ask.

Since, you put a screenshot of the template that you use ... then it takes a lot of rewriting to achieve it.

You can watch this version of hfs,  it includes some templates with "page-mode" (blue template, copper) that will help you to understand the work to provide.

http://www.rejetto.com/forum/hfs-~-http-file-server/for-testing-purpose-hfs-beta-279-including-ssl-tools/msg1056599/#msg1056599


@ Mars :
 Je ne t'ai pas dénoncé sur ce coup, ne connaissant pas ta disponibilité. ;) :D
« Last Edit: September 24, 2012, 03:25:17 PM by SilentPliz »


Offline Mars

  • Operator
  • Tireless poster
  • *****
    • Posts: 2063
    • View Profile
Quote
@ Mars :
 Je ne t'ai pas dénoncé sur ce coup, ne connaissant pas ta disponibilité. ;) :D
dénoncé, dénoncé? il manquerai plus que ça! c'est toi le coupable.  ;D ;D


Offline mynameiskeeet

  • Occasional poster
  • *
    • Posts: 18
    • View Profile
sorry but im not good at codes, can u elaborate where i should put ur code? :D

sorry. btw. here is my hfs.tpl


http://www.mediafire.com/download.php?h610jvsca07ctmz



Offline Mars

  • Operator
  • Tireless poster
  • *****
    • Posts: 2063
    • View Profile
watching your template, I found a very old model like that should be modified to suit your needs, but that will not work on a version 2.f
it would be best to use the template included in the latest version and adapt it.



« Last Edit: September 27, 2012, 08:37:24 AM by Mars »