Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Link ausgrauen/disablen?

Empfohlene Antworten

Veröffentlicht

Hallo Gemeinde!

Ich habe folgendes Prob:

Ich habe ein Zugangsportal, auf dem sich die User anmelden müssen. Danach gelangen sie zu einer Auswahlseite mit Links. Nun möchte ich gewissen Usern einige Links ermöglichen andere nicht. Frage:

Wie kann ich die Links ausgrauen oder disablen? Geht das überhaupt?

Danke im Voraus.

Gruß

Florian

hm dazu wirst du die Farbe des Links ändern müssen.

Aber was hälst du davon diese Links erst gar nicht einzublenden?

Danke erst einmal für die Antwort. Doch die Links müssen sichtbar sein. Ich habe mich auch noch woanders informiert :floet: .

Ich werde es jetzt wohl folgendermaßen machen:

if ($username == "erlaubternutzer)

{

echo "<a href=........>link</a>";

}

else

{

<font color="grey">

echo "linkname ohne verknüpfung";

}

Trotzdem danke.

Gruß

Florian

naja dann würd ich das ganze aber mit CSS lösen:


$links = array();

$link = array('link' => 'http://www.google.de', 'label' => 'Google.de', 'usrlvl' => 5 );
$links[] = $link;

$link = array('link' => 'http://www.fachinformatiker.de', 'label' => 'Fachinformatiker.de' , 'usrlvl' => 8);
$links[] = $link;


foreach( $links as $link) {
if ( $userlevel >= $link['usrlvl']) {
echo '<a href="'. $link['link'] . '">'. $link['label'] .'</a>';
} else {
echo '<span style="color: grey">'. $link['label'].'</span>';
}
}
[/PHP]

Damit kannst du den Benutzer je nach "UserLevel" die Link ausgrauen oder anzeigen

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.