0

I'm trying to find a way to show a simple entry count for the logged in member, which is limited by channel. I would be using this in a conditional to change the action of a link depending on how many entries they've posted to that channel. Something like this:

{if member_group == '8' && {MY_ENTRY_COUNT channel="directory"} > 1}{/if}

The only plugin I can find is this one: https://github.com/websecret/number_member_entries

But it doesn't work right to limit by channel - looks like its channels parameter is setup to list channel ID's instead of short names, but I don't think channels even have IDs.

If it makes any difference I'm using Solspace User, but that only appears to have a simple entry_count variable that can't be limited by channel.

Anyone know how else to get a count like this that could be used in an advanced conditional?

2
  • 2
    Every channel has an id. If you navigate to the channel area in the CP and hover over a channel youll se the id in the link of your browser. Mar 18, 2014 at 10:09
  • Never noticed they had an ID. I guess you learn something new every day! Mar 18, 2014 at 18:56

2 Answers 2

1

The Number member entries plugin looks like it should do the trick.

Channels do have a channel_id, but I can't find it in the EE control panel easily. You could count the number of channels down from the top of your Channels list (under Admin > Channel Administration > Channels). You could also use the Developer Info add-on to find the channel_id.

{if member_group == '8'}
  {if {exp:number_member_entries:count channels='1'} > 0}
    Yep, there are entries!
  {if:else}
    No entries here.
  {/if}
{/if}
1
  • Thanks to Alex and everyone else who pointed out that channels do have ID numbers. I've managed to get it working with code similar to above now that I found the appropriate channel ID. Mar 18, 2014 at 21:10
0

I check this plugin it's very useful for me , so I edit it to accept channel short name in channels param.

you can download the new version here:

https://github.com/ahmad-saad/number_member_entries

Regard's.

1
  • Thanks Ahmad. I was hoping someone more savvy than me would update that plugin to allow channel names.
    – Alex Roper
    Mar 18, 2014 at 22:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.