roller-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Derek Collins <derek.coll...@cityofprescott.net>
Subject Re: Custom Comment Code
Date Fri, 18 Jan 2008 00:02:21 GMT
Actually, I figured it out with the help of our network engineer. I  
needed to restart the application server, GlassFish, in order to  
allow roller to use the new .vm file. After restarting the new macros  
worked perfectly! Thanks again for you help Dave.

On Jan 17, 2008, at 1:38 PM, Derek Collins wrote:

> Thank you for your response Dave. I went with your second  
> suggestion and created a roller-custom.vm file and then modified  
> the #showWeblogEntryComments($entry) and renamed it  
> #showWeblogEntryComments2($entry). However, I'm now getting an  
> error on the page where the comments should be displayed:
>
> #showWeblogEntryComments2 
> (org.apache.roller.weblogger.pojos.wrapper.WeblogEntryWrapper@fa4fe0)
>
> I'm assuming that I need to get Roller to recognize this new .vm  
> file that I created, but I don't know how. Can you tell me what  
> else I need to do?
>
> Thanks,
> Derek
>
> On Jan 11, 2008, at 9:08 PM, Dave wrote:
>
>> On Jan 10, 2008 4:35 PM, Derek Collins  
>> <derek.collins@cityofprescott.net> wrote:
>>> Is it possible to customize the comment and/or comment-form code?
>>>
>>> I would like to customize the HTML that is output by:
>>>
>>> #showWeblogEntryComments($model.weblogEntry)
>>>
>>> and by this:
>>>
>>> #showWeblogEntryCommentForm($model.weblogEntry)
>>
>> Those are Velocity Macros that are provided by the Roller
>> WEB-INF/velocity/weblog.vm file. If you want to customize the comment
>> HTML, I think you've got two choices.
>>
>> One is to modify those macros to do what you want by editing the file
>> weblog.vm. The benefit of this approach is that all existing Roller
>> themes that you use will have your new look, because they all use
>> those macros. Oh, and make sure you save this file before you upgrade
>> Rolller, you'll have to merge your new macros back in when in  
>> upgrade.
>>
>> The other choice is to create some new comment macros with new
>> different names.Put those macros in a file called
>> WEB-INF/velocity/roller-custom.vm and then you can use them in
>> Roller.The benefit of this option is that you can have original  
>> Roller
>> style comments in some blogs and your new style comments where you
>> want them. It will also eliminate the merge on upgrade problem.
>>
>> Hope that helps,
>> - Dave
>


Mime
View raw message