Can I add more roles and more child types?

8 views
Skip to first unread message

J. S.

unread,
Oct 27, 2011, 8:42:01 PM10/27/11
to event...@googlegroups.com
Kunal,
It's been a while since you shift focus to PressTest. Any new release for EventPress in near term?
I've learned a lot from your codes and made some nice implementations. But seems I hit my limitations now--

1. I want to create 2 more roles for ep-event, and limit each role's cap to one category. 

2. I want to create 2 more child type for ep-event, if ep category is A,  then use child A, if ep category is B, then use child B.

Is this posible? If not posible, any work around?

The reason for my crazy idea is to extend ep like this:
Super Admin can create some intermal administration events-- this will need ep-log as child, people can log many times;
Clients can create some commercial events-- this will still use ep-reg as child, people can register once only;
If the roles and chidl types are solved, I think I can handle the querry.

By the way, I'm not sure if ep support completely moved to google groups. If it's so, I'd suggest a notes or link in old places to guide traffic :-)

Kunal Bhalla

unread,
Oct 29, 2011, 3:46:00 PM10/29/11
to event...@googlegroups.com
Hi

Can't promise on a new release at the moment as I've been having a bit
of trouble with my visa/starting my 1st job; and the dates for that
are still not finalized. I have started work on the new version;
though. I've just been working on really base level stuff at the
moment; a general wrapper for custom post types, syntactic sugar for
adding hooks, easier admin pages, a generalized configuration creator,
etc.

You'll have to check out how capabilities are mapped in custom post
types, and modify that filter accordingly. Justin Tadlock's post [1]
might be a good starting point, followed by reading the actual code in
WP implementing that.

Regarding the child types -- there is nothing in WP that makes sure
that post descendants are of a certain type. You'll have to modify a
lot of code to carry this out -- for custom types of child posts based
on the category of the parent post. I don't think this will be
possible without modifying EventPress code directly, though.

Your best bet would be to see how registration works at the moment,
and duplicate and split the code at that point itself, forking into
two paths based on the category. You can generalize that, if required
into mapping multiple categories to multiple post types if you think
that would be required at some other point.

A slight warning, though: the next version of EP is going to be a
complete rewrite from the ground up, whenever it is released.

Kunal

[1] http://justintadlock.com/archives/2010/07/10/meta-capabilities-for-custom-post-types

Jenny.S

unread,
Oct 29, 2011, 8:22:44 PM10/29/11
to event...@googlegroups.com
Kunal,
Thanks for helping! I will follow your advivse and see what I get.
Thanks for the warning of  next  BPCP and EP. I can work on small peices while waiting for the big suprise :-)

Congrates on your first job! I heard it's a big one with a big name.
Wish all the greenlights shinning on your way!
Reply all
Reply to author
Forward
0 new messages