gigya ~ Comments plugin ~ default templates?

654 Views Asked by At

According to the gigya Comments plugin developer documentation..

A template is a layout definition for a group of related graphics elements in the plugin. The plugin includes five customizable templates. You may assign each template with an HTML string that redefines its graphic layout. The 'templates' parameter of the socialize.showCommentsUI method receives an object with the following fields:

  • comment
  • commentBox
  • loginCanvas_loggedIn
  • loginCanvas_loggedIn_guest
  • loginCanvas_loggedOut
Each of the fields is a customizable template. Each field has a default value that you may override. In the following ...

What are the default values of those templates?

1

There are 1 best solutions below

0
On

as you can see in this example:

http://wikifiles.gigya.com/Socialize/CommentsUI_Example_Templates.htm

you just build html templates, assign them to a json object and pass them to the gigya comments function as part of the params:

var templates = {

    commentBox: '<span style="color:blue;">This is the Login Canvas: </span><br>$loginCanvas<br><br>' +

                '<span style="color:blue;">This is the Close Icon: </span>$closeIcon<br>' +

                '<span style="color:blue;">This is the Add Comment text box: </span>$addComment',

    comment:'Hello!<br>' +

            '<span style="color:blue;">This is the username: </span>$username<br>' +

            '<span style="color:blue;">This is the Photo Div: </span>$photoDiv<br><br><br>' +

            '<span style="color:blue;">This is the Date String: </span>$dateString<br>' +

            '<span style="color:blue;">This is the Comment Body: </span>$body<br>' +

            '<span style="color:blue;">This is the Replies Count: </span>$repliesCountPlaceholder<br>' +

            '<span style="color:blue;">This is the Reply Button: </span>$replyButton<br><br>' +

            '<span style="color:blue;">This is the Flagging option: </span>$flag<br>' +

            '<span style="color:blue;">This is the Voting option: </span>$vote<br><br>',

    loginCanvas_loggedIn: '<span style="color:blue;">Login Canvas - Logged in state! </span><br>$photoDiv<br>$username<br>$logoutLink',

    loginCanvas_loggedIn_guest: '<span style="color:blue;">Login Canvas - Guest user state! </span><br>$photoDiv<br>$username<br>$logoutLink',

    loginCanvas_loggedOut: '<span style="color:blue;">Login Canvas - Logged Out state!<br></span>$photoDiv<br>$loginDropdown<br>$guestDropdown'

}



var params =

{

    // Required parameters:

    categoryID: 7623701,

    containerID: 'commentsDiv',



    // Optional parameters:

    templates: templates,

    streamID: 'foo6',

    cid: ''

}

// Load the Comments Plugin

gigya.socialize.showCommentsUI(params);