vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   vBISpy - AJAX real-time feed of new posts/threads (for vB3.5) (https://vborg.vbsupport.ru/showthread.php?t=126027)

scottct1 09-09-2006 01:59 AM

Is there any way for it to display the last post in the thread instead of the first post in the thread?

MPDev 09-09-2006 02:38 AM

I didn't notice that until now; but the problem is I'm not sure how to get that. vB3.5 doesn't store the lastpostid made (where 3.6 does). So I'm not sure how to JOIN the post and thread table to grab the last preview text.

Try changing line 57 in vaispy.php to:

Code:

        LEFT JOIN ".TABLE_PREFIX."post ON (post.dateline = thread.lastpost)
The potential problem with this is on one large site with 1 million posts the query takes 10 seconds versus the .003 seconds for the original one! So, I'm not sure this is the best way.

Edit: However, if I manually add an index on the dateline field in the post table the query drops to .008 seconds on the same site. So this can work, if you add the index manually; unless someone has a better idea.

Gizmo5h1t3 09-09-2006 08:13 AM

Quote:

Originally Posted by MPDev
I didn't notice that until now; but the problem is I'm not sure how to get that. vB3.5 doesn't store the lastpostid made (where 3.6 does). So I'm not sure how to JOIN the post and thread table to grab the last preview text.

Try changing line 57 in vaispy.php to:

Code:

        LEFT JOIN ".TABLE_PREFIX."post ON (post.dateline = thread.lastpost)
The potential problem with this is on one large site with 1 million posts the query takes 10 seconds versus the .003 seconds for the original one! So, I'm not sure this is the best way.

Edit: However, if I manually add an index on the dateline field in the post table the query drops to .008 seconds on the same site. So this can work, if you add the index manually; unless someone has a better idea.

nope, edited line 57. and im still getting placed on the first post on a page m8...but only on some threads, others seem to work..weird.

MPDev 09-09-2006 11:55 AM

Quote:

Originally Posted by Gizmo5h1t3
nope, edited line 57. and im still getting placed on the first post on a page m8...but only on some threads, others seem to work..weird.

I'm not following you - this change would make the preview text display as that of the last last - does this not work for you or are you saying that when you click on a link it doesn't take you to the last post?

Snake 09-09-2006 05:38 PM

Thank you very much!

MPDev 09-09-2006 09:26 PM

Sure, Snake! Don't forget to click INSTALL! ;)

Gizmo5h1t3 09-10-2006 12:33 AM

Quote:

Originally Posted by MPDev
I'm not following you - this change would make the preview text display as that of the last last - does this not work for you or are you saying that when you click on a link it doesn't take you to the last post?


sorry for being unclear m8...im saying its not taking me to the final post in a thread....

MPDev 09-10-2006 12:48 PM

Can you grab the current download and update your vaispy.php and va_spy.js files?

djwins 09-10-2006 06:31 PM

Would there be a way to modify this so that the latest activity is called only one time every few seconds and not each time as a user hits the vbispy.php page?

If you can get the information to be pulled via a cron job (once every 10 seconds or so) and then have everything displayed on a static page, wouldn't this be much easier on the server load?

Quote:

Originally Posted by RFViet
Hmm I have the same problem . Yes I have java script at footer but I don't want to remove it.

Is there a way to make this compatible with microstats? https://vborg.vbsupport.ru/showthrea...ght=microstats

Maybe just a conditional in the footer that wouldt not display microstats on the vbispy page...anyone know how to do that?

Karabaja 09-10-2006 08:26 PM

Great stuff, thx. But it doesn't take me to last post either. Just to top of the thread.


All times are GMT. The time now is 09:25 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01339 seconds
  • Memory Usage 1,740KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete