Skocz do zawartości
"Idzie nowe..." - o zmianach i nie tylko ×
Przeniesienie zakupów z IPS Marketplace / Moving bought items from IPS Marketplace ×

aXen

Tłumacz
  • Postów

    2 251
  • Dołączył

  • Ostatnia wizyta

  • Wygrane w rankingu

    255

Odpowiedzi opublikowane przez aXen

  1. Pobierz hook z tej strony: http://forum.invisionize.pl/files/file/538-sos32-secondary-groups-indicator/

     

    Edytuj hook i znajdź:

    public function userInfoPane( $author, $contentid, $options )
    {
    if ( !$this->settings['sos32_othersgroups_on'] )
    {
    return parent::userInfoPane( $author, $contentid, $options );
    }
     
    $grupos = array();
           
          if ( $author['mgroup_others'] )
          {
            $grupos = explode( ",", IPSText::cleanPermString( $author['mgroup_others'] ) );
     
    $grupo = ipsRegistry::cache()->getCache( 'group_cache' );
     
    foreach ( $grupos as $sec_group )
    {
    if ( !in_array( $sec_group, explode( ',', $this->settings['sos32_othersgroups_grupos'] ) ) )
    {
            if ( $sec_group != $author['member_group_id'] )
    {
    $g_others[] = $grupo[ $sec_group ]['prefix'].$grupo[ $sec_group ]['g_title'].$grupo[ $sec_group ]['suffix'];
    }
    }
    }
     
    if ( count( $g_others ) )
                {
    $author['other_groups'] = implode( ", ", $g_others );
                }
    }
     
    if ( count( $g_others ) )
    {
    $this->registry->class_localization->loadLanguageFile( array( 'public_global' ), 'core' );
     
    $text1 = "<li><span class='ft'>{$this->lang->words['others']}: </span><span class='fc'>";
    $text2 = "</span></li>";
     
    $author['_group_formatted'] .= $text1.$author['other_groups'].$text2;
    }
     
    return parent::userInfoPane( $author, $contentid, $options );
    }

     

    Potem zmień na:

    public function userInfoPane( $author, $contentid, $options )
        {
            if ( !$this->settings['sos32_othersgroups_on'] )
            {
                return parent::userInfoPane( $author, $contentid, $options );
            }
     
            $grupos = array();
           
              if ( $author['mgroup_others'] )
              {
                $grupos = explode( ",", IPSText::cleanPermString( $author['mgroup_others'] ) );
     
                $grupo = ipsRegistry::cache()->getCache( 'group_cache' );
                
                foreach ( $grupos as $sec_group )
                {
                    if ( !in_array( $sec_group, explode( ',', $this->settings['sos32_othersgroups_grupos'] ) ) )
                    {
                        if ( $sec_group != $author['member_group_id'] )
                        {
                            $g_others[] = $grupo[ $sec_group ]['prefix'].$grupo[ $sec_group ]['g_title'].$grupo[ $sec_group ]['suffix'];
                        }
                    }
                }
                
                if ( count( $g_others ) )
                {
                    $author['other_groups'] = implode( "<br>", $g_others );
                }
            }
     
            if ( count( $g_others ) )
            {
                $this->registry->class_localization->loadLanguageFile( array( 'public_global' ), 'core' );
                
                $text1 = "<br>";
            
                $author['_group_formatted'] .= $text1.$author['other_groups'];
            }
            
            return parent::userInfoPane( $author, $contentid, $options );
        }

     

    Gotowe :)

    • Lubię to 1
  2. public function userInfoPane( $author, $contentid, $options )
        {
            if ( !$this->settings['sos32_othersgroups_on'] )
            {
                return parent::userInfoPane( $author, $contentid, $options );
            }
     
            $grupos = array();
           
              if ( $author['mgroup_others'] )
              {
                $grupos = explode( ",", IPSText::cleanPermString( $author['mgroup_others'] ) );
     
                $grupo = ipsRegistry::cache()->getCache( 'group_cache' );
                
                foreach ( $grupos as $sec_group )
                {
                    if ( !in_array( $sec_group, explode( ',', $this->settings['sos32_othersgroups_grupos'] ) ) )
                    {
                        if ( $sec_group != $author['member_group_id'] )
                        {
                            $g_others[] = $grupo[ $sec_group ]['prefix'].$grupo[ $sec_group ]['g_title'].$grupo[ $sec_group ]['suffix'];
                        }
                    }
                }
                
                if ( count( $g_others ) )
                {
                    $author['other_groups'] = implode( "<br>", $g_others );
                }
            }
     
            if ( count( $g_others ) )
            {
                $this->registry->class_localization->loadLanguageFile( array( 'public_global' ), 'core' );
                
                $text1 = "<br>";
            
                $author['_group_formatted'] .= $text1.$author['other_groups'];
            }
            
            return parent::userInfoPane( $author, $contentid, $options );
        }

     

    Ja przerobiłem kod kolegi wyżej na ten co chciałeś.

     

    Zmieniłem kod z:

    $author['other_groups'] = implode( ", ", $g_others );
    

     

    Na:

    $author['other_groups'] = implode( "<br>", $g_others );
    
    • Lubię to 1
  3. Przykład:

    <div id="" class="category_block">
    <h3 id="category_servers" class="maintitle"><a class="toggle right" href="#" title="Zmień widoczność tej kategorii">Zmień widoczność tej kategorii</a>Partnerzy</h3>
    <div class="table_wrap general_box" id="ads">
    <marquee width="100%" direction="left" behavior="scroll" truespeed="truespeed" scrolldelay="10" scrollamount="1" onmouseover="this.stop()" onmouseout="this.start()">
    <a href="http://pandorummt2.pl/" title="PandorumMT2.pl"><img id="ads_banner" src="http://holyfrag.com/img/4_logo_metin2.png"></a>
    <a href="http://holyfrag.com/" title="HolyFreg.com"><img id="ads_banner" src="http://fotozrzut.pl/zdjecia/dfb7b9f6bb.gif"></a>
    <a href="http://csgaming.pl/index.php" title="CSGaming.pl"><img id="ads_banner" src="http://csgaming.pl/uploads/images/1404200136-U1.jpg"></a>
    <a href="http://gamepine.eu/" title="gamePine.eu"><img id="ads_banner" src="http://vpx.pl/i/2014/05/14/banner.gif"></a>
    
    </marquee>
    </div>
    </div>
    
    

    Demo: http://epicgames.pl/

    • Lubię to 1
×
×
  • Dodaj nową pozycję...

Powiadomienie o plikach cookie

Umieściliśmy na Twoim urządzeniu pliki cookie, aby pomóc Ci usprawnić przeglądanie strony. Możesz dostosować ustawienia plików cookie, w przeciwnym wypadku zakładamy, że wyrażasz na to zgodę.