Hello Md Belal,
There are two ways of updating this language phrase:
Method 1: If you're using a language pack, then update or add the language phrase 'recent_activity_title' to it; otherwise, the default value is defined in qa-include/lang/qa-lang-main.php:149.
- Pros: Quick solution
- Cons: It'll be lost after updating Q2A and/or your language pack
Method 2: Update the language phrase 'recent_activity_title' via plugin override, for example:
function qa_get_request_content()
{
global $qa_phrases_full;
// Load language file
qa_lang('main/recent_activity_title');
// Override 'recent_activity_title'
$qa_phrases_full['main']['recent_activity_title'] = $qa_phrases_full['main']['recent_qs_as_title'];
return qa_get_request_content_base();
}
- Pros: It'll be preserved after updates
- Cons: (1) It's a workaround; (2) it'll load that language file even when it isn't actually needed; (3) If updated with a string, instead of another language phrase, it'll show the same phrase, even after changing the language pack
As pointed out in this comment, it'll update both the page title and the page heading. However, if only the page title needs to get updated, a plugin layer will just do the trick:
<?php
class qa_html_theme_layer extends qa_html_theme_base
{
public function head_title()
{
// Template name: 'activity'
if ($this->template === 'activity' && empty($this->content['favorite'])) {
$backup = $this->content['title'];
// New title here
$this->content['title'] = qa_lang_html('main/recent_qs_as_title');
parent::head_title();
$this->content['title'] = $backup;
} else {
parent::head_title();
}
}
}
Tidbit
This customization can also be applied to other pages shown in the top navigation; it's a matter of finding the right language phrase, for example:
and/or finding the right template name:
- 'qa' for 'Recent questions and answers'
- 'questions' for 'Recent questions'
- 'hot' for 'Hot questions'
- 'unanswered' for 'Recent questions without answers'
- 'tags' for 'Most popular tags'
- 'categories' for 'Browse categories'
- 'users' for 'Top scoring users', 'Newest users', 'Special users', and 'Blocked users'
I hope this answer is helpful.