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

Pavulon

Użytkownik
  • Postów

    3 849
  • Dołączył

  • Ostatnia wizyta

Odpowiedzi opublikowane przez Pavulon

  1. Dziwne, teoretycznie powinno działać to co pisałem wcześnie ale praktycznie nie chciało.

    Na szczęście była jeszcze opcja is_numeric()

    Czyli kod będzie taki:

    					if( $member['members_display_name'] && !is_numeric($_option) )
    				{
    					$name = IPSLib::makeNameFormatted($member['members_display_name'], $member['member_group_id']);
    
    					$existing[ $_option ]	= array( 'member_id' => $member['member_id'], 'members_display_name' => $name );
    					$this->cache->updateCacheWithoutSaving( '_tmp_bbcode_members', $existing );
    
    					$_content = $this->_buildOutput( $existing[ $_option ] );
    				} else if ( is_numeric($_option) ) {
    					$member = IPSMember::load( $_option );
    
    					if( $member['members_display_name'] )
    					{
    						$name = IPSLib::makeNameFormatted($member['members_display_name'], $member['member_group_id']);
    
    						$existing[ $_option ]	= array( 'member_id' => $member['member_id'], 'members_display_name' => $name );
    						$this->cache->updateCacheWithoutSaving( '_tmp_bbcode_members', $existing );
    
    						$_content = $this->_buildOutput( $existing[ $_option ] );
    					}
    				}

    Byłbym wdzięczny jak byś mógł poprawić pierwszy post :)

  2. Nie wiem czy to coś pomoże, ale spróbuj zmienić:

    			foreach( new DirectoryIterator( $custom_path ) as $f )

    na:

    			$dir = new DirectoryIterator( $custom_path );
    		foreach( $dir as $f )

    Jeżeli to nic nie da to mam ewentualnie tylko jeszcze jeden pomysł.

    Zamień:

    		if( is_dir( $custom_path ) )
    	{
    		foreach( new DirectoryIterator( $custom_path ) as $f )
    		{
    			if ( ! $f->isDot() && ! $f->isDir() )
    			{
    				$file = $f->getFileName();
    
    				if( $file[0] == '.' )
    				{
    					continue;
    				}
    
    				if ( preg_match( "#\.conf\.php$#i", $file ) )
    				{
    					$classname = str_replace( ".conf.php", "", $file );
    
    					require( $custom_path . '/' . $file );
    
    					//-------------------------------
    					// Allowed to use?
    					//-------------------------------
    
    					if ( $CONFIG['plugin_enabled'] )
    					{
    						if( in_array( $this->settings['search_method'], array( 'traditional', 'sphinx' ) ) && $CONFIG['plugin_key'] == 'recentActivity' )
    						{
    							continue;
    						}
    
    						$_position					= $this->_getTabPosition( $_positions, $CONFIG['plugin_order'] );
    						$_tabs[ $_position ]		= $CONFIG;
    						$_positions[]				= $_position;
    					}
    				}
    			}
    		}			
    	}

    na:

    		if( is_dir( $custom_path ) )
    	{
    		$dir = new DirectoryIterator( $custom_path );
    		$files = array();
    		foreach( $dir as $f )
    		{
    			if ( ! $f->isDot() && ! $f->isDir() )
    			{
    				$file = $f->getFileName();
    
    				if( $file[0] == '.' )
    				{
    					continue;
    				}
    
    				if ( preg_match( "#\.conf\.php$#i", $file ) )
    				{
    					$files[] = $file;
    				}
    			}
    		}
    
    		foreach( $files as $file )
    		{
    			$classname = str_replace( ".conf.php", "", $file );
    
    			require( $custom_path . '/' . $file );
    
    			//-------------------------------
    			// Allowed to use?
    			//-------------------------------
    
    			if ( $CONFIG['plugin_enabled'] )
    			{
    				if( in_array( $this->settings['search_method'], array( 'traditional', 'sphinx' ) ) && $CONFIG['plugin_key'] == 'recentActivity' )
    				{
    					continue;
    				}
    
    				$_position					= $this->_getTabPosition( $_positions, $CONFIG['plugin_order'] );
    				$_tabs[ $_position ]		= $CONFIG;
    				$_positions[]				= $_position;
    			}
    		}
    	}

×
×
  • 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ę.