The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
[DBTech] AJAX Threads v1 (vB3) Details »» | |||||||||||||||||||||||||||||||||||
AJAX Threads: What is it?
AJAX Threads brings your threads alive, making them automatically refresh without needing to reload the page. Uses AJAX Threads is the ideal product for forums with busy threads or which deal with any sort of "event" be that TV shows, sports or game releases! AJAX Threads allows you to make topics "auto update" without the user having to refresh. This can give performance benefits when applied to threads which receive a lot of refresh requests, and can increase user participation. Topics can be turned live by admins individually, or you can set whole forums to have their threads be live automatically. You can even allow only VIP usergroups to have threads refresh automatically to increase subscription numbers. ------------------------------------------------------------------------------------------- If you like this mod please hit the button to the right ----> Please remember to click the, button to the right if you installed the mod ----> What does 'Marking As Installed' do ? * It helps you to stay on top of updates - members who have installed modifications will be notified by us whenever new updates are available. * For security issues - vbulletin.org will contact all members who have installed a modification whenever a security issue is brought to their attention. * Marking a modification as installed also helps us know how many people are using our work, giving us extra incentive to provide more features and new modifications. We appreciate the support! ------------------------------------------------------------------------------------------- Differences between Pro and Lite Priority support & Product Demos available at: http://www.dragonbyte-tech.com/vbdownloads.php ------------------------------------------------------------------------------------------- Translations available @ our forum Support for translations handled by the translator in its respective threads only. ------------------------------------------------------------------------------------------- Major Features: Automatically Refresh Threads: Users will now see new posts in "real time" without having to refresh the page Performance Benefits: If your forum receives lots of refresh requests on threads being posted in often this can put a lot of strain on your server - AJAX Threads will greatly reduce server resources used in those situations by refreshing only the minimum information required. Total Control: You can set threads individually or per forum. You can set particular usergroups to receive the benefit, and you can even have it apply automatically to popular threads! ------------------------------------------------------------------------------------------- Complete Feature List (Lite) * vBOption: Enable Automatic Updates * vBOption: Refresh Interval * vBOption: Idle Timeout * vBOption: Automatic Un-Idle * vBOption: Enable Information Bar (Tells users how often the thread refreshes, whether they're idle, and how to un-idle, etc) * vBOption: Maximum Shown Posts * Ability for users to manually refresh threads if Automatic Updates are disabled (cannot refresh more often than Refresh Interval regardless) * Ability for users to manually un-idle themselves if automatic updates are enabled and the Idle Timeout is reached * Per-usergroup setting to determine if automatic updates are enabled * Per-usergroup setting to determine if manual updates are enabled * Per-category setting to determine if automatic updates are enabled * Per-category setting to determine if manual updates are enabled * "Live" image on forumdisplay for threads that have automatic or manual updates enabled * Posts fetched by AJAX Threads are marked as read * Per-usergroup "duration" before a thread goes "idle". Complete Feature List (Pro) * vBOption: Minimum Replies * Per-forum setting to determine if automatic updates are enabled * Per-forum setting to determine if manual updates are enabled * Per-thread setting to determine if automatic updates are enabled * Per-thread ability for administrators with the "Manager" permission to override forum / usergroup settings and either enable or disable automatic updates ------------------------------------------------------------------------------------------- This mod displays a copyright notification in the footer of all pages which includes:
Download Now
Screenshots
Show Your Support
|
4 благодарности(ей) от: | ||
BirdOPrey5, Hornstar, usHealthy, xorex |
Comments |
#82
|
||||
|
||||
Please check Firefox error console.
Fillip |
#83
|
||||
|
||||
My FF is in Dutch. It lists a long list of issues. Which all seem to be irrelevant things that firefox misunderstands. I do not see much difference between turning the addon on or off.
I have looked at it with firebug, but did not discover anything strange either. Is there anything specific in firebug that I can check out? |
#84
|
||||
|
||||
If you click the Errors tab in the FF error console it should only show things that are considered JS errors
In Firebug, copy the response body of the POST ajaxthreads.php request Fillip |
#85
|
||||
|
||||
At first it did not show ajaxthreads.php at all in firebug, but after hard refreshing it appeared.
Here are the parameters: Code:
v111 Code:
Accept-RangesbytesCache-Controlmax-age=604800Content-EncodinggzipContent-Length3479Content-Typeapplication/javascriptDateWed, 11 Jul 2012 00:19:24 GMTEtag"2c20-4ffb6c85-0"ExpiresWed, 18 Jul 2012 00:19:24 GMTLast-ModifiedMon, 09 Jul 2012 23:43:01 GMTServerLiteSpeedVaryUser-Agent Code:
$.noConflict(true)(function($) { // Define some variables var jObjects = { box : $('#ajaxprogress'), progressTitle : $('#progresstitle'), progressContent : $('#progresscontent'), postList : $('#posts'), statusText : $('span[name=dbtech_ajaxthreads_status]'), idleText : $('span[name=dbtech_ajaxthreads_idle]'), reloadLink : $('a[name=dbtech_ajaxthreads_reload]'), unIdleLink : $('a[name=dbtech_ajaxthreads_unidle]'), }, idleTime = 0, refreshTimer = null, lastUpdate = 0, pauseUpdates = false; if (ajaxThreadsOptions.autoUnidle && ajaxThreadsOptions.autoUpdate != 0) { jObjects.postList.hover(function() { // Reset timer and restart function //console.log('Resetting timer...'); resetTimer(); }); } if (ajaxThreadsOptions.manualUpdate != 0) { // Get new posts on click of reload jObjects.reloadLink.on('click', getNewPosts); } // Get new posts on click of reload jObjects.unIdleLink.on('click', function() { // Reset the timer resetTimer(); // Do an instant refresh _refreshPosts(); }); if (typeof ajax_last_post == 'undefined') { // Ensure this is set var tmp = new Date; ajax_last_post = parseInt(tmp.getTime() / 1000); console.log('ajax_last_post = ' + ajax_last_post); } else { var qrAjaxPost = qr_ajax_post, qrDoAjaxPost = qr_do_ajax_post; // ######################################################################### // We be tukken vB's AJAX QR function qr_ajax_post = function(submitaction, submitstring) { // So we can see if it's working console.log('Pausing AJAX Threads...'); // Schedule paused updates pauseUpdates = true; // Call the old backed up function qrAjaxPost(submitaction, submitstring); }; // ######################################################################### // We be tukken vB's AJAX QR Complete function qr_do_ajax_post = function(ajax) { // Call the old backed up function qrDoAjaxPost(ajax); // So we can see if it's working console.log('Un-pausing AJAX Threads...'); // Schedule paused updates pauseUpdates = false; // Un-idle us resetTimer(); }; } // ######################################################################### // Refreshes all the posts function getNewPosts() { if (pauseUpdates) { console.log('Updates paused, skipping...'); return false; } // Schedule paused updates pauseUpdates = true; var tmp = new Date; timeNow = parseInt(tmp.getTime() / 1000); if ((lastUpdate + parseInt(ajaxThreadsOptions.refreshDelay)) > timeNow) { console.log((lastUpdate + parseInt(ajaxThreadsOptions.refreshDelay)) + ' is greater than ' + timeNow); return false; } // Set last update lastUpdate = (timeNow - 1); // Set the animation _animateBox( vbphrase['dbtech_ajaxthreads_refreshing_thread'], vbphrase['dbtech_ajaxthreads_refreshing_thread_descr'], true ); var extraParams = { 'securitytoken' : SECURITYTOKEN, 'do' : 'ajax', 'action' : 'newposts', 't' : ajaxThreadsOptions.threadId, 'postids' : ajaxThreadsPostIds, 'postvisible' : ajaxThreadsPostVisible, 'lastpostdate' : ajax_last_post, }; var type = 'POST'; var jqxhr = $.ajax({ type: type, url: 'ajaxthreads.php', data: (SESSIONURL ? SESSIONURL + '&' : '') + $.param(extraParams), dataType: 'json' }) .done(function(data) { // Schedule paused updates pauseUpdates = false; if (typeof data == 'string') { try { // Parse the data data = $.parseJSON(data); } catch (e) { var errmsg = data; data = {'error' : errmsg + "\n\n" + data}; } } if (data.error) { // Animate box _animateBox( vbphrase['error'], data.error, true ); return false; } // Animate box _animateBox(false, false, false); if (data.deletedPosts) { $.each(data.deletedPosts, function(index, value) { if (ajaxThreadsOptions.vbversion == 3) { var postWrapper = $('#post' + index); } else { var postWrapper = $('#post_' + index); } // Remove from post counter ajaxThreadsOptions.postCount--; //var postWrapper = $('#dbtech_ajaxthreads_postid_' + index) // Fade the post out postWrapper.fadeOut(function() { // Remove the post in question $(this).remove(); $('#dbtech_thanks_entries_' + index).parent().remove(); }); }); } if (data.editedPosts) { $.each(data.editedPosts, function(index, value) { // Refresh the postbit _displayPost(index); }); } if (data.newPosts) { if (!$.isEmptyObject(data.newPosts)) { // Set last post for QR var tmp = new Date; ajax_last_post = parseInt(tmp.getTime() / 1000); console.log('ajax_last_post = ' + ajax_last_post); } $.each(data.newPosts, function(index, value) { if (ajaxThreadsOptions.vbversion == 3) { var postWrapper = $('#post' + index); } else { var postWrapper = $('#post_' + index); } // Add to post counter ajaxThreadsOptions.postCount++; if (postWrapper.length) { // Quick reply post return true; } if (ajaxThreadsOptions.direction == 'desc') { // stuff new fake postbit at the end jObjects.postList.append(value); } else { // stuff new fake postbit at the beginning jObjects.postList.prepend(value); } if (ajaxThreadsOptions.vbversion == 3) { var postWrapper = $('#post' + index); } else { var postWrapper = $('#post_' + index); } //var postWrapper = $('#dbtech_ajaxthreads_postid_' + index) if (ajaxThreadsOptions.vbversion == 3) { // Remove old lastpost $('#lastpost').remove(); // Create new last post node var newLastPost = string_to_node('<div id="lastpost"></div>'); if (ajaxThreadsOptions.direction == 'desc') { // stuff new fake postbit at the end jObjects.postList.append(newLastPost); } else { // stuff new fake postbit at the beginning jObjects.postList.prepend(newLastPost); } } // Hide the new post postWrapper.hide(); // Remove the post in question _displayPost(index); }); } if (data.postIds) { // Store the new post hashes ajaxThreadsPostIds = data.postIds; } if (data.postVisible) { // Store the new post hashes ajaxThreadsPostVisible = data.postVisible; } }); }; // ######################################################################### // Resets the timer function resetTimer() { // Reset idle time idleTime = 0; if (refreshTimer == null) { // Show status, hide idle jObjects.statusText.show(); jObjects.idleText.hide(); // Restart the timer _startTimer(); } }; // ######################################################################### // Refreshes a post display function _displayPost(postid) { var postCount = $('#postcount' + postid).attr('name'); var extraParams = { 'securitytoken' : SECURITYTOKEN, 'p' : postid, 'postcount' : (typeof postCount != 'undefined' ? parseInt(postCount) : ajaxThreadsOptions.postCount) }; var type = 'POST'; var jqxhr = $.ajax({ type: type, url: 'showpost.php', data: (SESSIONURL ? SESSIONURL + '&' : '') + $.param(extraParams) }) .done(function(data) { var postbit = $('postbit', data).text(), postText = $('#post_message_' + postid); if (ajaxThreadsOptions.vbversion == 3) { var postWrapper = $('#post' + postid); //var postWrapper2 = YAHOO.util.Dom.get('post' + postid); } else { var postWrapper = $('#post_' + postid); //var postWrapper2 = YAHOO.util.Dom.get('post_' + postid); } //var postWrapper = $('#dbtech_ajaxthreads_postid_' + index) if (postbit) { var newpostbit = string_to_node(postbit); if (postWrapper.is(':hidden')) { // Replace post //postWrapper2.parentNode.replaceChild(newpostbit, postWrapper2); postWrapper.replaceWith(newpostbit); // Init the postbit PostBit_Init(newpostbit, postid); if (ajaxThreadsOptions.vbversion == 3) { // Re-grab this var postWrapper = $('#post' + postid); } else { // Re-grab this var postWrapper = $('#post_' + postid); } if (ajaxThreadsOptions.vbversion > 3) { // Initialise collapse objects var links = YAHOO.util.Dom.getElementsByClassName("collapse", "a", newpostbit); for (var i = 0; i < links.length; i++) { new vBCollapse(links[i], vBCollapseFactory); } //-ch note: this replaces setting display:none property server-side apply_collapses(); } // Ensure the post is shown postWrapper.hide(); postWrapper.fadeIn(); //postWrapper.scrollIntoView(false); } else { // Fade out old post postText.fadeOut(function() { // Replace post //postWrapper2.parentNode.replaceChild(newpostbit, postWrapper2); postWrapper.replaceWith(newpostbit); // Init the postbit PostBit_Init(newpostbit, postid); // Store post text reference var postText = $('#post_message_' + postid); // Fade in the new post postText.hide(); postText.fadeIn(); }); } } }); return false; }; // ######################################################################### // Starts the timer function _startTimer() { if (ajaxThreadsOptions.autoUpdate == 0) { // We cannot proceed return false; } // Set the refresh timer refreshTimer = setInterval(_refreshPosts, (ajaxThreadsOptions.refreshDelay * 1000)); }; // ######################################################################### // Refreshes the post according to idle time function _refreshPosts() { if (idleTime >= ajaxThreadsOptions.duration && ajaxThreadsOptions.duration > 0) { // Get rid of the interval clearInterval(refreshTimer); refreshTimer = null; // Display idle message jObjects.statusText.hide(); jObjects.idleText.show(); return false; } // Update idle time idleTime += parseInt(ajaxThreadsOptions.refreshDelay); // Refresh the posts getNewPosts(); }; // ######################################################################### // Handle box animation function _animateBox(title, description, onoff) { if (onoff) { // Set CSS properties jObjects.box.css('display', 'inline-block'); jObjects.box.css('opacity', 0); } if (title) { // Set title jObjects.progressTitle.html(title); } if (description) { // Set description jObjects.progressContent.html(description); } // Set animation jObjects.box.animate({ opacity: (onoff ? 0.8 : 0) }, { duration: 700 }); }; // Begin the timer _startTimer(); }); |
#86
|
||||
|
||||
What site is it running on? I think I'll need to see this in action for myself
Fillip |
#87
|
|||
|
|||
I'm getting tons of database errors from this mod, a couple errors a minute
Database error in vBulletin 3.8.7: Invalid SQL: SELECT postid, userid, title, pagetext, visible, dateline FROM thecolic_post WHERE postid >= '1953014' AND threadid = '53216' AND visible = 1 AND post.userid NOT IN (6744,2036) ORDER BY postid ASC; MySQL Error : Unknown column 'post.userid' in 'where clause' Error Number : 1054 Request Date : Thursday, October 25th 2012 @ 02:50:21 PM Error Date : Thursday, October 25th 2012 @ 02:50:21 PM Script : http://forum/ajaxthreads.php Referrer : http://forum/locker-room/thread.html IP Address : --------- Username : Unregistered Classname : vB_Database |
#88
|
||||
|
||||
If you download the latest version from here: http://www.dragonbyte-tech.com/vbeco...&productid=114 that should be fixed
Fillip |
Благодарность от: | ||
beekay |
#89
|
|||
|
|||
If you answer "Quick Reply" sometimes completely reloaded the entire page.
Fillip, This can somehow fix this? |
#90
|
|||
|
|||
Page update occurs when new post AJAX. If updates AJAX new answers were not, "Quick Reply" works without refresh page.
This is the only thing that prevents this modification to use. (( |
#91
|
||||
|
||||
I have not been able to reliably reproduce it, without a way to reproduce it 100% of the time I cannot fix it
Fillip |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|