Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Latest Threads On Forum Home Details »»
Latest Threads On Forum Home
Version: 1.1.2, by Chris M Chris M is offline
Developer Last Online: Feb 2013 Show Printable Version Email this Page

Version: 3.5.0 Rating:
Released: 06-15-2005 Last Update: 10-23-2005 Installs: 458
Uses Plugins Template Edits
 
No support by the author.

[high]Installation Instructions[/high]

Step 1: Upload the .xml file to the Product Manager
Step 2: Modify the [high]FORUMHOME[/high] template
Find:
HTML Code:
<td class="alt1" width="100%"><div class="smallfont">$upcomingevents</div></td>
	</tr>
</tbody>
</if>
Add below:
HTML Code:
<!-- latest threads -->
<if condition="$show['latestthreads']">
<tbody>
	<tr>
		<td class="thead" colspan="2">
			<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_latestthreads')"><img id="collapseimg_forumhome_latestthreads" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_forumhome_latestthreads].gif" alt="" border="0" /></a>
			$vbphrase[latest_threads]
		</td>
	</tr>
</tbody>
<tbody id="collapseobj_forumhome_latestthreads" style="$vbcollapse[collapseobj_forumhome_latestthreads]">
	<tr>
		<td class="alt2"><img src="$stylevar[imgdir_statusicon]/forum_new.gif" alt="$vbphrase[latest_threads]" /></td>
		<td class="alt1"><div class="smallfont">$threadbits</div></td>
	</tr>
</tbody>
</if>
<!-- /latest threads -->
Step 3: Click [high]INSTALL[/high]

[high]Credits[/high]
NTLDR - For allowing me to port his vB3 hack of this

[high]Updates[/high]
Version 1.1.0: Simple update to make this work with vBulletin 3.5.0 Beta 2 - If you are installing for the first time, follow the installation instructions - If you are upgrading, please delete the previous plugin, and upload the new one - This new plugin also has the uncached template fix

Version 1.1.1: Simple update to fix a permissions bug - Wasn't showing on my board because I had already fixed it and forgot about it lol - To upgrade, simply replace the plugin with the one attached

Version 1.1.2: Simple update to fix a permissions bug again - To upgrade, simply replace the plugin with the one attached

Chris

Show Your Support

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

Comments
  #162  
Old 10-08-2005, 07:13 PM
Bytecon Bytecon is offline
 
Join Date: Jan 2005
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you

*installed*
Reply With Quote
  #163  
Old 10-09-2005, 04:37 PM
ScooterQ ScooterQ is offline
 
Join Date: Apr 2003
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is anyone else seeing a problem with new post icons? I'm seeing posts marked as new in the latest threads display, but if I click on "new posts" it says "Sorry, there are no new threads to view." That is correct - the new post icon in latest threads is wrong for me. Thus far the only way I've found to clear the new posts icon is to mark my forums read.

For example, I can log in as a test user and see 10 threads as unread using "new posts". If I click on a thread title it takes me to the thread. If I click on "new posts" again the thread is no longer listed, but if I go to my forum home the thread is still showing up as unread in the latest threads block. I'm using the database with automatic thread marking to track unread items.

I'm guessing that I need to modify the SQL to look at the threadread table for each post and add it to the show goto new post section (listed below).

Code:
	// show goto new post
	$show['firstnew'] = false;
	$bbforumview = fetch_bbarray_cookie('forum_view', $thread['forumid']);

	if ($bbforumview > $vbulletin->userinfo['lastvisit']) {
		$lastread = $bbforumview;
	} else {
		$lastread = $vbulletin->userinfo['lastvisit'];
	}

	if ($thread['lastpost'] > $lastread) {

		$threadview = fetch_bbarray_cookie('thread_lastview', $thread['threadid']);

		if ($thread['lastpost'] > $threadview) {
			$show['firstnew'] = true;
			$show['icon'] = false;
		}
	}
