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

Reply
 
Thread Tools
vBISpy - AJAX real-time feed of new posts/threads Details »»
vBISpy - AJAX real-time feed of new posts/threads
Version: 1.12, by MPDev MPDev is offline
Developer Last Online: Dec 2016 Show Printable Version Email this Page

Category: Add-On Releases - Version: 3.6.x Rating:
Released: 09-05-2006 Last Update: 09-27-2006 Installs: 947
Additional Files  
No support by the author.

After seeing the http://www.digg.com/spy application; I wondered if this could be done for vBulletin as well. I came across this webpage which had a "how to" on how they built a similiar application to do the same thing. Taking a page from their book (i.e. the code), I modified it for use with vBulletin.

During development, I also came across this post here on vBulletin.Org where the very subject had already been discussed.

So I put this together; a simple ZIP file with a single PHP script, three javascript files and 4 images.

Installation

. UNZIP the file into your forums directory
. That's it!

Virtually all the code to customize the page is in the vaispy.php script; there are no plugins, no templates and no phrases. You do not need to do anything further; this should work right out of the box.

In your browser, open the URL:

http://www.yourforum.com/forum/vaispy.php

You can see examples of this at:

http://www.viperalley.com/forum/vaispy.php
http://www.extremefitness.com/forum/vaispy.php

Note: I claim no ownership of this code except for the file vaispy.php - the rest of the files were using 'freely distributable' sources. As such, you may use these files as you wish, but please do not remove the copyrights.

This modification is for vBulletin 3.6 only, if you are running vBulletin 3.5 you will need to see this thread.

JOIN THE vBIspy Network!
Once you have this mod installed, you can join the vBIspy network to have your threads appear on this site; the vBIspy Network is a great way for people to see what's going on in various vBulletin communities and for forum owners to promote their sites and generate new traffic.

Optional add-ons

Who's Online mod for this: https://vborg.vbsupport.ru/showthread.php?t=126209

vBAdvanced Module: https://vborg.vbsupport.ru/showthread.php?t=126421

UPDATES
1.0.4
Added buro9's code from here

1.0.5 - 9.9.06
Modified some JavaScript in va_spy.js to remove split strings

1.0.6 - 9.10.06
Added date cuffoff code from here and changed init() to spyinit() - changed vaispy.php and va_spy.js files.

1.0.7 - 9.12.06
va_spy.js: Added a forum url variable to allow for integration with portals or other products outside the forum directory
va_spy.js: Added xmldelay variable at top of script for easier configuration or repolling
Updated files: vaispy.php, vb_spy.js

1.0.8 - 9.13.06
vaispy.php - changed code for checking for forum permissions to include password protected forums, added javascript tag for script code

