Example #1
0
 /**
  * Generate permalink to this comment.
  *
  * Note: This actually only returns the URL, to get a real link, use Comment::get_permanent_link()
  *
  * @param string glue between url params
  * @param string Anchor for meta comment
  */
 function get_permanent_url($glue = '&', $meta_anchor = '#')
 {
     $this->get_Item();
     if ($this->is_meta()) {
         // Meta comment is not published on front-office, Get url to back-office
         global $admin_url;
         if ($meta_anchor == '#') {
             // Use default anchor:
             $meta_anchor = '#' . $this->get_anchor();
         }
         return $admin_url . '?ctrl=items' . $glue . 'blog=' . $this->Item->get_blog_ID() . $glue . 'p=' . $this->Item->ID . $glue . 'comment_type=meta' . $meta_anchor;
     } else {
         // Normal comment
         return $this->Item->get_single_url('auto', '', $glue) . '#' . $this->get_anchor();
     }
 }
Example #2
0
 /**
  * Generate permalink to this comment.
  *
  * Note: This actually only returns the URL, to get a real link, use Comment::get_permanent_link()
  *
  * @param string glue between url params
  */
 function get_permanent_url($glue = '&')
 {
     $this->get_Item();
     $post_permalink = $this->Item->get_single_url('auto', '', $glue);
     return $post_permalink . '#' . $this->get_anchor();
 }
Example #3
0
 /**
  * Generate permalink to this comment.
  *
  * Note: This actually only returns the URL, to get a real link, use Comment::get_permanent_link()
  */
 function get_permanent_url()
 {
     $this->get_Item();
     $post_permalink = $this->Item->get_single_url('auto');
     return $post_permalink . '#' . $this->get_anchor();
 }