Skip to:
Content
Pages
Categories
Search
Top
Bottom

BP User Profile Map -> display only in a profile member page


  • Rayleigh
    Participant

    @julienlevain

    Hi,

    I would like to display a google map only in a profile page of a member.

    Is that possible or… ?

    thank you for your work Hugo 😉

Viewing 7 replies - 1 through 7 (of 7 total)
  • Then you should be able to? You should be able to manage the displays as you wish, it’s trickier on the user actual profile loop as you need to make some manual adjustments, adding a function directly to the template.


    Rayleigh
    Participant

    @julienlevain

    ok, thanks but it doesn’t work 🙁

    I wrote in the field “City” as you can see but this map generate a different location :/

    https://docs.google.com/file/d/0B__rIOiJ6Zq4LURxTkkwTlNUQU0/edit?usp=sharing


    Rayleigh
    Participant

    @julienlevain

    And I paste my code :

    <div class="bp-widget <?php	 	 bp_the_profile_group_slug(); ?>">
    
    				<!-- <h4><?php	/* 	 bp_the_profile_group_name(); */ ?></h4> -->
    
    				<div class="profile-fields grid_7">
    					<ul>
    					<?php	 	 while ( bp_profile_fields() ) : bp_the_profile_field(); ?>
    
    						<?php	 	 if ( bp_field_has_data() ) : ?>
    
    							<li<?php	 	 bp_field_css_class(); ?>>
                                	<ul>
                                    	<li class="label"><?php	 	 bp_the_profile_field_name(); ?></li>
    									<li class="data"><?php	 	 bp_the_profile_field_value(); ?></li>
                                    </ul>    	
    							</li>
    
    						<?php	 	 endif; ?>
    
    						<?php	 	 do_action( 'bp_profile_field_item' ); ?>
    
    					<?php	 	 endwhile; ?>
    					</ul>
    				</div>
                    <div class="grid_5">
                    <?php
                    	if( function_exists('upm_single_map_display') ) : upm_single_map_display(); endif;
    				?>
                    </div>
    			</div>

    https://docs.google.com/file/d/0B__rIOiJ6Zq4MlU5WWlYQXMxLVk/edit?usp=sharing

    Not sure why you are using the standalone function, but as mentioned in the instructions that function requires parameters to be passed through otherwise the function will simply use a series of default values.

    I think you want the approach outlined further down in the settings page for adding a map into the actual profile loop of users account profile screen.


    Rayleigh
    Participant

    @julienlevain

    I only need to display a map on a member profile, I don’t need on memberS page !

    1) I believed when I used the “BP xprofil field name” on the administration page (first screenshoot), It got automatically the location var City (my var is “City” when someone subscribe)

    2) Do u know why on my website, only some members are displayed ?

    Again you shouldn’t be using that standalone function, it requires you to pass parameters, and is simply a convenience if you wanted a map on a page.
    as i’ve said in the profile field screen you need a different function, it’s explained in the settings page however this was added as a specific requirement and isn’t functioning quite as I wanted but does work.


    Rayleigh
    Participant

    @julienlevain

    ok it looks great as u noticed 🙂 , so I only ticked :
    “bp_before_loop_content Displays on the members public profile view to the right”

    and I deleted :

    
    "<?php if( function_exists('upm_add_map_profile_field') ) : upm_add_map_profile_field(); endif ; ?>"

    unless I absolutly need ?

    Now, the problem is how could I show “map controls” while I thicked it !

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘BP User Profile Map -> display only in a profile member page’ is closed to new replies.
Skip to toolbar