1.0.9 - 9.16.06
vaispy.php
va_spy.js
va_effects.js
- modified to allow for proper display in Opera browsers and moved more html into vaispy.php to allow for stylevars, trimmed va_effects.js to remove unused code (ForumDog's suggestions, except not using templates yet), changed way threads are parsed (removes html as well)

1.0.10 - 9.17.06
va_prototype.js - removed 20kb of unused code

1.1.11 - 9.25.2006
vaispy.php
va_spy.js
- added SirAdrian's mods for thread status icons and alternating row colors
- added code to prepopulate the first 10 rows with existing threads allowing for 5 new ones to be added in scrolling mode (versus scrolling starting from the first thread).
- added option to display subscribed threads only

1.1.12 - 9.26.2006
vaispy.php
- added code to add empty rows if initial pull has less than 20 rows.

Supporters / CoAuthors

Show Your Support

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

Comments
  #432  
Old 01-17-2007, 12:04 AM
MPDev's Avatar
MPDev MPDev is offline
 
Join Date: Oct 2003
Location: Virginia
Posts: 885
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Does your header have some kind of conditional code that only runs when logged in which might interfere with the polling for new posts?
Reply With Quote
  #433  
Old 01-17-2007, 12:05 AM
MPDev's Avatar
MPDev MPDev is offline
 
Join Date: Oct 2003
Location: Virginia
Posts: 885
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ngaiox View Post
Wait, I don't get it. What does this do? Does it show a post or thread as soon as it is added? Kind of like a chatroom?
Go to the example or vBISpy.Com to see how it works. It's a live feed of new posts/threads.
Reply With Quote
  #434  
Old 01-17-2007, 03:52 PM
Lionel Lionel is offline
 
Join Date: Dec 2001
Location: Delray Beach, Florida
Posts: 3,277
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

A stupid question. Can this be used for one specific thread? We are doing live updates of soccer games and I would love to have a mean to input data from same thread
Reply With Quote
  #435  
Old 01-18-2007, 01:24 PM
MPDev's Avatar
MPDev MPDev is offline
 
Join Date: Oct 2003
Location: Virginia
Posts: 885
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Off the top of my head; I'd say it would be possible if you modified the query pulling for new threads to use a specific thread-id.
Reply With Quote
  #436  
Old 01-19-2007, 10:28 PM
kungfujesus kungfujesus is offline
 
Join Date: Mar 2006
Posts: 27
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kungfujesus View Post

2. Is there any way to show the entire post in the thread/post column? It shows a fair amount but cuts off at a certain point.
Quote:
Originally Posted by MPDev View Post

2. You could modify the vbispy.php application to change the string truncation occurring.
What do you change to do this?
Reply With Quote
  #437  
Old 01-20-2007, 06:05 PM
MPDev's Avatar
MPDev MPDev is offline
 
Join Date: Oct 2003
Location: Virginia
Posts: 885
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Code:
    $thread['preview'] = htmlspecialchars_uni(fetch_trimmed_title($thread['preview'], 200));
line 158 in vaispy.php - the 200 is the characters it's trimming from.
Reply With Quote
  #438  
Old 01-21-2007, 01:21 AM
T.S. T.S. is offline
 
Join Date: Apr 2006
Posts: 59
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Dankness View Post
This is a execellent mod but lately iv been getting some weird DB errors maild to me from using this? Does anyone know why these errors are appearing all of a sudden?

Im usign VB 3.6.4 also

Code:
Database error in vBulletin 3.6.4:

Invalid SQL:

    	SELECT thread.*, post.pagetext AS preview, post.userid AS lastpuserid
    	FROM vb3thread AS thread
    	LEFT JOIN vb3deletionlog AS deletionlog ON(thread.threadid = deletionlog.primaryid AND type = 'thread')
    	LEFT JOIN vb3post AS post ON(post.postid = thread.lastpostid)
    	WHERE open <> 10 AND thread.lastpostid > 43469
    	AND forumid NOT IN (0,49,50,51,22,40,136,163,32,23,31,38,43,48,56,112,134,113,114,115,116,117,118,119,122,123,124,125,126,127,128,129,130,120,131,132,133,)
    	AND thread.visible = '1'
    	AND deletionlog.primaryid IS NULL
    	ORDER BY lastpost
    	DESC LIMIT 10;

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 ')
    	AND thread.visible = '1'
    	AND deletionlog.primaryid
Error Number : 1064
Date         : Tuesday, December 5th 2006 @ 01:46:44 PM
Script       : http://www.villu-reborn.com/vaispy.php?do=xml&last=43469&r=0.0840441166388669&_=
Referrer     : http://www.villu-reborn.com/vaispy.php
IP Address   : 67.126.202.236
Username     : TOB
Classname    : vB_Database
=====================================================

Database error in vBulletin 3.6.4:

Invalid SQL:

				SELECT *
				FROM vb3session
				WHERE sessionhash = 'bdce42f7e1d317b047a3dc7e49429ded'
					AND lastactivity > 1165344136
					AND idhash = '7b36de2b030fce6f3b1a836591791a87';

MySQL Error  : Lost connection to MySQL server during query
Error Number : 2013
Date         : Tuesday, December 5th 2006 @ 01:58:20 PM
Script       : http://www.villu-reborn.com/vaispy.php?do=xml&last=43471&r=0.49022190606534977&_=
Referrer     : http://www.villu-reborn.com/vaispy.php
IP Address   : 
Username     : 
Classname    : vB_Database
=====================================================

Database error in vBulletin 3.6.4:

Invalid SQL:

				SELECT *
				FROM vb3session
				WHERE sessionhash = '9d818bc112fde35ebc591b04907f1765'
					AND lastactivity > 1165346474
					AND idhash = 'ce5f7ee9179f6b9722a5610947e86ed5';

MySQL Error  : Lost connection to MySQL server during query
Error Number : 2013
Date         : Tuesday, December 5th 2006 @ 02:36:33 PM
Script       : http://www.villu-reborn.com/vaispy.php?do=xml&last=43474&r=0.8675544199068099&_=
Referrer     : http://www.villu-reborn.com/vaispy.php
IP Address   : 
Username     : 
Classname    : vB_Database
=====================================================

Thank you for your time.
I am getting similar or the same database errors once in awhile. Mysql has stopped/crashed 2 times, about a week apart.
Reply With Quote
  #439  
Old 01-21-2007, 01:53 PM
zetetic's Avatar
zetetic zetetic is offline
 
Join Date: Apr 2004
Posts: 338
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by JoeP
One thing I'm puzzled about - when viewed by a logged-in user, does it distinguish unread from read posts? It seems to display them all. I'd like to see the unread posts highlighted. I'd say this is pretty important considering why a forum member would use a realtime feed.

Even better, I'd like a checkbox 'unread posts only' (like the existing 'subscribed threads only').

How possible are these requests?
I'm curious about this too. Any idea, MPDev?
Reply With Quote
  #440  
Old 01-22-2007, 04:02 PM
MPDev's Avatar
MPDev MPDev is offline
 
Join Date: Oct 2003
Location: Virginia
Posts: 885
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No, I do not try to determine if a thread has been read before or not.
Reply With Quote
  #441  
Old 01-22-2007, 06:00 PM
stud stud is offline
 
Join Date: May 2004
Posts: 87
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Trana View Post
Thus the need for someone who knows how this works to resolve the problems with the CMPS module version of this hack.
Can't echo my agreement with this enough! The CMPS module was working before one of the revisions and for some reason does not work anymore... it was an AMAZING module, but has since become MONTHS outdated.... a return to possibly revive this feature by someone who understands the code would make many of us happy here!
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:26 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.05198 seconds
  • Memory Usage 2,330KB
  • Queries Executed 26 (?)
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
  • (6)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