Skip to:

[Tip] Permalink to flagged comments not correct

  • David Hunt


    I found that this plugin does not generate the correct permalinks to flagged activity comments; the links in the emailed notifications were resulting in 404 errors.

    This is because comments do not, themeselves, have a single page archive. The closest we can get is to open the activity page and jump to the ID of the relevant comment.

    If you want to fix this bug, open bpModActions.php and locate the line:
    `$cont->item_url = $info[‘url’];`.

    Straight after it, add this:
    `if ($cont->item_type == ‘activity_comment’) {
    $cont->item_url = substr_replace($cont->item_url, $cont->item_id2, -(strlen($cont->item_id)+1));
    $cont->item_url .= ‘/#acomment-‘.$cont->item_id;

    There might be a more elegant way to do this, but so far it works for me.

    To fix other bugs in this plugin to help it work with BP 1.6+, see these two other support thread:

  • The topic ‘[Tip] Permalink to flagged comments not correct’ is closed to new replies.
Skip to toolbar