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)

AlexanderH 01-26-2005 03:33 PM

I am confused.

I did all the steps, yet no changes to the forum !

Also, my ACP was mucked up (See the quote)

Quote:

Parse error: parse error, unexpected T_STRING in /home/element/public_html/admincp/index.php on line 547

Any ideas ?

docvader 01-26-2005 09:56 PM

Uae, we seem to be having a small problem with the pager. It might be the way you designed it, as opposed to it being a bug.
If someone gets a page, with the respond box attached, they cannot get rid of the page unless they respond.

So, either we fix that, so that people can ignore the page, or, make the check box "unselected" by default. I prefer to do that now, but I don't know where in the code that is.

Where do I change that?

Otherwise, it seems to be working well.

docvader 01-27-2005 07:15 PM

We've been using the pager now since the new version came out. Working great, but, some people, not all, are having problems with the pager box not disappearing, despite trying to close it. Not sure why, not always related to the checked "allow reply" box.

Is there any way of putting some sort of time limit on this pager box, so that it "self destructs" and disappears, on its own, within a minute or two???? That might be the easiest way to solve this issue.

Otherwise. it's impressive. The pager icon shows up in the vba cmpls "who's online" box, which I found surprising. Also, having it in the "Who's Online" section was pure genius.

Let's get this thing to go away, and move the hack out of beta. AS I see it, it's the only issue.

wolfe 01-27-2005 09:54 PM

m8 i also got this working with the Who Was Online Hack :)

also m8 i have fixed up the vbpager template replace the whole template with the attached file

also m8 i might add a title to the pager messages because if itsshowing the message it will take up alot of space could be title Oi

lol

docvader 01-27-2005 10:56 PM

Hey, m8. Did you attach your new file? Not sure if it changed anything for me.

Also, I noticed that if you don't check the allow reply box, you can't close the pager. You can if you check the allow reply box.

laborer75 01-28-2005 01:16 AM

I installed this hack to a tee and get this error when trying to get in my forums. Won't even let me log into admincp unless i overwrite my global.php file back to original. I see the options in admincp. The button to click and page is all there too.

Fatal error: Call to undefined function: can_pager() in /home2/laborer7/public_html/forums/global.php on line 300

Ive checked everything and can't figure this one out. i have uninstalled and reinstalled 3 times. Any suggestions? Kinda new to this all but I have installed other hacks no problemo........Thanx in advance :)

wolfe 01-28-2005 01:22 AM

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

Sooner95 01-28-2005 01:24 AM

how close is this to being final? really like to throw this on my site. Thx

wolfe 01-28-2005 01:26 AM

fixed a few bugs in this file overwrite your old one with it.

docvader 01-28-2005 01:32 AM

Can you show us what your global php hacked area looks like, around line 300??


All times are GMT. The time now is 09:23 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.01295 seconds
  • Memory Usage 1,819KB
  • 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_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)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