vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Miscellaneous Hacks - vBISpy - AJAX real-time feed of new posts/threads (https://vborg.vbsupport.ru/showthread.php?t=233759)

mpadc 01-22-2010 10:22 PM

Thanks can soemone tell me how to include it as a link in the navbar next to calendar

patt1293 01-22-2010 10:57 PM

Quote:

Originally Posted by skariko (Post 1963333)
Same here! :)

Fixed your problem here

Quote:

Originally Posted by mpadc (Post 1963846)
Thanks can soemone tell me how to include it as a link in the navbar next to calendar

Find
PHP Code:

<li><a href="calendar.php{vb:raw session.sessionurl_q}">{vb:rawphrase calendar}</a></li

Add:
PHP Code:

<li><a href="vaispy.php">iSpy</a></li


Eric 01-23-2010 02:28 PM

Quote:

Originally Posted by DjEddie (Post 1963320)
If u would like access to mine, as the widget ideas seems like a good one .. then pm me for details and ill sort u an account out ... :)

We'll see - may do that when I know I'll have time to mess around with it :)

Quote:

Originally Posted by New Joe (Post 1963186)
Another small bug is that when you click on the newly posted post, it will take you to the first post and first page of that Thread, instead of taking you right to the last post, the on you've just clicked on in iSpy.

This seems to be because of vB4's new "Friendly URL's" - I've not found a way to be able to generate them in Javascript.

Quote:

Originally Posted by New Joe (Post 1963146)
I remeber having the same problem with MPDev's version, but after doing this:
It worked fine, I changed 7000 to 1000

But i have looked in the va_spy_js file in this new version and the above is different:


Any help would be great.
Thanks.

You can change that by modifying:
Code:

/* Delay between polls to the XML feed for new updates to page */
var xmldelay = 7000;

In /clientscript/va_spy.js - if using 2.0.2 - that line is now:
Code:

/* Delay between polls to the XML feed for new updates to page */
var xmldelay = 3000;


Eric 01-23-2010 02:30 PM

Updated to 2.0.2

2.0.2 - January 23, 2010
- Hopefully the incorrect showthread link is now fixed.
- Added alternate row colors.
- Changed default xml delay in va_spy.js to 3000 from 7000.

clmazin 01-23-2010 06:10 PM

Great work, SecondV. The showthread links do work correctly now, and clicking on the thread in the feed takes you to the last post.

Thanks!

C.

TimberFloorAu 01-23-2010 06:24 PM

That Looks Great now Eric.

Thanks ( upgraded )

Eric 01-23-2010 06:35 PM

Quote:

Originally Posted by clmazin (Post 1964627)
Great work, SecondV. The showthread links do work correctly now, and clicking on the thread in the feed takes you to the last post.

Thanks!

C.

Quote:

Originally Posted by TimberFloorAu (Post 1964636)
That Looks Great now Eric.

Thanks ( upgraded )

Awesomesauce! Glad it works now :)

Sushubh 01-23-2010 09:32 PM

thank you thank you thank you so much. :) i have been waiting for this since the day i moved to vb4...

SpankMe 01-23-2010 09:42 PM

Quote:

Originally Posted by SecondV (Post 1964400)
Updated to 2.0.2

2.0.2 - January 23, 2010
- Hopefully the incorrect showthread link is now fixed.
- Added alternate row colors.
- Changed default xml delay in va_spy.js to 3000 from 7000.

New colors don't work well on dark colored styles. :( It needs to use css from styles so we can adjust for style color.

ahmedbehiry 01-24-2010 02:15 AM

it's working, but I don't know what it doesn't update.. I mean the links in the page stay the same and they don't show new posts and threads in the forum!

ahmedbehiry 01-24-2010 02:46 AM

it's working, but I don't know what it doesn't update.. I mean the links in the page stay the same and they don't show new posts and threads in the forum!

cagbaazee 01-24-2010 06:03 AM

Thanks , I hv install it without any problem. Keep it up.

ManagerJosh 01-24-2010 06:22 AM

Up and running in http://uoem.com/forums/vaispy.php

jonty 01-24-2010 11:14 AM

Quote:

Originally Posted by Alfa1 (Post 1962975)
Please include new group discussions into the feed. New blogs would also be awesome.

:up:

Social Group discussion are our most commonly asked-for feature. (permissions dependant)
PMs (obviously just your own!)
Blogs and CMS entries would also be handy.

madotds 01-24-2010 01:04 PM

Quote:

Originally Posted by SpankMe (Post 1964797)
New colors don't work well on dark colored styles. :( It needs to use css from styles so we can adjust for style color.

I also have this problem as you can see HERE is there any way to change the colours?

Mark

Eric 01-24-2010 01:22 PM

Quote:

Originally Posted by madotds (Post 1965203)
I also have this problem as you can see HERE is there any way to change the colours?

Mark

Quote:

Originally Posted by SpankMe (Post 1964797)
New colors don't work well on dark colored styles. :( It needs to use css from styles so we can adjust for style color.

