Back to top

Autore Topic: Errore componente Eventlist con community builder  (Letto 1295 volte)

Offline enzo75

  • Nuovo arrivato
  • *
  • Post: 5
    • Mostra profilo
Errore componente Eventlist con community builder
« il: 12 Gen 2008, 00:53:38 »
Ciao!
Ho installato community builder e ho bisogno che gli utenti iscritti possano comunicare i loro eventi personali. Ho installato il componente Eventlist e il plug  "plug_eventlistmy" in Cb. Il tutto funzionerebbe se non comparisse un errore che non riesco a risolvere. Praticamente quando un utente inserisce l'evento e lo pubblica compare un errore nel suo profilo ovvero questo:

Codice: [Seleziona]
Notice: Undefined variable: return in \components\com_comprofiler\plugin\user\plug_eventlistmy\eventlist_my.plugin.php on line 79
alla riga 79 abbiamo questo :
Codice: [Seleziona]
$return .= "<div style=\"padding:4px;\">"."</div>";


l'intero file invece è questo :

Codice: [Seleziona]
class getMyEventsTab extends cbTabHandler {
function getMyEventsTab() {
$this->cbTabHandler();
}
  function getDisplayTab($tab,$user,$ui) {
global $database,$mosConfig_live_site, $mosConfig_absolute_path, $mosConfig_lang;
//Language:
if (file_exists($mosConfig_absolute_path."/components/com_comprofiler/plugin/user/plug_eventlistmy/language/".$mosConfig_lang.".php")) { include($mosConfig_absolute_path."/components/com_comprofiler/plugin/user/plug_eventlistmy/language/".$mosConfig_lang.".php");
} else {         if(file_exists($mosConfig_absolute_path."/components/com_comprofiler/plugin/user/plug_eventlistmy/language/english.php")) { include($mosConfig_absolute_path."/components/com_comprofiler/plugin/user/plug_eventlistmy/language/english.php");
   } else {
             return "Error: No language file could be loaded. Is the Event List component properly installed? \n".$mosConfig_absolute_path."/components/com_comprofiler/plugin/user/plug_eventlistmy/language/english.php";
           }}
$cbpi_header = _EVENTLIST_CBPI_HEADER;
$cbpi_title = _EVENTLIST_CBPI_TITLE;
$cbpi_where = _EVENTLIST_CBPI_WHERE;
$cbpi_date = _EVENTLIST_CBPI_DATE;
$cbpi_city = _EVENTLIST_CBPI_CITY;
$cbpi_click_title = _EVENTLIST_CBPI_CLICK_TITLE;
    $cbpi_click_location = _EVENTLIST_CBPI_CLICK_LOCATION;
$cbpi_no_events = _EVENTLIST_CBPI_NO_EVENTS;
$params = $this->params; // get parameters (plugin and related tab)
$myEventNumber = $params->get('myEventNumber', "20");
/* braucht es nicht - wird eh nicht benutzt, oder?
if ($showTotal == 1) {
$countsql = "select count(*)"
. "\n FROM `#__eventlist_register` "
. "\n WHERE uid = ". $user->id .";";

    $database->setQuery($countsql);
    $count = $database->loadResult();
}
*/
$query = "SELECT s.id, s.titel, s.dates, s.locid, l.club, l.city"
. "\n FROM "
. "\n `#__eventlist_dates` s, `#__eventlist_locate` l"
. "\n WHERE s.sendermail = '".$user->email ."'"
. "\n AND s.locid = l.id"
                . "\n AND s.published = 1"
. "\n ORDER BY s.dates"
. "\n LIMIT $myEventNumber";

$database->setQuery( $query );

$events = $database->loadObjectList();
if(!count($events)>0) {
$return = $cbpi_no_events;
return $return;
}
$return .= "<div style=\"padding:4px;\">"."</div>";

$return .= "<table cellpadding=\"5\" cellspacing=\"0\" border=\"0\" width=\"95%\">";
$return .= "<tr class=\"sectiontableheader\">";
$return .= "<td>".$cbpi_title."</td><td>".$cbpi_where."</td><td>".$cbpi_city."</td><td>".$cbpi_date."</td>";

$return .= "</tr>";
$i=1;
foreach($events AS $event) {
$i= ($i==1) ? 2 : 1;
$return .= "<tr class=\"sectiontableentry$i\"><td>"

."<a href=\"".sefRelToAbs($mosConfig_live_site."/index.php?option=com_eventlist&Itemid=102&func=details&did=".$event->id)."\" title=\"".$cbpi_click_title."\" />".$event->titel."</a></td>"
        ."<td><a href=\"".sefRelToAbs($mosConfig_live_site."/index.php?option=com_eventlist&Itemid=102&func=shlocevents&locatid=".$event->locid)."\" title=\"".$cbpi_click_location."\"  />".$event->club."</a></td>"
."<td>".$event->city."</td>"
."<td> ".mosFormatDate( $event->dates." 00:00:00", _DATE_FORMAT_LC, "1")." </td>"
."</tr>\n";

}
$return .= "</table>";

return $return;
}
}

magari è una stupidaggine ma non so quasi niente di php e quindi non so risolvere...

grazie ;D ;D

Offline enzo75

  • Nuovo arrivato
  • *
  • Post: 5
    • Mostra profilo
Re: Errore componente Eventlist con community builder
« Risposta #1 il: 13 Gen 2008, 20:11:35 »
nessuno sa darmi qualche indicazione su almeno dove cercare?
 ??? ???

 



Web Design Bolzano Kreatif