vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Beta Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=34)
-   -   vB Pager 2.0.4 (https://vborg.vbsupport.ru/showthread.php?t=72823)

mello_mike 01-28-2005 01:42 AM

For some strange reason.. all my members can send messages .. but we cannot GET any. I made sure permissions were correct.. still no luck

All message are marked unread.. members aren't getting their messages.

docvader 01-28-2005 01:48 AM

Wolfe, what are you fixing? The persistent pager box problem?

wolfe 01-28-2005 02:01 AM

Quote:

Originally Posted by docvader
Wolfe, what are you fixing? The persistent pager box problem?

the guest popup one i fixed i have also fixed some bugsin the pager file where there was no " . TABLE_PREFIX . " where it was needed ;)

my guest box don't pop up no more

docvader 01-28-2005 02:05 AM

Wolfe, nice, but, I instituted your changes, and it wiped out the user's ability to see anything in the board, once I sent him a message.

I sent myself a message, from one of my test accounts, and bamm. I got mysql errors for every damn page of my site. Other users had no problem. Just the guy that got a message.

I reverted to the originals, and my board works for me again.

I don't use table prefixes. Might that be the cause??? There's also a line where you changed the UPDATE pager table. Wonder if that screwed me up. I can see why you added quotes to everything. But the UPDATE command change, was that necessary?

Scared the living s... out of me man.

docvader 01-28-2005 02:32 AM

I've also noticed, that if you have a pager box that you cannot close, and, you just leave it be, it will cause your forum page to refresh, every minute or so. Yet, it won't go away.

mello_mike 01-28-2005 02:34 AM

I'm getting this SQL error when I got to view messages in the AdminCP

Quote:

Database error in vBulletin 3.0.3:

Invalid SQL: select pagerid, parentpid, tosessionid, fromsessionid, touserid, fromuserid, message, msgdate, deliverdate, canreply, hidden, delread, delsent, active, username from pager as p left join user as u on (p.touserid=u.userid) where active=0 order by msgdate desc LIMIT -15, 15
mysql error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-15, 15' at line 1

mysql error number: 1064

laborer75 01-28-2005 03:37 AM

K-I got it installed. When I click to send a message in IE, it errors and I have to shut IE down. It does not do this in firefox though. My members are all having the same problem. Any ideas why this is happening? I read a couple others are having the same problem in this thread. Wondering if anybodys figured out why yet? Thanx in advance.......

uae 01-28-2005 08:53 AM

Quote:

Originally Posted by docvader
I've also noticed, that if you have a pager box that you cannot close, and, you just leave it be, it will cause your forum page to refresh, every minute or so. Yet, it won't go away.

Hey, I just registered @ your forum http://x.russbo.com/vb/
I logged in as a registered user "uae", then I went to WOL page using Internet Explorer, and I opened FireFox and logged in as a guest!
I was able to send a pager message from uae to that guest, and both buttons were working fine, Reply and Close button!
I haven't noticed that if you got a pager message popup opened, the page will keep refreshing!

Close or Reply button, both should update DB and set that message as READ.
So, that message should never popUP again!

I just can't see your problem!

wolfe 01-28-2005 02:08 PM

m8 the table prefix will only come into action if you have got a prefix if not it will not do anything also that file stopped all the mysql errors on my site

docvader 01-28-2005 02:17 PM

Understand, m8. You've got a New Yorker talking like a Brit now. Anyway, I noticed basically two portions of code that you put into pager.php, that changes it. One had an "else" statement, the other changed the way the table updated. The rest, were quotation mark additions.

I'm not sure which one caused my mysql errors throughout the board. Got any idea???

Uae, keep checking into http://x.russbo.com/vb/index.php. You'll see the error. Use IE.

uae 01-28-2005 06:03 PM

I did not see no errors!!!

I used IE!

laborer75 01-28-2005 06:07 PM

Quote:

