View Single Post
  #1  
Old 12-09-2009, 08:13 PM
lms lms is offline
 
Join Date: Jan 2008
Posts: 34
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Itsid HIDE ajax sids hide. Don't work AJAX. Help

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
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01375 seconds
  • Memory Usage 2,009KB
  • Queries Executed 12 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (6)bbcode_php
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (2)postbit_attachment
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete