Get HitCounter to show CGBlog images in results?

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
pwg
Forum Members
Forum Members
Posts: 191
Joined: Tue Aug 01, 2006 1:48 am

Get HitCounter to show CGBlog images in results?

Post by pwg »

Hi,

With some help from Jo Morg, (thanks gain) I'm using Hitcounter to give me a list of the most viewed blog posts in CGBlog.
http://forum.cmsmadesimple.org/viewtopi ... =7&t=72526

I'm wondering if it is possible for the results to also include thre blog image?

I tried adding an extra key2=$entry->image to the detail template and calling this in the {HitCounter action=popular key1='CGBlog' key2={$main_image} key3=$entry->id limit="6" popular_template="test"}
but no go.

Any suggestions? Any help really appreciated.

Cheers,

Paul
nikkio
Forum Members
Forum Members
Posts: 63
Joined: Sun Jun 08, 2008 12:34 pm

Re: Get HitCounter to show CGBlog images in results?

Post by nikkio »

Hi!

i've made a popular template in Hitcounter like this:

Code: Select all

{foreach $popular as $linkdefn}
{capture append="ids"}
{$linkdefn->id}
{/capture}
{/foreach}
{foreach $ids as $idblog}
{CGBlog action="detail" detailtemplate="btv_popolari" articleid="{$idblog}"}
{/foreach}
hope it helps :)

.nikkio
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: Get HitCounter to show CGBlog images in results?

Post by velden »

At the time the question was asked the id property wasn't implemented yet for CGBlog.

Developer was so kind to implement it on request.
http://dev.cmsmadesimple.org/feature_request/view/10501

Why are you looping twice? Seems not very efficient, capture doesn't help either nor does the tag inside the tag (...cleid="{$idblog}"}):

Suggestion:

Code: Select all

{foreach $popular as $linkdefn}
{CGBlog action="detail" detailtemplate="btv_popolari" articleid=$linkdefn->id}
{/foreach}
nikkio
Forum Members
Forum Members
Posts: 63
Joined: Sun Jun 08, 2008 12:34 pm

Re: Get HitCounter to show CGBlog images in results?

Post by nikkio »

Thank you Velden for the suggestion!
I'm new to this and I'm here to learn :)

.nikkio
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: Get HitCounter to show CGBlog images in results?

Post by velden »

nikkio wrote:Thank you Velden for the suggestion!
I'm new to this and I'm here to learn :)

.nikkio
Sure, you're welcome.
Post Reply

Return to “Modules/Add-Ons”