Originally Posted by wolfe
m8 here what you do

in includes/functinons.php


find

PHP Code:


/*======================================================================*\
|| ####################################################################
|| # Downloaded: 17:25, Wed Jan 26th 2005
|| # CVS: $RCSfile: functions.php,v $ - $Revision: 1.984.2.13 $
|| ####################################################################
\*======================================================================*/
?> 

its at the end of the file

then above it add

PHP Code:


// [START HACK='vB Pager' AUTHOR='WwW.UAEWEB.COM' VERSION='2.0.4' CHANGEID= 7 ]
    
function can_pager($type=0$usrid=0)
     {
        global 
$vboptions$bbuserinfo;

        if (
$usrid==0)
         
$usrid $bbuserinfo[userid];
        if (
$usrid==0)
         return 
false;

        if (
$vboptions[vbpager_on_off]=="0")
          return 
false;

    
$gid_m        $vboptions[vbpager_usergroup_member]; 
    
$gid_g        $vboptions[vbpager_usergroup_guest];
    
$uid_m        $vboptions[vbpager_userid_member];
    
$uid_g        $vboptions[vbpager_userid_guest];


    if (!(
$gid_m))
     
$gid_m "-1";

    if (!(
$gid_g))
     
$gid_g "-1";

    if (!(
$uid_m))
     
$uid_m "-1";

    if (!(
$uid_g))
     
$uid_g "-1";


    
$uids explode(','str_replace(' '''$uid_g));
    foreach(
$uids AS $ids)
     if (
$usrid==$ids)
      {
        
$vboptions[vbpager_canpager] = 1;
         return 
true;    
      }

if (
$type==0)
 {
    
$uids explode(','str_replace(' '''$uid_m));
    foreach(
$uids AS $ids)
     if (
$usrid==$ids)
      {
        
$vboptions[vbpager_canpager] = 1;
         return 
true;    
      }
 }
    
$uids explode(','str_replace(' '''$gid_g));
    foreach(
$uids AS $ids)
     if (
$bbuserinfo[usergroupid]==$ids)
      {
        
$vboptions[vbpager_canpager] = 1;
         return 
true;    
      }
       
$mids explode(','str_replace(' '''$bbuserinfo[membergroupids]));
        foreach(
$uids AS $id)
          {
        foreach(
$mids AS $ids)
         if (
$id==$ids)
           {
               
$vboptions[vbpager_canpager] = 1;
               return 
true;    
            }
         }
if (
$type==0)
 {
    
$uids explode(','str_replace(' '''$gid_m));
    foreach(
$uids AS $ids)
     if (
$bbuserinfo[usergroupid]==$ids)
      {
        
$vboptions[vbpager_canpager] = 1;
         return 
true;    
      }
       
$mids explode(','str_replace(' '''$bbuserinfo[membergroupids]));
        foreach(
$uids AS $id)
          {
        foreach(
$mids AS $ids)
         if (
$id==$ids)
           {
               
$vboptions[vbpager_canpager] = 1;
               return 
true;    
            }
         }
 }
        
$vboptions[vbpager_canpager] = 0;
        return 
false;
     }

    function 
