4images Forum & Community

4images Issues / Ausgaben => Discussion & Troubleshooting => Topic started by: Allround on November 24, 2012, 06:44:47 PM

Title: Userbox nur für Mitglieder sichtbar
Post by: Allround on November 24, 2012, 06:44:47 PM
Hallo,

da ich einen separaten Login Link und separate Login Seite habe, macht das die User Box für Gäste sinnlos. Allerdings nicht für einegloggte, weil da ja Kontrollbereich und Leuchtkasten Link angezeigt wird.

Nun meine Frage. Kann man die Userbox nur für eingeloggte User sichtbar machen?

MfG
Title: Re: Userbox nur für Mitglieder sichtbar
Post by: Rembrandt on November 24, 2012, 07:19:00 PM
Hi!

Suche in all deinen Haupt html files, home, categories, details, search, member:´
Code: [Select]
                  <table width="150" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td class="head2" height="20"><img src="{template_url}/images/spacer.gif" alt="" width="4" height="4" />{lang_registered_user}</td>
                    </tr>
                    <tr>
                      <td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
                    </tr>
                    <tr>
                      <td align="center" class="row1">{user_box}</td>
                    </tr>
                    <tr>
                      <td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
                    </tr>
                  </table>
und ersetze es mit:
Code: [Select]
                  {if user_loggedin}
                  <table width="150" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td class="head2" height="20"><img src="{template_url}/images/spacer.gif" alt="" width="4" height="4" />{lang_registered_user}</td>
                    </tr>
                    <tr>
                      <td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
                    </tr>
                    <tr>
                      <td align="center" class="row1">{user_box}</td>
                    </tr>
                    <tr>
                      <td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
                    </tr>
                  </table>
                  {endif user_loggedin}

mfg Andi
Title: Re: Userbox nur für Mitglieder sichtbar
Post by: Allround on November 24, 2012, 08:17:55 PM
{if user_loggedin} + {endif user_loggedin}  ist quasi dafür verantwortlich.. kann man das bei allem verwenden innerhalb des Templates? Zum Beispiel auch Links, Banner, u.a.?
Title: Re: Userbox nur für Mitglieder sichtbar
Post by: Rembrandt on November 24, 2012, 08:22:26 PM
ja sicher du kannst auch schreiben:
{ifnot user_loggedin} ... {endifnot user_loggedin}

das gleiche mit admin:

{if is_admin} ... {endif is_admin}
oder
{ifnot is_admin} ... {endifnot is_admin}

mfg Andi