vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Itsid HIDE ajax sids hide. Don't work AJAX. Help (https://vborg.vbsupport.ru/showthread.php?t=229870)

lms 12-09-2009 08:13 PM

Itsid HIDE ajax sids hide. Don't work AJAX. Help
 
1 Attachment(s)
Hola:
Estoy adaptando el c?digo de Itsid HIDE ajax sids hide (no aparece por esta web desde hace m?s de un a?o -Developer Last Online: Aug 2008- y no logro contactar con ?l) y lo he hecho funcionar en la BETA 3 de vB pero no logro que funcione la parte AJAX. En particular este reemplazo
PHP Code:

            <title>JS_PLACEMENT by Ziki</title>
            <
hookname>global_start</hookname>
            <
phpcode><![CDATA[if ($vbulletin->options['sid_hide_ajax_on'] AND THIS_SCRIPT === showthread){            
                
$ara '<!-- / CSS Stylesheet -->';
                
$vbulletin->templatecache['HEADINCLUDE'] = str_replace($ara,$ara vB_Template::fetch_template_raw('sid_hide_head'),$vbulletin->templatecache['HEADINCLUDE']);
            }]]></
phpcode

La variable
PHP Code:

$ara '<!-- / CSS Stylesheet -->'

no funciona y hace que no funcione el mod en su parte AJAX.

Esto no s? si funciona bien:
PHP Code:

        </plugin>
        <
plugin active="1" executionorder="126">
            <
title>hide hack ajax request</title>
            <
hookname>postbit_display_complete</hookname>
            <
phpcode><![CDATA[
            if (
$_REQUEST['do'] == 'whatever'){
            global 
$vbulletin$vboptions$bbuserinfo$db$threadid$postid;
            
$bbuserinfo $this->registry->userinfo;
            
$postid $_REQUEST['p'];
            
$hide_call $_REQUEST['all'];
            
$hide_read false;
            
$hide_replied '';
            
$hide_thanked '';
            if (
$vbulletin->options['sid_hide_showthanked']){
                if(
$vbulletin->options['post_thanks_forum_first_all'] == 1){
                    
$hide_thanked $db->query_first("SELECT userid FROM "TABLE_PREFIX ."post_thanks WHERE postid='$thread[firstpostid]' AND userid='$bbuserinfo[userid]'");
                    if(
$hide_thanked !=''){
                        
$hide_read true;
                    }
                } elseif (!empty(
$vbulletin->options['post_thanks_forum_first'])){
                    
$post_thanks_forums1_first explode("|",$vbulletin->options['post_thanks_forum_first']);
                    if (
in_array($this->thread['forumid'], $post_thanks_forums1_first)){
                        
$hide_thanked $db->query_first("SELECT userid FROM "TABLE_PREFIX ."post_thanks WHERE postid='$thread[firstpostid]' AND userid='$bbuserinfo[userid]'");
                        if(
$hide_thanked !=''){
                            
$hide_read true;
                        }
                    }else{
                        
$hide_thanked $db->query_first("SELECT userid FROM "TABLE_PREFIX ."post_thanks WHERE postid='$postid' AND userid='$bbuserinfo[userid]'");
                        if(
$hide_thanked !=''){
                            
$hide_read true;
                        }
                    }
                } else{
                    
$hide_thanked $db->query_first("SELECT userid FROM "TABLE_PREFIX ."post_thanks WHERE postid='$postid' AND userid='$bbuserinfo[userid]'");
                    if(
$hide_thanked !=''){
                        
$hide_read true;
                    }
                }
            }
            if (
$vbulletin->options['sid_hide_showposted'] AND $hide_read==false){
                
$hide_replied $db->query("SELECT COUNT(postid) AS count FROM "TABLE_PREFIX "post WHERE userid='$bbuserinfo[userid]' AND visible = 1 AND threadid='$post[threadid]'");
                
$myreplies 0;
                if(
$db->num_rows($hide_replied)){
                    while (
$h_post $db->fetch_array($hide_replied)){
                        
$myreplies += $h_post['count'];
                    }
                    
$myreplies vb_number_format($myreplies);
                }
                if(
$myreplies 0){
                    
$hide_read true;
                }
            }
            if(!
$bbuserinfo[userid]){
                
$hide_read false;
            }
            if( 
$hide_read == true){
                
$hide_post $db->query_first("SELECT pagetext as 'message' FROM "TABLE_PREFIX ."post WHERE postid='$postid'");
                
$hide_string "#\[hide\](.*)\[\/hide\]#siU";
                require_once(
DIR '/includes/class_bbcode.php');
                
$parser =& new vB_BbCodeParser($vbulletinfetch_tag_list());
                
$hide_post['message'] = $parser->do_parse($hide_post['message'],true);
                if(
preg_match_all($hide_string$hide_post['message'], $hide_match)) {
                    for(
$i=0$i<count($hide_match[0]); $i++) {
                        
$hide_replace[$i] ="<fieldset><legend><span class=\"highlight\">".$vbphrase[sid_hide_post_show]."</span></legend>".$hide_match[1][$i]."</fieldset>";
                        
$hide_post['message']= str_replace($hide_match[0][$i],$hide_replace[$i],$hide_post['message']);
                    }
                }
            }else{
                
$hide_post['message'] = 'sid_hide_still_active';
            }
            
            
$ajax_on true;
            
$output $hide_post['message'];
            echo 
"$output";
            exit;
            }
            ]]></
phpcode