show_pager()
     {
        global 
$vboptions$vbphrase$bbuserinfo$DB_site;

    if (
$bbuserinfo[userid]!=0)
     {
    
$pagerinfo $DB_site->query_first("SELECTp.pagerid, p.parentpid, p.fromuserid, p.touserid, u.username,p.message, p.msgdate, p.canreply, p.hidden FROM " .  TABLE_PREFIX"pager as p left join " .  TABLE_PREFIX "user as u on(u.userid=p.fromuserid) WHERE p.delsent=0 and p.active=1 andp.touserid="$bbuserinfo['userid'] ." order by msgdate");
             
$pagerinfo[timesent] = vbdate($vboptions['dateformat'],$pagerinfo[msgdate], true) . " " vbdate($vboptions['timeformat'],$pagerinfo[msgdate]);     
     if (!(
$pagerinfo))
      {
        
$show[pager]         = "";
        
$show[pagererror]    = 1;
        
$nopager        1;
      }
      else
        {
        if (
$pagerinfo[hidden])
           
$pagerinfo[username] = $vbphrase['vbpager_na'];
        elseif(
$pagerinfo[username]=="")
            
$pagerinfo[username] = $vbphrase['guest'];
        }

     }
    elseif ( (
$bbuserinfo[userid]==0) and ($vboptions[sessionid]!="") )
     {
        
$userexist =$DB_site->query_first("SELECT sessionhash from " TABLE_PREFIX "session where sessionhash='" $vboptions[sessionid] ."'");
        if (
$userexist)
        
$pagerinfo =$DB_site->query_first("SELECT p.pagerid, p.parentpid, p.fromuserid,p.touserid, u.username, p.message, p.msgdate, p.hidden, p.canreply FROM" .  TABLE_PREFIX "pager as p left join " .  TABLE_PREFIX ."user as u on (u.userid=p.fromuserid) WHERE p.active=1 and delsent=0and p.tosessionid='"$vboptions[sessionid] ."' order by msgdate");

        if(!(
$pagerinfo))
         {
            
$show[pager]         = "";
            
$show[pagererror]    = 1;
            
$nopager        1;
         }
        else
             {
           
$pagerinfo[timesent]= vbdate($vboptions['dateformat'], $pagerinfo[msgdate], true) . " " .vbdate($vboptions['timeformat'], $pagerinfo[msgdate]); 
        if (
$pagerinfo[hidden])
           
$pagerinfo[username] = $vbphrase['vbpager_na'];
        elseif(
$pagerinfo[username]=="")
            
$pagerinfo[username] = $vbphrase['guest'];
             }
     }
   if (!
$pagerinfo[pagerid])
 if (
$bbuserinfo[pager] > 0)
  {
  
$result $DB_site->query("UPDATE "TABLE_PREFIX "user set pager=pager - 1 where 
userid = " 
$bbuserinfo[userid] . "");
  return 
false;
  }
        return 
$pagerinfo;
     }
// [END HACK='vB Pager' AUTHOR='WwW.UAEWEB.COM' VERSION='2.0.4' CHANGEID= 7 ] 

this should fix it

I double checked it and the edit is perfect. Internet explorer still shuts down on me and my members when trying to send a page. Had it working in firefox but both parties have to be using firefox. I made a guest account on my site if anybody wants to look at what I'm saying. Any help on this is appreciated. This hack looks like it will be a big hit on my forums........Thanx

http://www.xxx-forums.net/forums/index.php?
username: guest1
password: guest1

uae 01-28-2005 06:15 PM

laborer, Working just fine with me!

laborer75 01-28-2005 06:22 PM

Odd.......wont work for me and now I get this error when trying to goto my forums.....

Database error in vBulletin 3.0.3:

Invalid SQL: SELECTp.pagerid, p.parentpid, p.fromuserid, p.touserid, u.username,p.message, p.msgdate, p.canreply, p.hidden FROM pager as p left join user as u on(u.userid=p.fromuserid) WHERE p.delsent=0 and p.active=1 andp.touserid=1 order by msgdate
mysql error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECTp.pagerid, p.parentpid, p.fromuserid, p.touserid, u.usern

mysql error number: 1064

Date: Friday 28th of January 2005 03:22:27 PM
Script: http://www.xxx-forums.net/forums/
Referer:
Username: BuckSteel

Man, this has got me pulling my hair out. LOL. All I wanna do is page people. LMAO.... Why am I getting that error now? Thanx in advance.....:D

Weird thing is, it wont let me in, my mods can get in. LOL

uae 01-28-2005 06:30 PM

Quote:

Originally Posted by laborer75
Odd.......wont work for me and now I get this error when trying to goto my forums.....

