Skip to:
Content
Pages
Categories
Search
Top
Bottom

Profile stats and location in profile page like buddypress.org


  • leguis
    Participant

    @leguis08

    How I can insert the widget’s profile with the user’s recent activity and location as buddypress.org?
    There are some plugin to do this or do I need to change the profile page? Someone who can guide me. Thanks in advance

Viewing 25 replies - 1 through 25 (of 25 total)

  • leguis
    Participant

    @leguis08

    No answer? Please


    LPH2005
    Participant

    @lph2005

    Maybe this will help. But I don’t use this plugin so I’m not sure if it includes the widget used on this site.

    https://buddypress.org/community/groups/gpress/

    The map on the profile pages on this site are hardcoded with the following: http://pastebin.com/rqd16Rm9


    LPH2005
    Participant

    @lph2005

    Thank you Paul.


    leguis
    Participant

    @leguis08

    Thanks gpress is a great plugin


    noizeburger
    Participant

    @noizeburger

    @Paul Gibbs:

    Thank you for that!


    James
    Participant

    @janismo

    isn’t it allowed to just take necessary piece of code from gPress?

    Are you asking for permission?

    You can hack anything you like, preferable is to write it yourself where possible. Paul provides you with the code you need above though so it might be better to use that but perhaps update it to use V3 map api.


    James
    Participant

    @janismo

    @hnla

    couldn’t you specify, where exactly I should put this code?
    (probably, profile-loop, but somehow it does not work for me).

    V3 map api would be good, but my knowledge of html, php, etc..won’t allow me to do this.

    P.S. “..Are you asking for permission?..” I just don’t know what all these plugins licenses mean. maybe authors of gPress will decide to eat my tiny www for this x lines of code :)

    It’s gpl code, Apart from the fact that no would know, give due attribution to the original authors of the work/ code snippet and unlikely anyone will eat your www :)

    The code above that Paul shows in the pastebin example is run as a standalone snippet that you would place where you wanted the map to display or you could run it from a functions.php file using add_action function to place the code on the page where there is an action hook such as bp_profile_header_meta.

    To see the code working try placing it somewhere in the members-header.php file perhaps for testing purposes before or after the div item-meta block of code. As for where it really needs to go for your requirements that’s harder to say


    James
    Participant

    @janismo

    thanks @hnla ,
    probably it would work, but at the moment code requests new API, even if I already pasted new one.
    maybe someone knows how to update @DJPaul code to Google Map API V3 (if it needs a lot of time, no need even to reply to this question)?

    thanks to all!


    James
    Participant

    @janismo

    sorry guys, code works well, however Google Map API V3 would be good update.

    Are you referring to API key? in which case you must obtain one first and replace the one in the example code.


    James
    Participant

    @janismo

    don’t know why, but first API that I got did not work, so I had to get another one, which works well now.


    pcwriter
    Participant

    @pcwriter

    Just a heads up for anyone else (i.e. – n00bs like me) who wants to implement this on their site: when you insert your new API key in the code where it says [YOUR API KEY] , make sure those square brackets – [ ] – are removed. In other words, don’t just drop your key between them (like I did ;-) ) ‘cuz it ain’t gonna work.

    A little styling and it works & looks just fine. Check it out:
    http://nowrecovery.com/members/admin/

    V3 API removes the need for a key, If people ask nicely I may post my revised map code :)


    pcwriter
    Participant

    @pcwriter

    Pretty, pretty please?


    noizeburger
    Participant

    @noizeburger

    @hnla: please, please, pretty, pretty!

    When I get the chance I’ll try and wrap it as a plugin – in the meantime there was a plugin being written by travel_junkie that may suit, not sure how far that’s come in development.

    @pcwriter @noizeburger

    I have finished a basic little plugin that allows you to add the google map to profile pages via the various action hooks available along with a widget for placing map in custom areas. Just waiting on svn repo access to upload plugin.


    pcwriter
    Participant

    @pcwriter

    @hnla

    Goody! I’d like to incorporate this into my new theme framework (coming along nicely…). That is, if you don’t mind credit and some link love ;-)
    I couldn’t figure out how to do it without the key but, now it looks doable. Thanks a bunch!


    leguis
    Participant

    @leguis08

    bp-user- maps is the plugin I was looking for and works very fine. Thanks @hnla


    Virtuali
    Participant

    @gunju2221

    I tried the plugin, although it does not show up in the profile?

    Must be because I am using custom theme

    @pcwriter go for it, it’s there to be used if it suits the purpose. – API keys were always a pain :)

    @leguis08 Glad it works.

    @gunju2221 It is very possibly a custom theme issue, a custom theme will have to have ensured that the correct action hooks exist in pages as the main maps are fed through to the page via these, you could test with the widget instead which was provided really so that site admins could place the map in more refined custom widitised areas of the members profile pages if they existed.

    When writing something like this you can only account for that which is known thus the included stylesheet is there simply to try and style the map if it’s dropped into bp-default, therefore those styles may not have relevance to a custom theme, especially where that theme may be heavily modified, however the basic styles are worked on elements and element id’s/classes that should exist in any theme.

    The other aspect of course is that you must have created that extended profile field and named it ‘location’ and existing users will then need to actually edit their profile to add an address or partial address for the map to display, if a user hasn’t filled this item in then the map does not display at all.

Viewing 25 replies - 1 through 25 (of 25 total)
  • The topic ‘Profile stats and location in profile page like buddypress.org’ is closed to new replies.
Skip to toolbar