Kir 2012
Forum Replies Created
-
Forum: Everything else WordPress
In reply to: Urgent assistance requiredHi thank you for your reply, and I’m sorry, in this case it is.
Would you be kind enough to supply me with a means of private contact in order that I can explain the situation and share full information.
I urgently require assistance.
Sincerely
Ah I see, the policy is for www.ads-software.com sitewide – I just didn’t know whether you’d have editor access. Thank you so much anyway, I really appreciate your help and I will try that now.
Sorry, to clarify once again just for your convenience, urgently need to amend just a tiny link above in this thread, in the first code paste:
To read:
<a href="https://www.mywebsite.com/'. $EM_Booking->get_person()->get_name()
Thank you, I know you have a policy, I can share the details on PM first if you prefer, but it’s urgent – really sorry again.
Or if you can’t help personally with doing this quick swap for me, please pass me to the correct person to pursue it with.
The circumstances are a match for the policy on this.
Thank you, I will look now, can you please respond about the above also? I need that url swapped out. I am sorry, I know it’s hassle, but I just need the real url swapped for mysite.com in the first example code on this thread. Please help me with this!
Hi,
When you say can’t, do you mean can’t as in don’t have access? If so, who does? Who should I speak to about this? I need to address it ASAP.
It’s not a deletion, just, as above, a very quick substitution. Please advise asap. Happy to make a donation if required.
And as above, yes, but in the context provided above. That is the exact code, I can’t seem to get anything working to deliver a link to the profile rather than the booking screen.
Many thanks.
Also, I’m really sorry, but can you replace the contents of the link at the start of this thread with ‘mywebsite/’ instead of the actual url.
It’s so very important – sorry, it was stupid of me, but could you just replace that for me so the content of the post can remain up as a resource?
I’m sorry about that, let me know any problems.
I have another problem, please help, it’s an easy one I’m sure.
I worked the one above out, here is my code below in case it helps anyone:
Replace entire attendees.php in placeholders file.<?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 '<a href="'.bp_core_get_user_domain( $EM_Booking->get_person()->ID ).'">'. get_avatar($EM_Booking->get_person()->ID, 50) .'</a>'; echo '<br><a href="'.bp_core_get_user_domain( $EM_Booking->get_person()->ID ).'">'. $EM_Booking->get_person()->get_name() .'</a>'; echo '<br>'; echo ''. $EM_Booking->booking_comment .'<br><br>'; }elseif($EM_Booking->booking_status == 1 && $guest_bookings && $EM_Booking->get_person()->ID == $guest_booking_user ){ echo ''. $EM_Booking->get_person()->get_name() .'<br><br>'; } } ?> </ul> <?php } ?>
I am now trying to make this code into a link, it is the em_person.php page in classes, and I want the link to go to the attendee’s profile, rather than duplicate a link to the page you’re already on as it does currently.
<?php // TODO make person details more secure and integrate with WP user data class EM_Person extends WP_User{ function __construct( $person_id = 0, $username = '', $blog_id='' ){ if( is_array($person_id) ){ if( array_key_exists('person_id',$person_id) ){ $person_id = $person_id['person_id']; }elseif ( array_key_exists('user_id',$person_id) ){ $person_id = $person_id['user_id']; }else{ $person_id = $person_id['ID']; } }elseif( is_object($person_id) && get_class($person_id) == 'WP_User'){ $person_id = $person_id->ID; //create new object if passed a wp_user } if($username){ parent::__construct($person_id, $username); }elseif( is_numeric($person_id) && ($person_id <= 0) ){ $this->data = new stdClass(); $this->ID = 0; $this->display_name = 'Non-Registered User'; $this->user_email = ''; }else{ parent::__construct($person_id); } $this->phone = wp_kses_data(get_metadata('user', $this->ID, 'dbem_phone', true)); //extra field for EM do_action('em_person',$this, $person_id, $username); } function get_bookings($ids_only = false, $status= false){ global $wpdb; $status_condition = $blog_condition = ''; if( is_multisite() ){ if( !is_main_site() ){ //not the main blog, force single blog search $blog_condition = "AND e.blog_id=".get_current_blog_id(); }elseif(is_main_site() && !get_option('dbem_ms_global_events')){ $blog_condition = "AND (e.blog_id=".get_current_blog_id().' OR e.blog_id IS NULL)'; } } if( is_numeric($status) ){ $status_condition = " AND booking_status=$status"; }elseif( EM_Object::array_is_numeric($status) ){ $status_condition = " AND booking_status IN (".implode(',', $status).")"; } $EM_Booking = em_get_booking(); //empty booking for fields $results = $wpdb->get_results("SELECT b.".implode(', b.', array_keys($EM_Booking->fields))." FROM ".EM_BOOKINGS_TABLE." b, ".EM_EVENTS_TABLE." e WHERE e.event_id=b.event_id AND person_id={$this->ID} {$blog_condition} {$status_condition} ORDER BY ".get_option('dbem_bookings_default_orderby','event_start_date')." ".get_option('dbem_bookings_default_order','ASC'),ARRAY_A); $bookings = array(); if($ids_only){ foreach($results as $booking_data){ $bookings[] = $booking_data['booking_id']; } return apply_filters('em_person_get_bookings', $bookings, $this); }else{ foreach($results as $booking_data){ $bookings[] = em_get_booking($booking_data); } return apply_filters('em_person_get_bookings', new EM_Bookings($bookings), $this); } } /** * @return EM_Events */ function get_events(){ global $wpdb; $events = array(); foreach( $this->get_bookings()->get_bookings() as $EM_Booking ){ $events[$EM_Booking->event_id] = $EM_Booking->get_event(); } return apply_filters('em_person_get_events', $events); } function get_bookings_url(){ if( get_option('dbem_edit_bookings_page') && (!is_admin() || !empty($_REQUEST['is_public'])) ){ $my_bookings_page = get_permalink(get_option('dbem_edit_bookings_page')); $bookings_link = em_add_get_params($my_bookings_page, array('person_id'=>$this->ID, 'event_id'=>null, 'ticket_id'=>null, 'booking_id'=>null), false); }else{ $bookings_link = EM_ADMIN_URL. "&page=events-manager-bookings&person_id=".$this->ID; } return apply_filters('em_person_get_bookings_url', $bookings_link, $this); } function display_summary(){ ob_start(); $no_user = get_option('dbem_bookings_registration_disable') && $this->ID == get_option('dbem_bookings_registration_user'); ?> <table class="em-form-fields"> <tr> <td><?php echo get_avatar($this->ID); ?></td> <td style="padding-left:10px; vertical-align: top;"> <table> <?php if( $no_user ): ?> <tr><th><?php _e('Name','dbem'); ?> : </th><th><?php echo $this->get_name(); ?></th></tr> <?php else: ?> <tr><th><?php _e('Name','dbem'); ?> : </th><th><a href="<?php echo $this->get_bookings_url(); ?>"><?php echo $this->get_name(); ?></a></th></tr> <?php endif; ?> <!--<tr><th><?php _e('Email','dbem'); ?> : </th><td><?php echo $this->user_email; ?></td></tr>--> <!--<tr><th><?php _e('Phone','dbem'); ?> : </th><td><?php echo esc_html($this->phone); ?></td></tr>--> </table> </td> </tr> </table> <?php return apply_filters('em_person_display_summary', ob_get_clean(), $this); } function get_name(){ $full_name = $this->first_name . " " . $this->last_name ; $full_name = wp_kses_data(trim($full_name)); $name = !empty($full_name) ? $full_name : $this->display_name; return apply_filters('em_person_get_name', $name, $this); } } ?>
The link text reads:
e('Name','dbem'); ?> : </th><th><a href="<?php echo $this->get_bookings_url(); ?>"><?php echo $this->get_name(); ?></a></th></tr> <?php endif; ?>
I have tried to remove the link between the “XXX” and swap it for
'.bp_core_get_user_domain( $EM_Booking->get_person()->ID ).'
Plus a few other things, but I can’t make it work.I just need to know how to create that link so it goes to the profile, mine are in root so to go to mywebsite/username (not name, but user name). Incidentally, if I replace it with <?php echo $this->get_name(); ?> in between the “XXX” it works, but takes the link to the name, not the user name, and it’s the user name in the slug so that’s what I need.
Has anyone got any light they can shed for me? I know it should be an easy one but I’m stumped!
Thanks
Hi just checking you saw my last message, can I pm you or email you somehow?
Many thanksHi there, thank you so much for your reply, that is good news – can I private message my url to you somehow please? Or I am on Slack, are you? I am under SUPERFAN.
All the bestPs if anyone else has ever had this problem already and has a solution, I’d be so grateful for the help! ??
Forum: Plugins
In reply to: [WP ULike - All-in-One Engagement Toolkit] Breaks my themeAlimir that’s great, it worked perfectly, I’m so pleased! Thank you!! ??
Thanks R-A-Y ?? I will have a good old read of this tonight.
Once I have found the (dynamic?) code to add the activity of the people a logged in user’s following into an activity loop, how would I then get this into the sidebar?
If anyone out there has ever done this before I’d love a tip in the right direction – I’m not an experienced coder, although I know my way around worpress and can add code snippets to my templates – style / function etc and use plugins etc.
Could I use the arbitrary text widget to bring it in if I created my own loop somehow? Also I want to keep the usual activity loops as they are for use elsewhere. All pointers most gratefully received ??
Thank you!Forum: Plugins
In reply to: [BuddyPress Activity Plus] Updates not appearingHere is the notifier plugin, it’s supposed to have been on the road map for buddypress development so the devel isn’t doing anything with it, although it does include a message saying that was a couple of yrs ago on the plugin page. Hope it helps a bit anyhow ??
https://www.ads-software.com/plugins/buddypress-activity-stream-ajax-notifier/
Forum: Plugins
In reply to: [BuddyPress Activity Plus] Updates not appearingHi there, this is a good plugin, thank you – it would really be good to see this feature.
I have the same issue, I use an activity feed update notification plugin which is the next best thing in the absence of it working properly in terms of this, the notification leaves a bar notifying that there has been an update and the page needs refreshing. Clunky but better than nothing.
I am sure I saw an automatic activity update the other day too in the plugins on wordpress, I will paste it here if I notice it again …
I saw an update for this plugin
https://www.ads-software.com/support/plugin/ls-buddypress-activity-plus-tabs-extension
although it doesn’t work properly … it would be amazing to see tabs added too so you can see an album showing your vids or pics
All the best ??
K