Go Back   vb.org Archive > vBulletin Modifications > Archive > Modification Graveyard
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Recently Viewed Threads Details »»
Recently Viewed Threads
Version: 1.2 Beta, by Logikos Logikos is offline
Developer Last Online: Sep 2023 Show Printable Version Email this Page

Version: 3.5.3 Rating:
Released: 02-10-2006 Last Update: 02-11-2006 Installs: 24
DB Changes Uses Plugins Template Edits
Is in Beta Stage  
No support by the author.

Recently Viewed Threads


What this does
This will show each user a list of Recently Viewed Threads. The idea came from www.SitePoint.com. I found myself using it alot when I came back to the site to check up on some threads I forgot about, or just couldn't find. AJAX enabled - (quick thread title edit and open/close works!)

This was coded to be placed on the forumhome, though you can edit to your needs if you know what your doing.

How this plugin works
The concept of this plugin is simple. When a user clicks on a thread, it will log the user and thread info in the database. The thread will then be marked as viewed using a conditional timestamp comparison. In lamens terms this means that when a user views a thread, it will log the time the thread was viewed. It will not relog the thread information if the user views the same thread within a certain amount of wait time. (Admin CP setting). Default is 5 minutes.

Descriptive Example
LiveWire clicks on a thread titled 'New Hack Posted'. 1 small query is performed to see if I have recently viewed this thread yet.

If I have viewed this thread already, it will check and see when I viewed it. If it was longer then 5 minutes ago, then it will add the new information using 1 more query.

If I have never viewed this thread before, then it will insert it into the database using 1 query.

To do list...
  • Time to install: 2 minutes or less
  • Queries to run: 1 (Installer Controlled)
  • File Mods: 0
  • Templates to edit: 1 (forumhome)
  • Templates to add: 1 (Installer Controlled 'forumhome_recentbit')
  • New Phrases: 0
  • New Plugins: 2
Click It For Support!
Install This Product

Important Note
This product of mine is marked as beta as I'm still working on some code for future releases. vBCron to clean up Database will be released soon as an addon in the below post.

