BlogHarbor Home Page
FAQFAQ  SearchSearch  MemberlistMemberlist  UsergroupsUsergroups  UsergroupsRSS   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Adding names to recent comments...
 
Post new topic   Reply to topic    BlogHarbor Community Forum Index -> Beginner's Lounge
View previous topic :: View next topic  
Author Message
Guest






PostPosted: Wed Jun 30, 2004 1:55 pm    Post subject: Adding names to recent comments... Reply with quote

Is there a way I can make the entries under "recent comments" include the name of the poster in addition to just the name of the article the comment is for? Alternatively is there a reference somewhere for the variables you can reference when editing a component?
Back to top
john
Site Admin


Joined: 16 Mar 2004
Posts: 3434

PostPosted: Wed Jun 30, 2004 4:24 pm    Post subject: Re: Adding names to recent comments... Reply with quote

Try using this in your customized Recent Comments component:

Code:
{{if blog.recent_comments}}
<div class="component">
<div class="componentHead">Recent Comments</div>
<div class="componentContent">
<div class="componentRecentComments">
{{loop name=blog.recent_comments limit=5}}
<div class="componentRecentCommentsItem">
<a href="{{permalink_url}}">{{if title}}{{title}}{{else}}Untitled{{/if}}</a><br>
{{if author}}
    {{var name=author escape=html}}
{{else}}
   Anonymous
{{/if}}
</div>
{{/loop}}
</div> <!-- componetRecentComments -->
</div> <!-- componentContent -->
</div> <!-- component -->
{{/if}} <!-- blog.recent_comments -->


jazz it up with the time that a comment was made, like this:

Code:
{{if blog.recent_comments}}
<div class="component">
<div class="componentHead">Recent Comments</div>
<div class="componentContent">
<div class="componentRecentComments">
{{loop name=blog.recent_comments limit=5}}
<div class="componentRecentCommentsItem">
<a href="{{permalink_url}}">{{if title}}{{title}}{{else}}Untitled{{/if}}</a><br>
{{if author}}
    {{var name=author escape=html}}
{{else}}
   Anonymous
{{/if}}
<br>
{{publish_time}}
</div>
{{/loop}}
</div> <!-- componetRecentComments -->
</div> <!-- componentContent -->
</div> <!-- component -->
{{/if}} <!-- blog.recent_comments -->


There is a list of variables related to comments here:

http://demo.blogharbor.com/blog/_archives/2004/6/3/82631.html

(Yes, the HTML is all mucked up on that page, we'll take a look at that!)

Most of the variables used in the templates can be used in components, the template manual here may help:

http://demo.blogharbor.com/blog/Manual/_archives/2004/6/4/83189.html
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Xemu
Guest





PostPosted: Fri Jul 02, 2004 12:10 am    Post subject: Reply with quote

Great, thanks!

(I was the original poster, forgot to set a Username. Smile
Back to top
Search all BlogHarbor support resources.
View previous topic :: View next topic  
Display posts from previous:   
Post new topic   Reply to topic    BlogHarbor Community Forum Index -> Beginner's Lounge All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum