Hi All

I am using the core forum along with Advanced Forum along with some other modules including Flat comments. I have noticed that using Advanced Forum disables the default clickable property of the post (comment) subjects. Is there a way to revert to the default state thus making the subjects clickable? Additionally what part of the code do I have to change in order to change the text of the post anchors from "#2" to "Reply #2" for example?

Cheers

Comments

chillz’s picture

Ok I think I have solved both issues with a minor hack/work-around.

1. Disable the comment subject field for forums
2. Replace the following code in "/sites/all/modules/advanced_forum/advanced_forum.module"

$linktext = '#' . (($page_number * $post_per_page) + $post_number) ;

with

$post_subject = check_plain($variables['comment']->subject);
$linktext =  decode_entities($post_subject) . ' [' . 'Reply #' . (($page_number * $post_per_page) + $post_number) . ']';

"check_plain($variables['comment']->subject);" outputs a predefined subject from the "Flatcomments" module which is based on the original thread title. However, when this variable was used in its raw state, special html characters in the subject such as "'" (single quotes) were echoed as their undecoded values "'". Thus a post subject such as It's a test. would be displayed as It & # 0 3 9 ;s a test. (Note there are no spaces between the characters & to ;. The spaces were inserted because the code was being parsed resulting in single quote being displayed). The "decode_entities" function converts special html characters into their actual values.

This appears to work but it has not been thoroughly tested. I am still interested in finding a solution for making the Advanced Forums post subjects clickable. So if anyone has one I will be grateful for it.