Am I alone here? If so, I'll just quietly go fix my problem on my forum, but if not I'd like to solve this for all of us, not just me.
Reply With Quote
  #164  
Old 10-09-2005, 05:30 PM
ScooterQ ScooterQ is offline
 
Join Date: Apr 2003
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've pretty much figured out that the problem I'm seeing has to do with the forum_view cookie not being set, thus causing my unread status to fall back to using lastvisit instead. The forum_view cookie is only set in two places in all of the VB3.5 code and in both cases it's only set if you **are not** using threadmarking.

function_bigthree.php
Code:
	if ($vbulletin->options['threadmarking'] AND $userid)
	{
		$db->query_write("
			REPLACE INTO " . TABLE_PREFIX . "forumread
				(forumid, userid, readtime)
			VALUES
				($foruminfo[forumid], $userid, $time)
		");

		if (!$check_parents)
		{
			return;
		}

		// check to see if any parent forums should be marked as read as well
		$parents = array();
		$parents_sql = $db->query_read("
			SELECT forum.forumid
			FROM " . TABLE_PREFIX . "forum AS forum
			LEFT JOIN " . TABLE_PREFIX . "forumread AS forumread ON (forum.forumid = forumread.forumid AND forumread.userid = $userid)
			WHERE forum.forumid IN ($foruminfo[parentlist])
				AND forum.forumid NOT IN ($foruminfo[forumid], -1)
				AND (forum.lastpost = 0 OR
					IF(forumread.readtime IS NULL, " . (TIMENOW - ($vbulletin->options['markinglimit'] * 86400)) . ", forumread.readtime) > forum.lastpost
				)
		");
		while ($parent = $db->fetch_array($parents_sql))
		{
			$parents[] = "($parent[forumid], $userid, $time)";
		}

		if ($parents)
		{
			$db->query_write("
				REPLACE INTO " . TABLE_PREFIX . "forumread
					(forumid, userid, readtime)
				VALUES
					" . implode(', ', $parents)
			);
		}
	}
	else
	{
		set_bbarray_cookie('forum_view', $foruminfo['forumid'], $time);
	}
So it looks like I may just have to modify the getthreads query for this plugin.
Reply With Quote
  #165  
Old 10-09-2005, 05:39 PM
Basit Basit is offline
 
Join Date: Apr 2004
Location: London
Posts: 61
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Does this work with 3.5.0 Gold ?
Reply With Quote
  #166  
Old 10-09-2005, 05:50 PM
Mr Chad's Avatar
Mr Chad Mr Chad is offline
 
Join Date: Jul 2005
Posts: 911
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Basit
Does this work with 3.5.0 Gold ?
doesnt look like it.
Reply With Quote
  #167  
Old 10-09-2005, 06:45 PM
Chris M's Avatar
Chris M Chris M is offline
 
Join Date: Dec 2001
Location: Northampton, England
Posts: 6,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It should do, but it's untested on my end - I haven't had time to install 3.5 Gold yet

Chris
Reply With Quote
  #168  
Old 10-10-2005, 09:45 AM
albarq albarq is offline
 
Join Date: Jun 2005
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ya it does work
Reply With Quote
  #169  
Old 10-13-2005, 11:13 AM
thetoolman thetoolman is offline
 
Join Date: Aug 2005
Posts: 57
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

will this hack work if i put it in the header or footer?
Reply With Quote
  #170  
Old 10-13-2005, 11:57 AM
Chris M's Avatar
Chris M Chris M is offline
 
Join Date: Dec 2001
Location: Northampton, England
Posts: 6,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You will need to make it a global plugin location not a forumhome location

Chris
Reply With Quote
  #171  
Old 10-13-2005, 12:13 PM
Vierie Vierie is offline
 
Join Date: Apr 2005
Posts: 88
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

And how would I do that?
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 04:09 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.09842 seconds
  • Memory Usage 2,321KB
  • 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
  • (2)bbcode_code
  • (2)bbcode_html
  • (1)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
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (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