hefterbrumi Posted March 24, 2011 Share Posted March 24, 2011 Hi! I need to integrate this code (and put in a div tag like the others (to work with the css)down below), but i have no idea how to do it since "print" command puts it in place but ignores the echo part in the like button code. Please help <iframe src="http://www.facebook.com/plugins/like.php?href=<?php echo "http://" . $_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']; ?>&layout=button_count&show_faces=false&width=450&action=like&font&colorscheme=dark&height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:21px;" allowTransparency="true"></iframe> into this: function mutargy_megjelenito($content) { $res=""; //$res.="<pre>".print_r($content,true)."</pre>"; if(isset($content[0]["body"]["ximg"])) { $mass=$content[0]["body"]; $c=0; $title[$c]="\"".$mass["xtitle"]."\""; $c++; if($mass["xtype"]!="") {$title[$c]=$mass["xtype"]; $c++;} $title[$c]=date("Y",$mass["xdate"]); $c++; if($mass["xplace"]!="") {$title[$c]=$mass["xplace"]; $c++;} if($mass["xmat"]!="") {$title[$c]="anyaga: ".$mass["xmat"]; $c++;} if($mass["xsize"]!="") {$title[$c]="mérete: ".$mass["xsize"]; $c++;} $tit=implode(", ",$title); $img=sitegen_processImage($mass["ximg"],array(array("resize_box",500,400))); if(isset($mass["xgal"][0]["body"])) { $mass["xgal"][0]["body"]["xtitle"]=""; $mass["xgal"][0]["body"]["xsubtitle"]=""; $mass["xgal"][0]["body"]["xdesc"]=""; $buf=sitegen_callFunction("galeria_megjelenito",$mass["xgal"]); $gal=$buf[0]["body"]; } else { $gal=""; } if($mass["xdesc"]!="") { $desc="<div class=\"rtf\">".sitegen_callFunction("filterRichText",$mass["xdesc"])."</div>"; } else { $desc=""; } $res.="<div class=\"artwork\"> <div class=\"artworkleft\"> <div class=\"artworkimg\"> <img src=\"<resource>".$img["name"]."</resource>\" width=\"".$img["x"]."\" height=\"".$img["y"]."\" alt=\"".$mass["xtitle"]."\" title=\"".$mass["xtitle"]."\" > </div> <div class=\"artworktxt\">".$tit."</div> </div> <div class=\"artworkright\"> ".$gal." </div> <div class=\"clear\"></div> ".$desc." </div>"; } $result[0]["head"]=""; $result[0]["body"]=$res; return($result); } Link to comment https://forums.phpfreaks.com/topic/231602-like-button-integration-php-help/ Share on other sites More sharing options...
Maq Posted March 24, 2011 Share Posted March 24, 2011 Please use the tags in the future. Link to comment https://forums.phpfreaks.com/topic/231602-like-button-integration-php-help/#findComment-1191768 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.