The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Active Topics - (replaces New Posts) Sorted By [x] Amount Of Time Details »» | |||||||||||||||||||||||||||
Active Topics - (replaces New Posts) Sorted By [x] Amount Of Time
Developer Last Online: Nov 2023
This is something I never saw on any vbulletin sites before, and loved it when I used to be a member of a snitz forum. It is the 'Active Topics' feature...
What does it do? It replaces your 'New Posts' link in your navbar with a drop down list of times to view posts, from all forums(depending on user permissions, which they can and cannot see). What will it look like? View live version, here. How many templates do i have to edit? You only have to edit your 'navbar' template. Very easy to do. How many phrases do I have to add? It depends on how specific you want your Active Topics bar to be. How many .php files will I have to edit? You only have to edit your search.php in one little area. Very simple. Good luck with this hack, and I hope you enjoy it as much as I do. ================================================== ======= ================================================== ======= ================================================== ======= ================================================== ======= Active Topics - compiled from multiple hacks(credit given at bottom) and tweaked by Trevelyn1015 This small template mod is for the vB 3.0.3 navbar template. This mod replaces the Today's Posts/New Posts links with an 'Active Topics' dropdown menu. It only works when vB dropdowns are allowed, otherwise the default vB link is displayed. 1) Go to the vB Phrase Manager and add the following Global phrases (see vB help for further directions). If you want different times, adjust accordingly: Code:
$vbphrase[active_topics_nav] = "Active Topics"; $vbphrase[get_fifteen_minutes] = "Last 15 Minutes"; $vbphrase[get_thirty_minutes] = "Last 30 Minutes"; $vbphrase[get_fortyfive_minutes] = "Last 45 Minutes"; $vbphrase[get_one_hour] = "Last Hour"; $vbphrase[get_three_hours] = "Last 3 Hours"; $vbphrase[get_six_hours] = "Last 6 Hours"; $vbphrase[get_twelve_hours] = "Last 12 Hours"; $vbphrase[get_one_day] = "Last Day"; $vbphrase[get_three_days] = "Last 3 Days"; $vbphrase[get_one_week] = "Last Week"; $vbphrase[get_three_weeks] = "Last 3 Weeks"; $vbphrase[get_one_month] = "Last Month"; 2) Go to the vB Phrase Manager and edit the following phrase: 'new_posts_nav' - edit the translation to be "Since Last Visit" 3) Make the following TWO edits to the vB 3.0.3 navbar template: EDIT ONE: Find the following: <if condition="$show['popups']"> <if condition="$show['searchbuttons']"> <if condition="$show['member']"> <td class="vbmenu_control"><a href="search.php?$session[sessionurl]do=getnew" accesskey="2">$vbphrase[new_posts_nav]</a></td> <else /> <td class="vbmenu_control"><a href="search.php?$session[sessionurl]do=getdaily" accesskey="2">$vbphrase[todays_posts]</a></td> </if> And REPLACE with the following: <if condition="$show['popups']"> <if condition="$show['searchbuttons']"> <td id="navbar_posts" class="vbmenu_control"><a href="search.php?$session[sessionurl]" accesskey="2">$vbphrase[active_topics_nav]</a> <script type="text/javascript"> vbmenu_register("navbar_posts"); </script></td> EDIT TWO: Find the following: Code:
<if condition="$show['popups']"> <!-- NAVBAR POPUP MENUS --> Code:
<if condition="$show['searchbuttons']"> <div class="vbmenu_popup" id="navbar_posts_menu" style="display:none"> <table cellpadding="4" cellspacing="1" border="0"> <tr><td class="thead">$vbphrase[active_topics_nav]</td></tr> <tr><td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=getnew" accesskey="2">$vbphrase[new_posts_nav]</a></td></tr> <tr><td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=getdaily&minutes=15" accesskey="2">$vbphrase[get_fifteen_minutes]</a></td></tr> <tr><td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=getdaily&minutes=30" accesskey="2">$vbphrase[get_thirty_minutes]</a></td></tr> <tr><td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=getdaily&minutes=45" accesskey="2">$vbphrase[get_fortyfive_minutes]</a></td></tr> <tr><td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=getdaily&hours=1" accesskey="2">$vbphrase[get_one_hour]</a></td></tr> <tr><td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=getdaily&hours=3" accesskey="2">$vbphrase[get_three_hours]</a></td></tr> <tr><td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=getdaily&hours=6" accesskey="2">$vbphrase[get_six_hours]</a></td></tr> <tr><td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=getdaily&hours=12" accesskey="2">$vbphrase[get_twelve_hours]</a></td></tr> <tr><td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=getdaily&days=1" accesskey="2">$vbphrase[get_one_day]</a></td></tr> <tr><td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=getdaily&days=3" accesskey="2">$vbphrase[get_three_days]</a></td></tr> <tr><td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=getdaily&days=7" accesskey="2">$vbphrase[get_one_week]</a></td></tr> <tr><td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=getdaily&days=21" accesskey="2">$vbphrase[get_three_weeks]</a></td></tr> <tr><td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=getdaily&days=31=" accesskey="2">$vbphrase[get_one_month]</a></td></tr> </table> </div> </if> 4) In your search.php: Find: Code:
'days' => INT, Code:
'hours' => INT, 'minutes' => INT, 'seconds' => INT, Then, find: Code:
// get date: if ($_REQUEST['do'] == 'getnew' AND $bbuserinfo['lastvisit'] != 0) { // if action = getnew and last visit date is set $datecut = $bbuserinfo['lastvisit']; } else { $_REQUEST['do'] = 'getdaily'; if ($days < 1) { $days = 1; } $datecut = TIMENOW - (24 * 60 * 60 * $days); } Code:
// get date: if ($_REQUEST['do'] == 'getnew' AND $bbuserinfo['lastvisit'] != 0) { // if action = getnew and last visit date is set $datecut = $bbuserinfo['lastvisit']; } else { $_REQUEST['do'] = 'getdaily'; if (($days < 1)AND(!$hours)AND(!$minutes)AND(!$seconds)) { $days = 1; $hours = 0; $minutes = 0; $seconds = 0; } elseif($days < 1) { $days = 0; } $datecut = TIMENOW - (($days*24*60*60) + ($hours*60*60) + ($minutes*60) + $seconds); } If you have installed this hack, please click ==> ================================================== ======= ================================================== ======= ================================================== ======= ================================================== ======= Thanks to: amykhar and sabret00the for helping me with the search.php editing. waxed, from vbulletintemplates, for a hack released to create a "since [x] amount of days", which was the foundation of how i put this together. Show Your Support
|
Comments |
#2
|
|||
|
|||
holy crap, nice!!!!
|
#3
|
|||
|
|||
thanks. i know how much i enjoy this hack. i hope alot of you do too...
|
#4
|
|||
|
|||
|
#5
|
|||
|
|||
Installed!!
|
#6
|
|||
|
|||
thanks, twins. i already talked to waxed... and i gave him credit here...
this is not a "rework" as this hack does something different... |
#7
|
||||
|
||||
No offense, but this isn't your work. It's somebody else's template mod combined with my code hack. You couldn't even get the math right to do the darn thing; so I'm surprised you released this is a hack of your own doing.
|
#8
|
|||
|
|||
i asked the original guy if i could post it here as a hack and give him credit. he said ok. you helped with math. i gave you credit.
what is the problem? make it "amy's active topics hack". i could care less. i just thought i would share this. not like we get paid for this or anything... it's one little mod on a vbulletin forum... edit: for weeks and weeks i have posted about getting this hack out here. i don't see anyone else with an "active topics" hack... all i saw was one guy on a totally different forum who did something i could have done on my own, sorting by days. then i went in and made up my own phrases and edited another phrase and then tried for a few days to get some help from other members who know more about coding to make the math work. amy, you finally figured it out. want a cookie? who cares about who releases something? did you put the "how to" together? did you write all of the template editing? no. i don't think so. i gave you credit for your math skills and i thanked you in the thread you helped me in... ================================================== ======= Quote:
================================================== ======= Quote:
2) It was tested. It works like a charm, thanks to Amy's math skills. 3) There is editing done on the search.php file. Therefore, it is classified as a hack. 4) It was specified that it was made for 3.0.3 5) It comes with support. That checkbox is clicked. 6) I own the license to my vBulletin forum. 7) There is no encryption. 8) Does not apply. well, it looks as if I have done nothing wrong and I feel I have more than enough explained and defended myself... |
#9
|
|||
|
|||
Installed!!!
|
#10
|
|||
|
|||
[high]* lasto clicks install
[/high] politics eh who needs em @mods: vb3 hack in the vb2 section - needs moving me thinks |
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|