Ahh, that totally slipped my mind. You can edit this in vaispy.php, find:

#spy_table td .alt1 & #spy_table td .alt2

And you can change it there.

ahmedbehiry 01-24-2010 01:32 PM

and what should I do with the page not being updates as it should?

madotds 01-24-2010 01:38 PM

Quote:

Originally Posted by SecondV (Post 1965218)
Ahh, that totally slipped my mind. You can edit this in vaispy.php, find:

#spy_table td .alt1 & #spy_table td .alt2

And you can change it there.

Ok thanks for that I have used rgb 000.102.153 and rgb 000.153.153 and this shows up well on both my light and dark skin. :)

Eric 01-24-2010 01:53 PM

Quote:

Originally Posted by ahmedbehiry (Post 1965221)
and what should I do with the page not being updates as it should?

What is the URL to your installation?

ahmedbehiry 01-24-2010 03:40 PM

<a href="http://haridy.com/ib/vaispy.php" target="_blank">http://haridy.com/ib/vaispy.php</a>
sorry, it's in Arabic.. but you can see that the posts are not changing..

Eric 01-24-2010 03:53 PM

Quote:

Originally Posted by ahmedbehiry (Post 1965331)
http://haridy.com/ib/vaispy.php
sorry, it's in Arabic.. but you can see that the posts are not changing..

You're using jQuery - jQuery and Prototype(what this mod uses) do not play nice with each other.

ahmedbehiry 01-24-2010 04:01 PM

:S is there a way to disable jquery inthis page with vb conditionals?

New Joe 01-25-2010 01:12 AM

Quote:

Originally Posted by SecondV (Post 1964396)


This seems to be because of vB4's new "Friendly URL's" - I've not found a way to be able to generate them in Javascript.

So do you think it can be done?

compuminus 01-25-2010 01:30 AM

Quote:

Originally Posted by SecondV (Post 1964400)
Updated to 2.0.2

2.0.2 - January 23, 2010
- Added alternate row colors.

Ideally the alternate row colors would be drawn from the stylevars, as opposed to being hard-coded into the php. I have a light and dark style for my forums, so as it stands now, vBISpy won't look right with one of them. Perhaps alt1 could correspond to threadbit_background and alt2 could be threadbit_alt_background ? Thanks for porting this to vB4!

compuminus 01-25-2010 01:38 AM

Also, perhaps you would want to use the new thread status icons for vB4...? You'd mentioned that these were too large to fit in the line of vBISpy test, so they weren't used -- but how about using the 16x16px versions? This would just change the vaispy.php code from:

Code:

$thread['statusicon'] = vB_Template_Runtime::fetchStylevar('imgdir_statusicon') . '/thread' . $thread['statusicon'] . '.gif';
to:

Code:

$thread['statusicon'] = vB_Template_Runtime::fetchStylevar('imgdir_statusicon') . '/thread' . $thread['statusicon'] . '-16.png';

ahmedbehiry 01-25-2010 02:56 AM

I've disabled jquery in the page using vb conditional <vb:if condition="THIS_SCRIPT != 'vaispy'">
and I'm checking it right now

ahmedbehiry 01-25-2010 05:21 AM

still not working even though jquery is disabled.

phil801 01-25-2010 06:18 AM

I'm so glad you fixed this mod for 4.0! I was in the process of paying to have it customized.

Installed fast and easy and WORKS!

Viewable here: http://www.ldspreppers.com/recentposts.php

Eric 01-27-2010 12:33 AM

Quote:

Originally Posted by compuminus (Post 1965749)
Ideally the alternate row colors would be drawn from the stylevars, as opposed to being hard-coded into the php. I have a light and dark style for my forums, so as it stands now, vBISpy won't look right with one of them. Perhaps alt1 could correspond to threadbit_background and alt could be threadbit_alt_background ? Thanks for porting this to vB4!

Yeah, it just slipped my mind when I added that in. The threadbit backgrounds probably would be best for it.

Quote:

Originally Posted by compuminus (Post 1965752)
Also, perhaps you would want to use the new thread status icons for vB4...? You'd mentioned that these were too large to fit in the line of vBISpy test, so they weren't used -- but how about using the 16x16px versions? This would just change the vaispy.php code from:

Code:

$thread['statusicon'] = vB_Template_Runtime::fetchStylevar('imgdir_statusicon') . '/thread' . $thread['statusicon'] . '.gif';
to:

Code:

$thread['statusicon'] = vB_Template_Runtime::fetchStylevar('imgdir_statusicon') . '/thread' . $thread['statusicon'] . '-16.png';

Ahh, thanks for that - will implement that in the next release :)

Quote:

Originally Posted by ahmedbehiry (Post 1965805)
I've disabled jquery in the page using vb conditional <vb:if condition="THIS_SCRIPT != 'vaispy'">
and I'm checking it right now

Sorry, not sure what else to tell you. It could be an RTL issue, I'm not sure.
Quote:

Originally Posted by New Joe (Post 1965744)
So do you think it can be done?

