Jump to content
  • 0

Online indicator


COOLPIX

Question

Salut

Nu pot urca codul urmator in globalTemplate, imi da eroare:

   {{if \IPS\Member::loggedIn()->member_id }}
 <span class="indicator_onoff">
          {{if $member->isOnline()}}
          <span class="online_in"></span>
                {{else}}
          <span class="offline_in"></span>
                 {{endif}}
          </span>
  {{endif}}
Quote

[[Template core/front/global/usercard is throwing an error. This theme may be out of date. Run the support tool in the AdminCP to restore the default theme.]]

 

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Pai in global template nu ai ce cauta cu variabila $member :))

Codul tau trebuie sa arate asa:

{{if \IPS\Member::loggedIn()->member_id }}
<span class='member_online'>is online</span>
{{else}}
<span class='member_offline'>is offline</span>
{{endif}}

Cu toate astea nu vad de ce ai adauga asa ceva pentru ca nu vezi niciodata ca esti offline, codul asta ar avea mai multa logica daca ai crea un sistem de Away, Busy, etc.

Link to comment
Share on other sites

  • 0
On 4/29/2023 at 12:01 AM, COOLPIX said:

Salut

Nu pot urca codul urmator in globalTemplate, imi da eroare:

   {{if \IPS\Member::loggedIn()->member_id }}
 <span class="indicator_onoff">
          {{if $member->isOnline()}}
          <span class="online_in"></span>
                {{else}}
          <span class="offline_in"></span>
                 {{endif}}
          </span>
  {{endif}}

 

Codul tau este ok, doar ca nu se adauga in globalTemplate ci in userPhoto -> iar mai apoi il stilizezi in css dupa cum iti place!

WWW.TECTONICPX.COM [ Professional Web Design Services ]

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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