Uutiset:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu
Advertisement:

the "show replies to your posts" function

Aloittaja AndyK, maaliskuu 16, 2008, 11:40:32 AP

« edellinen - seuraava »

AndyK

Is it posible to use the "show replies to your posts" function in the main index template? Say for example below your boards?

What template controls this? I've looked around the sources folder for something linking this but can't seem to find it.

Thanks

greyknight17

Where do you want it to show up exactly? It's already in the user info area on top. The direct link is:

http://www.yourforum.com/index.php?action=unreadreplies

AndyK

Hi greyknight17, Thanks for your reply.

I want the info displayed by clicking that link in the main index, just below the list of boards. Not sure how to achieve this, though I'm thinking there must be a way of incorporating it. Any ideas?

Cheers.

greyknight17

Hmmm....will something like the below do?

Open up /Themes/default/BoardIndex.template.php:

Koodi (Search for) [Valitse]
<td align="', !$context['right_to_left'] ? 'left' : 'right', '" class="smalltext">
<img src="' . $settings['images_url'] . '/new_some.gif" alt="" align="middle" /> ', $txt[333], '
<img src="' . $settings['images_url'] . '/new_none.gif" alt="" align="middle" style="margin-left: 4ex;" /> ', $txt[334], '
</td>


Koodi (Replace with) [Valitse]
<td align="', !$context['right_to_left'] ? 'left' : 'right', '" class="smalltext">
<img src="' . $settings['images_url'] . '/new_some.gif" alt="" align="middle" /> ', $txt[333], '
<img src="' . $settings['images_url'] . '/new_none.gif" alt="" align="middle" style="margin-left: 4ex;" /> ', $txt[334], '
</td>
<td><a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a></td>

AndyK

I'll give that a try! Thanks very much for your help :)

AndyK

Hi again,  :D

That shows the link to the unread replies page, but I was wondering how you could get the content from the unread replies page into the main index template. Is this possible?

Thanks again for your help

greyknight17

I'm not sure how to do that. Moving this to Mod Request...

ccbtimewiz

I think he wants the template that shows the unread replies right under all the main index board categories. Like:

Category 1
-Board 1
-Board 2

Category 2
-Board 1
-Board 2
-Board 3

Unread Replies

AndyK

ccbtimewiz got it. :)

I thought it might not have been all that easy, but thanks for your help Grey.

Andy

ccbtimewiz

A modification package that would make sense for this would be:

- If the user is not logged in, don't show the their unread replies. Thus, the table row should only appear when the user is logged in.
- Don't have the table alternate colors. Have the category list down their topics, along with the information shown in the normal template for unread.
- Include a toggle function where a user can collapse the section. Or better yet, put a toggle box in the profile stating: "Show most recent unread replies on the index?"

Advertisement: