View Unanswered/New/Active Posts on every page?

Need some coding help with a MOD or tweak you are working on? - Ask here.
Forum rules
Ask for support specifically regarding coding help with phpBB3.
Not for generic usability questions or support.

View Unanswered/New/Active Posts on every page?

Postby mandy02 » 04 Jul 2009, 23:23

How do I get the View Unanswered/New/Active Posts on every page? I think I found where there are instructions to do that, but with the Mods I have installed, things look a bit different.

The snippet of code that I have for the overall_header.html is

Spoiler:
<!-- IF S_DISPLAY_SEARCH and not S_IN_SEARCH -->
<div id="search-box">
<form action="{U_SEARCH}" method="post" id="search">
<fieldset>
<input name="keywords" id="keywords" type="text" maxlength="128" title="{L_SEARCH_KEYWORDS}" class="inputbox search" value="<!-- IF SEARCH_WORDS-->{SEARCH_WORDS}<!-- ELSE -->{L_SEARCH_MINI}<!-- ENDIF -->" onclick="if(this.value=='{LA_SEARCH_MINI}')this.value='';" onblur="if(this.value=='')this.value='{LA_SEARCH_MINI}';" />
<input class="button2" value="{L_SEARCH}" type="submit" /><br />
<a href="{U_SEARCH}" title="{L_SEARCH_ADV_EXPLAIN}">{L_SEARCH_ADV}</a> {S_SEARCH_HIDDEN_FIELDS}
</fieldset>
</form>
</div>
<!-- ENDIF -->


The code that I have for the index_body.html is

Spoiler:
<!-- IF S_DISPLAY_SEARCH or (S_USER_LOGGED_IN and not S_IS_BOT) -->
<ul class="linklist">
<!-- IF S_DISPLAY_SEARCH -->
<li><a href="{U_SEARCH_UNANSWERED}">{L_SEARCH_UNANSWERED}</a><!-- IF S_USER_LOGGED_IN --> &bull; <a href="{U_SEARCH_NEW}">{L_SEARCH_NEW}</a><!-- ENDIF --> &bull; <a href="{U_SEARCH_ACTIVE_TOPICS}">{L_SEARCH_ACTIVE_TOPICS}</a></li>
<!-- ENDIF -->


If none of this makes sense, please let me know and I'll do what I can to make it make sense. :D
User avatar
mandy02
Cadet IV
Cadet IV
 
Posts: 40
Joined: 08 Mar 2009, 00:08
Gender: Female
phpBB Knowledge: 1


Re: View Unanswered/New/Active Posts on every page?

Postby jdrechsler » 07 Jul 2009, 04:44

are you talking about
View unanswered posts ? View new posts ? View active topics

Just above the forum list?
Then you want to work with this code
Code: Select all
<!-- IF S_DISPLAY_SEARCH or (S_USER_LOGGED_IN and not S_IS_BOT) -->
<ul class="linklist">
   <!-- IF S_DISPLAY_SEARCH -->
      <li><a href="{U_SEARCH_UNANSWERED}">{L_SEARCH_UNANSWERED}</a><!-- IF S_USER_LOGGED_IN --> &bull; <a href="{U_SEARCH_NEW}">{L_SEARCH_NEW}</a><!-- ENDIF --> &bull; <a href="{U_SEARCH_ACTIVE_TOPICS}">{L_SEARCH_ACTIVE_TOPICS}</a></li>
   <!-- ENDIF -->
   <!-- IF not S_IS_BOT and U_MARK_FORUMS --><li class="rightside"><a href="{U_MARK_FORUMS}" accesskey="m">{L_MARK_FORUMS_READ}</a></li><!-- ENDIF -->
</ul>
<!-- ENDIF -->
jdrechsler
Ensign
Ensign
 
Posts: 61
Joined: 27 Jun 2009, 15:42
Gender: Male
phpBB Knowledge: 4

Re: View Unanswered/New/Active Posts on every page?

Postby gravitydk » 29 Apr 2010, 20:47

I got it working in prosilver / phpbb-SEO 3.07PL1
line 157, in overall_header.html

I see:
Code: Select all
<li class="icon-home"><a href="{U_INDEX}" accesskey="h">{L_INDEX}</a> <!-- BEGIN navlinks --> <strong>&#8249;</strong> <a href="{navlinks.U_VIEW_FORUM}">{navlinks.FORUM_NAME}</a><!-- END navlinks --></li>


But when I changed it to this:
Code: Select all
<li><a href="{U_SEARCH_UNANSWERED}">{L_SEARCH_UNANSWERED}</a><!-- IF S_USER_LOGGED_IN --> &bull; <a href="{U_SEARCH_UNREAD}">{L_SEARCH_UNREAD}</a> &bull; <a href="{U_SEARCH_NEW}">{L_SEARCH_NEW}</a><!-- ENDIF --> &bull; <a href="{U_SEARCH_ACTIVE_TOPICS}">{L_SEARCH_ACTIVE_TOPICS}</a></li>


I don't get the Unread / New button on index page, but only on forum-category pages, in this broken-looking way:
sshot.jpg


So I put the code into this block instead, same file:
Code: Select all
      <!-- IF not S_IS_BOT and S_USER_LOGGED_IN -->
         <ul class="linklist leftside">
            <li class="icon-ucp">
               <a href="{U_PROFILE}" title="{L_PROFILE}" accesskey="e">{L_PROFILE}</a>
                  <!-- IF S_DISPLAY_PM --> (<a href="{U_PRIVATEMSGS}">{PRIVATE_MESSAGE_INFO}</a>)<!-- ENDIF -->
               <!-- IF S_DISPLAY_SEARCH --> &bull;
               <a href="{U_SEARCH_SELF}">{L_SEARCH_SELF}</a>
               <!-- IF S_USER_LOGGED_IN --> &bull; <a href="{U_SEARCH_UNREAD}">{L_SEARCH_UNREAD}</a> &bull; <a href="{U_SEARCH_NEW}">{L_SEARCH_NEW}</a><!-- ENDIF -->
               <!-- ENDIF -->
               <!-- IF U_RESTORE_PERMISSIONS --> &bull;
               <a href="{U_RESTORE_PERMISSIONS}">{L_RESTORE_PERMISSIONS}</a>
               <!-- ENDIF -->
            </li>
         </ul>
         <!-- ENDIF -->

And that worked a treat! :thumbsup:
gravitydk
Supporter
Supporter
 
Posts: 54
Joined: 30 Mar 2010, 00:28
Location: Sydney
Gender: Male
phpBB Knowledge: 3

Re: View Unanswered/New/Active Posts on every page?

Postby Kaidok » 02 Jul 2012, 00:35

Sorry for digging up an ancient post, but how do you make this work with 3.0.10? I've implemented the changes here to the overall_header.html file and I'm not seeing anything different. :think:
Kaidok    
Crewman
Crewman
 
Posts: 1
Joined: 02 Jul 2012, 00:32
Gender: Male
phpBB Knowledge: 3

Re: View Unanswered/New/Active Posts on every page?

Postby Handyman » 03 Jul 2012, 17:56

You probably need to purge your template cache to see the changes.
Please contact me if you have any news to submit to SCOFF News.
SCOFFing at the candidates while you sleep.
My Mods || My Mod Queue
Image
User avatar
Handyman    
Rear Fleet Admiral
Rear Fleet Admiral
 
Posts: 7457
Joined: 08 May 2006, 04:45
Location: Where no man has gone before!
Favorite Team: Seattle Seahawks
Gender: Male


Return to phpBB3 Coding Assistance

Who is online

Users browsing this forum: YandexBot and 9 guests