Einzelnen Beitrag anzeigen
  #1 (permalink)  
Alt 15.09.2011, 00:12
Benutzerbild von Wolowizard
Wolowizard Wolowizard ist offline
Big Bang
neuer user
Thread-Ersteller
 
Registriert seit: 05.09.2011
Beiträge: 5
Wolowizard befindet sich auf einem aufstrebenden Ast
Frage Eigener Facebook Share Button

Hallo an alle,

im Internet hab ich eine Möglichkeit gefunden ein eigenes Bild mit der Facebook share funktion auszustatten.

HTML-Code:
<a name="fb_share" type="button" href="http://www.facebook.com/sharer.php?u=<?php the_permalink();?>&t=<?php the_title();?>" rel="nofollow">
<img src="images/fb.gif" alt="Facebook Share" title="Facebook Share"></a>
Diesen Code hab ich in meine Internetseite eingebunden und soweit ich das beurteilen kann, funktioniert er auch. Jag ich jedoch meine Internetseite durch den Validator, dann gibt er folgende Fehlermeldung aus:

Zitat:
cannot generate system identifier for general entity "t"

…m/sharer.php?u=<?php the_permalink();?>&t=<?php the_title();?>" rel="nofollow">

An entity reference was found in the document, but there is no reference by that name defined. Often this is caused by misspelling the reference name, unencoded ampersands, or by leaving off the trailing semicolon (. The most common cause of this error is unencoded ampersands in URLs as described by the WDG in "Ampersands in URLs".

Entity references start with an ampersand (&) and end with a semicolon (. If you want to use a literal ampersand in your document you must encode it as "&amp;" (even inside URLs!). Be careful to end entity references with a semicolon or your entity reference may get interpreted in connection with the following text. Also keep in mind that named entity references are case-sensitive; &Aelig; and &aelig; are different characters.

If this error appears in some markup generated by PHP's session handling code, this article has explanations and solutions to your problem.

Note that in most documents, errors related to entity references will trigger up to 5 separate messages from the Validator. Usually these will all disappear when the original problem is fixed.


general entity "t" not defined and no default entity

…m/sharer.php?u=<?php the_permalink();?>&t=<?php the_title();?>" rel="nofollow">

This is usually a cascading error caused by a an undefined entity reference or use of an unencoded ampersand (&) in an URL or body text. See the previous message for further details.


reference to entity "t" for which no system identifier could be generated

…m/sharer.php?u=<?php the_permalink();?>&t=<?php the_title();?>" rel="nofollow">

This is usually a cascading error caused by a an undefined entity reference or use of an unencoded ampersand (&) in an URL or body text. See the previous message for further details.


entity was defined here

…m/sharer.php?u=<?php the_permalink();?>&t=<?php the_title();?>" rel="nofollow">
Da mir der code-schnipsel nicht wirklich viel sagt, wollte ich wissen, wie ich das beheben kann?

Wenn ich das & durch ein
Code:
&amp;
ersetze, dann ist meine Seite valide. Allerdings weiß ich nicht, ob ich das einfach so ändern kann? (kenn mich leider mit php noch gar nicht aus)

Doctype ist HTML 4.01 Strict.


gruß
Wolowizard


P.S.: Falls es nicht zuviele Umstände macht, würde ich noch gerne wissen, wie ich den Link dazu bringe, dass er sich in einem neuen Tab oder Fenster öffnet, da target ja nicht erlaubt ist bei meinem Doctype. Funktioniert das nur mit Javascript? Ist das hier zu empfehlen, oder wird das eher anders gelöst?
Mit Zitat antworten
Sponsored Links