Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Active Topics - (replaces New Posts) Sorted By [x] Amount Of Time Details »»
Active Topics - (replaces New Posts) Sorted By [x] Amount Of Time
Version: 1.00, by trevelyn1015 trevelyn1015 is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Version: 3.0.3 Rating:
Released: 01-05-2005 Last Update: 01-05-2005 Installs: 38
 
No support by the author.

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 -->
And AFTERWARDS ADD the following:

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,
Below, add:

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);
	}
Replace with:

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);
		
	}
then upload your search.php back into your forum directory and "voila"... you are done.

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

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #52  
Old 06-29-2005, 12:36 AM
Senza Senza is offline
 
Join Date: Jan 2005
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am having difficulty locating this exact phrase in the 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>


I am currently running Vb v 3.0.6 with a extremepixies template. I searched in the default template with no luck either. Can anyone shed any light. Thank you.

-edit- My other administrator has already modified the template, hense I couldn't find it.
Reply With Quote
  #53  
Old 08-14-2005, 04:40 PM
Bulent Tekcan Bulent Tekcan is offline
 
Join Date: Oct 2003
Location: TURKEY - Istanbul
Posts: 437
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

In 3.0.8 this error ocurred.But old search.php file is working (3.0.7)

Any idea ?

Thanks

HTML Code:
 Database error in vBulletin 3.0.8:
Invalid SQL: 
REPLACE INTO search (userid, showposts, ipaddress, personal, forumchoice, sortby, sortorder, searchtime, orderedids, dateline, displayterms, searchhash)
VALUES (1, , '81.215.68.108', 1, '81', 'lastpost', 'DESC', 0.024744033813477, '121392,121490,120766,121509,119274,121365,121523,121517,121522,121514,121521,121444,121094,121519,121380,121250,121426,121518,121516,121465,120785,119247,27698,51447,121507,120349,86338,114026,119490,121467,95997,87804,8270,79956,119699,121473,102902,121304,116133,121478,121513,121511,119243,83179,121377,119079,121315,118783,121512,121515,121437,121076,120824,121050,121502,11736,65554,121510,116545,120295,118620,99639,120188,66177,121423,75702,47761,121484,120779,120784,121416,121333,65445,120361,120194,121501,119919,121503,8449,121361,121370,121505,121508,121464,111804,121476,121204,120255,121275,121428,113993,121352,35223,79306,121466,120926,100813,121504,121459,120902,121369,65665,121472,115965,121506,2943,88462,120555,121500,121453,119416,121493,121112,121284,96507,96679,118694,101592,54962,121286,119549,121285,121287,19037,121458,114084,121495,121331,111796,120907,121485,121041,121299,121448,120893,121499,121497,12286', 1124040976, 'a:6:{s:5:\"words\";a:0:{}s:9:\"highlight\";a:0:{}s:6:\"common\";a:0:{}s:5:\"users\";a:0:{}s:6:\"forums\";N;s:7:\"options\";a:3:{s:11:\"starteronly\";i:0;s:11:\"childforums\";i:1;s:6:\"action\";s:8:\"getdaily\";}}', '6946790854e6d74826ce5e5a398e3d6c')
 
mysql error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ' '81.215.68.108', 1, '81', 'lastpost', 'DESC', 0.02474403381347
mysql error number: 1064
Reply With Quote
  #54  
Old 08-15-2005, 07:47 PM
Chris@TSE's Avatar
Chris@TSE Chris@TSE is offline
 
Join Date: Jul 2005
Location: New York
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by sv1cec
I don't think I ever got an answer, sorry too long ago, I do not remember. Eventually, I fixed it up, to suite my needs. But I am not sure if my fix has anything to do with the code published here, as I said, I don't remember anymore. If you want me to send you the code, just let me know.

Rgds
Yes please.....

If anyone knows how to fix this issue please let me know!


Problem: No matter which search you use, be it since last visit, last hour, or last day. Any of them..... at the top of the seach results it states "Search: Posts From Last Day "
Reply With Quote
  #55  
Old 08-15-2005, 08:01 PM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Gang, the problem is the poster of this mod didn't write a single line of the code and is unable to support it. You are on your own.
Reply With Quote
  #56  
Old 09-29-2005, 02:01 AM
Lockout Lockout is offline
 
Join Date: Jan 2005
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I would love to see this hack changed for VB 3.5 as this is one of my most used hacks any help
Reply With Quote
  #57  
Old 09-29-2005, 02:19 AM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I already ported my original hack to 3.5. It's been done for ages. (This release was merely a copy of my mod and somebody else's template mod)
Reply With Quote
  #58  
Old 10-19-2005, 04:12 PM
AL-min AL-min is offline
 
Join Date: Jan 2005
Location: London, UK
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by amykhar
Gang, the problem is the poster of this mod didn't write a single line of the code and is unable to support it. You are on your own.
Is this hack still supported ? As I am looking to install this or simular hack to my forum.

I have had a search around this site for simular hack but not found any :disappointed: Any suggestions? I need to get this sorted soon as im getting grief from members ever since I moved over from Snitz :ermm:

Im using version 3.0.7 BTW

TIA

Al
Reply With Quote
  #59  
Old 10-19-2005, 04:16 PM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

THIS hack is not supported. It was posted by somebody who swiped my code. My original mod is supported. If you check my profile, you will see the 3.0 version and the 3.5 version. I am not taking feature requests for either version though.
Reply With Quote
  #60  
Old 02-15-2006, 05:10 AM
cmiller1014 cmiller1014 is offline
 
Join Date: May 2004
Posts: 248
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Anyone recreate this for 3.5.3? I had it on 3.0 and wiped that board clean. It would be helpful to even have the search links to use.......
Reply With Quote
  #61  
Old 04-29-2007, 10:02 PM
DieselMinded's Avatar
DieselMinded DieselMinded is offline
 
Join Date: Mar 2007
Posts: 1,655
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Will this work on Ver 3.6.5 ???
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:17 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04781 seconds
  • Memory Usage 2,334KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (7)bbcode_code
  • (1)bbcode_html
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete