www.johnchivall.co.uk - My site
www.johnchivall.co.uk - My site
Hi,
I used CMSMS for my recent site redesign. This was my first time attempting anything beyond simple static HTML/CSS, and I'm very pleased with the results. I used a free template from NodeThirtyThree design which was tweaked a fair bit for the final design. Thanks to Calguy for his awesome modules - it's great to have so much "off the shelf" stuff that I could easily plug in to the site without too much stress. This was a much less painful project than I'd feared!
You can see my site at http://www.johnchivall.co.uk/ All feedback is welcome!
The trickiest bit was getting a good-looking and valid RSS feed for the blog and news summaries (smarty's eval tag was useful in CGFeedMaker templates).
What I would really like is to be able to import and export iCalendar data into CGCalendar - might have to teach myself PHP...
CMS Version 1.6.6
CGExtensions 1.17.5
CGSimpleSmarty 1.4.3
CGCalendar 1.2.5
CGBlog 1.3.1
FormBuilder 0.5.12
Quotes 0.1.2
CGFeedMaker 1.0.9
CGFeedback 1.0.4
Statistics 0.9.3
I used CMSMS for my recent site redesign. This was my first time attempting anything beyond simple static HTML/CSS, and I'm very pleased with the results. I used a free template from NodeThirtyThree design which was tweaked a fair bit for the final design. Thanks to Calguy for his awesome modules - it's great to have so much "off the shelf" stuff that I could easily plug in to the site without too much stress. This was a much less painful project than I'd feared!
You can see my site at http://www.johnchivall.co.uk/ All feedback is welcome!
The trickiest bit was getting a good-looking and valid RSS feed for the blog and news summaries (smarty's eval tag was useful in CGFeedMaker templates).
What I would really like is to be able to import and export iCalendar data into CGCalendar - might have to teach myself PHP...
CMS Version 1.6.6
CGExtensions 1.17.5
CGSimpleSmarty 1.4.3
CGCalendar 1.2.5
CGBlog 1.3.1
FormBuilder 0.5.12
Quotes 0.1.2
CGFeedMaker 1.0.9
CGFeedback 1.0.4
Statistics 0.9.3
Comments and RSS for cgblog using cgfeedback and cgfeedmaker
I had an email query from someone who'd seen the above post and wanted to know how I set up my blog.
I used the CGBlog and CGFeedback modules (latest versions). I modified the standard templates in the modules to use the appropriate css styles to fit in with the rest of the site.
The blog summary on the front page is just produced by:
The detailpage parameter just takes the name of the CMS page I want the post to show up in, in this case "blog", which uses a different page template than most of the normal content pages.
The most work I had to do was integrating the comments system with the blog posts. I have a custom ratings template for CGFeedback which returns only the number of comments for a particular post using this tag, which goes in the CGBlog detail template, and is assigned to a smarty variable:
So I can do things in the template like:
Which when rendered becomes for example:
The CGBlog detail view template calls the CGFeedback module to list comments and also generate the new comment form. I use the CGBlog $entry.id variable as a "key" for the CGFeedback item.
I used CGFeedMaker to produce RSS feeds. Getting valid, good-looking RSS was tricky until I realised I needed to use smarty's {eval} function. My template for the cgblog feed has this to generate the individual items:
I've still got to sort out the CSS for the blog detail views so that the comment form doesn't push the text in the right-hand column down to the bottom of the page. Not really sure why it's happening - any ideas?
Also, when I get time, I want to dynamically generate the page title from blog or news entry titles, but that will mean messing about with my page templates.
I used the CGBlog and CGFeedback modules (latest versions). I modified the standard templates in the modules to use the appropriate css styles to fit in with the rest of the site.
The blog summary on the front page is just produced by:
Code: Select all
{CGBlog pagelimit="4" detailpage="blog" summarytemplate='my-custom-summary-template'}
The most work I had to do was integrating the comments system with the blog posts. I have a custom ratings template for CGFeedback which returns only the number of comments for a particular post using this tag, which goes in the CGBlog detail template, and is assigned to a smarty variable:
Code: Select all
{CGFeedback key1="CGBlog" key2=$entry->id action="ratings" ratingstemplate="count" assign="num_comments"}
Code: Select all
Comments ({$num_comments})
The CGFeedback "count" ratings template just consists of:Comments (12)
Code: Select all
{strip}
{$stats.count}
{/strip}
Code: Select all
...
<div class="comments">
<h3>Comments</h3>
<p>
{if $num_comments != '0'}
{CGFeedback key1="CGBlog" key2=$entry->id action="summary"}
{else}
There are no comments on this entry yet. Use the form below to add
your comment.
{/if}
</p>
</div>
<div class="commentform">
{CGFeedback key1="CGBlog" key2=$entry->id action="default"}
</div>
...
Code: Select all
{CGBlog assign='junk'}
{foreach from=$items item='entry'}
<item>
<title>{$entry->title|cms_html_entity_decode}</title>
<link>{$entry->detail_url}</link>
{capture assign='description'}
{if $entry->summary}
{eval var=$entry->summary}
{else}
{eval var=$entry->content}
{/if}
{/capture}
<description>
<![CDATA[{$description|trim|summarize:40}
<a href="{$entry->detail_url}">Read more...</a>]]>
</description>
<pubDate>{$entry->postdate|rfc_date}</pubDate>
<guid>{$entry->detail_url}</guid>
</item>
{/foreach}
Also, when I get time, I want to dynamically generate the page title from blog or news entry titles, but that will mean messing about with my page templates.
Re: www.johnchivall.co.uk - My site
Awesome work on the site. Very handy tip on the blog comments too, definitely going to try that.
Re: www.johnchivall.co.uk - My site
Hi John,
I was the one that emailed you through your site. I really like the way your blog looks.
Question: Where do I put this?: Comments ({$num_comments})
I put that in my summary template of my blog, but I just get Comments ()
Here is the link to the site I'm building for a friend: http://kingdomgrowthministries.com/index.php?page=blog
If you could send me what your templates looks like (maybe as separate files by email), that would be so much appreciated. I really like the integration of the blog module in your site and I would love to get something like that.
Thanks for you help,
Jeff
I was the one that emailed you through your site. I really like the way your blog looks.
Question: Where do I put this?: Comments ({$num_comments})
I put that in my summary template of my blog, but I just get Comments ()
Here is the link to the site I'm building for a friend: http://kingdomgrowthministries.com/index.php?page=blog
If you could send me what your templates looks like (maybe as separate files by email), that would be so much appreciated. I really like the integration of the blog module in your site and I would love to get something like that.
Thanks for you help,
Jeff
Re: www.johnchivall.co.uk - My site
Hi John,
Some really good tips on the blog. I took a quick look at your detail page and I think if you change the 2 divs outlined below in your style sheet it should fix your problem. you might have to make some minor adjustments to the widths.
I'm trying to decide at the minute weather to look at integrating wordpress into a cmsms site I'm doing or weather to go with CGBlog. Would prefer to use CGBlog so the whole site is in cmsms but was starting to think I wouldn't be able to get it to look like a standard blog with the comments untill I seen yours. I would also be very interested to see your summary template if possible.
Hope the css above sorts your problem.
Thanks,
Paul
Some really good tips on the blog. I took a quick look at your detail page and I think if you change the 2 divs outlined below in your style sheet it should fix your problem. you might have to make some minor adjustments to the widths.
Code: Select all
#primarycontent {
float:left;
margin:1.5em 1em 0 0;
width:60em;
}
#secondarycontent {
float:right;
margin-top:1.5em;
width:12em;
}
Hope the css above sorts your problem.
Thanks,
Paul
CGBlog with CGFeedback comments: templates
Here's my CGBlog summary template in full.
Because I ony need to show the number of comments once per item, I call the CGFeedback 'count' template directly:
Whereas, in the detail template, I want to show the number of comments but also display a message if there are no comments, so I assign the CGFeedback output to a variable $num_comments so I can refer to it multiple times without the overhead of a separate call to the CGFeedback module each time.
{CGFeedback key1="CGBlog" key2=$entry->id action="ratings" ratingstemplate="count" assign="num_comments"}
Here's my detail template in full:
I've had to use the $canonical variable to create a link to the comments anchor, but ideally I'd like to do this using {cms_selflink}, but there doesn't seem to be a straightforward way to refer to an individual cgblog/news/etc entry that way.
(edited to change title of post to help people find it in search results)
Code: Select all
<!-- Start CGBlog Display Template -->
{if $pagecount > 1}
<div class="details">
{if $pagenumber > 1}
{$firstpage} {$prevpage}
{/if}
{$pagetext} {$pagenumber} {$oftext} {$pagecount}
{if $pagenumber < $pagecount}
{$nextpage} {$lastpage}
{/if}
</div>
{/if}
{foreach from=$items item=entry}
<div class="post">
<h4>
<a href="{$entry->detail_url}" title="{$entry->title|escape:htmlall}">
{$entry->title|escape}
</a>
</h4>
<div class="contentarea">
<div class="details">
{if $entry->author}
Posted by {$entry->author}
{/if}
{if $entry->postdate}
on {$entry->postdate|cms_date_format}
{/if}
</div>
{if $entry->summary}
{eval var=$entry->summary}
{else if $entry->content}
{eval var=$entry->content}
{/if}
<ul class="controls">
<li><a class="comments" href="{$entry->detail_url}#comments">Comments ({CGFeedback key1="CGBlog" key2=$entry->id action="ratings" ratingstemplate="count"})</a></li>
<li><a class="more" href="{$entry->detail_url}" title="{$entry->title|escape:htmlall}">Read More</a></li>
</ul>
</div>
</div>
<div class="divider2"></div>
{/foreach}
<!-- End CGBlog Display Template -->
Code: Select all
<li><a class="comments" href="{$entry->detail_url}#comments">Comments ({CGFeedback key1="CGBlog" key2=$entry->id action="ratings" ratingstemplate="count"})</a></li>
{CGFeedback key1="CGBlog" key2=$entry->id action="ratings" ratingstemplate="count" assign="num_comments"}
Here's my detail template in full:
Code: Select all
{* set a canonical variable that can be used in the head section if process_whole_template is false in the config.php *}
{if isset($entry->canonical)}
{assign var='canonical' value=$entry->canonical}
{/if}
{CGFeedback key1="CGBlog" key2=$entry->id action="ratings" ratingstemplate="count" assign="num_comments"}
<div class="post">
<h3>{$entry->title|escape}</h3>
<div class="contentarea">
<div class="details">{if $entry->author}
{$author_label} {$entry->author}
{/if}
{if $entry->postdate}
on {$entry->postdate|cms_date_format}
{/if}
<br />
{if $entry->categories}
<span class="CGBlogSummaryCategory">
{strip}{$category_label}
{foreach from=$entry->categories item='category'}{$category.name} {/foreach}
{/strip}
</span>
{/if}
<br />
<a href="{$canonical}#comments">
{$num_comments} comments
</a>
</div>
<div id="CGBlogPostDetailContent">
{eval var=$entry->content}
</div>
{if $entry->extra}
<div id="CGBlogPostDetailExtra">
{$extra_label} {$entry->extra}
</div>
{/if}
<div class="divider2"><a name="comments"></a></div>
<div class="comments">
<h3>Comments</h3>
<p>
{if $num_comments != '0'}
{CGFeedback key1="CGBlog" key2=$entry->id action="summary"}
{else}
There are no comments on this entry yet. Use the form below to add your comment.
{/if}
</p>
</div>
<div class="commentform">
{CGFeedback key1="CGBlog" key2=$entry->id action="default"}
</div>
</div>
(edited to change title of post to help people find it in search results)
Last edited by john_c on Fri Dec 04, 2009 11:55 am, edited 1 time in total.
Re: www.johnchivall.co.uk - My site
Hi John,
Thanks for the reply. I spent alot of time at it yesterday and got the comments working from your first post. Thanks again.
Paul
Thanks for the reply. I spent alot of time at it yesterday and got the comments working from your first post. Thanks again.
Paul
Re: www.johnchivall.co.uk - My site
Hi Paul,vigor wrote: Hi John,
Some really good tips on the blog. I took a quick look at your detail page and I think if you change the 2 divs outlined below in your style sheet it should fix your problem.
...
Hope the css above sorts your problem.
Thanks,
Paul
Thanks for the tip; in the end I realised I'd forgotten to close a div in the template! No CSS changes required in the end, it all works now!
John.
Re: www.johnchivall.co.uk - My site
Nice site.
For protecting email, have you considered this feature within cmsms:
http://wiki.cmsmadesimple.org/index.php ... _Tricks/fr
For protecting email, have you considered this feature within cmsms:
http://wiki.cmsmadesimple.org/index.php ... _Tricks/fr
Re: www.johnchivall.co.uk - My site
Thanks, I considered that but I'm trying to produce a site without any javascript.nmorgan wrote: Nice site.
For protecting email, have you considered this feature within cmsms:
http://wiki.cmsmadesimple.org/index.php ... _Tricks/fr
Dynamic titles with news and cgblog - simple!
I got dynamic titles working very easily.
In the head section of the page template I just put:
I have {process_pagedata} as the first line in the template.
And in the blog and news detail templates I put:
Seems to work so far!
In the head section of the page template I just put:
Code: Select all
<title>{if isset($dynamic_title)}{$dynamic_title}{else}{title}{/if} | {sitename}</title>
And in the blog and news detail templates I put:
Code: Select all
{assign var='dynamic_title' value=$entry->title|escape}
Re: www.johnchivall.co.uk - My site
Thanks again for all your help....it's getting there now!
Thanks,
Thanks,