Comments

  • Overview

    There will be no surprises here.... its a comments module.... it lets people leave comments on stuff.

    When its enabled, stuff that can be commented on gets a box underneath it that looks like this:
  • screenshot of the comments box.
  • video overview of what the jrComments module does.
  • Adding a comments box to a template

    Below is the code that adds the comments box to the item_details.tpl file of the jrAudio module.

    Its just an example. If you want to add comments to any other module, it must be using a datastore to store its item details.

    Use that modules name in the module parameter and the profile_id that is displaying the item for the profile_id.

    The item_id is the id of the item being commented on.
    The profile_id is the profile id of the owner of the item being commented on.
    {* Comments *}
    {jrComment_form module="jrAudio" profile_id=$item._profile_id item_id=$item._item_id}
  • The {jrComment_form ...} is designed to be placed at the bottom of an item detail template page, on a profile. You don't want to use a comment form anywhere on the site - instead link to the unique item detail page for the item. This way everything about that specific item is available at 1, unique URL. If you must have comments at other locations, you'll have to build the comment form yourself in the template.
  • {jrComment_form}

    Function
    mixed {jrComment_form} (
    string module,
    int profile_id,
    int item_id,
    string template,
    string tpl_dir,
    string style,
    string class,
    ???? ????
    )
    parameter
    type
    default
    required
    description
    module
    string
    n/a
    on
    The name of the module that the comment is for.
    profile_id
    int
    n/a
    on
    The profile_id of the profile that owns this item.
    item_id
    int
    n/a
    on
    The item_id of the item that this comment is being left for.
    template
    string
    n/a
    off
    A template to use instead of the default one provided by /modules/jrComment/templates/comment_form.tpl
    tpl_dir
    string
    (active skin)
    off
    The directory to locate the template to use. Used in conjunction with the template parameter
    style
    string
    -
    off
    some CSS styling to add to the form.
    class
    string
    -
    off
    any extra CSS classes you wish to add to the form.
    ????
    ????
    -
    off
    any other parameters you want to pass in to the template.
    {jrComment_form module="......" profile_id="....." item_id="....." }

    a Smarty function to show an embedded comment form.
Zachary Moonshine
06 Nov 2015 01:33:17PM @zachary-moonshine:
so i have to put a specific item on a page and then set a comment box below it in order to activate comments on a custom page?
michael
20 Aug 2016 11:16:06PM @michael:
Please ask support questions in the forums: https://www.jamroom.net/the-jamroom-network/forum/new_posts

Share This

Tags