Skocz do zawartości

Rekomendowane odpowiedzi

Opublikowano

Siemanko :)

Na moim forum Użytkownik słusznie zauważył błąd w panelu ostatnio poruszone tematy. 

W edycji tego panelu można skonfigurować jakie tematy ma pokazywać. 

Użytkownik ponownie uaktywnił swój dziennik treningowy z 2014 roku, a w edycji panelu można wpisać ręcznie z ilu dni ma pokazywać tematy, lub zaznaczyć ostatni rok.

Po wpisaniu ręcznie wartości dni nie daje to oczekiwanego efektu. Temat się nie wyświetla nawet jak wpisałem 9000 dni. 

 

Ma ktoś pomysł co można z tym zrobić? :)

  • Manager
Opublikowano

W najnowszej jest tak:

		/* Limit to days */
		if ( isset( $this->configuration['widget_feed_restrict_days'] ) and $this->configuration['widget_feed_restrict_days'] > 0 )
		{
			$where[] = array(  $class::$databaseTable . '.' . $class::$databasePrefix . $class::$databaseColumnMap['date'] . '>?',  \IPS\DateTime::create()->sub( new \DateInterval( 'P' . $this->configuration['widget_feed_restrict_days'] . 'D' ) )->getTimestamp() );
		}

W 4.3.6 jest tak:

		/* Limit to days */
		if ( isset( $this->configuration['widget_feed_restrict_days'] ) and $this->configuration['widget_feed_restrict_days'] > 0 )
		{
			$where[] = array(  $class::$databaseTable . '.' . $class::$databasePrefix . $class::$databaseColumnMap['date'] . '>?',  \IPS\DateTime::create()->sub( new \DateInterval( 'P' . $this->configuration['widget_feed_restrict_days'] . 'D' ) )->getTimestamp() );
		}

 

Więc różnic brak. ;)

Pytanie czy już widzisz nową zawartość widgetu. A i może coś z uprawnieniami - sprawdzałeś? W sensie, nie, że do widgetu tylko do danego tematu. Odznacz testowo opcję która mówi o honorowaniu właśnie tych uprawnień i wtedy sprawdź.

  • Lubię to 1

intermedia - profesjonalne rozwiązania Invision Power Board

---

Chcesz uzyskać szybko i sprawnie pomoc? Uzupełnij wersję i adres w profilu.

  • Manager
Opublikowano

Ha, na pewno! :)

 

		/* Limit to days */
		if ( isset( $this->configuration['widget_feed_restrict_days'] ) and $this->configuration['widget_feed_restrict_days'] > 0 and $this->configuration['widget_feed_restrict_days'] <= 365 )
		{
			$where[] = array(  $class::$databaseTable . '.' . $class::$databasePrefix . $class::$databaseColumnMap['date'] . '>?',  \IPS\DateTime::create()->sub( new \DateInterval( 'P' . $this->configuration['widget_feed_restrict_days'] . 'D' ) )->getTimestamp() );
		}
		else
		{
			$where[] = array(  $class::$databaseTable . '.' . $class::$databasePrefix . $class::$databaseColumnMap['date'] . '>?',  \IPS\DateTime::create()->sub( new \DateInterval( 'P1Y' ) )->getTimestamp() );
		}

 

  • Dziękuję 1

intermedia - profesjonalne rozwiązania Invision Power Board

---

Chcesz uzyskać szybko i sprawnie pomoc? Uzupełnij wersję i adres w profilu.

Opublikowano

No to tak:

Zamieniłem to:

		if ( isset( $this->configuration['widget_feed_restrict_days'] ) and $this->configuration['widget_feed_restrict_days'] > 0 and $this->configuration['widget_feed_restrict_days'] <= 365 )
		{
			$where[] = array(  $class::$databaseTable . '.' . $class::$databasePrefix . $class::$databaseColumnMap['date'] . '>?',  \IPS\DateTime::create()->sub( new \DateInterval( 'P' . $this->configuration['widget_feed_restrict_days'] . 'D' ) )->getTimestamp() );
		}

Na to:

		if ( isset( $this->configuration['widget_feed_restrict_days'] ) and $this->configuration['widget_feed_restrict_days'] > 0 )
		{
			$where[] = array(  $class::$databaseTable . '.' . $class::$databasePrefix . $class::$databaseColumnMap['date'] . '>?',  \IPS\DateTime::create()->sub( new \DateInterval( 'P' . $this->configuration['widget_feed_restrict_days'] . 'D' ) )->getTimestamp() );
		}

 

I otrzymałem taki błąd:

ParseError: syntax error, unexpected '?' (0)
#0 [internal function]: IPS\IPS::autoloader('IPS\\Content\\Wid...')
#1 /home/klient.dhosting.pl/dynloth/workoutathletes.com/public_html/forum/applications/forums/widgets/topicFeed.php(24): spl_autoload_call('IPS\\Content\\Wid...')
#2 /home/klient.dhosting.pl/dynloth/workoutathletes.com/public_html/forum/init.php(421): require_once('/home/klient.dh...')
#3 [internal function]: IPS\IPS::autoloader('IPS\\forums\\widg...')
#4 [internal function]: spl_autoload_call('IPS\\forums\\widg...')
#5 /home/klient.dhosting.pl/dynloth/workoutathletes.com/public_html/forum/system/Widget/Widget.php(294): class_exists('\\IPS\\forums\\wid...')
#6 /home/klient.dhosting.pl/dynloth/workoutathletes.com/public_html/forum/system/Dispatcher/Front.php(539): IPS\_Widget::load(Object(IPS\forums\Application), 'topicFeed', '318wsrw9z', Array, NULL, 'horizontal')
#7 /home/klient.dhosting.pl/dynloth/workoutathletes.com/public_html/forum/system/Dispatcher/Dispatcher.php(154): IPS\Dispatcher\_Front->finish()
#8 /home/klient.dhosting.pl/dynloth/workoutathletes.com/public_html/forum/index.php(13): IPS\_Dispatcher->run()
#9 {main}

Pewnie jakiś głupi błąd robię. ☹️

 

  • Manager
Opublikowano

To:

		/* Limit to days */
		if ( isset( $this->configuration['widget_feed_restrict_days'] ) and $this->configuration['widget_feed_restrict_days'] > 0 and $this->configuration['widget_feed_restrict_days'] <= 365 )
		{
			$where[] = array(  $class::$databaseTable . '.' . $class::$databasePrefix . $class::$databaseColumnMap['date'] . '>?',  \IPS\DateTime::create()->sub( new \DateInterval( 'P' . $this->configuration['widget_feed_restrict_days'] . 'D' ) )->getTimestamp() );
		}
		else
		{
			$where[] = array(  $class::$databaseTable . '.' . $class::$databasePrefix . $class::$databaseColumnMap['date'] . '>?',  \IPS\DateTime::create()->sub( new \DateInterval( 'P1Y' ) )->getTimestamp() );
		}

Zmień na:

		/* Limit to days */
		if ( isset( $this->configuration['widget_feed_restrict_days'] ) and $this->configuration['widget_feed_restrict_days'] > 0 )
		{
			$where[] = array(  $class::$databaseTable . '.' . $class::$databasePrefix . $class::$databaseColumnMap['date'] . '>?',  \IPS\DateTime::create()->sub( new \DateInterval( 'P' . $this->configuration['widget_feed_restrict_days'] . 'D' ) )->getTimestamp() );
		}

 

  • Dziękuję 1

intermedia - profesjonalne rozwiązania Invision Power Board

---

Chcesz uzyskać szybko i sprawnie pomoc? Uzupełnij wersję i adres w profilu.

Gość
Ten temat został zamknięty. Brak możliwości dodania odpowiedzi.
  • Ostatnio przeglądający   0 użytkowników

    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • 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ę.