In the theme we're using there are no links to "Unread posts" and "New replies" in the header.
So I would like to add them to /profile
Would anybody be able (and be so kind) to tell me how I can achieve this?
Any help is very much appreciated!
Where in the profile? Perhaps show a screencap of the desired location?
The links in themselves are easy.
Basically add these links where you want them.
<a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a>
<a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a>
I've added a screenshot of how it looks right now.
I think between Show Posts and Show Stats would be perfect.
What theme is that? :)
In Curve, I think you could do this
In profile.template.php
FIND
echo '
<a href="', $scripturl, '?action=profile;area=showposts;u=', $context['id_member'], '">', $txt['showPosts'], '</a><br />
<a href="', $scripturl, '?action=profile;area=statistics;u=', $context['id_member'], '">', $txt['statPanel'], '</a>
</p>';
REPLACE WITH
echo '
<a href="', $scripturl, '?action=profile;area=showposts;u=', $context['id_member'], '">', $txt['showPosts'], '</a><br />
<a href="', $scripturl, '?action=unread">', $txt['unread_since_profile'], '</a><br />
<a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_rep_profile], '</a><br />
<a href="', $scripturl, '?action=profile;area=statistics;u=', $context['id_member'], '">', $txt['statPanel'], '</a>
</p>';
Then add to modifications.english.php
$txt['unread_since_profile'] = 'Unread topics';
$txt['show_unread_rep_profile'] = 'Unread replies';
The theme is our own, based on bootstrap (can be seen in action here (https://www.applezone.nl)).
I put your first code in Profile.template.php of Themes/default/ and the second bit of code in Themes/default/languages/Modifications.english-utf8.php.
But both "unread_since_profile" and "show_unread_rep_profile" show as black (instead of the normal red) in the editor and the site throws the following error when I try to open the Profile-page:
syntax error, unexpected '/'
Would it help if I attached some of those files here?
I could look at them, specifically both of the mentioned files - They should be correct,
and I did try those codes on the original files and didn't notice anything off.
Both included with this post.
Thanks, it'll take about an hour or so before I'm back at the keyboard, but I'll get back to you. :)
I'm so sorry, I made a typo in my original code here. I left out one small '
The edit to profile.template should be this:
echo '
<a href="', $scripturl, '?action=profile;area=showposts;u=', $context['id_member'], '">', $txt['showPosts'], '</a><br />
<a href="', $scripturl, '?action=unread">', $txt['unread_since_profile'], '</a><br />
<a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_rep_profile'], '</a><br />
<a href="', $scripturl, '?action=profile;area=statistics;u=', $context['id_member'], '">', $txt['statPanel'], '</a>
</p>';
Your modifications.english-utf8 seems fine to me. :)
Yes, that did the job!
You're my hero!!! ;D ;D ;D
You are welcome :)