?Algui?n puede echarme una mano?

Perd?n por mi mal ingl?s, pero soy espa?ol y uso traductor.

---------------------------------------------------------------------------------------------------

Hello:
I am adapting the code of Itsid (does not appear by this site from more than a year -Developer Last Online: Aug 2008- and not achieving contact with him) HIDE ajax sids hide and i have done work in the BETA 3 vB but not achievement to operate the party AJAX. In particular this replacement
PHP Code:

            <title>JS_PLACEMENT by Ziki</title>
            <
hookname>global_start</hookname>
            <
phpcode><![CDATA[if ($vbulletin->options['sid_hide_ajax_on'] AND THIS_SCRIPT === showthread){            
                
$ara '<!-- / CSS Stylesheet -->';
                
$vbulletin->templatecache['HEADINCLUDE'] = str_replace($ara,$ara vB_Template::fetch_template_raw('sid_hide_head'),$vbulletin->templatecache['HEADINCLUDE']);
            }]]></
phpcode

variable
PHP Code:

$ara '<!-- / CSS Stylesheet -->'

does not work and does not work the mod in its part AJAX.

This does not know if it works well:
PHP Code:

        </plugin>
        <
plugin active="1" executionorder="126">
            <
title>hide hack ajax request</title>
            <
hookname>postbit_display_complete</hookname>
            <
phpcode><![CDATA[
            if (
$_REQUEST['do'] == 'whatever'){
            global 
$vbulletin$vboptions$bbuserinfo$db$threadid$postid;
            
$bbuserinfo $this->registry->userinfo;
            
$postid $_REQUEST['p'];
            
$hide_call $_REQUEST['all'];
            
$hide_read false;
            
$hide_replied '';
            
$hide_thanked '';
            if (
$vbulletin->options['sid_hide_showthanked']){
                if(
$vbulletin->options['post_thanks_forum_first_all'] == 1){
                    
$hide_thanked $db->query_first("SELECT userid FROM "TABLE_PREFIX ."post_thanks WHERE postid='$thread[firstpostid]' AND userid='$bbuserinfo[userid]'");
                    if(
$hide_thanked !=''){
                        
$hide_read true;
                    }
                } elseif (!empty(
$vbulletin->options['post_thanks_forum_first'])){
                    
$post_thanks_forums1_first explode("|",$vbulletin->options['post_thanks_forum_first']);
                    if (
in_array($this->thread['forumid'], $post_thanks_forums1_first)){
                        
$hide_thanked $db->query_first("SELECT userid FROM "TABLE_PREFIX ."post_thanks WHERE postid='$thread[firstpostid]' AND userid='$bbuserinfo[userid]'");
                        if(
$hide_thanked !=''){
                            
$hide_read true;
                        }
                    }else{
                        
$hide_thanked $db->query_first("SELECT userid FROM "TABLE_PREFIX ."post_thanks WHERE postid='$postid' AND userid='$bbuserinfo[userid]'");
                        if(
$hide_thanked !=''){
                            
$hide_read true;
                        }
                    }
                } else{
                    
$hide_thanked $db->query_first("SELECT userid FROM "TABLE_PREFIX ."post_thanks WHERE postid='$postid' AND userid='$bbuserinfo[userid]'");
                    if(
$hide_thanked !=''){
                        
$hide_read true;
                    }
                }
            }
            if (
$vbulletin->options['sid_hide_showposted'] AND $hide_read==false){
                
$hide_replied $db->query("SELECT COUNT(postid) AS count FROM "TABLE_PREFIX "post WHERE userid='$bbuserinfo[userid]' AND visible = 1 AND threadid='$post[threadid]'");
                
$myreplies 0;
                if(
$db->num_rows($hide_replied)){
                    while (
$h_post $db->fetch_array($hide_replied)){
                        
$myreplies += $h_post['count'];
                    }
                    
$myreplies vb_number_format($myreplies);
                }
                if(
$myreplies 0){
                    
$hide_read true;
                }
            }
            if(!
$bbuserinfo[userid]){
                
$hide_read false;
            }
            if( 
$hide_read == true){
                
$hide_post $db->query_first("SELECT pagetext as 'message' FROM "TABLE_PREFIX ."post WHERE postid='$postid'");
                
$hide_string "#\[hide\](.*)\[\/hide\]#siU";
                require_once(
DIR '/includes/class_bbcode.php');
                
$parser =& new vB_BbCodeParser($vbulletinfetch_tag_list());
                
$hide_post['message'] = $parser->do_parse($hide_post['message'],true);
                if(
preg_match_all($hide_string$hide_post['message'], $hide_match)) {
                    for(
$i=0$i<count($hide_match[0]); $i++) {
                        
$hide_replace[$i] ="<fieldset><legend><span class=\"highlight\">".$vbphrase[sid_hide_post_show]."</span></legend>".$hide_match[1][$i]."</fieldset>";
                        
$hide_post['message']= str_replace($hide_match[0][$i],$hide_replace[$i],$hide_post['message']);
                    }
                }
            }else{
                
$hide_post['message'] = 'sid_hide_still_active';
            }
            
            
$ajax_on true;
            
$output $hide_post['message'];
            echo 
"$output";
            exit;
            }
            ]]></
phpcode

How someone can i a hand?

Forgiveness for my bad english, but i am spanish and use translator.


Salud2


All times are GMT. The time now is 08:38 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.01187 seconds
  • Memory Usage 1,855KB
  • 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
  • (6)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (1)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete