Jump to content

Recommended Posts

Posted

Jak dodać do zaktualizowanych plików żeby tez po 24 czy tam 48 godzinach znikał napis/ikonka jak przy nowych?

 

<div class="image-section" style="position: relative;">
      {{if $file->submitted  != $file->updated}}
      <img src="img/up.png" alt="Up" style="position: absolute; top: -47px; right: -12px; width: 157px; height: auto; z-index: 10;">
      {{endif}}
  	  {{if $file->submitted > \IPS\DateTime::create()->sub( new \DateInterval( 'PT24H' ) )->getTimestamp() }}
    <img src="img/new.png" alt="New" style="position: absolute; top: 6px; right: 2px; width: 100px; height: auto; z-index: 10;">
  {{endif}}

 

probowałem skopiowac fragment

 

> \IPS\DateTime::create()->sub( new \DateInterval( 'PT24H' ) )->getTimestamp() 

 i wstawic za tym

 

!= $file->updated

 

to ikonka z zaktualizowanych znikła  ale była na innych które nie zostały zaktualizowane w ogóle

logo.png.519590789bae8db2833a4ecc09316aef.png

  • Manager
  • Solution
Posted

A tak?

<div class="image-section" style="position: relative;">
    {{if $file->submitted != $file->updated && $file->updated > \IPS\DateTime::create()->sub( new \DateInterval( 'PT24H' ) )->getTimestamp()}}
        <img src="img/up.png" alt="Up" style="position: absolute; top: -47px; right: -12px; width: 157px; height: auto; z-index: 10;">
    {{endif}}
    {{if $file->submitted > \IPS\DateTime::create()->sub( new \DateInterval( 'PT24H' ) )->getTimestamp()}}
        <img src="img/new.png" alt="New" style="position: absolute; top: 6px; right: 2px; width: 100px; height: auto; z-index: 10;">
    {{endif}}
</div>

 

intermedia - profesjonalne rozwiązania Invision Power Board

---

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.