http://twitter.com/about/resources/tweetbutton
mittels Nutzung eines vorhandenen Moduls von Carsten Hallwachs.
der Navigationspfad wurde von mir auskommentiert und kann gelsöcht werden.
es wird der Name des Artikels bei twitter angeszeigt..
Anregungen erwünscht!
überarbeitet am 09.11.2015, da Umlaute nicht dargestellt wurden, also ersetzen
Code: Alles auswählen
<?php
/***********************************************
* CONTENIDO MODUL - OUTPUT
*
* Location String
*
* Fügt einen "Location String" ein, dass ist der
* aktuelle Navigations-Pfad.
* (Z.B. "Hauptnavigation > Intern > Kontakt")
*
* Author : Carsten Hallwachs
* Copyright :
* Created : 01-07-2003
* Modified : 17-06-2005
************************************************/
include_once($cfg["path"]["contenido"].$cfg["path"]["includes"]."functions.con.php");
$rval = conCreateLocationString($idcat, " / ", $navpath);
$sql="select * from ".$cfg["tab"]["art_lang"]." where idart='".$idart."' and idlang='".$lang."' LIMIT 1";
$db->query($sql);
$db->next_record();
$myART = $db->f('title');
/*$contr = $navpath;
$contr = strtoupper(trim(substr ( $contr, strrpos ( $contr, "/" )+1)));
if (strlen($navpath.$myART) > 85) {
while (strlen($navpath.$myART) > 75) {$navpath = trim(substr ( $navpath, strpos ( $navpath , "/" )+1));}
if ($contr == (strtoupper($myART))) {echo "... / ".$navpath;} else {echo "... / ".$navpath." / ".$myART;}
} else {
if ($contr == (strtoupper($myART))) {echo $navpath;} else {echo $navpath." / ".$myART;}
}*/
?>
<a href="https://twitter.com/share?text=<?php echo urlencode(utf8_encode("$myART"));?>" class="twitter-share-button" data-count="none">Tweet</a><script type="text/javascript" src="//platform.twitter.com/widgets.js"></script>