Drupal 6 + Permalink Module to show Comment ID in each comment


With Permalink module, I can have the real link to the comment. Without Permalink, the comment link will not work correctly with multiple comment pages.  It will always link you to the first page of that node (In this case, node 33034) if that comment you are looking for is not on the first page. The comment link will be like below :

  • Without Permalink -> http://www.bxtra.net/node/33034#comment-45673
  • With Permalink -> http://www.bxtra.net/comment/45673#comment-45673

Permalink is great but when it display the link, it will only show the word Permalink which is good but I also would like it to display the comment id which is #45673.  With Comment ID in each comment, user knows and can refer to the comment easily. It does not need to go into order start from 1 in every node. I want to use just the real Comment ID (cid) which is good enough.  However, I don't see anyway to do that via Permalink module.

What I did to make it works is to replace text in the Permalink variable ( $permalink) with the comment ID using str_replace. Then, print it out in the theme file comment.tpl.php.  Below is the small code to make it work :

    <?php $permalink_number = str_replace("Permalink", $comment->cid, $permalink); ?>
    <?php print '#'.$permalink_number; ?>


Software Tested :

  • Pressflow 6.26
  • Permalink 6.x-1.6
  • Zen Theme 1.2


As the great air con to be had in the marketplace, the Blaux Portable AC additionally has a superb charge, not to say it does the job of an air cleaner and air humidifier too. https://www.smore.com/utv4k-blaux-portable-ac-review-latest During these times of pandemic, the air excellent in houses is very critical, indivuals want to additionally experience comfortable inside the vicinity they’re spending their time in, something that excessive warmth doesn’t allow them to. More than this, the air humidity all through summertime may be very risky for the breathing system.

We have a confirmed Instagram marketing strategy to develop your Instagram follower base manifolds. Our services include each natural and paid sports to reinforce engagement and grow your fans. https://skfollowerspro.in We do a number of of factors for growing organic attain of your Instagram content material. It includes leveraging the hashtags and locating right target audience which are like minded and equipped to have interaction.

Add new comment

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.