PHP Classes

Passing Content

Recommend this page to a friend!

      Active Calendar  >  All threads  >  Passing Content  >  (Un) Subscribe thread alerts  
Subject:Passing Content
Summary:Looking to pass content into the title of the event
Messages:1
Author:Steve Barbera
Date:2008-06-27 17:16:25
 

  1. Passing Content   Reply   Report abuse  
Picture of Steve Barbera Steve Barbera - 2008-06-27 17:16:25
Hello all,
I was wondering if someone could give me some pointers in modifying the class alittle bit so i can pass some more information into the Event Table. I'm looking to use the MooTools Tips Class to display information about the event in a tooltips popup. The way you do that is define the class that should hold the tool tip and in the title area of the class/link you add your information.
I was able to modify the mkEventContent to display the tooltip with the static tool tip, but I would like to know how to write it so that it is being pulled from my DB content.

If anyone has any pointers on writing that code, it would be a huge help. Here is where I think I need to change around the class, the table title="$EventDetails" is the variable I want to insert.

function mkEventContent($var){
$hasContent=$this->hasEventContent($var);
$out="";
if ($hasContent){
for ($x=0;$x<count($hasContent);$x++){
foreach($hasContent[$x] as $eventContentid => $eventContentData){
foreach($eventContentData as $eventContentUrl => $eventContent){
$out.="<table title='$EventDetails' class=\"Tips ".$eventContentid."\">";
if (is_string($eventContent)){
if (is_int($eventContentUrl)) $out.="<tr><td>".$eventContent."</td></tr></table>";
else $out.="<tr><td><a href=\"".$eventContentUrl."\">".$eventContent."</a></td></tr></table>";
}
elseif (is_array($eventContent)){
foreach($eventContent as $arrayContent){
if (is_int($eventContentUrl)) $out.="<tr><td>".$arrayContent."</td></tr>";
else $out.="<tr><td><a href=\"".$eventContentUrl."\">".$arrayContent."</a></td></tr>";
}
$out.="</table>";
}
else $out="";
}
}
}
}
return $out;
}