I am using the Forum module in Drupal 7. I want to change "Topic"
with "foo"
, for example, in the General discussion forum page.
Where did I search for this
I did check the template in the forum module file and for this page it is
forum-topic-list.tpl.php
. There I found that, it is printed by following code,<thead> <tr><?php print $header; ?></tr> </thead>
And in the description, the following statement has been provided.
Available variables:
- $header: The table header. This is pre-generated with click-sorting information. If you need to change this, see
template_preprocess_forum_topic_list()
.
Hence, there is nothing called "Topic" which I can just change as this header coming from the $header.
Now, I did check
template_preprocess_forum_topic_list()
but it does not have provision to Change "Topic" string.- $header: The table header. This is pre-generated with click-sorting information. If you need to change this, see
Lastly, I did check the forum.module where I found the following function starting at line 914.
function forum_get_topics($tid, $sortby, $forum_per_page) { global $user, $forum_topic_list_header; $forum_topic_list_header = array( NULL, array('data' => t('Topic'), 'field' => 'f.title'), array('data' => t('Replies'), 'field' => 'f.comment_count'), array('data' => t('Last reply'), 'field' => 'f.last_comment_timestamp'), );
Now, in the above function you can see
t('Topic')
. I could simply replace it witht('foo')
, but I think this is not the right way.
Any suggestion, how can I override this? Thanks.