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

Czas błąd(?).

Rekomendowane odpowiedzi

Opublikowano
  • Autor
No oryginalny kod jest taki 


}
 
if ( ! $member['online_extra'] )
{
$member['online_extra'] = $member['id'] ? ipsRegistry::getClass('class_localization')->words['board_index'] 
: ipsRegistry::getClass('class_localization')->words['not_online'];
 
}
 
return $member;
}

 

A ja zmieniam na taki:



}
 
if ( ! $member['online_extra'] )
{
$member['online_extra'] = $member['id'] ? ipsRegistry::getClass('class_localization')->words['board_index'] 
: ipsRegistry::getClass('class_localization')->words['not_online'];
var_dump($member['_online'], $member['online_extra'], $member['id']);
 
}
 
return $member;
}

 

Lub inaczej podaj mi kod błagam huh ;c

  • Odpowiedzi 54
  • Wyświetleń 5,5 tys.
  • Dodano
  • Ostatnia odpowiedź

Najlepsi użytkownicy w tym temacie

Popularne posty

  • Może ja spróbuję. @Macsch15 dał ci kod po to żeby specjalnie wywołać błąd i wskazać gdzie tkwi problem. Więc skopiuj ten błąd, łącznie z ewentualnymi cyferkami, znakami poniżej/powyżej i wklej tutaj u

  • Zamień to   if ( ! $member['online_extra'] ) { $member['online_extra'] = $member['id'] ? ipsRegistry::getClass('class_localization')->words['board_index'] : ipsRegistry::getClass('class_localizati

Opublikowano

Zamień to

 
if ( ! $member['online_extra'] )
{
$member['online_extra'] = $member['id'] ? ipsRegistry::getClass('class_localization')->words['board_index']
: ipsRegistry::getClass('class_localization')->words['not_online'];
}

 

na to

 

if ( ! $member['online_extra'] )
{
$member['online_extra'] = $member['id'] ? ipsRegistry::getClass('class_localization')->words['board_index']
: ipsRegistry::getClass('class_localization')->words['not_online'];
}
        var_dump($member['_online'], $member['online_extra'], $member['id']);

 

(Tak to zrozumiałem z postu @Macsch15)

Domagasz się szybkiej reakcji z mojej strony? Proszę, zacytuj post.

Opublikowano
  • Autor

Error się robi.. błąd... omg;c

Opublikowano
  • Autor

Skopiowałem ! to co napisał PAWEŁ i błąd no kurde

Opublikowano

Usunąłeś to

 
if ( ! $member['online_extra'] )
{
$member['online_extra'] = $member['id'] ? ipsRegistry::getClass('class_localization')->words['board_index']
: ipsRegistry::getClass('class_localization')->words['not_online'];
}

 

i wkleiłeś to

 
if ( ! $member['online_extra'] )
{
$member['online_extra'] = $member['id'] ? ipsRegistry::getClass('class_localization')->words['board_index']
: ipsRegistry::getClass('class_localization')->words['not_online'];
}
var_dump($member['_online'], $member['online_extra'], $member['id']);

 

Tak?

Domagasz się szybkiej reakcji z mojej strony? Proszę, zacytuj post.

Opublikowano

Ale błąd oczywiście się pojawi. Nie pisałem że nie, tyle że poza błędem pojawi się również wynik funkcji var_dump KTÓRY AUTOR TEMATU MIAŁ WKLEIĆ.

Opublikowano
  • Autor

O co chodzi z tym błędem?. Kurde mówcie co dokładnie zrobić no!

Opublikowano
  • Autor

wkleiłem to 

var_dump($member['_online'], $member['online_extra'], $member['id']);

 

Jak kazałeś i co?, kurde stary wesz mi daj cały kod tego aby nie było błędów cały dzień się z tym męczę nie rozumiem lekko tego kurde zrozum mnie trochę. ehh

Opublikowano

Może ja spróbuję. @Macsch15 dał ci kod po to żeby specjalnie wywołać błąd i wskazać gdzie tkwi problem. Więc skopiuj ten błąd, łącznie z ewentualnymi cyferkami, znakami poniżej/powyżej i wklej tutaj używając

 

[code]
 
Opublikowano

To podstawowy system debugowania błędów. Od źródła sprawdza się które warunki nie są spełnione aby coś działało.

W tym przypadku to:

<if test="onlineDetails:|:$member['_online'] && ($member['online_extra'] != $this->lang->words['not_online'])">

:)

Opublikowano
  • Autor
Parse error: syntax error, unexpected T_RETURN, expecting T_FUNCTION in /home/stronar/public_html/strona.pl/admin/sources/base/ipsMember.php on line 2008

oto błąd.

Opublikowano

Nie. To błąd który informuje o tym że coś źle zrobiłeś. Błąd jaki prawdopodobnie (zależy od ustawień error_reporting) pojawi się po moim fragmencie to Warning informujący że header nie może zostać nadpisany ponownie... bo został już wysłany. Ale to nie ważne.

 

Pokaż kod który zmodyfikowałeś.

Opublikowano
  • Autor
if ( ! $member['online_extra'] )
{
$member['online_extra'] = $member['id'] ? ipsRegistry::getClass('class_localization')->words['board_index']
: ipsRegistry::getClass('class_localization')->words['not_online'];
}
var_dump($member['_online'], $member['online_extra'], $member['id']);

ten o.

Opublikowano
  • Autor
 
static public function getLocation( $member )
{
$member['online_extra'] = "";
 
//-----------------------------------------
// Grab 'where' info
//-----------------------------------------
 
if( !$member['in_error'] AND $member['current_appcomponent'] AND IPSLib::appIsInstalled( $member['current_appcomponent'] ) )
{
$member['current_appcomponent'] = IPSText::alphanumericalClean($member['current_appcomponent']);
 
$filename = IPSLib::getAppDir(  $member['current_appcomponent'] ) . '/extensions/coreExtensions.php';
 
if ( is_file( $filename ) )
{
$toload = IPSLib::loadLibrary( $filename, 'publicSessions__' . $member['current_appcomponent'], $member['current_appcomponent'] );
 
if( class_exists( $toload ) )
{
$loader = new $toload();
 
if( method_exists( $loader, 'parseOnlineEntries' ) )
{
$tmp = $loader->parseOnlineEntries( array( $member['id'] => $member ) );
 
// Yes, this is really id - it's session id, not member id
if( isset( $tmp[ $member['id'] ] ) && is_array( $tmp[ $member['id'] ] ) && count( $tmp[ $member['id'] ] ) )
{
if ( isset( $tmp[ $member['id'] ]['_whereLinkSeo']) )
{
$member['online_extra'] = "{$tmp[ $member['id'] ]['where_line']} <a href='" . $tmp[ $member['id'] ]['_whereLinkSeo'] . "' title='" . $tmp[ $member['id'] ]['where_line'] . ' ' . $tmp[ $member['id'] ]['where_line_more'] . "'>" . IPSText::truncate( $tmp[ $member['id'] ]['where_line_more'], 35 ) . "</a>";
}
/* @link http://community.invisionpower.com/tracker/issue-20598-where-link-not-taken-into-account-on-profile-page-if-no-where-line-more-specified/ */
else if ( isset($tmp[ $member['id'] ]['where_link']) AND $tmp[ $member['id'] ]['where_line_more'] )
{
$member['online_extra'] = "{$tmp[ $member['id'] ]['where_line']} <a href='" . ipsRegistry::$settings['base_url'] . "{$tmp[ $member['id'] ]['where_link']}' title='" . $tmp[ $member['id'] ]['where_line'] . ' ' . $tmp[ $member['id'] ]['where_line_more'] . "'>" . IPSText::truncate( $tmp[ $member['id'] ]['where_line_more'], 35 ) . "</a>";
}
else if ( isset($tmp[ $member['id'] ]['where_link']) )
{
$member['online_extra'] = "<a href='" . ipsRegistry::$settings['base_url'] . "{$tmp[ $member['id'] ]['where_link']}' title='" . $tmp[ $member['id'] ]['where_line'] . "'>" . IPSText::truncate( $tmp[ $member['id'] ]['where_line'], 35 ) . "</a>";
}
else
{
$member['online_extra'] = $tmp[ $member['id'] ]['where_line'];
}
}
}
}
}
}
 
 
if ( ! $member['online_extra'] )
{
$member['online_extra'] = $member['id'] ? ipsRegistry::getClass('class_localization')->words['board_index'] 
: ipsRegistry::getClass('class_localization')->words['not_online'];
 
}
 
return $member;
}
 
/**
* Determine if two members are friends
*
* @author Brandon Farber
* @param integer Member ID to check for
* @param integer  Member ID to check against (defaults to current member id)
* @param bool Only return true if the friend is approved
* @return boolean Whether they are friends or not
* @since IPB 3.0
*/
static public function checkFriendStatus( $memberId, $checkAgainst=0, $onlyVerified=false )
{
/**
* If no member id, obviously not friends
*/
if( !$memberId )
{
return false;
}
 
/**
* Get member data
*/
$memberData = array();
 
if( !$checkAgainst )
{
$memberData = ipsRegistry::instance()->member()->getProperty('_cache');
}
else
{
$member = self::load( $checkAgainst, 'extendedProfile' );
$memberData = self::unpackMemberCache( $member['members_cache'] );
}
 
/**
* Do we have a friends cache array?
*/
if( !$memberData['friends'] OR !is_array($memberData['friends']) OR !count($memberData['friends']) )
{
return false;
}
 
/**
* If there is, then check it..
*/
if( $onlyVerified )
{
if( isset($memberData['friends'][ $memberId ]) AND $memberData['friends'][ $memberId ] )
{
return true;
}
 
return false;
}
else
{
return isset($memberData['friends'][ $memberId ]) ? true : false;
}
 
return false;
}
 
/**
* Determine if a member is ignoring another member
*
* @author Brandon Farber
* @param integer Member ID to check for
* @param integer  Member ID to check against (defaults to current member id)
* @param string Type of ignoring to check [messages|topics].  Omit to check any type.
* @return boolean Whether the member id to check for is being ignored by the member id to check against
* @since IPB 3.0
*/
static public function checkIgnoredStatus( $memberId, $checkAgainst=0, $type=false )
{
/**
* If no member id, obviously not ignored
*/
if( !$memberId )
{
return false;
}
 
/**
* Get member data
*/
$memberData = array();
 
if( !$checkAgainst )
{
/**
* Ignored users loaded at runtime and stored in an array...loop
*/
foreach( ipsRegistry::instance()->member()->ignored_users as $ignoredUser )
{
/**
* We found the user?
*/
if( $ignoredUser['ignore_ignore_id'] )
{
/**
* If not specifying a type, then just return
*/
if( !$type )
{
return true;
}
/**
* Otherwise verify we are ignoring that type
*/
else if( $ignoredUser[ 'ignore_' . $type ] )
{
return true;
}
}
}
}
else
{
/**
* See if checkAgainst is ignoring memberId
*/
$checkAgainst = intval($checkAgainst);
$ignoredUser = ipsRegistry::instance()->member()->DB()->buildAndFetch( array( 'select' => '*', 'from' => 'ignored_users', 'where' => 'ignore_owner_id=' . $checkAgainst . ' AND ignore_ignore_id=' . $memberId ) );
 
/**
* No?
*/
if( !$ignoredUser['ignore_id'] )
{
return false;
}
/**
* He is?
*/
else
{
/**
* If not specifying a type, then just return
*/
if( !$type )
{
return true;
}
/**
* Otherwise verify we are ignoring that type
*/
else if( $ignoredUser[ 'ignore_' . $type ] )
{
return true;
}
}
}
 
/**
* If we're here (which we shouldn't be) just return false
*/
return false;
}
 
/**
* Retrieve all IP addresses a user (or multiple users) have used
*
* @param  mixed [integer] member ID or [Array] array of member ids
* @param string Defaults to 'All', otherwise specify which tables to check (comma separated)
* @return array Multi-dimensional array of found IP addresses in which sections
*/
static public function findIPAddresses( $id, $tables_to_check='all' )
{
Opublikowano

Mogę spytać po co dałeś domyślną część kodu IPB?

 

Nigdy bym nie przypuszczał że wstawienie poprawnie jednej linijki kodu w celu próby zdiagnozowania problemu może być TAK trudne.

I tym kończę.

 

Miłej nocy. :)

Opublikowano

Chodzi mu o to, że masz sobie edytować plik admin\sources\base\ipsMember.php (który zmieniałeś) za pomocą np. notepad++, zjechać do linii 2008 (numeracja linijek jest z lewej) i wkleić kod który się znajduje w okolicach linii 2008 :)

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.