Gossamer Forum
Quote Reply
ExtraStats Loops
If wanting to use different layouts on other pages, can loops be used so as not to be reliant the 1 template for the layout.

<%Plugins::ExtraStats::TopDaily('10')%>

If so, how with the above?

--------------------------------
Privacy Software
Quote Reply
Re: [BLOOD] ExtraStats Loops In reply to
Sorry - something I've been meaning to fix for a long time.
I'll have a look at this now.

Laura.
The UK High Street
Quote Reply
Re: [BLOOD] ExtraStats Loops In reply to
OK - I've added this in now. If you want to use a loop you need to add 'loop' as the last option in the tag. (I wanted to do it this way so that anyone currently using the plugin would not have to change anything).

Note that 'last' is a different number in each case so you need to leave spaces to allow for each option you are leaving as default. As an example, if you are currently using

<%Plugins::ExtraStats::TopDaily('10')%>

then to use a loop you will need

<%Plugins::ExtraStats::TopDaily('10',,,'loop')%>

to allow the sort order and date to take the default values. You will need an extra space in the Monthly tags to allow for sort order, month and year default values and one more in the Links in a Category lists to allow for 'SUBCATS'. I hope this makes sense!

If you do use loop, this tag will not return anything. To get the output you will need for example

<%loop DailyLoop%>
<li><%Title%> ...
<%endloop%>

after the tag. The names of the loops are on the tags page.

Please let me know if any of this is not clear.

Laura.
The UK High Street
Quote Reply
Re: [afinlr] ExtraStats Loops In reply to
So far so good.

I couldn't get subcats to work before or after this though - maybe a bug?

Can you check this on your copy?

<%Plugins::ExtraStats::CatTopMonthly($ID,'10','A','SUBCATS')%>

The top cat has no links but has several clicked links in subcategories below.

Result: No links have been clicked on yet.

On the subcats page where several links have clicks recorded:
Result: No links have been clicked on yet.

--------------------------------
Privacy Software
Quote Reply
Re: [BLOOD] ExtraStats Loops In reply to
The problem is that you need to put the options in exactly the right place to get them to work.

<%Plugins::ExtraStats::CatTopMonthly($ID,'10','AU',,,'SUBCATS')%>

You need the extra commas to make sure that the 'SUBCATS' option is after values for month and year - at the moment your tag thinks that the month is 'SUBCAT' which is why you're getting no results.
Quote Reply
Re: [afinlr] ExtraStats Loops In reply to
Of course, that's great.

Perhaps a note about this in the tags doc so folks like me don’t keep forgetting Blush

--------------------------------
Privacy Software
Quote Reply
Re: [BLOOD] ExtraStats Loops In reply to
Will do - it's all getting a bit complicated!