Buddypress How to change every user's avatar url from add_filter(bp_core_fetch_avatar)? - buddypress

I am trying to change the buddypress user avatar's url. When user click other user's avatar, it will go to the user's specific field instead of the default url 'activity'. I had search through internet, I think I should add_filter bp_core_fetch_avatar to change the avatar's url, but I had tried for hours to hack, no luck. Hope somebody could help me here. Appreciate.

You don't want to change the avatar url. You want to change the link in the href wrapped around an avatar. That link is usually handled by bp_member_permalink()
So try using this filter hook:
apply_filters( 'bp_get_member_permalink', bp_core_get_user_domain( $members_template->member->id, $members_template->member->user_nicename, $members_template->member->user_login ) );

Related

How to get a free Google-provided domain (for example, yourapp.page.link)

I am following an example to add an email link, but after I click on Dynamic Links, it doesn't provide me with a default url, like in the picture (flutterauth.page.link). I get an empty box, no dropdown.
How do I get a Google provided page.link subdomain, like in the picture?
This is what mine looks like:
I figured out. It's very simple. The url is not pre-created, it doesn't show up by default. You have to start typing, and then you can create a url, if the url link is not taken.
Afer this, you will get a message:
myapp.page.link has been verified and approved for use

block redirect link to login in joomla and add a popup instead of that

In joomla the default function if a guest clicks a link with a registered access level, is to redirect guest to the login page.
Is there a way to show a popup instead, for all of registered access level links?
For example it redirects to
your.com/login.html
But i want to show a login-button before the guest is redirected.
I found another template where it works like this, but it wont work in my own template. How can I do it in my template?
if(JFactory::getUser()->guest) {
//do user logged out stuff
}
else {
//do user logged in stuff
}
There is no simple fix. The problem is that when it is added, you dont really have information about where a link leads to. If you create an article that is public, and you add a link to an article that is restricted, then joomla does not check this when you add the link.
In the event that joomla can know this beforehand, like restricted menu items, or listing of article links in a category, restricted links will not be displayed to a guest user.
If you want to try to change the behaviour like you want to, then I would consider in what situation this actually happens. If it is links in articles that is the main problem, then the best would be if the editors, when adding links to restricted content, also added a predefined class or something to this link. Then use JQuery to disable the link and display a popup on click. A similar approach could be used in other contexts.

Yii how to redirect to particular URL

I have used url beautifier to remove index.php?r= from URL. it works fine.
now i want user to redirect to URL if user hits particular url.
suppose
http://localhost/xm/xmds.php?wsdl
To
http://localhost/xm_demo_menu/WebService/service
how to achieve this. i search lot on google but not found material relevant to my problem
any suggestions ?
I do not see where the problem should be. See documentation
In you controller, simply call:
$this->redirect("http://localhost/xm_demo_menu/WebService/service");

How to block a user from my instagram webfeed?

I have a joomla website, and use a module to get a feed from Instagram based on a tag (#). But i have a user that keeps taggin with this tag. Is it possible to blog the user so that his images do not show on my web page even if he uses the tag that i use for my feed? I have tryed to block the user in Instagram, but his images still comes up in my feed..
You will have to write your own custom module to get feed and filter manually by blocking the user_id
You might have to delete your comments or remove tags because they will not automatically be removed even after blocking that user.
source: http://viralkick.com/blog/block-someone-instagram/

Google+ badge on websites

I am trying to put a Google+ badge on my recently created websites at sites.google.com. When I copy the code and paste it into the HTML box actually nothing happens.
What am I doing wrong?
You can use to insert a Google+ Badge into your Google Sites pages using a custom gadget:
Get your Google+ profile ID, which you can get from the URL of your profile. The ID would be 123456789012345678901 for this URL: https://plus.google.com/123456789012345678901/ or would be +LarryPage for this URL: https://plus.google.com/+LarryPage/
Edit the page that you want to add the badge
Choose Insert-> ...More gadgets...
Search for G+ Badge.
Paste your profile ID into the G+ ID field.
Configure additional options as necessary for your page. You might need to adjust dimensions of the gadget container to get the badge to work well in your site.
Gadgets have limitations, this might not work perfectly but its probably the best way to get a badge onto your page.
There is a configuration tool for the Google+ Badge that you can find at https://developers.google.com/+/web/badge/.
The key points are that you need to add the HTML as a widget and include the JavaScript tag--which is the same JavaScript that loads any of our Google+ attributes.
I also made a 3 minute video explaining these steps last year, which you can view at http://www.youtube.com/watch?v=wLG4IIIPgnc.