Database error in vBulletin 3.0.3:

Invalid SQL: SELECTp.pagerid, p.parentpid, p.fromuserid, p.touserid, u.username,p.message, p.msgdate, p.canreply, p.hidden FROM pager as p left join user as u on(u.userid=p.fromuserid) WHERE p.delsent=0 and p.active=1 andp.touserid=1 order by msgdate
mysql error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECTp.pagerid, p.parentpid, p.fromuserid, p.touserid, u.usern

Hey, there should be one space in that query, after SELECT!

DO the changes again for functions.php

Here it is again,

FIND AT THE END:
Code:

?>
ABOVE ADD:

ABOVE that ADD:
Code:


// [START HACK='vB Pager' AUTHOR='WwW.UAEWEB.COM' VERSION='2.0.4' CHANGEID= 7 ]
 function can_pager($type=0, $usrid=0)
  {
  global $vboptions, $bbuserinfo;
  if ($usrid==0)
  $usrid = $bbuserinfo[userid];
  if ($usrid==0)
  return false;
  if ($vboptions[vbpager_on_off]=="0")
        return false;
 $gid_m  = $vboptions[vbpager_usergroup_member];
 $gid_g  = $vboptions[vbpager_usergroup_guest];
 $uid_m  = $vboptions[vbpager_userid_member];
 $uid_g  = $vboptions[vbpager_userid_guest];

 if (!($gid_m))
  $gid_m = "-1";
 if (!($gid_g))
  $gid_g = "-1";
 if (!($uid_m))
  $uid_m = "-1";
 if (!($uid_g))
  $uid_g = "-1";

 $uids = explode(',', str_replace(' ', '', $uid_g));
 foreach($uids AS $ids)
  if ($usrid==$ids)
  {
        $vboptions[vbpager_canpager] = 1;
          return true;
  }
if ($type==0)
 {
 $uids = explode(',', str_replace(' ', '', $uid_m));
 foreach($uids AS $ids)
  if ($usrid==$ids)
  {
        $vboptions[vbpager_canpager] = 1;
          return true;
  }
 }
 $uids = explode(',', str_replace(' ', '', $gid_g));
 foreach($uids AS $ids)
  if ($bbuserinfo[usergroupid]==$ids)
  {
        $vboptions[vbpager_canpager] = 1;
          return true;
  }
        $mids = explode(',', str_replace(' ', '', $bbuserinfo[membergroupids]));
  foreach($uids AS $id)
        {
  foreach($mids AS $ids)
  if ($id==$ids)
        {
                $vboptions[vbpager_canpager] = 1;
                return true;
          }
  }
if ($type==0)
 {
 $uids = explode(',', str_replace(' ', '', $gid_m));
 foreach($uids AS $ids)
  if ($bbuserinfo[usergroupid]==$ids)
  {
        $vboptions[vbpager_canpager] = 1;
          return true;
  }
        $mids = explode(',', str_replace(' ', '', $bbuserinfo[membergroupids]));
  foreach($uids AS $id)
        {
  foreach($mids AS $ids)
  if ($id==$ids)
        {
                $vboptions[vbpager_canpager] = 1;
                return true;
          }
  }
 }
  $vboptions[vbpager_canpager] = 0;
  return false;
  }
 function show_pager()
  {
  global $vboptions, $vbphrase, $bbuserinfo, $DB_site;
 if ($bbuserinfo[userid]!=0)
  {
 $pagerinfo = $DB_site->query_first("SELECT p.pagerid, p.parentpid, p.fromuserid, p.touserid, u.username, p.message, p.msgdate, p.canreply, p.hidden FROM " .  TABLE_PREFIX . "pager as p left join " .  TABLE_PREFIX . "user as u on (u.userid=p.fromuserid) WHERE p.delsent=0 and p.active=1 and p.touserid=". $bbuserinfo['userid'] ." order by msgdate");
        $pagerinfo[timesent] = vbdate($vboptions['dateformat'], $pagerinfo[msgdate], true) . " " . vbdate($vboptions['timeformat'], $pagerinfo[msgdate]); 
  if (!($pagerinfo))
  {
  $show[pager]  = "";
  $show[pagererror] = 1;
  $nopager  = 1;
  }
  else
        {
  if ($pagerinfo[hidden])
        $pagerinfo[username] = $vbphrase['vbpager_na'];
  elseif($pagerinfo[username]=="")
  $pagerinfo[username] = $vbphrase['guest'];
        }
  }
 elseif ( ($bbuserinfo[userid]==0) and ($vboptions[sessionid]!="") )
  {
  $userexist = $DB_site->query_first("SELECT sessionhash from " .  TABLE_PREFIX . "session where sessionhash='" . $vboptions[sessionid] . "'");
  if ($userexist)
  $pagerinfo = $DB_site->query_first("SELECT p.pagerid, p.parentpid, p.fromuserid, p.touserid, u.username, p.message, p.msgdate, p.hidden, p.canreply FROM " .  TABLE_PREFIX . "pager as p left join " .  TABLE_PREFIX . "user as u on (u.userid=p.fromuserid) WHERE p.active=1 and delsent=0 and p.tosessionid='". $vboptions[sessionid] ."' order by msgdate");
  if(!($pagerinfo))
  {
  $show[pager]  = "";
  $show[pagererror] = 1;
  $nopager  = 1;
  }
  else
          {
        $pagerinfo[timesent] = vbdate($vboptions['dateformat'], $pagerinfo[msgdate], true) . " " . vbdate($vboptions['timeformat'], $pagerinfo[msgdate]);
  if ($pagerinfo[hidden])
        $pagerinfo[username] = $vbphrase['vbpager_na'];
  elseif($pagerinfo[username]=="")
  $pagerinfo[username] = $vbphrase['guest'];
          }
  }
  if (!$pagerinfo[pagerid])
 if ($bbuserinfo[pager] > 0)
  {
  $result = $DB_site->query("UPDATE ". TABLE_PREFIX . "user set pager=pager - 1 where
userid = " . $bbuserinfo[userid] . "");
  return false;
  }
  return $pagerinfo;
  }
// [END HACK='vB Pager' AUTHOR='WwW.UAEWEB.COM' VERSION='2.0.4' CHANGEID= 7 ]


laborer75 01-28-2005 06:36 PM

Seems to be working now. You are the man. I looked over that code so many times and you caught it right away. Thanx a million bro. I really appreciate it!!!

docvader 01-28-2005 06:58 PM

No, still get problems with people not being able to close the box, even with this new functions.php. For some strange reason, now, it's just intermittent. Again, it ONLY occurs when you send someone a message WITHOUT the reply option checked. Let me play with this for a day or so, and get back to you. It seems better, but, still the occasional problem. Maybe some things have to "clear" out of the database?

I've got it running on http://x.russbo.com/vb/index.php I invite you to come play with it.

mello_mike 01-28-2005 09:46 PM

I'm guessing no one knows the solution to my issue.. .because no one has helped me..

docvader 01-28-2005 10:41 PM

Quote:

Originally Posted by mello_mike
For some strange reason.. all my members can send messages .. but we cannot GET any. I made sure permissions were correct.. still no luck

All message are marked unread.. members aren't getting their messages.

Are you sure that you did all of the file edits??? Because, we've had problems with this hack, but this was not one of them. The issues that we've had, revolved around the pager box being stubborn. But, it did work.

wolfe 01-29-2005 12:07 AM

Quote:

Originally Posted by laborer75
K-I got it installed. When I click to send a messagein IE, it errors and I have to shut IE down. It does not do this infirefox though. My members are all having the same problem. Any ideaswhy this is happening? I read a couple others are having the sameproblem in this thread. Wondering if anybodys figured out why yet?Thanx in advance.......

m8 mines the same now i got it working perfectly with Firefox but it crashes IE 6 out when it tries to receive a page.

i have added the function code and its still crashign out.

docvader 01-29-2005 01:24 AM

I'm not having any problems with IE6. Got the new function.php code, which seems to keep the persistent pager box problem away. I didn't do all of your changes though wolfe, all I changed was the function.php the way uae put it in his last post.

Hope this helps.

yoyoyoyo 01-29-2005 06:05 AM

I installed this hack, and did the most recent file edits and this is what I am getting:

Quote:

Fatal error: Cannot redeclare can_pager() (previously declared in /home/mysite/public_html/forum/includes/functions.php:3916) in /home/mysite/public_html/forum/includes/functions_online.php on line 1571
can someone post an update with all of the necessary file edits, etc. in one post to make it easier to figure out?

mello_mike 01-29-2005 07:24 AM

Quote:

Originally Posted by docvader
Are you sure that you did all of the file edits??? Because, we've had problems with this hack, but this was not one of them. The issues that we've had, revolved around the pager box being stubborn. But, it did work.

I'll do a re-edit to my files and see if that works... hopefully it does.

docvader 01-29-2005 09:10 AM

Yoyo,

Install the vbpager zip as Uae has it, make sure that you uninstall previous versions as he explains in the zip, and use this functions.php file: https://vborg.vbsupport.ru/showpost....&postcount=135
That's all I did, and it works fine for me.

yoyoyoyo 01-29-2005 12:02 PM

Quote:

Originally Posted by docvader
Yoyo,

Install the vbpager zip as Uae has it, make sure that you uninstall previous versions as he explains in the zip, and use this functions.php file: https://vborg.vbsupport.ru/showpost....&postcount=135
That's all I did, and it works fine for me.

cool- thanks - I will give it a shot.

yoyoyoyo 01-29-2005 12:36 PM

I just checked my file edits, and I had put some stuff in the functions_online.php file that should have gone in the functions.php, and it is working PERFECTLY now! excellent hack!


*******clicks install*******

Sooner95 01-30-2005 01:00 AM

i really woul dlike to instal this.. is the file(s) for this up to date?

docvader 01-30-2005 01:13 AM

Read post 144 on this page. It works great. Follow the instructions carefully. They are easy to follow and well written.

yoyoyoyo 01-30-2005 02:33 AM

It has been working without a hitch!

uae 01-30-2005 04:47 AM

Quote:

Originally Posted by wolfe
fixed a few bugs in this file overwrite your old one with it.

Thanks Wolfe,

I have updated the zip file with your changes to pager.php

wolfe 01-30-2005 07:15 PM

Quote:

Originally Posted by uae
Thanks Wolfe,

I have updated the zip file with your changes to pager.php

nps

ok m8 i uninstalled and reinstalled it and it works gr8 on ie firefoxand opera ;) i now see no need for the pm system lol vbulletin shouldput this on vb.3.0.7 as default ;) better and quicker that pms ;)

docvader 01-30-2005 10:58 PM

The PM system still has its uses. but, this, is great for directing people into a chat room, or, Hubz, or whatever, as you can easily catch them onlline. I love it.

Still have some people complaining about persistent pager boxes. Now, it's not IE or Netscape specific; on one of my computers, it's persistent (in IE); in my other, it isn't. I think it might have to do with some of the preferences settings in the browser. I just haven't figured out what it is yet though.

uae 02-01-2005 03:38 AM

This Hack has been moved to Full Releases Forum.
https://vborg.vbsupport.ru/showthread.php?t=66744


All times are GMT. The time now is 04:19 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.01584 seconds
  • Memory Usage 1,914KB
  • 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
  • (2)bbcode_code_printable
  • (2)bbcode_php_printable
  • (12)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (33)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