vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Portal Software - vBISpy module - live AJAX feed of new threads - for vBAdvanced CMPS (https://vborg.vbsupport.ru/showthread.php?t=126421)

MPDev 09-11-2006 10:00 PM

vBISpy module - live AJAX feed of new threads - for vBAdvanced CMPS
 
This is my first module for vBAdvanced, but its a simple one, so I don't expect any installation problems.

You can see an example of this working on:

ViperAlley.Com

You must already have a working copy of the vBIspy client v1.0.7 or better in place. (vB 3.5 users need v1.06 or better)

INSTALLATION

Add the vbispyblock.module to your vBAdvance portal - keep in mind the size of the block when you choose it's placement - if you use three columns, then really only the center column will work.

To install you should have a working copy of the VBIspy client already working on your system. Once you have one of the clients working adding vBIspy blocks to other pages becomes easier.

################################################## ################################
################################################## ################################

STEP 1

Because vBAdvanced CMPM usually resides outside of the forum directory, you will need to make one change to the clientscript/va_spy.js script that comes with vBIspy.

In va_spy.js, find:

Code:

var vburl = '';
and change this to read:

Code:

var vburl = '/forum/';
using the name of the directory your forums are in in place of "forum". This is important as otherwise the links from the vBIspy block will not resolve to the forum directory.

################################################## ################################
################################################## ################################

STEP 2

You will need to modify the 'adv_portal' template to add a few lines:

################################################## ################################

Find:

Code:

$headinclude
Add after:

Code:

<script language="javascript" src="{$vbulletin->options['bburl']}/clientscript/va_prototype.js"></script>
<script language="javascript" src="{$vbulletin->options['bburl']}/clientscript/va_effects.js"></script>
<script language="javascript" src="{$vbulletin->options['bburl']}/clientscript/va_spy.js"></script>
<script language="javascript">
    spymax = 10;
    highestid = 0;
</script>

################################################## ################################

Find:

Code:

$footer
Add after:

Code:

<script language="javascript">
    spyinit();
</script>

################################################## ################################

You are done. Activate the module and you should start seeing a live feed of threads on your portal page.

If you do not see an updating list of threads:

1) Double check that your vBIspy.php script is working properly!
2) Make sure you followed the above instructions.
3) If all else fails, open the JavaScript Console in Firefox and see what errors you might be getting.

1.0.1 - 9.28.06
Modified template for module to support 1.0.12 release of vBIspy (you can modify your template manually from this post; but you also need to note the changes to the spymax and addition of the highestid variable to be changed in your adv_portal template).

MPDev 09-12-2006 12:58 PM

Users upgrading from 1.00 to 1.01 please read this:

If you already have it installed; you need to modify your adv_portal_vbispy templates according this this thread.

Then you need to edit your adv_portal template and change this:

Code:

spymax = 15;
to this:

Code:

spymax = 10;
highestid = 0;


juan71287 09-12-2006 02:01 PM

Thankx a lot man... THis wasnice for the forum now its nice for the PORTAL :)

soletrader 09-12-2006 02:05 PM

I do not see var vburl = ''; in va_spy.js

Also, how did you make your live updates module on your forum homepage to display just one post at a time? Thank you

cygy2k 09-12-2006 02:21 PM

Is there a way to make it so this can replace the latest forum topics that most of use have above our latest news posts? With that I mean is there a way to have it show the last x number of posts and no more and doesn't show the post but rather just the regular vba type of listing of threads? Also, would it be easy to make this appear in a scrolling marquee so it fits the page better?

Great work!!

nix 09-12-2006 04:04 PM

its not working here. Getting this error.

init is not defined.

PHP Code:

<script language="javascript">
    
init();
</
script

VBispy works fine. It worked at first till I upgraded to version 1.07. I've done all the edits and my forum and VBadvanced are in the same directory so I didn't do the js edits.

mickeymouse690 09-12-2006 05:17 PM

Yeah its me again, Can this with the vburl thingy be made to goto an external source? You know what im looking to do.

MPDev 09-12-2006 05:19 PM

Sorry, that should be spyinit(), not init() - I've updated the instructions.

MPDev 09-12-2006 05:21 PM

It'll show all the posts the users logged in has access to see; so if a user doesn't have access to a forum, then it shouldn't appear in their feed.

cygy2k 09-12-2006 05:42 PM

MPDev-

Is there a way to make this replace the latest topics module so it stays in the same relative format by showing the topic replied to instead of the post and where it shows like the last x posts rather than a longer lists?

nix 09-12-2006 05:42 PM

Quote:

Originally Posted by MPDev
Sorry, that should be spyinit(), not init() - I've updated the instructions.

thanks. That fixed it.

lexhunt 09-12-2006 05:55 PM

Cannot find var vburl

Sorry I had version 1.05

MPDev 09-12-2006 05:55 PM

Quote:

Originally Posted by cygy2k
MPDev-

Is there a way to make this replace the latest topics module so it stays in the same relative format by showing the topic replied to instead of the post and where it shows like the last x posts rather than a longer lists?

Only if you modified the javascript to reformat the display.

MPDev 09-12-2006 05:56 PM

I am running into what I think is a compatibility issue between the prototype AJAX code and vB's AJAX code; either you can't have two AJAX handlers on the same page or they contain objects that are overwriting one another.

For example, expand/collapse won't save to a cookie when va_prototype.js included; going to have to research further.

MPDev 09-12-2006 06:18 PM

It may not be an AJAX issue; but a cookie issue. The save_collapsed() to save expand/collapse settings on a page are not being saved.

