Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: [HTML] Wyświetla numer tel (skype) zamiast liczb
Forum PHP.pl > Forum > Przedszkole
-Grzesiek-
Zrobiłem stronę, już prawie ją skończyłem, jednak mam pewien problem.
Otóż mam w pewnej części strony numer tefefonu w postaci (022) xxx xx xx/ xxx xx xx, a przeglądarki wyświetlają mi go jako coś takiego:
(numer przykładowy oczywiscie)

wstawiłem na stronę kod:
Kod
<META NAME="SKYPE_TOOLBAR" content ="SKYPE_TOOLBAR_PARSER_COMPATIBLE"/>

<?php
...

?>


ale po tym nie przechodzi mi validacji strona. Bez tego kodu jest wszystko ok, a z tym kodem wyskakuje nagle 100 błędów.
Ma ktoś jakąś radę jak temu zaradzić?
bogdan89
Cytat(-Grzesiek- @ 16.11.2008, 02:43:19 ) *
Ma ktoś jakąś radę jak temu zaradzić?


Ja mam... wyłącz dodatek Skype dla przeglądarki...
Mize
Dokładnie, to żaden skrypt tylko plugin w Twojej przeglądarce.
-Grzesiek-
no ok, może macie rację, ale chodzi o to że robię stronę dla kogoś, i chcę to zrobić tak żeby u każdego w przeglądarce tak samo się wyświetlało.
Ja mam ten plugin, ktoś inny zapewne też ma jak ma skypa zainstalowanego, a chce zrobić tak żeby zawsze numer się wyświetlał w postaci
Kod
"(022) xxx xx xx/ xxx xx xx"
bogdan89
ok, jak wolisz...

tylko nie przesadzaj z tym:
Kod
<META NAME="SKYPE_TOOLBAR" content ="SKYPE_TOOLBAR_PARSER_COMPATIBLE"/>

ten kawałek kodu może mieć najwyżej trzy błędy!

spróbuj tak:
Kod
<meta name="SKYPE_TOOLBAR" content="SKYPE_TOOLBAR_PARSER_COMPATIBLE" />


PS. nie wiem czy wiesz, ale ten dodatek Skype właśnie instaluje się po to żeby zamieniał te numery na linki Skype.
Jeśli nie podoba Ci się ten sposób przedstawiania ich na stronie, to możesz przejrzeć Skype.com i znajdziesz tam pewnie inne i ładniejsze rozwiązania takiego problemu, niż zablokowanie dodatku Skype.
-Grzesiek-
Wrzuciłem fragment tego kodu tylko akurat w tym miejscu co jest wyświetlany numer tel. i są tylko 2 błędy w walidacji...
Wolałbym wcale ich nie mieć, ale jak nie znajdę sposobu to i tak zostawię chyba...
Chyba, że może można jakoś coś wstawić żeby danego fragmentu np <div>xxxxxx</div> żadne pluginy nie dotyczyły lub coś podobnego....
bogdan89
Wrzuć ten kod do sekcji head, tam gdzie powinien być. Jak kod będzie w dobrym miejscu, to błędów nie będzie.
-Grzesiek-
wrzuciłem tak jak mówiłeś i 5 błędów wtedy wyskakuje.
i to błędy typu <br/> itp... nie wiem o co chodzi... trudno, niech sobie są te 2 błędy, przynajmniej wtedy validator znajduje błędy w tym kodzie do skypa, a nie niewiadomo dlaczego gdzieś indziej
erix
Cytat
wrzuciłem tak jak mówiłeś i 5 błędów wtedy wyskakuje.

Przykro mi, ale moja szklana kula się właśnie roztrzaskała... :/

Błędów może być kilka tysięcy. tongue.gif
-Grzesiek-
Cytat(erix @ 16.11.2008, 18:50:31 ) *
Przykro mi, ale moja szklana kula się właśnie roztrzaskała... :/

Błędów może być kilka tysięcy. tongue.gif


