Replies
Yes, I can see I am wrong, it breaks my site.
What I do not understand is, that these functions you gave to me seems to be urls, but apparently I can’t just replace a normal url with these.
So my question is, how do I use these functions/urls?
Regards
CarstenHi Brajesh, just to clarify this, then eg
href=$url = bp_loggedin_user_domain();"
replaces
href="https://domain/members/carstenadmin/profile/change-avatar/"
or am I wrong?
- calu on April 24, 2020 at 12:19 pm in reply to: [Resolved] Adding message count to Messages in a hook element #29220
Hi Brajesh, thanks, I found out that
visitors_get_unique_visitors_count
must be the correct one, or?One more question to this markup of the class below, which is probably not correct, It seems like defining the class below is redundant, as it has no effect?
<li id="visitors-personal-li"> <a href="https://domain/members/me/visitors/" id="user-visitors" class="recent-visitors-for-buddypress-profile" > Besøg <span class="count"></span> </a> <?php echo visitors_get_unique_visitors_count( bp_loggedin_user_id() ); ?> </li>
The correct class must be something like the one for messages defining the button:
class="menu-item menu-item-type-post_type menu-item-object-post messages-personal-li button"
but I don’t know where to look it up?
Regards
Carsten - calu on April 24, 2020 at 11:32 am in reply to: [Resolved] Adding message count to Messages in a hook element #29212
Hi Brajesh, I think I found the right function
<?php echo visitors_get_visit_count( $user_id ); ?>
Regards
Carsten - calu on April 24, 2020 at 10:19 am in reply to: [Resolved] Adding message count to Messages in a hook element #29209
Hi Brajesh, thank you very much, again, for your valuable help, it’s working perfectly.
Can I ask you to give me with the corresponding code for the visitors count?
Thanks again
Carsten
- calu on April 23, 2020 at 2:28 pm in reply to: [Resolved] TTFB increased by Live Notification #29158
Hi there, I have done some tests, and I’m not sure that Live Notification is causing increased TTFB so I am closing this topic.
Regards
Carsten Hi Brajesh, thanks for the functions.
To be more specific, I need the function for the user xprofile button link, to put into a hook element so the tab shows here: ´bp_after_member_body´
This code below is taken directly from the inspector, but this code will not work as it is, because it will link to the user “John” even if you are visiting user “Ben”‘s profile.
<li id="xprofile-personal-li" class="current selected"><a id="user-xprofile" href="https://domain/members/John/profile/">Profil</a></li>
I have tried to put on of the functions into php tags
´<?php $url = bp_displayed_user_domain(); ?>´
- calu on April 23, 2020 at 11:12 am in reply to: [Resolved] TTFB increased by Live Notification #29144
NB! I know these results can vary, and influenced by a number of factors, and, as said, the number of plugins are also a crucial factor, so I will not claim, that Live Notification is causing this alone.
Regards
Carsten Hi Brajesh, sorry for not making myself clear, but here’s the case.
I’m using a hook element to place tabs different places on my page. I’m then adding functions, like
bp_send_private_message_button
to that hook which is working fine.But the correct functions can be difficult to find, which is why I’m trying another approach by adding the element from the inspector instead.
Anm example is the ‘Profile’ tab, where the markup is the same on own profile and profiles visited.
The problem is, that thehref
is not changing. If I use members/me/profile, it will always point at users own profile, which is fine, but if I add this code, it will always point to jeff’s profile.<li id="xprofile-personal-li" class="current selected"><a id="user-xprofile" href="https://domain/members/jeff/profile/">Profil</a></li>
I hope this clarifies.
Maybe this approach is not working for what I am trying to achieve. The best way is to add the function, but even if I use buddypress.org hookr.io/, or a plugin to show the functions, they often do not work.
Any suggestions would be most appreciated
Regards
Carsten- calu on April 6, 2020 at 2:09 pm in reply to: [Resolved] Can users block another user with BuddyPress Moderation Tools? #28585
Hi Ravi, thanks for sharing bp-toolkit, I know the plugin, I just wondered if BuddyPress Moderation Tool were offering the same.