Version: 1.11, by digitalpoint
Developer Last Online: May 2016
Category: Miscellaneous Hacks -
Version: 4.x.x
Rating:
Released: 05-26-2010
Last Update: 09-09-2012
Installs: 404
DB Changes Uses Plugins Auto-Templates
Additional Files
No support by the author.
About
This is a Digg-style spy for seeing what's going on in your forum in realtime.
This is something I originally made about 4 years ago. Now that I rewrote it for vBulletin 4 (it also now uses the bundled YUI for animation), I decided to also wrap it up as a product package and release it for the world to use.
Installation
Put the spy.php file in your forum folder.
Put the digitalpoint_spy.js file in your clientscript folder.
Install the product-digitalpoint_spy.xml product under AdminCP -> Plugins & Products -> Manage Products -> Add/Import Product
Firstly, I want to say that I'd appreciate for your quick support.
But ... I did the same thing in the post, means: change the exact words function play_pause() to the Code you gave in the post ... and I got the following warning when I tried to save the template:
Quote:
The following error occurred when attempting to evaluate this template:
Parse error: syntax error, unexpected '[', expecting ')' in /home/vitav/public_html/forum/includes/adminfunctions_template.php(4748) : eval()'d code on line 32
This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.
Once again, sorry for bothering you and looking forward to hearing from you ...
Good to see Shawn releasing some of his 'custom' modification.
Heard about the Sphinx Search For vBulletin 4 too that you released at DP.
So sad I can't access that.
Firstly, I want to say that I'd appreciate for your quick support.
But ... I did the same thing in the post, means: change the exact words function play_pause() to the Code you gave in the post ... and I got the following warning when I tried to save the template:
Once again, sorry for bothering you and looking forward to hearing from you ...
I also tried to Continue when facing the above error, and nothing changed ... still nothing to display ...
Any plans on upgrading to vBulletin 4.0.3? The problem itself is caused by vBulletin versions before 4.0.2 not able to parse templates properly.
If you have phpmyadmin, go into the templates table and search for the template record with the title of SPY. Edit that record (it should have a styleid of -1) and set the template field (NOT the template_un field) to this:
<script type="text/javascript">
var spymax = 25;
var play = 1;
var whats = new Array();
var titles = new Array();
var previews = new Array();
var whos = new Array();
var threadids = new Array();
var postids = new Array();
var userids = new Array();
var spyids = new Array();
var forumids = new Array();
var forumnames = new Array();
var highestid = 0;
var fadetime = .25;
var pushtime = 1500;
var fadetime_end = 1.5;
var pushtime_end = 4000
var initalfill_flag = 0;
function init() {
getXML();
}
function play_pause() {
var label = new Array(\'' . vB_Template_Runtime::parsePhrase("click_to_continue") . '\', \'' . vB_Template_Runtime::parsePhrase("click_to_pause") . '\');
play = Math.abs(1-play);
document.getElementById("play_pause").innerHTML = label[play];
}
function getXML() {
if (highestid > 0) {
var querystring = "do=xml&last=" + highestid;
} else {
var querystring = "do=xml";
}
if (play == 0) {
setTimeout("push()", 1000);
return;
}
var cell;
var cellnext;
var text;
var clip;
var who_clip = \'\';
var where = \'\';
var post_url;
var style = "";
var what = whats.pop();
var title = titles.pop();
var preview = previews.pop();
var who = whos.pop();
var threadid = threadids.pop();
var postid = postids.pop();
var userid = userids.pop();
var spyid = spyids.pop();
var forumid = forumids.pop();
var forumname = forumnames.pop();
That is the parsed template from a version of vBulletin that can parse templates properly. Ultimately the best thing to do would be to upgrade to a version of vBulletin that can parse templates correctly, but if that's not an option manually parsing it like shown above should work.
I have private forums that not all users can see, is this mod permissions based? Like if a user goes to the spy page, they won't see updates for forums they cannot access, correct?
edit: I just tested it in two different browsers and it seems to work that way! Fantastic mod, I love it!
It currently adds a link to the "Community" drop-down menu in the lower navigation (when you are anywhere within the forums).
If you really want it to have it's own main navbar button could you do something like so (this is off the top of my head, I didn't actually test it to make sure it works, but it should).
Plug-ins To Add
Location: process_templates_complete
PHP Code:
if (THIS_SCRIPT == 'spy') $vbulletin->options['selectednavtab'] = 'spy';
$template_hook['navtab_middle'] .= vB_Template::create('spy_navbar_link')->render();