Product History
Sun, Feb 12 2006 - Forumhome Recent Table is can be collapsed
Sun, Feb 12 2006 - Added plugins (The two plugins didn't export for some reason)
Sat, Feb 11 2006 - Beta Released


Help & Support
Before asking for support Please make sure you have done all necessary changes! If you still need support please post a reply here and double check that you have clicked the Install Button.

Please post bugs and errors here. Hope you like, feedback welcomed!

Show Your Support

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

Comments
  #32  
Old 02-16-2006, 05:11 PM
bashy bashy is offline
 
Join Date: Nov 2005
Posts: 2,544
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

All seems ok again
Cheers for the quick response an all that
Reply With Quote
  #33  
Old 02-19-2006, 06:44 PM
bashy bashy is offline
 
Join Date: Nov 2005
Posts: 2,544
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just had this error

Code:
Database error in vBulletin 3.5.3:

Invalid SQL:

                        SELECT post.pagetext AS preview,
                                thread.threadid, thread.title AS threadtitle, lastpost, forumid, pollid, open, replycount, postusername, postuserid, lastposter,
                                thread.dateline, views, thread.iconid AS threadiconid, notes, thread.visible
                                

                        FROM thread AS thread
                        
                        LEFT JOIN recentlyviewed AS recentlyviewed ON(recentlyviewed.threadid = thread.threadid)
                        LEFT JOIN post AS post ON(post.postid = thread.firstpostid)
                        WHERE thread.threadid IN(1701,1699,1698,1697,1693,1692,1691,1687,1703,1704,1705,1706,1708,1707,1712,1714,194,1732,1103,1729,1718,1725,1717,1736,1051,1741,1647,1625,1346,1579,1688,1742,1743,1744,184,1670,1754,1753,1758,1759,1577,1757,1546,1391,1760,1761,1762,1764,1766,1765,1749,1747,1748,1755,1767,1768,1769,1770,1771,1773,1774,1775,1776,1751,1678,1657,1640,1611,1607,1561,1540,1528,1777,1778,1779,132,1781,1782,1783,1784,1785,1786,1787,1788,1789,1790,1791,1792,1685,1715,1772,1816,1621) 
                        ORDER BY recentlyviewed.dateline DESC
                        LIMIT 5;

MySQL Error  : The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay Error Number : 1104
Date         : Sunday, February 19th 2006 @ 08:35:01 PM
Script       : http://www.bashys-place.com/forums/
Referrer     : http://www.bashys-place.com/forums/
I tried to run that sql ya gave me but didnt work this time...
Please advise as i have to keep this turned off now
Reply With Quote
  #34  
Old 03-15-2006, 08:25 AM
Wongod Wongod is offline
 
Join Date: Jan 2006
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is this hack working?
Reply With Quote
  #35  
Old 03-30-2006, 06:52 PM
thanh thanh is offline
 
Join Date: Aug 2004
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

me too

I had the errrors

Database error in vBulletin 3.5.4:

Invalid SQL:

SELECT post.pagetext AS preview,
thread.threadid, thread.title AS threadtitle, lastpost, forumid, pollid, open, replycount, postusername, postuserid, lastposter,
thread.dateline, views, thread.iconid AS threadiconid, notes, thread.visible


FROM thread AS thread

LEFT JOIN recentlyviewed AS recentlyviewed ON(recentlyviewed.threadid = thread.threadid)
LEFT JOIN post AS post ON(post.postid = thread.firstpostid)
WHERE thread.threadid IN(4,5,1,2,3,15,19,8,22,23,28,29,11,34,18,24,25,20 ,40,42,57,59,60,62,31,64,65,35 ,66,6,7,67,41,73,63,72,74,75,76,77,78,79,80,81,82, 83,84,85,86,87,88,89,90,91,92, 93,94,95,96,97,98,99,100,101,102,103,104,105,106,1 07,71,111,115,117,127,157,134, 181,156,120,186,141,159,197,234,217,216,187,237,19 6,192,243,211,244,215,133,212, 246,158,268,270,272,274,276,277,278,279,280,281,28 2,283,284,285,286,287,289,290, 291,292,294,295,296,298,299,300,301,302,303,68,304 ,307,308,309,310,312,313,314,3 15,316,317,318,320,321,322,323,324,325,326,327,328 ,180,330,152,331,333,221,335,3 36,337,188,338,341,342,347,340,359,384,379,386,155 ,385,362,344,390,391,358,396,4 15,441,458,463,436,474,476,429,269,461,484,487,493 ,488,491,502,509,511,512,513,5 14,515,516,517,519,521,522,523,524,504,424,496,492 ,154,421,537,531,470,420,560,5 58,564,477,466,426,542,430,494,475,561,566,520,568 ,604,596,574,600,618,615,614,6 23,624,585,619,622,598,563,577,261,645,423,706,670 ,757,756,866,937,802,808,841,6 92,960,904,829,1030,1014,1029,1034,1046,377,1036,1 044,1033,1018,375,1022,1051,20 6,401,409,367,378,387,13,453,951,1143,1217,1219,11 49,1195,1042,1272,1275,1305,63 2,275,241,675,1658,373,1303)
ORDER BY recentlyviewed.dateline DESC
LIMIT 5;

MySQL Error : Got error 28 from table handler
Error Number : 1030
Date : Thursday, March 30th 2006 @ 03:30:52 PM
Script : http://xxxxxxxxxxxxxx/forums/index.php
Referrer : http://xxxxxxxxxx/forums/showthread.php?t=1679
IP Address : xxxxxxxxxxxxxx
Username : admin
Classname : vb_database
Reply With Quote
  #36  
Old 03-30-2006, 07:00 PM
thanh thanh is offline
 
Join Date: Aug 2004
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@LiveWire

When run
DELETE FROM recentlyviewed
WHERE dateline < (1140115611 - 3600)

The member access forum OK w/o any error but when iam, the administrator loggin in the error still apear
Reply With Quote
  #37  
Old 03-30-2006, 07:02 PM
thanh thanh is offline
 
Join Date: Aug 2004
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

AHA, when i'm trying TRUNCATE TABLE `recentlyviewed`
all become the normal now
Reply With Quote
  #38  
Old 04-03-2006, 09:10 PM
xspazx xspazx is offline
 
Join Date: Jun 2005
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The hook for this plugin made my forums stats say threads: 5. Maybe you should update that?. I wont click uninstall in hopes that you do fix the slight bug. But it's going to be disabled on my site for now. Thanks.
Reply With Quote
  #39  
Old 04-04-2006, 02:33 AM
Logikos Logikos is offline
 
Join Date: Jan 2003
Posts: 2,924
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'll be updating this in the next day or so, as I need to fix it for my site.
Reply With Quote
  #40  
Old 04-24-2006, 05:00 PM
Wongod Wongod is offline
 
Join Date: Jan 2006
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi LiveWire, any progress? This seems like a great feature.
Reply With Quote
  #41  
Old 05-23-2006, 05:17 AM
FleaBag's Avatar
FleaBag FleaBag is offline
 
Join Date: Dec 2001
Posts: 1,674
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I get the issue where it says I have 5 threads too. Also, recently this seems to slow down my forumhome loading. Normally <1 second to over a minute. I had to disable even with it only showing 3 threads updating every 30 minutes. Hope you know about this issue and how to fix.
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 03:17 PM.


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.05367 seconds
  • Memory Usage 2,305KB
  • 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
  • (1)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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