Hello, You can do it by adding a new macro into the /WEB-INF/velocity/weblog.vm . It should be similar to #macro(showWeblogEntryCommentForm $entry) except that it has to take an extra parameter (let call it username). Copy and paste the showWeblogEntryCommentForm and rename it's name as folllows:
#macro(showWeblogEntryCommentFormWithUsername $entry $username) Also you have to replace the following line: <input type="text" name="name" class="text large" value="$cform.name" size="50" maxlength="255" /> with: <input type="text" name="name" class="text large" value="$username" size="50" maxlength="255" /> Instead of calling #showWeblogEntryCommentForm($entry) in the weblog page, call #showWeblogEntryCommentFormWithUsername($entry,$user.userName) . I hope, this will works. Sedat --- benjamin servant <[EMAIL PROTECTED]> wrote: > Ideally, I am looking for something like: #if > ($model.permalink) #if( > $utils.isUserAuthenticated() ) > $comment.setUserName($utils.userName) //Line I am > looking for > #showWeblogEntryComments($entry) > #showWeblogEntryCommentForm($entry) #else > You have to log in to add comments > #showWeblogEntryComments($entry) > #end #endOf course I just made up the > comment.setUserName($utils.userName) line but this > would be the kind of thing I need.Regards,Ben. > _________________________________________________________________ > Essayez Live.com et créez l'Internet qui vous > ressemble : infos, sports, météo et bien plus encore > ! > http://www.live.com/getstarted __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
