vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Major Additions - [AJAX] vB Pager 3.0.4 (https://vborg.vbsupport.ru/showthread.php?t=104609)

SnapOff Racing 06-10-2006 10:07 AM

nevermind uae...i found out the problem...i did a view page source and saw that for some reason the code in the stuff i have didn't have this hack to this extent in it.

Code:

<!-- [START HACK='vB Pager' AUTHOR='UAEWEB.COM' VERSION='3.0.3' CHANGEID= 5 ] -->
                <style type="text/css">
        #PLAYER { position:absolute; height:1; width:1px; top:10; left:0; }
</style>
<script type="text/javascript">
var qstring = '';

function check_pager(qstring)
{
        vbPage = new vB_AJAX_Handler(true);
        vbPage.onreadystatechange(ShowPager);
        if (qstring=='' || qstring==null)
          {
        vbPage.send('/forums/pager.php?action=pager&do=readpager&', 'nocache=' + (5 * Math.random() * 1.33) );
          }
        else
          {
        vbPage.send('/forums/pager.php', qstring);
          }
}

function Close_Pager(qstring)
{
        check_pager(qstring);
}

function ShowPager()
{
        var refreshtime = 60;
                if (refreshtime > 0)
                refreshtime = refreshtime * 1000;

        if (vbPage.handler.readyState == 4 && vbPage.handler.status == 200)
        {

// Ignore result if its "Fatal Error"
                resultText = vbPage.handler.responseText;
                isError = resultText.indexOf("Fatal error");
                        if (isError >= 0 && isError < 25)
                                vbPage.handler.responseText = '';

                if (vbPage.handler.responseText)
                {                       
                document.body.style.cursor = 'default';
                pagerbox = fetch_object('PLAYER');                               
                pagerbox.innerHTML = vbPage.handler.responseText;
                displayPager();
                        if (vbPage.handler.responseText == '' || vbPage.handler.responseText == null)
                        {
                                pagerbox.innerHTML = '';
                                setTimeout('check_pager()', refreshtime);
                        }
                }
                else
                {                if (refreshtime > 0)
                        setTimeout('check_pager()', refreshtime);
                }
        }
}
check_pager();
</script>
<script type="text/javascript">
var ns=(document.layers);
var ie=(document.all);
var w3=(document.getElementById && !ie);
var calunit=ns? "" : "px"


function displayPager()
{
        if(!ns && !ie && !w3) return;
        if(ie)                objPager=eval('document.all.PLAYER.style');
        else if(ns)        objPager=eval('document.layers["PLAYER"]');
        else if(w3)        objPager=eval('document.getElementById("PLAYER").style');
        if (ie||w3)
        objPager.visibility="visible";
        else
        objPager.visibility ="show";

        if (ie)
        {
                documentWidth  =truebody().offsetWidth/2+truebody().scrollLeft-20;
                documentHeight =truebody().offsetHeight/2+truebody().scrollTop-50;
        }       
        else if (ns)
        {
                documentWidth=window.innerWidth/2+window.pageXOffset-20;
                documentHeight=window.innerHeight/2+window.pageYOffset-20;
        }
        else if (w3)
        {
                documentWidth=self.innerWidth/2+window.pageXOffset-20;
                documentHeight=self.innerHeight/2+window.pageYOffset-20;
        }
        objPager.left=documentWidth-200+calunit;
        objPager.top =documentHeight-100+calunit;
}


function truebody()
{
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

// Drag box Code

function Browser()
{
  var ua, s, i;
  this.isIE    = false;
  this.isNS    = false;
  this.version = null;
  ua = navigator.userAgent;
  s = "MSIE";
  if ((i = ua.indexOf(s)) >= 0) {
    this.isIE = true;
    this.version = parseFloat(ua.substr(i + s.length));
    return;
  }
  s = "Netscape6/";
  if ((i = ua.indexOf(s)) >= 0) {
    this.isNS = true;
    this.version = parseFloat(ua.substr(i + s.length));
    return;
  }
// Treat any other "Gecko" browser as NS 6.1.
  s = "Gecko";
  if ((i = ua.indexOf(s)) >= 0) {
    this.isNS = true;
    this.version = 6.1;
    return;
  }
}

var browser = new Browser();

// Global object to hold drag information

var dragObj = new Object();
dragObj.zIndex = 0;

function dragStart(event, id) {

  var el;
  var x, y;

// If an element id was given, find it. Otherwise use the element being
// clicked on.

  if (id)
    dragObj.elNode = document.getElementById(id);
  else {
    if (browser.isIE)
      dragObj.elNode = window.event.srcElement;
    if (browser.isNS)
      dragObj.elNode = event.target;

// If this is a text node, use its parent element.

    if (dragObj.elNode.nodeType == 3)
      dragObj.elNode = dragObj.elNode.parentNode;
  }

// Get cursor position with respect to the page.

  if (browser.isIE) {
    x = window.event.clientX + document.documentElement.scrollLeft
      + document.body.scrollLeft;
    y = window.event.clientY + document.documentElement.scrollTop
      + document.body.scrollTop;
  }
  if (browser.isNS) {
    x = event.clientX + window.scrollX;
    y = event.clientY + window.scrollY;
  }

// Save starting positions of cursor and element.

  dragObj.cursorStartX = x;
  dragObj.cursorStartY = y;
  dragObj.elStartLeft  = parseInt(dragObj.elNode.style.left, 10);
  dragObj.elStartTop  = parseInt(dragObj.elNode.style.top,  10);

  if (isNaN(dragObj.elStartLeft)) dragObj.elStartLeft = 0;
  if (isNaN(dragObj.elStartTop))  dragObj.elStartTop  = 0;

// Update element's z-index.

  dragObj.elNode.style.zIndex = ++dragObj.zIndex;

// Capture mousemove and mouseup events on the page.

  if (browser.isIE) {
    document.attachEvent("onmousemove", dragGo);
    document.attachEvent("onmouseup",  dragStop);
    window.event.cancelBubble = true;
    window.event.returnValue = false;
  }
  if (browser.isNS) {
    document.addEventListener("mousemove", dragGo,  true);
    document.addEventListener("mouseup",  dragStop, true);
    event.preventDefault();
  }
}

function dragGo(event)
{
  var x, y;
// Get cursor position with respect to the page.

  if (browser.isIE) {
    x = window.event.clientX + document.documentElement.scrollLeft
      + document.body.scrollLeft;
    y = window.event.clientY + document.documentElement.scrollTop
      + document.body.scrollTop;
  }
  if (browser.isNS) {
    x = event.clientX + window.scrollX;
    y = event.clientY + window.scrollY;
  }

// Move drag element by the same amount the cursor has moved.

  dragObj.elNode.style.left = (dragObj.elStartLeft + x - dragObj.cursorStartX) + "px";
  dragObj.elNode.style.top  = (dragObj.elStartTop  + y - dragObj.cursorStartY) + "px";

  if (browser.isIE) {
    window.event.cancelBubble = true;
    window.event.returnValue = false;
  }
  if (browser.isNS)
    event.preventDefault();
}

function dragStop(event)
{
  // Stop capturing mousemove and mouseup events.

  if (browser.isIE) {
    document.detachEvent("onmousemove", dragGo);
    document.detachEvent("onmouseup",  dragStop);
  }
  if (browser.isNS) {
    document.removeEventListener("mousemove", dragGo,  true);
    document.removeEventListener("mouseup",  dragStop, true);
  }
}

// End Drag box Code

function closepager(id)
{
 objplayer = fetch_object('PLAYER');
        objplayer.innerHTML = ' ';
        if (ie||w3)
        objplayer.display="none";
        else
        objplayer.visibility ="hide";
}

function SubmitForm(frmobj, rid)
 {
        minchar = 3;
        maxchar = "500";
  if (frmobj.message.value.length > maxchar)
  {
          alert("The text that you have entered is too long. Maximum characters per message is " + maxchar + "");
          return false;
  }

  if (frmobj.message.value.length < minchar)
  {
        alert("Message is too short. Please lengthen your message to at least 3 characters.");
    return false;
  }
  else
  {
                                canreply = 0;
                if (typeof frmobj.canreply != 'undefined')
                        if (frmobj.canreply.checked==true)
                                  canreply = 1;
                         
            check_pager('action=pager&do=pagerreply&message=' + PHP.urlencode(frmobj.message.value) + '&rid=' + rid + '&canreply=' + canreply);
    closepager('PLAYER');
    return false;
  }
    return false;
 }

function textCounter(field) {
maxlimit = 500;
  if (field.value.length > maxlimit)
      {field.value = field.value.substring(0, maxlimit);}
      else
      {document.frmpager.charNum.value = maxlimit - field.value.length;}
  }
   
</script>
                <DIV ID="PLAYER" style="position:auto;overflow:auto;width:500px;">
                </DIV>

<!-- [END HACK='vB Pager' AUTHOR='UAEWEB.COM' VERSION='3.0.3' CHANGEID= 5 ] -->


nymyth 06-12-2006 06:14 PM

any news on why IE crashes when a new message comes in???

Peace

hotwheels 06-13-2006 01:25 PM

nymyth........this is the current issue with this hack:
Quote:

Originally Posted by johon
It's truly bad, taht there seems to be no support any longer on this great hack, my users love it.

Normally, the mentioned problem should be fixed quite easily if the Pop is registered for the IE (http://support.microsoft.com/kb/912945/EN-US/) buit I don't know how.

Too bad....

Johon

Gizmo5h1t3 06-13-2006 02:37 PM

weird that, ive never had an issue with it, its worked fine since the day i installed it

dwbro1 06-13-2006 09:55 PM

it crashes my IE also i had to finally diable it.. :(

AMFMaree 06-14-2006 10:09 PM

Im installing this on another forum, I already have it in use on my own with NO problems.But for some reason I can not get the pop up reply box to work..everything seems to be uploaded and changed correctly..but its still not working..anyone have any ideas?

morrow 06-15-2006 10:22 PM

Quote:

Originally Posted by cyberbeggar
I have installed but I get this message



Any reason why I get this?

any answers to this issue: "Sorry, you are not allowed to use vB Pager!"

jadkar 06-19-2006 01:17 AM

Does anyone have an answer yet as to why the pager doesn't work accross styles?? If you send a page to someone who is on a different style then you they will not get it. Huge shortcoming to the hack :(

GrCh_Jeff 06-19-2006 03:47 AM

Quote:

Originally Posted by morrow
any answers to this issue: "Sorry, you are not allowed to use vB Pager!"

You must go to your admincp>> usergroups>> can use pager etc.

Danmaxito 06-19-2006 05:22 AM

Anyone have any idea as to why vbpager does not work on my site:
www.Mac-headz.com
It also deactivates a lot of features on the board too.


All times are GMT. The time now is 05:29 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.02109 seconds
  • Memory Usage 1,775KB
  • 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
  • (1)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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