Still looking into the friendly URL situation...

compuminus 01-27-2010 01:10 AM

Quote:

Originally Posted by SecondV (Post 1967554)
Ahh, thanks for that - will implement that in the next release :)

Great. It's not a perfect icons coding though, since it does not always correctly use the thread_dot_16-right.png or thread-16-right.png as opposed to thread_dot_16.png or thread-16.png, respectively (when appropriate), but it's pretty close.

Look forward to the new release! Thanks!

Alien 01-27-2010 01:49 AM

Quote:

Originally Posted by compuminus (Post 1965749)
Ideally the alternate row colors would be drawn from the stylevars, as opposed to being hard-coded into the php. I have a light and dark style for my forums, so as it stands now, vBISpy won't look right with one of them. Perhaps alt1 could correspond to threadbit_background and alt2 could be threadbit_alt_background ? Thanks for porting this to vB4!

I have this same issue, please consider this it's very important for those with light and dark styles both!

compuminus 01-28-2010 03:32 PM

I just noticed another issue that I'm surprised I hadn't spotted before:

All of the lower menu items disappear on the vaispy.php page (New Posts, Private Messages, FAQ, Community, etc.). Only the very top level items appear (Forum, What's New, etc.)

Should be a reasonably simple fix...

SpankMe 01-29-2010 11:14 PM

Quote:

Originally Posted by compuminus (Post 1967574)
Great. It's not a perfect icons coding though, since it does not always correctly use the thread_dot_16-right.png or thread-16-right.png as opposed to thread_dot_16.png or thread-16.png, respectively (when appropriate), but it's pretty close.

Look forward to the new release! Thanks!

For now just..

cp statusicon/thread_dot-16.png BP-Brown/statusicon/thread_dot_hot-16.png
cp statusicon/thread_dot-16.png BP-Brown/statusicon/thread_dot-16.png
cp BP-Brown/statusicon/forum_old-16.png BP-Brown/statusicon/thread-16.png

it fits well. And it's green. :)

New Joe 02-02-2010 08:22 AM

Any chance of getting this made: https://vborg.vbsupport.ru/showthread.php?t=126421
vBISpy module - live AJAX feed of new threads - for vBAdvanced CMPS

dosadno 02-03-2010 10:39 AM

Sorry if this has been asked, but how can i set it to be viewable by only certain usergroups?
I would like that only admins and moderators can use this mod...

BTW great mod

Sushubh 02-03-2010 10:53 AM

i guess do not reveal the URL of the vaispy page!

that's what i do. only a limited number of people know about the vaispy page on my forum.

dosadno 02-03-2010 10:58 AM

There must be a beter way, besides, tab with the url is alredy publised

shofolofo 02-05-2010 08:03 PM

yes I need this aswell .. anyway to define the user group ids ?

chris1979 02-13-2010 10:13 AM

Are there some customisation instructions somewhere? I cannot remember from the 3.8 version... how do we select which forums to include, and how can we set how often to check for updates?

Eric 02-13-2010 10:21 AM

Quote:

Originally Posted by shofolofo (Post 1975611)
yes I need this aswell .. anyway to define the user group ids ?

This will be in the next update. In the meantime, if you want to block certain usergroups from viewing vaispy...

Edit vaispy.php and find:
PHP Code:

// #######################################################################
// ######################## START MAIN SCRIPT ############################
// ####################################################################### 

and after that, add (only an example)
PHP Code:

if (is_member_of($vbulletin->userinfo8))
{
    
print_no_permission();


Where '8' would be the usergroup id. You can also do multiple usergroups. Let's say you had 8, 9, 10 that you wanted to block:
PHP Code:

if (is_member_of($vbulletin->userinfo8910))
{
    
print_no_permission();


Quote:

Originally Posted by chris1979 (Post 1981283)
Are there some customisation instructions somewhere? I cannot remember from the 3.8 version... how do we select which forums to include, and how can we set how often to check for updates?

Since this is based on the original vBISpy, I've not really changed the mod much. It doesn't make use of the product system/templates/phrases/etc, so it has to be done manually. You can not currently choose which forums to include, you can only choose to exclude forums:

Around line 44 in vaispy.php
PHP Code:

/**
* Do not list these forums even if they have 
* permissions (test categories, etc)
*/
$blockforums ''

As far as the time between updates, that's controlled by the javascript, in the clientscript/va_spy.js file. In that file, around line 38 you'll see:
HTML Code:

/* Delay between polls to the XML feed for new updates to page */
var xmldelay = 3000;

This value is seconds x 1000

So, let's say you wanted it to be 6 seconds, you'd change it to:
HTML Code:

/* Delay between polls to the XML feed for new updates to page */
var xmldelay = 6000;



All times are GMT. The time now is 01:40 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.01528 seconds
  • Memory Usage 1,857KB
  • 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
  • (6)bbcode_code_printable
  • (2)bbcode_html_printable
  • (6)bbcode_php_printable
  • (26)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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