fersamp
Forum Replies Created
-
Hi caimin_nwl,
thank you for help.I explain better the situation:
I have 3 tabs in my home page
1) Today events
2) Tomorrow events
3) Choose one day to filter eventsFor the 1st and 2nd I used:
[custom_events]today[/custom_events]and[custom_events]tomorrow[/custom_events]that invoke my custom functionfunction display_custom_events( $attr, $content = null ) { ob_start(); echo do_shortcode('[events_list scope="' . $content. '" limit=3 pagination=1 ajax=1][/events_list]'); return ob_get_clean(); } add_shortcode('custom_events', 'display_custom_events');For the 3rd tab I use custom search because this is the only way I found to filter events by date in a tab page:
[custom_search][/custom_search]that invokesfunction display_custom_search( $attr, $content = null ) { $search_args = em_get_search_form_defaults(); em_locate_template('templates/events-search.php', true, array('args'=>$search_args)); $args['limit'] = !empty($args['limit']) ? $args['limit'] : get_option('dbem_events_default_limit'); if( !empty($args['ajax']) ){ echo '<div class="em-search-ajax">'; } //AJAX wrapper open if( get_option('dbem_event_list_groupby') ){ em_locate_template('templates/events-list-grouped.php', true, array('args'=>$args)); }else{ em_locate_template('templates/events-list.php', true, array('args'=>$args)); } if( !empty($args['ajax']) ) echo "</div>"; //AJAX wrapper close /*return '<a href="http://twitter.com/filipstefansson" class="twitter-button">' . $content . '</a>';*/ } add_shortcode('custom_search', 'display_custom_search');For italian it works today events and tomorrow filter.
Custom filter has been working for a long time, but now not (I suppose is something about ajax=1, but I need it to show results for tab 1 and 2 in the same page, to avoid redirect to events page)…Every filter doesn’t work in the other languages in any case π
Hi, I’m using this code in my function.php file, do you think that problem is the invocation?
I would like to create some event dinamically passing variables through a function, for example start date, end date and title like this:
$EM_Event = new EM_Event(); $EM_Event->event_name = $evt_name; $EM_Event->event_start_date = $evt_start_d; $EM_Event->event_start_time = $evt_start_t; $EM_Event->event_end_date = $evt_end_d; $EM_Event->event_end_time = $evt_end_t; $EM_Event->save();If I get some data like title, start and end date, how can I create manually events? That code doesn’t work form me
Forum: Plugins
In reply to: [JSON API User] Bad link url image from wordpressHi Ali,
sorry but I’m not good with these things.I don’t understand one thing:
If I get an avatar url from a registered user with facebook, the path is with https://
For example
https://www.dayroma.it/api/user/get_avatar/?user_id=1&type=full{"status":"ok","avatar":"https:\/\/graph.facebook.com\/10208671599336771\/picture?width=580&height=580"}
and after extracted the json I have https://graph.facebook.com/10208671599336771/picture?width=580&height=580Instead with https://www.dayroma.it/api/user/get_avatar/?user_id=25&type=full
I have
{"status":"ok","avatar":"\/\/www.gravatar.com\/avatar\/7262c3fd8da0cf5939e15239dd1369af?s=150&r=g&d=mm"}That is //www.gravatar.com/avatar/7262c3fd8da0cf5939e15239dd1369af?s=150&r=g&d=mm
This second link is not valid a prior…
I would like the same kind of result independently from the userForum: Plugins
In reply to: [JSON API User] SyntaxError: illegal characterThank you for help.
And, why I’m retrieving this JSON?
{"status":"ok","avatar":"\/\/www.gravatar.com\/avatar\/7262c3fd8da0cf5939e15239dd1369af?s=150&r=g&d=mm"}from http://www.dayroma.it/api/user/get_avatar/?user_id=25&type=full
In this JSON the url image is
//www.gravatar.com/avatar/7262c3fd8da0cf5939e15239dd1369af?s=150&r=g&d=mmHow can avoid // at the path beginning?
Thank you
Forum: Plugins
In reply to: [JSON API User] SyntaxError: illegal characterHi @ali Qureshi, thank you for help.
Since you’re very kind I would like to ask you one other thing about the JSON API user .
When I add a user on my wordpress site and try to get his profile picture I get a link with two initial slash.
You can see it here:http://www.dayroma.it/api/user/get_avatar/?user_id=25&type=full
I could solve it using parse string manually, but I’d like to understand why and how to change default profile image size(best would be full sized).
Thank you again
π you’re welcome
-_- sorry but in this post you helped about.
https://wordpress.org/support/topic/building-an-events-object?replies=20What is support-policy problem there about creating an event through code?
I only need to add an event through php…
Ciao @cristian, come hai fatto a capire che sono italiano? π
Per colorare la tabella degli eventi basta inserire una classe CSS nelle impostazioni di EM: vai su Eventi->Impostazioni->Formato->Eventi e in Formattazione predefinita dell’intestazione della lista degli eventi inserisci la tua classe custom css:
<table class="myTableEvents" > <thead> <tr> <th width="20%"></th> <th width="80%"></th> </tr> </thead> <tbody>Nel mio caso ho aggiunto un file css nel Child del tema:
.myTableEvents { margin:0px;padding:0px; width:100%; box-shadow: 10px 10px 5px #777777; border:1px solid #cccccc; -moz-border-radius-bottomleft:0px; -webkit-border-bottom-left-radius:0px; border-bottom-left-radius:0px; -moz-border-radius-bottomright:0px; -webkit-border-bottom-right-radius:0px; border-bottom-right-radius:0px; -moz-border-radius-topright:0px; -webkit-border-top-right-radius:0px; border-top-right-radius:0px; -moz-border-radius-topleft:0px; -webkit-border-top-left-radius:0px; border-top-left-radius:0px; }.myTableEvents table{ border-collapse: collapse; border-spacing: 0; width:100%; height:100%; margin:0px;padding:0px; }.myTableEvents tr:last-child td:last-child { -moz-border-radius-bottomright:0px; -webkit-border-bottom-right-radius:0px; border-bottom-right-radius:0px; } .myTableEvents table tr:first-child td:first-child { -moz-border-radius-topleft:0px; -webkit-border-top-left-radius:0px; border-top-left-radius:0px; } .myTableEvents table tr:first-child td:last-child { -moz-border-radius-topright:0px; -webkit-border-top-right-radius:0px; border-top-right-radius:0px; } .myTableEvents tr:last-child td:first-child{ -moz-border-radius-bottomleft:0px; -webkit-border-bottom-left-radius:0px; border-bottom-left-radius:0px; } .myTableEvents tr:hover td{ } .myTableEvents tr:nth-child(odd){ background-color:#f2f2f2; } .myTableEvents tr:nth-child(even) { background-color:#ffffff; } .myTableEvents td{ border:1px solid #cccccc; border-width:0px 1px 1px 0px; text-align:left; font-size:15px; font-family:Arial; color:#666666; } .myTableEvents tr:last-child td{ border-width:0px 1px 0px 0px; } .myTableEvents tr td:last-child{ border-width:0px 0px 1px 0px; } .myTableEvents tr:last-child td:last-child{ border-width:0px 0px 0px 0px; } .myTableEvents td:first-child{ text-align: center; } /* .myTableEvents tr:hover td{ background:-o-linear-gradient(bottom, #ff3333 5%, #ff3333 100%); background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #ff3333), color-stop(1, #ff3333) ); background:-moz-linear-gradient( center top, #ff3333 5%, #ff3333 100% ); filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#ff3333", endColorstr="#ff3333"); background: -o-linear-gradient(top,#ff3333,#ff3333); background-color:#ffe5e5; }*/ .myTableEvents tr:first-child td:first-child{ border-width:0px 0px 1px 0px; } .myTableEvents tr:first-child td:last-child{ border-width:0px 0px 1px 1px; }in particolare puoi impostare colori alternati grazie a
.myTableEvents tr:nth-child(odd){ background-color:#f2f2f2; } .myTableEvents tr:nth-child(even) { background-color:#ffffff; }dove indichi i colori alternati (grigio e bianco nel mio caso).
π
Thank you for help.
One last thing: How can I manually add an event to EM?
I found this link, https://wordpress.org/support/topic/building-an-events-object but it doesn’t work.
$EM_Event = new EM_Event(); // -- $e is facebook event -- $EM_Event->event_name = wp_strip_all_tags($e->name); $startDateFb = $e->start_time; $endDateFb = $e->end_time; $dtStart = new DateTime($startDateFb, new DateTimeZone('PST')); $dtStart->setTimezone(new DateTimeZone('CET')); $EM_Event->event_start_date = $dtStart->format('Y-m-d'); $EM_Event->event_start_time = $dtStart->format('H:i'); $dtEnd = new DateTime($endDateFb, new DateTimeZone('PST')); $dtEnd->setTimezone(new DateTimeZone('CET')); $EM_Event->event_end_date = $dtEnd->format('Y-m-d'); $EM_Event->event_end_time = $dtEnd->format('H:i'); $EM_Event->save();Thank you angelo_nwl, I resolved π
Hi everyone,
after hours spent the solution was very simple ahahahPre tag was added automatically by text editor: even if I wrote
“[custom_events]tomorrow[/custom_events]” wordpress editor adds automatically pre tag and I dind’t saw it. (you can see it only in block text changing visual to text view )Remove auto-add pre tag solved the problem.
π I’m very happy
My site is http://www.dayroma.it and when I publish an event it doesn’t appear nothing above the publish button.
I followed this guide:
– Go to Settings β Sharing in your dashboard;
– Click on βConnectβ next to the Social Network you want to connect to;
– Log in to that Social Network site and authorize the connection.I would like to publish events-posts on my facebook page…
The best it would be to publish directly a facebook event, but I suppose is very difficult to do πWhat can I do to solve publication problem?
Hi javasworks,
I did something similar some months ago implementing this php code:<?php /* @var $EM_Event EM_Event */ $people = array(); $EM_Bookings = $EM_Event->get_bookings(); if( count($EM_Bookings->bookings) > 0 ){ ?> <ul class="event-attendees"> <?php $guest_bookings = get_option('dbem_bookings_registration_disable'); $guest_booking_user = get_option('dbem_bookings_registration_user'); foreach( $EM_Bookings as $EM_Booking){ if($EM_Booking->booking_status == 1 && !in_array($EM_Booking->get_person()->ID, $people) ){ $people[] = $EM_Booking->get_person()->ID; /*echo '<li>'.bp_core_get_userlink($EM_Booking->get_person()->ID)." ". get_avatar($EM_Booking->get_person()->ID, 50).'</li>';*/ $user_id = $EM_Booking->get_person()->ID; echo '<a href="'. bp_core_get_user_domain( $user_id ).'profile">'; echo get_avatar($EM_Booking->get_person()->ID, 50); echo '</a>'; }elseif($EM_Booking->booking_status == 1 && $guest_bookings && $EM_Booking->get_person()->ID == $guest_booking_user ){ /*echo '<li>'.bp_core_get_userlink($EM_Booking->get_person()->ID).'</li>';*/ $user_id = $EM_Booking->get_person()->ID; echo '<a href="'. bp_core_get_user_domain( $user_id ).'profile">'; echo get_avatar($EM_Booking->get_person()->ID, 50); echo '</a>'; } } ?> </ul> <?php }Create an empty file called attendeeslist.php in yourchildtheme//plugins/events-manager/placeholders and put that code,
it would be work π
this should display clickable attendee image linked to buddy profileThank you caimin_nwl,
I found this guide that could help who would like to implement Facebook Integration in EM. (Adding Event in wordpress will add an event to a facebook page too)https://hasin.me/2011/09/29/working-with-facebook-events-using-graph-api-part-1/
Now I have to add a filter to em_event_save function…
Suggestions are really appreciated.I don’t know where to start with my knowledge π EM has very difficult code
Hi caimin_nwl,
I set 15th theme and deactivate all plugins, except EM.Here my home page http://www.dayroma.it/