rbiasiutti
Forum Replies Created
-
Hi,
because I wanted to do the same thing, i modified the plugin code.
After many attempts I found the 3 functions to change.I insert here the functions already changed
1) function db_query_events
function db_query_events($start, $end, $category_id, $excluded, $limit=false) { global $wpdb; $excluded = ($excluded) ? 'NOT IN' : 'IN'; $andcategory = ($category_id) ? " AND category_id {$excluded}({$category_id})" : ''; $limit = ($limit) ? " LIMIT {$limit}" : ""; $tabeventi = $wpdb->prefix . AEC_EVENT_TABLE; $tabcategorie = $wpdb->prefix . AEC_CATEGORY_TABLE; $result = $wpdb->get_results("SELECT " . $tabeventi . ".id, " . $tabeventi . ".user_id, " . $tabeventi . ".title, " . $tabeventi . ".start, " . $tabeventi . ".end, " . $tabeventi . ".allDay, " . $tabeventi . ".repeat_int, " . $tabeventi . ".repeat_freq, " . $tabeventi . ".repeat_end, " . $tabeventi . ".category_id, " . $tabcategorie . ".category FROM " . $tabeventi . " INNER JOIN " . $tabcategorie . " ON " . $tabeventi . ".category_id = " . $tabcategorie . ".ID WHERE ( (start >= '{$start}' AND start < '{$end}') OR (end >= '{$start}' AND end < '{$end}') OR (start <= '{$start}' AND end >= '{$end}') OR (start < '{$end}' AND (repeat_freq > 0 AND repeat_end >= '{$start}')) ) {$andcategory} ORDER BY start{$limit};"); return $this->return_result($result); }
2) function generate_event
function generate_event($input, $user_id) { $permissions = new stdClass(); $permissions = $this->get_event_permissions($input, $user_id); $repeats = ($input->repeat_freq) ? ' aec-repeating' : ''; $output = array( 'id' => $input->id, 'title' => $input->title, 'start' => $input->start, 'end' => $input->end, 'allDay' => ($input->allDay) ? true : false, 'className' => "cat{$input->category_id}{$permissions->cssclass}{$repeats}", 'editable' => $permissions->editable, 'repeat_i' => $input->repeat_int, 'repeat_f' => $input->repeat_freq, 'repeat_e' => $input->repeat_end, 'categoryName' => $input->category ); return $output; }
3) function render_eventlist_events
here I show only the inserted partfunction render_eventlist_events($events, $whitelabel, $limit) { ... // link to event $class = ($whitelabel) ? '' : ' ' . $row->className; $out .= '<li class="fc-event round5' . $class . '" onClick="jQuery.aecDialog({\'id\':' . $row->id . ',\'start\':\'' . $row->start . '\',\'end\':\'' . $row->end . '\'});">'; $out .= '<span class="fc-event-category">Categoria : ' . $row->categoryName . '</span>' $out .= '<span class="fc-event-time">'; $out .= $row->start_date; ...
I hope everything is clear.
Bye
RiccardoI continued with attempts to solve the problem.
I set fixed values in the procedure calcDuration?? for calculate the mills variable (value of “from” and “to” fields) and is functional.calcDuration = function (from, to, allDay, frequency, interval, until) { // var mills = new Date(to).getTime() - new Date(from).getTime(), var mills = new Date(2012,7,20).getTime() - new Date(2012,7,11).getTime(), diff = {}, out = [];
Grazie per la risposta.
No, l’IP non l’ho provato visto che ci colleghiamo da più sedi (con ADSL e IP dinamico) e quindi non ho l’indicazione di quale sia il mio; è per questo che sono ricorso all’ID dell’utente.
Per gli screenshot ok… ma non so come mandare un PM; ho cercato ma non ho trovato… se mi puoi dire da dove si manda, provvedo.
Grazie
RicccardoP.S.
Complimenti per il plug-in.Ciao,
mi aggancio al post perchè ho lo stesso problema.
Ho provato sia ad inserire il nome dell’utente sia il relativo ID ma Slimstat continua a registrare i miei accessi.L’impostazione l’ho fatta sotto Impostazioni->Slimstat->Filtri
Hai qualche idea?
Grazie
Riccardo