latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Restrict bbPress forums based on date

Home Forums Community Forum Restrict bbPress forums based on date

This topic contains 1 reply, has 2 voices. Last updated by  Bruce 3 years, 8 months ago.

Topic Author Topic
Posted: Tuesday Apr 23rd, 2013 at 5:51 am #48164

Hi guys,

I need to restric access to forum pages (forum, theme, thread, reply) based on user’s registration date for a weekly course.

I’ve found this thread: http://www.s2member.com/forums/topic/a-few-questions-before-i-buy-the-pro-version/#post-13113 to be very useful but still not quite what I need.

My forum structure is like this:

Forums > Course > Week X > Threads for Week X

“Course” is a category Forum (only contains forums, not threads), and “Week X” is a regular forum (contains all threads for Week X an their corresponding replies).

I need any thread/reply belonging to the forum Week X to be only accesible for users whose registration date is at leas equal to X weeks, so users registered one week ago have access only to forums from Week 1, users registered three weeks ago have access to forums from weeks 1, 2 and 3, and so on.

The code in the topic I referred to is built around ccaps/levels and restricts access based on the oldest parent, not exactly what I need.

Could you please help? (I’ll be happy to pay someone to customize this code for me, I just don’t know anyone to do it)

List Of Topic Replies

Viewing 1 replies (of 1 total)
Author Replies
Author Replies
Posted: Tuesday Apr 23rd, 2013 at 7:38 pm #48229
Bruce
Username: Bruce
Staff Member

Thank you for your inquiry.

We can’t debug custom code, but I’d say the portion of this code you’re looking to edit is this line:

if (!is_page_permitted_by_s2member($int)) { // this is an s2member function. Check if the current user can access the $first_parent, via the stored page/post ID in the $int variable

You should need to replace the call to is_page_permitted_by_s2member() with something from this section of the docs:

Dashboard -› s2Member® -› API / Scripting -› Content Dripping

Could you please help? (I’ll be happy to pay someone to customize this code for me, I just don’t know anyone to do it)

That’s about as far as we can go with custom code. If you need further assistance, we recommend http://jobs.wordpress.net, http://elance.com/, http://odesk.com/, or another freelance web site where WordPress® experts are offering their expertise through a bid on your project.
Viewing 1 replies (of 1 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.