Jump to content

Like button integration php help!!!!!!!!!


hefterbrumi

Recommended Posts

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.