XF 2.2 Restrict viewing bb code to X number per month

sdchan

Member
I am looking for a way to restrict users from viewing the "Code" section in posts after X number of views per month. For example, is there a way to limit users (unless they pay to upgrade) to viewing only 10 code sections on all pages they view? Sort of like implementing a paywall (like nytimes or wall street journal), but only for the "code" section of the posts. This would have to work for both unregistered and registered users. However, if they are the creator of the thread or the post, they can view all code blocks within that thread with no restrictions (to encourage posting threads and to not penalize the original posters).
 

beerForo

Well-known member
Remove the code button for certain groups and use group promotion to move to the group with the code button.
 

Brogan

XenForo moderator
Staff member
Remove the code button for certain groups and use group promotion to move to the group with the code button.
That only removes the button from the editor - it doesn't prevent anyone manually entering the bb code.

However, in this case, the request is to prevent viewing the content of code blocks, so it's unrelated to the button.
 

sdchan

Member
Yes - restricting the viewing of the code block content. However, hopefully this can't be defeated by the user going into incognito mode or something similar.

Maybe I have to restrict viewing of code blocks to only registered members...
 

sdchan

Member
Could I hide code block viewing to registered members only? E.G. to view code blocks you must register at the site. And to view more than 10 code blocks a month you must upgrade...would that be a way to get around the CSS limitations?
 
Top