Jump to content

Developer Documentation

Anonymous Content

Throughout the IPS Community Suite, content items can be posted as anonymous.

 

Implementing page view tracking

First, you need to implement the Anonymous interface in your content item model, like so:

implements \IPS\Content\Anonymous

Next, add a is_anon and last_comment_anon key to your $databaseColumnMap, with the value being the name of the database column that stores the bit.

 

To determine if a content item or comment was posted anonymous, you can use the new Item::isAnonymous() method.

Also Item::author() will return a guest object for anonymous content!


  Report Document


×
×
  • Create New...