Tungsten 09-12-2006 08:11 PM

In the module there is a hardcoded URL that needs to be modified according to where you have vBulletin installed...

Code:

<tr><td colspan="4" class="tcat" align="left"><span class="smallfont"><strong>&raquo; <a href="/forum/vaispy.php">Live Forum Updates</a></strong></span></td></tr>
The href="/forum/... portion of the code is what I am talking about.

nix 09-12-2006 08:27 PM

Yea didn't notice that before. Just fixed it on mine.

MPDev 09-12-2006 08:29 PM

Good catch; I would image that can be replaced with a vb variable; my first module and all that. ;)

Acido 09-12-2006 11:11 PM

Quote:

Originally Posted by MPDev
Good catch; I would image that can be replaced with a vb variable; my first module and all that. ;)

Excellent Job :)
Thanx for share this!

Ramsesx 09-13-2006 01:40 AM

Nice idea, for your information on Opera 8 it's looking not correct (see screenshot)

MPDev 09-13-2006 01:49 AM

Yeah, Opera isn't working properly; I dont use Opera, don't know Opera and at this time don't have the time to install it and try and learn why. Hopefully someone with more experience can point us in the right direction.

Guest210212002 09-13-2006 03:45 AM

Absolutely awesome. I started a thread about this a while back, and caught some grief about it being an "improper use of AJAX". I think it rocks, install took about 5 seconds, and I've wanted this since the first time I saw it. :D

Thanks very much MPDev, great mod.

[high]* Guest210212002 clicks install[/high]

Capt. GannA 09-13-2006 07:37 AM

It's seemingly not working for me.

1) Uploaded all the files in the correct directories.
2) Followed your instructions.
3) vaispy.php is working.

There's not a single error in the firefox javascript console either :/..

Barakat 09-13-2006 08:55 AM

its works but i change some of the adv_portal_vbispy template so as to hide the space and make it better view ....

http://www.jerusalemgts.com/gti/portal.php

thanks for that hack .

Snake 09-13-2006 10:04 AM

Thanks for the hack!

Tungsten 09-13-2006 04:04 PM

Quote:

Originally Posted by Capt. GannA
It's seemingly not working for me.

1) Uploaded all the files in the correct directories.
2) Followed your instructions.
3) vaispy.php is working.

There's not a single error in the firefox javascript console either :/..

I have the same issue on my forum as well. :(

stud 09-13-2006 04:37 PM

does this work for CMPS installed on VB3.5 also?

MPDev 09-13-2006 04:40 PM

I would think so; but I dont have 3.5 installed to test it on.

stud 09-13-2006 04:42 PM

hmm ok. i ask because when i followed the instructions, any time i make the module active - it blanks the entire home page - showing nothing.

camoman 09-13-2006 06:16 PM

Has anyone tested this yet with vb 3.5.4 and vbadvanced 2.1.0?

camoman 09-13-2006 07:11 PM

Just tested it and it works fine.

ChurchMedia 09-13-2006 07:51 PM

I'm getting a white space to the right of the info. I've done everything I know to do to get rid of it. Could it be in one of the .js files?

See screenshot.
Here is an example:
http://www.churchmedia.net/page.php?p=newsletter2

Thanks for the hack!

It looks fine here: http://www.churchmedia.net/CMN/vaispy.php

Barakat 09-13-2006 08:56 PM

Just open the adv_portal_vbispy template and change the values in the fist table to zero instead of 6 and 1 like this :
Code:

<table class = "tborder" cellpadding="0" cellspaces="0" width="100%" border="0" align="center" id="spy-table">
dont copy paste this , just correct the values ? ?

Capt. GannA 09-14-2006 09:56 AM

Quote:

Originally Posted by Capt. GannA
It's seemingly not working for me.

1) Uploaded all the files in the correct directories.
2) Followed your instructions.
3) vaispy.php is working.

There's not a single error in the firefox javascript console either :/..

uhhhh HELP?

stud 09-14-2006 12:54 PM

MPDev - what do you think about the following suggestion:

Is there any way to have it remove previous instances and put the most updated reply on the top?

IE: when you first refresh the iSpy - it polls and finds all recent replies to the threads. However when a new reply is posted to a single thread, it puts this reply on the top and leaves the previous instance underneith.

A great way to use this module would be to have it remove the old post from the iSpy, and place the most recent reply to the top - hence removing duplicates and functioning as a self-refreshing superior "Recent Threads" module.

GMail functions sort of like this. A bonus would be to bold and unbold topics as they are read, in the same way the Recent Threads currently works as you manually refresh the page. I like the functionality of both ways but having the option to use the module this way would prove a superior replacement for the Recent Threads module.

glorify 09-14-2006 09:39 PM

Any way to limit the characters?

MPDev 09-15-2006 01:32 AM

poninja,

You didn't add the javascript to the header for the portal page (I checked your html); see instructions in the top post.

poninja 09-15-2006 02:52 AM

OK, I edited the default template by accident. Doh!

Thanks for the help!

StevanMD 09-15-2006 12:08 PM

MPDev,

I am having the same sort of problem poninja had, only I did follow the instructions closely and do have everything in right place.
Please, take a look:
http://www.mototips.com/
http://www.mototips.com/vaispy.php

Thanks

MPDev 09-15-2006 12:13 PM

Stevan,

I don't see a Live Feeds block on your index page at all; did you add the module?


All times are GMT. The time now is 12:48 PM.

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.01414 seconds
  • Memory Usage 1,829KB
  • 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
  • (10)bbcode_code_printable
  • (1)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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