Author Topic: Additional Comments (descript.ion)  (Read 1287 times)

0 Members and 1 Guest are viewing this topic.

Offline vbn

  • Experienced poster
  • ***
  • Posts: 36
    • View Profile
Additional Comments (descript.ion)
« on: May 19, 2010, 02:17:13 AM »
I am looking for a way to include a secondary comments method. It is required to store MD5 hashes for uploaded files.

I want to display the MD5 for a file in the listing table. I am able to append the md5 hash to a comment and get it displayed but then manual comment updation by the uploader is not clean.

Any ideas ?


Offline SilentPliz

  • Operator
  • Insane poster
  • *****
  • Posts: 1181
  • ....... chut ! shh!
    • View Profile
Re: Additional Comments (descript.ion)
« Reply #1 on: May 19, 2010, 05:21:48 PM »
I don't know what's the template you use.

If you can post your template here, I could propose you an another way to display your comments and md5 hash.


Quote
updation by the uploader is not clean.

If you can also say more what does not work as you want.

If you mean the user can not uploaded an *.md5 file ... It's normal. It's for avoid that a .md5 file be replaced by a false *.md5 by a user.

An md5 file can be created when we upload a file, but an file .md5 cannot be uploaded.
« Last Edit: May 19, 2010, 10:30:10 PM by SilentPliz »

Offline vbn

  • Experienced poster
  • ***
  • Posts: 36
    • View Profile
Re: Additional Comments (descript.ion)
« Reply #2 on: May 20, 2010, 06:59:13 AM »
Its the same default template in latest beta...just my automation on server side creates a MD5 for a uploaded file and appends to "comments" for that file with something like "<br>MD5 : 238428478743" ... for example.

Offline rejetto

  • Administrator
  • Insane programmer
  • *
  • Posts: 12851
    • View Profile
Re: Additional Comments (descript.ion)
« Reply #3 on: May 29, 2010, 05:21:08 PM »
sorry for the late reply.
so, your problems comes with manual edit of the comment? what's the problem exactly?
if you want to keep the comment and the md5 separately, it's easy.
just don't put the MD5 in the comment, and instead save it to a dedicated file.
then you can just make a little change to the template to display the MD5 after the comment.

Offline vbn

  • Experienced poster
  • ***
  • Posts: 36
    • View Profile
Re: Additional Comments (descript.ion)
« Reply #4 on: July 05, 2010, 06:00:20 AM »
how can I accomplish this easily....I have my automation software which creates a .md5 with same name as the file when its uploaded via HFS or FTP...

In the listing I want to display this md5 against each of the file......

so ABC.rar has a corresponding ABC.md5 ... now in the template how can I read each md5 on traversal and display next to comments ?

Offline Mars

  • Operator
  • Insane poster
  • *****
  • Posts: 1819
    • View Profile
Re: Additional Comments (descript.ion)
« Reply #5 on: July 05, 2010, 10:48:25 AM »
in the menu , you have "fingerprints" which is used to create md5, you can disable it

we are working with the event "upload completed" in the file hfs.events (HFS: Event scripts (by Topic)).

Quote
[upload completed]
{.delete|%item-resource%.md5.}
{.save|%item-resource%.md5|{.md5 file|%item-resource%.}.}
{.append|%item-resource%.md5|{.chr|13|10.}|add some text as new line inside the md5.}

then every upload generate and md5 file , by deleting the previous file md5,

after you have to extract what is necessary to your main template

insert section [file]

{.load|%item-resource%.md5.}

and manage the information;

answer your question?  ;)
« Last Edit: July 05, 2010, 10:53:23 AM by Mars »
FRENCH MEMBER : Si vous comprenez la langue française,  n'hésitez pas à l'utiliser pour une meilleure aide de ma part

Offline rejetto

  • Administrator
  • Insane programmer
  • *
  • Posts: 12851
    • View Profile
Re: Additional Comments (descript.ion)
« Reply #6 on: July 06, 2010, 11:44:18 AM »
the md5 for abc.rar must be abc.rar.md5, not abc.md5

you can put this in the template  {.load|%item-resource%.md5.}
as mars reported

Offline vbn

  • Experienced poster
  • ***
  • Posts: 36
    • View Profile
Re: Additional Comments (descript.ion)
« Reply #7 on: July 07, 2010, 05:20:11 AM »
Aha...I think the filename was what made me cry :(

Anyways will try this now asap :)