pisałem odnośnie posta kolegi "bogdan89"...
mike
Cytat(-Grzesiek- @ 17.11.2008, 17:37:03 ) *
pisałem odnośnie posta kolegi "bogdan89"...
A co? On będzie miał szklaną kulę?
Podaj treści błędów. Przecież nikt się nie domyśli co masz teraz na ekranie.
-Grzesiek-
no pisałem jakiego typu są błędy
<BR /> - głównie tego typu, tak jakby cos nie tak było z slashami na końcu znaczników typu <br/>
jak wstawiłem ten kod w miejsce gdzie akurat jest numer telefonu w <td...> to validator pokazal 2 bledy, i akurat dotyczące właśnie tego kodu tylko...
mike
Człowieku, podaj treść tych błędów! Przecież Twoje gdybanie nic nie wnosi.
-Grzesiek-
Prosze bardzo:

Wstawiam jako zwykly tekst zeby było widać zaznaczenia błędów...






Validation Output: 5 Errors

1. Error Line 1, Column 0: no document type declaration; will parse without validation.

<br />



The document type could not be determined, because the document had no correct DOCTYPE declaration. The document does not look like HTML, therefore automatic fallback could not be performed, and the document was only checked against basic markup syntax.

Learn how to add a doctype to your document from our FAQ, or use the validator's Document Type option to validate your document against a specific Document Type.
2. Warning Line 1, Column 4: NET-enabling start-tag requires SHORTTAG YES.

<br />



The sequence <FOO /> can be interpreted in at least two different ways, depending on the DOCTYPE of the document. For HTML 4.01 Strict, the '/' terminates the tag <FOO (with an implied '>'). However, since many browsers don't interpret it this way, even in the presence of an HTML 4.01 Strict DOCTYPE, it is best to avoid it completely in pure HTML documents and reserve its use solely for those written in XHTML.
3. Error Line 2, Column 57: character data is not allowed here.

… syntax error, unexpected '<' in <b>/home/mec/domains/mec.unl.pl/public_html/



You have used character data somewhere it is not permitted to appear. Mistakes that can cause this error include:
* putting text directly in the body of the document without wrapping it in a container element (such as a <p>aragraph</p>), or
* forgetting to quote an attribute value (where characters such as "%" and "/" are common, but cannot appear without surrounding quotes), or
* using XHTML-style self-closing tags (such as <meta ... />) in HTML 4.01 or earlier. To fix, remove the extra slash ('/') character. For more information about the reasons for this, see Empty elements in SGML, HTML, XML, and XHTML.
4. Error Line 2, Column 120: end tag for element "B" which is not open.

…l/public_html/themes/MEC/theme.php</b> on line <b>20</b><br />



The Validator found an end tag for the above element, but that element is not currently open. This is often caused by a leftover end tag from an element that was removed during editing, or by an implicitly closed element (if you have an error related to an element being used where it is not allowed, this is almost certainly the case). In the latter case this error will disappear as soon as you fix the original problem.

If this error occurred in a script section of your document, you should probably read this FAQ entry.
5. Error Line 2, Column 132: document type does not allow element "B" here.

…l/themes/MEC/theme.php</b> on line <b>20</b><br />



The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).

One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error).
6. Warning Line 2, Column 143: NET-enabling start-tag requires SHORTTAG YES.

…C/theme.php</b> on line <b>20</b><br />



The sequence <FOO /> can be interpreted in at least two different ways, depending on the DOCTYPE of the document. For HTML 4.01 Strict, the '/' terminates the tag <FOO (with an implied '>'). However, since many browsers don't interpret it this way, even in the presence of an HTML 4.01 Strict DOCTYPE, it is best to avoid it completely in pure HTML documents and reserve its use solely for those written in XHTML.
7. Error Line 2, Column 143: document type does not allow element "BR" here.

…C/theme.php</b> on line <b>20</b><br />



The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).

One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error).
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.