rejetto forum

make "add comment" feature in my customized template

0 Members and 1 Guest are viewing this topic.

Offline mynameiskeeet

  • Occasional poster
  • *
    • Posts: 18
    • View Profile
hi. i want to make a "add comment feature" on my customized template where user can tick the checkbox of a file, click comment button then he/she can comment to that file.. something like the latest default template below




my template was a customized old default template of hfs. i want to add this feature. i dont want to use the latest hfs default template because i want the design of my template now and i dont want to start all over again.. here is how my template looked (after trying to add the comment feature..)



ive restored it back to its previous cause i felt like im already lost in the code. i dont know which codes to import to my code :(

here is how it looks now..




i need to finish this before Tuesday, need it for school :(
so i would really appreciate if u guys could help me out.


ill be online on skype today

u can add me up so we can talk

skype id: mynameiskeeet

or u can just message me here at this post.

will wait for ur response. thanks.. :)

attached here is my hfs.tpl file


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13523
    • View Profile
i guess you need only these two pieces

Code: [Select]
{.if|{.can rename.}|
<button id='renameBtn' onclick='
            var a = selectedItems();
                if (a.size() != 1)
return alert("You must select a single item to rename");
ezprompt(this.innerHTML, {type:"text"}, function(s){
$.post("?mode=section&id=ajax.rename", {"from":getItemName(a[0]), "to":s}, getStdAjaxCB());
    });'>{.!Rename.}</button>
.}

Code: [Select]
[ajax.rename|no log]
{.break|if={.not|{.can rename.}.}|result=forbidden.}
{.set|x|{.force ansi|%folder%{.postvar|from.}.}.}
{.set|y|{.force ansi|%folder%{.postvar|to.}.}.}
{.break|if={.not|{.exists|{.^x.}.}.}|result=not found.}
{.break|if={.exists|{.^y.}.}|result=exists.}
{.break|if={.not|{.length|{.rename|{.^x.}|{.^y.}.}.}.}|result=failed.}
{.add to log|User %user% renamed "{.^x.}" to "{.^y.}".}
ok


jannuh

  • Guest
More and more features commonly don't make software always better....