PDA

View Full Version : Creating an Active Topics Menu.



Wayne Luke
Wed 21st Apr '04, 12:20pm
Many people want to create a drop down menu for active topics in their forum navigation. This shows posts from last visit, yesterday, last week, etc...


Find this in the navbar template:


<!--<td class="vbmenu_control"><a href="$vboptions[forumhome].php?$session[sessionurl]">Home</a></td>-->


Add this:


<if condition="$show['searchbuttons']">
<td id="navbar_activetopics" class="vbmenu_control">
<a href="search.php?$session[sessionurl]&do=getdaily&days=1">Active Topics</a>
<script type="text/javascript">
vbmenu_register("navbar_activetopics");
</script>
</td>
</if>



Then farther down, where it has:


<if condition="$show['popups']">
<!-- NAVBAR POPUP MENUS -->

<if condition="$show['searchbuttons']">


Add this after that (feel free to add/remove/change the menu options to suit your needs. days=30 for Last Month, etc):



<div class="vbmenu_popup" id="navbar_activetopics_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">
<tr>
<td class="thead">Active Topics</td>
</tr>
<tr>
<td class="vbmenu_option"><a href="search.php?$session[sessionurl]&do=getdaily&days=1">Last Day</a></td>
</tr>
<tr>
<td class="vbmenu_option"><a href="search.php?$session[sessionurl]&do=getdaily&days=2">Last 2 Days</a></td>
</tr>
<tr>
<td class="vbmenu_option"><a href="search.php?$session[sessionurl]&do=getdaily&days=3">Last 3 Days</a></td>
</tr>
<tr>
<td class="vbmenu_option"><a href="search.php?$session[sessionurl]&do=getdaily&days=4">Last 4 Days</a></td>
</tr>
<tr>
<td class="vbmenu_option"><a href="search.php?$session[sessionurl]&do=getdaily&days=5">Last 5 Days</a></td>
</tr>
</table>
</div>


This was originally created by Congsoft and posted here (http://www.vbulletin.com/forum/showthread.php?t=89080).