Comment Location

Developer

Laisvunas

3rd Party (Commercial)
Current Version: 1.0

License Agreement

Buy Now!

$12.00
Qty:

EE Version Support

  • ExpressionEngine 1.x
  • ExpressionEngine 2

Compatibility

If an item is crossed out, it might be untested, not applicable or incompatible. Contact the developer to be sure.

  • Updater
  • Multi Site Manager
  • Stand Alone Entry Form
  • Low Variables
  • Content Elements
  • Better Workflow
  • Matrix
  • Grid
  • Webservice
  • Publisher

Requirements

  • jQuery for the Control Panel

Add-On Type(s)

Plugin

Tags

The Comment Location plugin allows you to find the page containing a certain comment and to redirect to that page. It supports pagination, and can be used together with en extension which scrolls to the last comment but does not support pagination, such as Matthew Pennell’s Scroll to Comment extension.

Also it can be used to support linking directly to comments, for example when someone
wants to link to certain article’s comment #48 which is on second page out of five comment pages,
he will be able to use such link as http://mysite.com/index.php/template_group/template/url_title/#comment_511/
and plugin will redirect to the page which contains needed comment.
 
 
PARAMETERS

1) per_page - Required. Allows you to specify how many comments are displayed on the
page. The value of this parameter MUST BE the same as the value of “limit”
parameter of exp:comment:entries tag.

2) prefix - Optional. Allows you to specify the prefix used in URL segment to identify
certain comment.

3) comment_id - Optional. Allows you to specify comment_id of certain comment.

Either “prefix” or “comment_id” parameter must be defined.

4) sort - Optional. Allows you to specify how comments are sorted. The value of this parameter
MUST BE the same as the value of “sort” parameter of exp:comment:entries tag. Possible values
are “asc” and “desc”. Default is “desc”.

5) orderby - Optional. Allows you to specify how comments are ordered. The value of this parameter
MUST BE the same as the value of “orderby” parameter of exp:comment:entries tag. Default
value is “date”. Parameter accepts the same values as “orderby” parameter of exp:comment:entries tag.


VARIABLES

1) c_location_current_pagination_number - outputs pagination number of currently opened page (i.e. of the
page before redirect is performed). In case the page has no pagination segments, its pagination number is “0”.

2) c_location_pagination_number - outputs pagination number of the page in which needed comment is
present. In case the page has no pagination segments, its pagination number is “0”.

3) c_location_comment_id - id number of the needed comment.

4) c_location_entry_id - entry id of the entry needed comment is posted to.

5) c_location_weblog_short_name - channel/weblog short name of the entry needed comment is posted to.

6) c_location_total_comments - total number of comments posted into entry.

7) c_location_absolute_count - absolute count number of the needed comment
including comments on previous pages (if using pagination).

8) c_location_count - count number of the needed comment on the page needed comment is displayed.
If five comments are being displayed per page, then for the fourth entry on the page
the {c_location_count} variable would have a value of “4”.

9) c_location_current_page - number of page in which needed comment is displayed.

10) c_location_total_pages - total number of comment pages.

11) c_location_pagination_segment - outputs pagination segment of the page in which
needed comment is located. E.g. if pagination segment is “P50” then this variable
will output “P50/”. If there is no pagination, then this variable will output an empty string.

12) site_url - outputs the same as ExpressionEngine’s “site_url” variable.

13) homepage - outputs the same as ExpressionEngine’s “homepage” variable.

14) c_location_redirect has required parameter “location”. Redirects to location which
is specifies as the value of this parameter. This variable is parsed after any other
variable of this plugin. That means that any variable can be used inside parameter.


EXAMPLE OF USAGE

On top (i.e. before any other code) of the template in which there is exp:comment:entries tag
place the code as this:

{exp:c_location per_page="30" prefix="#comment_" sort="asc"}
{if c_location_comment_id != "" AND c_location_pagination_number != c_location_current_pagination_number}
{c_location_redirect location="{homepage}/{segment_1}/{segment_2}/{segment_3}/{c_location_pagination_segment}#comment_{c_location_comment_id}/"}
{/if}
{/exp:c_location}

Comment Location Links

This entry was created August 25, 2009, 11:37 am.
This entry was last updated August 29, 2011, 12:37 am.

Disclaimer: Information about ExpressionEngine add-ons is provided as a service to you, the user, and every member of the ExpressionEngine community. devot:ee is not responsible if you hose, mangle, wreck, or otherwise destroy your EE website by installing an add-on that you found out about at this site, regardless of its rating, Favorites status, commercial or free status, or general popularity. Caveat EEmptor!

Returns: devot:ee has a 30-day return policy on all commercial add-ons sold through devot-ee.com. If you need to return an add-on, do not go to the developer or the developer's site, but rather visit our returns page at https://devot-ee.com/returns to initiate your return. If you have questions, email support@devot-ee.com.

There are no reviews for this add-on yet.

What are you waiting for? Rate it and review it!