The proxy contains several customization options.
You can select between showing only approved comments and showing both unmoderated and approved comments. In Media Factory you can choose to approve to deny comments. Denied comments will never appear on the front end.
define('DISPLAY_UNMODERATED_COMMENTS', true); |
If you only want members who are logged in to comment, you can turn off anonymous comments.
define('ALLOW_ANONYMOUS_COMMENTS', true); |
If you don't want to show the login box, you can turn it off
define('DISPLAY_LOGIN_FORM', true); |
And if you don't want to display the register form, that can be turned off too.
define('DISPLAY_REGISTER_FORM', true); |
If you want to better organize your comments, you'll want to put them in a channel inside of Media Factory. Once you or your Multimedia Comments provider creates the channel, change a setting in the proxy.php file. On approximately line 27, change the zero in the follow code to the channel ID
define('COMMENT_CHANNEL',0); |
The Multimedia Comments Application has tons of customizable options. Simply add the property and value pair to your settings object to customize your comments. Heres an example on how to add a ajax pager to your comments and limit the number of comments per page to 5.
<script type="text/javascript"> jQuery(document).ready(function() { jQuery.noConflict(); var settings = { element : 'commentWrapper', proxy : '/proxy.php', vhost : 123, pager : true, pagerAjax : true, pageSize : 5 } fm.comments.init(settings); }); </script> |
The following is a list of property and possible value pairs. If you wish to build a customized version and have all this code generated for you, visit our Multimedia Comments Demo page. Hit the options tab in the top right and play around with the settings. Once you have a version you like, hit the 'source' tab to grab the JavaScript.
property | default | possible values | notes |
---|---|---|---|
element | string | This must the 'id' attribute value of the element where you want the comments to be displayed. | |
externalId | [current url] | unique string or unique number | This must be unique for each set of comments (parent item). By default, it uses the current page URL. However, if you have a multi page article, use article ids or wish to use another way of identifying the current page, you can enter a unique string or number here. |
externalTitle | [current url] | string | This will be the title of the parent item inside Media Factory |
externalUrl | [current url] | string | The URL of the page that include this set of comments. |
proxy | proxy.php | [path to your proxy] | This file communicates with Filemobile. The path needs to be correct in order for MMC to work |
vhost | '123' | The vhost id we provide you. | This id must be correct in order for MMC to work |
wid | null | valid Media Factory widget id, null | The video player can be customized inside Media Factory (brand logo, colours etc). If you use a custom video player, put that widget id here. |
disableComments | false | false, true | Disables the users ability to submit comments. All previous comments will still appear. |
enableUpload | true | true, false | Disables the users ability to upload files. |
style | 2 | 1, 2, 3, 4 | The comment layout style. |
pageSize | 10 | int > 0 | The number of comments per page. |
profiles | false | [url to profile page], false | Clicking on the commenter's name or avatar will direct the user to the profile page provided. Only available with Media Factory users. |
avatar | true | true, false | Shows a users avatar, true, or hides the user's avatar, false. |
defaultAvatar | http://www.filemobile.com/static/1/images/global/male.gif | [full url to an image] | Show this avatar if the user doesn't have one. |
loadingIcon | http://www.filemobile.com/static/mmc/images/loading.gif | [full url to an image] | Display this image anytime something is loading (new comments, adding a comment, etc) |
exactDate | false | true, false | Display exact dates (Jan/02/10), true, or display relative dates (3 minutes ago), false |
longDate | true | true, false | When displaying the exact date, show day of week/day/month/ year/hour/minute/second. |
liking | true | true, false | Display the like button and number (true) or hide them (false) |
likingInline | true | true, false | Display the like button inline with the rest of the comment (just like Facebook). |
likingShowValue | true | true, false | Show the number of likes. |
sort | upload DESC | 'upload DESC', 'upload ASC', 'votecount DESC' | The order the comments will be displayed |
sortSelect | true | true, false | Show or hide the sort select box that will allow users to dynamically sort the comments. |
report | report.php | false, [path to report.php] | Set to false if you don't want users to report comments, or set it to the location of the report.php file |
reportFade | false | true, false | Automatically fade out the report box after reporting a comment |
maxLengthNumber | false | false, int > 0 | Set to false to turn off maximum number of characters per comment. Or set it to a number, the max length. |
maxLengthDisplay | true | true, false | Display how many characters have been user or how many characters are remaining. |
maxLengthCountdown | true | true, false | Toggle displaying the remaining characters. commentLength also needs a value. |
pager | false | true, false | Show a pager instead of the "More Comments" button. |
pagerAjax | false | true, false | If you want a pager and don't want the pager to refresh the page, set this to true. If you want the page to refresh, set it to false. |
pagerLimit | 2 | int > 0 | The number of page links displayed on either side of the current page |
pagerShowPrevNext | true | true, false | Show or hide the previous page and next page links |
pagerShowFirstLast | true | true, false | Show or hide the first page and last page links |
pagerShowNumbers | true | true, false | Show or hide the number links |
pagerCenter | true | true, false | Horizontally enter the pager |
webcam | false | true, false | Show or hide the webcam uploader for logged in users |
scroll | true | true, false | Scroll to the top of the comments list when loading more comments with the pager. |
scrollDuration | 0 | int >= 0 | The time it takes to get to the top of the comments list, in milliseconds. |
rating | true | true, false | Turn on or off the rating widget (you may also want to remove the rating HTML). |
ratingEmptyStar | http://www.filemobile.com/static/mmc/images/empty.png | full url to an image | Path to blank rating image |
ratingFullStar | http://www.filemobile.com/static/mmc/images/full.png | full url to an image | Path to active rating image |
logHit | false | true, false | Log a hit on the parent media in Media Factory every time the MMC app is initialized. |
showUsername | true | true, false | Show the username next to their comment |
showFirstName | false | true, false | Show the user's first name next to their comment |
showLastName | false | true, false | Show the user's first name next to their comment |
imageTranscoder | 14 | int | The transcoder ID to use for displaying images |
videoTranscoder | 21 | int | The transcoder ID to use for displaying videos |
videoPlayerWidth | 320 | int | The width of the video player |
videoPlayerHeight | 240 | int | The width of the video player |
layout | ['header','comments','more','add'] | array | The display order of the commenting sections. You are free to reorganize the array to display a different layout or even remove an section if needed. |