Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Jak zmienić kolor czcionki, w skrypcie?
Astaroth
post 12.03.2005, 18:14:04
Post #1





Grupa: Zarejestrowani
Postów: 32
Pomógł: 0
Dołączył: 16.05.2004
Skąd: Wisła

Ostrzeżenie: (0%)
-----


To jest część skryptu pokazującego użytkowników na stronie:
  1. <?php
  2. if ( $row['user_level'] == ADMIN ) $username = '@' . $username;
  3. elseif ( $row['user_level'] == MOD ) $username = '*'.$username;
  4. else $username = '~'.$username;
  5. ?>
Chciałbym aby Admin miał pomarańczowy kolor nicka, mod - zielony a użytkownik niebieski. Jak dodać do tego kou kolor czcionki?? tiredsmiley.gif


--------------------
**********************************
http://www.cob.xx.pl - Fan Club fińskiej kapeli Children Of Bodom!!! + Forum PHPBB
W te wakacje zlot nad jeziorem w Tresnej!!!
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 3)
bela
post 12.03.2005, 18:45:43
Post #2


Administrator PHPedia.pl


Grupa: Developerzy
Postów: 1 102
Pomógł: 2
Dołączył: 14.09.2003

Ostrzeżenie: (0%)
-----


Sprawdz pierwszy znak i ustaw dry.gif


--------------------
Go to the top of the page
+Quote Post
Astaroth
post 13.03.2005, 19:26:51
Post #3





Grupa: Zarejestrowani
Postów: 32
Pomógł: 0
Dołączył: 16.05.2004
Skąd: Wisła

Ostrzeżenie: (0%)
-----


Heh łatwo powiedzieć ja nie jestem jeszcze programistom!


--------------------
**********************************
http://www.cob.xx.pl - Fan Club fińskiej kapeli Children Of Bodom!!! + Forum PHPBB
W te wakacje zlot nad jeziorem w Tresnej!!!
Go to the top of the page
+Quote Post
Cysiaczek
post 13.03.2005, 21:16:16
Post #4





Grupa: Moderatorzy
Postów: 4 465
Pomógł: 137
Dołączył: 26.03.2004
Skąd: Gorzów Wlkp.




Podpowiem.

to będzie wyglądało jakoś tak:

  1. <?php
  2.  
  3. if ($row['user_level']=='ADMIN')
  4. {
  5. print &#092;"<p style=\"font-family:arial;color:orange;\">$username</p>\";
  6. }
  7.  
  8. ?>


Oczywiście ustawiasz sobie kolor najlepiej w css. Tak robisz np dla wszystkich uzytkowników. Teraz możesz się pomęczyć:) i zrobić to lepiej

Ten post edytował Cysiaczek 13.03.2005, 21:17:26


--------------------
To think for yourself you must question authority and
learn how to put yourself in a state of vulnerable, open-mindedness;
chaotic, confused, vulnerability, to inform yourself.
Think for yourself. Question authority.
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 19.07.2025 - 10:15