![]() |
Nice. :)
Although.. it doesn't seem to like either GARS or the RSS bot feature.. http://www.nzboards.com/forums/nzbpostspy.php Only the New Post has a 'Forum' entry. *edit* In Firefox, that is. |
I'm using it with RSS feeds and its working fine in FF. Same with Gars.
|
Here's the code.. it looks like something is being stripped.
Code:
<td class="alt1Active"><strong><a href="showthread.php?t=30950">Object from 'space' found by chance - Stuff.co.nz</a></strong><br><div class="smallfont"><br><table border="0" cellpadding="2" cellspacing="7" width=""><tbody><tr><t><a... replies="" 0="" views="" (0=""></a...></t><td class="alt1" align="center"><div class="smallfont"><strong><a href="forumdisplay.php?f=76">New Zealand News Feeds</a></strong></div></td></tr></tbody></table></div></td> Code:
if (e instanceof RangeError) return '...'; |
Quote:
In va_spy.js REMOVE Code:
function pauseSpy() { In vaispy.php FIND: Code:
<script language="javascript" type="text/javascript"> ADD BELOW: Code:
<script language="javascript" type="text/javascript"> Code:
<img id="vaplay" src="images/misc/play_up.gif" alt="Play" title="Play Comments" onclick="playSpy();" /> Code:
<img id="vaplay" src="$stylevar[imgdir_misc]/play_down.gif" style="cursor:pointer;" alt="Play" title="Play Comments" onclick="playSpy();" /> And make sure your Play/Pause buttons are uploaded to the misc directory of each individual theme. Finis. |
Quote:
Code:
$selectivefiltered = $vbulletin->userinfo['excludeforumids']; Code:
$gnpoptoutforums = $vbulletin->userinfo['excludeforumsgnp']; |
I'd be curious if the selected forums code works on sites where people do not use that feature; if so, I can add it.
On another note, I've updated vBIspy.com so that it can pull threads using vBulletin's external.php script; so we can aggregate content with vBIspy client (you get some additional features like profile links, forum specific links, views/replies) or with vB's own internal RSS feed. I am updating the download with a new version that changes the forumpermissions area to include checking for password protected forums. |
It's not selected forums code, it's deselected forums code to exclude forums from getnew searches. It's not default vBulletin code so I don't see how it could work on those without the appropriate plugin installed but I don't see why it would cause a problem for people without it. Should just be skipped over. I'll try it properly later.
Um, could you possibly not advertise in the hack update feature. :p |
Quote:
|
Quote:
|
Quote:
|
Does anybody know if this hack is server intensive?
|
Quote:
Aside from that, take a look... turn on debug mode and add explain=1 to the do=xml querystring for the php file. I'm seeing the page generated in 5 queries, all taking less than 0.01 seconds, and the largest query isn't the spy query, but the ones that fetch the datastore and templates (I'm using the template layer for spy and not the echo'd HTML that spy originally shipped with). I also reduced the number of refreshes fired by the JavaScript, from 7 seconds down to 20 seconds. As that is the highest rate of posting on my forum around peak time, so it seemed daft to be firing off so many useless AJAX calls. I'm considering dropping it further to 30 seconds, which would be about the maximum on a large forum before you degrade the user experience of the spy. In summary: Doesn't need to be intensive, but the first version was. Oh, and the JavaScript is horrible. All kinds of dodgy 1.0 stuff and bizarre splitting of strings. I'm very much inclined to re-write that stuff using proper DOM stuff. vBulletin is largely XHTML, there's not much excuse to break that on this page through the use of innerHTML rather than DOM manipulation. Besides... use one or the other, both are fast, but combined they are cludgy. So I'm going to change most of mine to fully use DOM stuff, and get rid of those arrays of data when objects would be just as good, or using the original responseXML. Anyway... rambling... low server load if you use the latest version. |
Quote:
buro9, would you release your improvements? I also moved the code except the inside of the table rows to the templating system and changed the non-IE XHTML to divs and spans with CSS for better markup and to fix the Opera rendering failure, plus some other cosmetic changes/additions. It's currently driving me nuts that the HTML is all inside the JS and I can't use conditionals or anything like that. It would be really great if I could and the code was vB consistent if I could twist your arm. :) |
When I've done the DOM JavaScript stuff I'll post it here. It may be a few weeks though, I'm still running the old javascript on my site, the new stuff I haven't had tested in many browsers (just Firefox on Ubuntu), so I've yet to even get it past IE on Windows ;) And I'm going to be distracted and slow working for a fortnight as my girl is coming to stay for a couple of weeks... this takes a lower priority ;)
As for the basics to make things better now: In vaispy.php: REPLACE: Code:
$daysprune = 1; Code:
$daysprune = 0.04; In va_spy.js: REPLACE: Code:
var xmldelay = 7000; Code:
var xmldelay = 20 * 1000; REPLACE THE TWO INSTANCES OF: Code:
setTimeout("getXML()", 5000); Code:
setTimeout("getXML()", xmldelay); Changing that you will have taken each users average 10 queries per minute down to 3 queries per minute. Change it to 30 seconds and they'll be down to 2 queries per minute. Any time span higher than this will reduce the beauty and usability of the spy page too much for my liking. But quiet forums could easily get it to 1 minute per poll. I also don't like * queries in SQL, so I changed in vaispy.php: Code:
$getthreads = $db->query_read(" Code:
$getthreads = $db->query_read(" |
Hi peeps
Can someone please take a look at my vaispy.php as the opacity is not working this time. It worked the last time i edited the page to my liking, but then i updated and lot it all, so i have now done it again but the opacity is not working on the last few posts at all.... You can view it here untill i remove for guests http://www.bashys-place.com/forums/vaispy.php I have enclosed the php for you to check if you have time please? Also done a quick scout and cannot find how i could stop guests from using this please? At present guests can only see 10 or so posts, memebsr can see 45, i dont want guests seeing any! |
Quote:
The opacity was not correct in the first place, it's one of the fixes I made I'll post it with the rest soon. Thanks buro9 :) great to see people working together on this mod. |
Quote:
I'll change the query in the next update so everyone can benefit from the improvement. And nice to have others putting in the effort! Thanks. |
I did have the opacity working the on 1st install, it was fine :)
Quote:
|
It works for IE, but not on FF; I assume it's a tag, but haven't had the time to go looking just yet.
|
Quote:
|
Hi,
Great add-on! I would like to show this on a non-vb page as an include. How can I do that without getting the "Unable to add cookies, header already sent." error? Thanks! Tim |
Quote:
The default title length as set by vBulletin is actually 85 characters not 80. In vaispy.php FIND: Code:
(unhtmlspecialchars($thread['title']), 80) Code:
(unhtmlspecialchars($thread['title']), 85) I moved the HTML to a vBulletin template, it's easier to separate code from presentation that way and allows use of template caching more flexibility with conditionals and so on so I'll *assume* that's what you'll want to do. It's very easy to do manually as long as this isn't a plugin which for the time being is unnecessary. FIND: Code:
// pre-cache templates used by all actions Code:
// pre-cache templates used by all actions Now we have to tell the page to fetch the template, and we're also going to add a couple of lines to keep the vBulletin breadcrumb going. In vaispy.php FIND: Code:
eval('$navbar = "' . fetch_template('navbar') . '";'); REPLACE WITH: Code:
$navbits = array(); Looking good! Now let's just transfer it over to the template. REMOVE: Code:
echo<<<VAPRINT Code:
VAPRINT; This will allow Microstats to show up in the footer and whitespace strippers, template caches etc, makes the code valid too. In template vaispy: FIND: Code:
$footer Code:
</body> Because we're now in a template there's no reason not to use style-specific directories to allow people with multiple themes not to be forced to create a new top-level directory for the buttons. You must ensure your buttons are copied to each misc directory for every style you have installed. Also added is code to ensure the mouse changes to the hand icon over a button to show it is a clickable link, plus compatibility commenting for inline javascript code. In va_spy.js REMOVE Code:
function pauseSpy() { In vaispy.php FIND: Code:
<script language="javascript" type="text/javascript"> Code:
<script language="javascript" type="text/javascript"> Code:
<img id="vaplay" src="images/misc/play_up.gif" alt="Play" title="Play Comments" onclick="playSpy();" /> Code:
<img id="vaplay" src="$stylevar[imgdir_misc]/play_down.gif" style="cursor:pointer;" alt="Play" title="Play Comments" onclick="playSpy();" /> Now we're going to make the opacity code which creates the nice fading effect work across all browsers instead of currently very few. I am currently pulling images into the post/thread Spy, so if you/the author decides to do this the fade effect is also already there for them too. FIND: Code:
opacity:.XX REPLACE WITH: Code:
class="spyfadeX" FIND: Code:
$headinclude Code:
<style type="text/css"> Code:
Code:
// if (i + 5 > spymax) { The reason Opera is failing to render properly is because it does not download elements with {display:none;}, unlike other browsers which download them but don't show them. This is actually quite a bandwidth saver at times and usually A Good Thing, but here it is causing problems because the table cells which the javascript is throwing out have no table row structure due to them having the attribute {display:none;}, so they're just piling up as lone cells without a row. MPDev seemed to want this now :p, but otherwise it's fine. Since IE is already the one having trouble doing...more or less anything...and it can't handle the non-table code, we're going to continue the slightly painful IE-specific code theme. I'm afraid I've already heavily optimised and customised the appearance to match my threadbit so I'm sorry to say this is rather vague. In va_spy.js FIND: Code:
text = '<td class="alt1" align="center"><div class="smallfont"><strong>' + what + '</strong></div></td><td class="alt2"><div class="smallfont">' + poster_clip + '</div></td><td class="alt1Active">' + clip + '</td><td align="center" class="alt1"><div class="smallfont">' + where + '</div></td>'; ***Note: I now have this working on any resolution with Opera & Firefox and hopefully every other browser, BUT I only use three cells not four like the default code so you're going to have to use my code as a template to work out the layout for four. Take note of the clears and floats and make sure you assign a % width to the thread/post section and a px width to all the others. Let me know if you need a hand. Code:
// Did I mention IE is "special"? Help it avoid the scary clever presentation. Now we have to add the accompanying code to the template to match. Again it's a bit vague because of my template, sorry. This is the general idea. I can only test on Opera, Firefox and IE but it works across all 3, latest release versions, and should be good across other modern browsers as tables are really only used for things like this because IE can't handle anything more complicated. FIND: Code:
<table class="tborder" cellpadding="6" cellspacing="1" border="0" width="100%" align="center" id="spy_table"> Code:
<if condition="is_browser('ie')"> Finally, unless you've looked you won't be aware that the va_effects JS file contains considerably more effects than just the fade-in (called Appear) used by default. I went through most of them, I don't think any consistently worked properly (indeed, neither does the fade-in effect since it doesn't work in IE, this is probably due to the lack of varying opacity code as I mentioned earlier). However, since it's the default and obviously you can only use one effect I removed the other code from the effects file and trimmed it down to just the Appear effect. This saves 20kb from the initial download time. The file is attached for anyone who wants it, to use it just place the attached file in your clientscript folder with the va_effects.js file and in your vaispy template just replace the words va_effects.js with va_appear.js. Phew! Hope that helped. |
I'm glad you guys are working on a fix for Opera... once it's done I'll probably install this nice mod.
|
Cheers, I have added and the opacitiy is working well now, thanks alot :)
I actually have 2 monitors and i use the spu on the other monitor on the active desktop so that i get real time updates without even having to log on to the forum, its great :) Thanks again peeps!!!! Quote:
|
Thanks, ForumDog; I'll see about incorporating those change shortly. By creating a template, I also have to create a plug-in; which I was sort of trying to avoid, but might be the natural progression to take.
I left the effects javascript in tact, although the copyrights don't say we can't modify for our use. I'll leave the copyrights in place and just use the code from the file that we use. |
Quote:
Edited the above post slightly, just noticed that removing the style.filter code in the .JS allows the fade out to work in IE. |
Not a problem; I can make one, just liked the easy upload and go way of letting it run. ;)
I'll see what I can come up with - great work! |
Quote:
http://www.vbispy.com If you narrow your window, you can see how this happens. I have the width at 50%. How do you force Opera to display those span's without any linebreaks? |
Unfortunately I can't view how you've set it up by viewing the source code. PM me the text line code for non-IE browsers as you have it and I'll take a look when I've got a chance. It's not a high priority for me now since I've got it working for my site.
|
I had better success using a table versus the spans; I'll keep playing with it in the meantime.
|
Thanks, ForumDog! I have an Opera integration working at:
ViperAlley.Com and at vBispy.com I'll post an update soon. |
*pam clicks install*
Great add on, thank you so much! Two things, a question, and a suggestion: Question: Is there way to limit the number of characters in the thread text preview (I'm using the VBAdvanced hack and want to squeeze up the size of each line on the page) Suggestion: How about the option to play a sound file when a new post/thread is submitted so I can browse away or walk away from the comp and come back when I hear the sound file :cool: |
Ahh, the issue I was having with Firefox was caused by the Forum in question allowing HTML.
The <br> that the RSS feed started with was translating into a <br> in the vaispy display. Manually removing the <br> seems to fix it, but it would be grand if it could be stripped before display. :) |
I strip bb code, so adding a strip for html code wouldn't be a problem; I'll do that as well.
The thread preview is set by the , 200); line in vaispy.php Not sure about a sound..... |
I would LOVE to see a mix between this and Top X Stats or Cyb's Advanced Forum Statistics.
|
Posted changes to fix Opera browsers, improve post parsing, trim javascript effects file and move some javascript into index.php to make using stylevars easier for those who want to stylize their copies.
|
The only thing I'd like to see is checking for new private messages as well. I know it's not really the point of the hack, but then you can just leave the one page open and be updated with everything.
|
Can the second column - By - be made smaller or dynamic. It's too wide.
Bob |
The html for the columns is in va_spy.js at lines 268 and 270; you could modify the columns widths there.
|
That didn't work, so I looked at vaispy.php and removed the width="190" attribute from <td class="thead" width="190">By</td> at line 291.
Bob |
All times are GMT. The time now is 03:32 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|