DEPRECATION WARNING

This documentation is not using the current rendering mechanism and is probably outdated. The extension maintainer should switch to the new system. Details on how to use the rendering mechanism can be found here.

Reference

This extension provides the following configuration options.

Main configuration

Following properties live under plugin.tx_community.settings

loginPage

Property

loginPage

Data type

int (page id)

Default

{$plugin.tx_community.settings.loginPage}

profilePage

Property

profilePage

Data type

int (page id)

Default

{$plugin.tx_community.settings.profilePage}

editProfilePage

Property

editProfilePage

Data type

int (page id)

Default

{$plugin.tx_community.settings.editProfilePage}

messagePage

Property

messagePage

Data type

int (page id)

Default

{$plugin.tx_community.settings.messagePage}

threadedMessagePage

Property

threadedMessagePage

Data type

int (page id)

Default

{$plugin.tx_community.settings.threadedMessagePage}

galleryPage

Property

galleryPage

Data type

int (page id)

Default

{$plugin.tx_community.settings.galleryPage}

searchPage

Property

searchPage

Data type

int (page id)

Default

{$plugin.tx_community.settings.searchPage}

relationPage

Property

relationPage

Data type

int (page id)

Default

{$plugin.tx_community.settings.relationPage}

wallPage

Property

wallPage

Data type

int (page id)

Default

{$plugin.tx_community.settings.wallPage}

afterAccountDeletePage

Property

afterAccountDeletePage

Data type

int (page id)

Default

{$plugin.tx_community.settings.loginPage}

debug

Property

debug

Data type

1 or 0

Description

Set debug mode for community, e.g. flash messages will containg some debug information

Default

0

flashMessagesDisplayer.where

Property

flashMessagesDisplayer.where

Data type

jQuery like CSS selector e.g. #elementId.elementClass

Description

css-like path to the element, which will be prepended with flash messages this selector will be used by jQuery

Default

body

Profile settings

Following configuration lives under plugin.tx_community.settings.profile

image.maxWidth

Property

image.maxWidth

Default

300

image.maxHeight

Property

image.maxHeight

Default

300

image.prefix

Property

image.prefix

Default

uploads/tx_community/photos/

image.types

Property

image.types

Description

List of allowed image extensions

Default

jpeg,jpg,png,gif

image.defaultImage

Property

image.defaultImage

Description

File used when user doesn't have any profile image.

Default

EXT:community/Resources/Public/Images/defaultProfileImage.png

reasonForReportRequired

Property

reasonForReportRequired

Data type

1 or 0

Description

Determines if textfield for typing reason for reporting a profile should be displayed.

Default

1

details.showDetails

Property

details.showDetails

Description

Sets which user's profile details should be visible on profile page.

Default

username,gender,dateOfBirth,politicalView,religiousView,activities,int erests,music,movies,books,quotes,aboutMe,address,city,zip,country,www, cellphone,phone,email

Relationship settings

Following settings live under plugin.tx_community.settings.relation

request.allowMultiple

Property

request.allowMultiple

Description

if set to 1 then relationship request is allowed even if it was once rejected

Default

1

Album settings

Following settings live under plugin.tx_community.settings.album

image

Property

image

image.prefix

Property

image.prefix

Default

uploads/tx_community/photos/

image.types

Property

image.types

Default

jpeg,jpg,png

image.maxSize

Property

image.maxSize

Description

Maximal file size in bytes

Default

1000000

unknownAlbumMainPhoto

Property

unknownAlbumMainPhoto

Description

the image we see on list of albums when we have no access to album

Default

EXT:community/Resources/Public/Images/unknownAlbumMainPhoto.png

dafaultAlbumMainPhoto

Property

dafaultAlbumMainPhoto

Description

the image we see on list of albums when there are on images in album

Default

EXT:community/Resources/Public/Images/defaultAlbumMainPhoto.png

Mapping controller actions to resource names

This array is used to map controller action name to resource name. Resource name is used in access control – see plugin.tx_community.settings.accessRules

Thanks to that, multiple controller actions can be bound to one resource name.

Example:

plugin.tx_community.settings.accessActionResourceMap
{
   Message {  // message controller
           write = message.write
           //both “write” and “send” actions are bound to “message.write” resource name
           send = message.write
   }
   User {  //User controller
           image = profile.image   //image action
   }
}

Access configuration

public

Property

public

Description

Guests (not logged in), and requested user not set

nobody

Property

nobody

Description

Settings for guests (not logged in users), requested user is set

other

Property

other

Description

Logged in user, but not a friend

friend

Property

friend

Description

Friend

By default user is able to change everything on his own profile, so there are no settings for this case.

Example:

plugin.tx_community.settings.accessRules.accessRules
{
        nobody {
               profile.image.access = 1     //not logged in user has access to see profile image
                //”profile.image” resource name is the same as in accessActionResourceMap above
               utils.access = 1     //and flash messages
               access = 0             //by default has no access (whitelist approach)
        }
        //logged in user has access to the same things as “nobody” plus some additional rules defined below
        other < plugin.tx_community.settings.accessRules.nobody
        other {
            access = 0
            user.search.access = 1
            user.searchBox.access = 1
            profile.menu.access = 1
        }
}

Notification service configuration

Following configuration live under plugin.tx_community.settings.notification

templateRootPath

Property

templateRootPath

Description

Path for email templates.

Default

EXT:community/Resources/Private/Templates/Notification/

layoutRootPath

Property

layoutRootPath

Default

EXT:community/Resources/Private/Layouts/

partialRootPath

Property

partialRootPath

Default

EXT:community/Resources/Private/Partials/

defaults

Property

defaults

Default

Default setings for notification

defaults.handler

Property

defaults.handler

Description

Default handler, can be overridden in specific rule

Default

Tx_Community_Service_Notification_MailHandler

defaults.serverEmail

Property

defaults.serverEmail

Default

{$plugin.tx_community.serverEmail}

rules

Property

rules

Description

Array of notification names and configuration

Example:

plugin.tx_community.settings.notification.notification
{
      rules {
         RelationRequest {
                // naming convention: ControllerActionName
               10 {
         // array of notification handlers – it is possible to send multiple
         // notifications after some
      //action, e.g. notify by email, by private message and wall post
               handler = Tx_Community_Service_Notification_MailService     //notification handler class name
                template = RelationRequest        //template name ( "html" extension will be appended )
                }
        }
         #admin notification about bad profile
        userReport {
                10 {
                        template = UserReport
                        recipient = {$plugin.tx_community.adminEmail}
                        //recipient email address
                        overrideRecipient = 1
                        // instead of using reported user email, we are  sending this report
                        // to community administrator
                        replyToSenderUser = 1
                        // send copy of the email to user who filed the report
                }
        }
}

Variables assigned to all views

Community by default passes several variables to all views (this is done in BaseController in initializeView method). So you don't have to pass these objects in your controller actions.

requestedUser

Variable name

requestedUser

Description

User which e.g. profile we want to see

requestingUser

Variable name

requestingUser

Description

Logged in user who is accessing the page

relation

Variable name

relation

Description

Relation between requestedUser and requestingUser