Skocz do zawartości
Hosting webh.pl - 20%

Ramka błędu z informacją o Pomocy

Rekomendowane odpowiedzi

Opublikowano

Witam,

Nie wiesz jak usunąć ramkę zależnie od błędu? Oto sposób, aby tego dokonać:

Otwórz: sources/ipsclass.php

Znajdź i zamień całą funkcję:

    /*-------------------------------------------------------------------------*/
   // ERROR FUNCTIONS             
   /*-------------------------------------------------------------------------*/

   /**
   * Show error message
   *
   * @param    array    'LEVEL', 'INIT', 'MSG', 'EXTRA', 'HELP'
   * @return    void
   * @since    2.0
   */
   function Error($error)
   {
       $override = 0;

       //-----------------------------------------
       // Showing XML / AJAX functions?
       //-----------------------------------------

       if ( $this->input['act'] == 'xmlout' )
       {
           @header( "Content-type: text/plain" );
           print 'error';
           exit();
       }

       //-----------------------------------------
       // Initialize if not done so yet
       //-----------------------------------------

       if ( isset($error['INIT']) AND $error['INIT'] == 1)
       {
           $this->quick_init();
       }
       else
       {
           $this->session_id = $this->my_session;
       }

       if ( !isset($this->compiled_templates['skin_global']) OR !is_object( $this->compiled_templates['skin_global'] ) )
       {
           $this->load_template('skin_global');
       }

       //-----------------------------------------
       // Get error words
       //-----------------------------------------

       $this->load_language('lang_error');

       list($em_1, $em_2) = explode( '@', $this->vars['email_in'] );

       $msg = $this->lang[ $error['MSG'] ];

       //-----------------------------------------
       // Extra info?
       //-----------------------------------------

       if ( isset($error['EXTRA']) AND $error['EXTRA'] )
       {
           $msg = str_replace( '<#EXTRA#>', $error['EXTRA'], $msg );
       }

       //-----------------------------------------
       // Show error
       //-----------------------------------------
       $show_help = ( isset($error['HELP']) AND $error['HELP'] == 1 ) ? 1 : 0;

       $html = $this->compiled_templates['skin_global']->Error( $msg, $em_1, $em_2, $show_help);

       //-----------------------------------------
       // If we're a guest, show the log in box..
       //-----------------------------------------

       if ($this->member['id'] == "" and $error['MSG'] != 'server_too_busy' and $error['MSG'] != 'account_susp')
       {
           $safe_string = $this->base_url . str_replace( '&', '&', $this->parse_clean_value($this->my_getenv('QUERY_STRING')) );

           $html = str_replace( "<!--IBF.LOG_IN_TABLE-->", $this->compiled_templates['skin_global']->error_log_in( str_replace( '&', '&', $safe_string ) ), $html);
           $override = 1;
       }

       //-----------------------------------------
       // Do we have any post data to keepy?
       //-----------------------------------------

       if ( $this->input['act'] == 'Post' OR $this->input['act'] == 'Msg' OR $this->input['act'] == 'calendar' )
       {
           if ( $_POST['Post'] )
           {
               $post_thing = $this->compiled_templates['skin_global']->error_post_textarea($this->txt_htmlspecialchars($this->txt_stripslashes($_POST['Post'])) );

               $html = str_replace( "<!--IBF.POST_TEXTAREA-->", $post_thing, $html );
           }
       }

       //-----------------------------------------
       // Update session
       //-----------------------------------------

       $this->DB->do_shutdown_update( 'sessions', array( 'in_error' => 1 ), "id='{$this->my_session}'" );

       //-----------------------------------------
       // Print
       //-----------------------------------------

       $print           =  new display();
       $print->ipsclass =& $this;

       $print->add_output($html);

       $print->do_output( array( 'OVERRIDE' => $override, 'TITLE' => $this->lang['error_title'] ) );
   }

Sposób wykorzystania:

$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'nazwa_klucza', 'HELP' => 1 ) );

Bez podania parametru, sam usunie ramkę. Jedynie podając dodatkowy parametr doda ją.

Pozdrawiam,

Largo

Jeżeli Ci pomogłem, nie zapomnij proszę o kliknięciu - add.png

Możesz liczyć na moją pomoc z zakresu: PHP5, MySQL, JavaScript i Ajax | W trakcie nauki CSS i xHTML!

W sprawie pomocy z zakresu IP.Board służę pomocą w dziale Zaawansowane programowanie IP.Board

Proszę o nie wysyłanie próśb PW o prywatną pomoc - pomagam JEDYNIE na forum lub na zlecenie!

  • 2 miesiące temu...
Opublikowano

i m also used translater but i have not understand could you explain more

Opublikowano

all functions with ? this ?

$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'nazwa_klucza', 'HELP' => 1 ) );

?

Jeśli chcesz dodać odpowiedź, zaloguj się lub zarejestruj nowe konto

Ostatnio przeglądający 0

  • Brak zarejestrowanych użytkowników przeglądających tę stronę.

Szukaj

Szukaj

Skonfiguruj powiadomienia push w przeglądarce

Chrome (Android)
  1. Stuknij ikonę kłódki obok paska adresu.
  2. Stuknij Uprawnienia → Powiadomienia.
  3. Dostosuj swoje ustawienie.
Chrome (Komputer)
  1. Kliknij ikonę kłódki na pasku adresu.
  2. Wybierz Ustawienia witryny.
  3. Znajdź Powiadomienia i dostosuj swoje ustawienie.