Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

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

  • LaurieDugdale
    Participant

    @lauriedugdale

    Found the code below on these forums works perfectly.

    function my_cache_avatar_url() {
    	update_user_meta( bp_displayed_user_id(), 'modemloopers_awesome_avatar_url', bp_core_fetch_avatar( 'html=false&item_id=' . bp_displayed_user_id() ) );
    }
    add_action( 'xprofile_screen_change_avatar', 'my_cache_avatar_url' );
    

    I’ve tried to make it work for an xprofile field by doing the code below with no such luck. Any ideas?

    
    function my_cache_xprofile_website() {
    	update_user_meta( bp_displayed_user_id(), 'modemloopers_awesome_website_url', bp_profile_field_data('field=Website&item_id=' . bp_displayed_user_id() ) );
    }
    add_action( 'xprofile_updated_profile ', 'my_cache_xprofile_website' );
    

    LaurieDugdale
    Participant

    @lauriedugdale

    Brilliant will remove the extra fluff.

    Thanks for the help!


    LaurieDugdale
    Participant

    @lauriedugdale

    After a lot of reading and playing around I turned this code

    
        function prorevs_member_header() {
                if ($GLOBALS['bp']->current_component == "reviews") {
                    return false;
                } else {
                    ?>
                    <div class="generic-button">
                        <a title="Add reviews for this user."
                           href="<?php echo bp_get_displayed_user_link() ?>reviews/">Add Review</a>
                    </div>
                    <?php
                }
            }
        }
    

    into this

    
        function prorevs_member_header() {
            if ( bp_is_my_profile() == 1 ) {
                echo "";
            } else {
                if ($GLOBALS['bp']->current_component == "reviews") {
                    return false;
                } else {
                    ?>
                    <div class="generic-button">
                        <a title="Add reviews for this user."
                           href="<?php echo bp_get_displayed_user_link() ?>reviews/">Add Review</a>
                    </div>
                    <?php
                }
            }
        }
    

    It seems to work well. Is there a better way of doing it?


    LaurieDugdale
    Participant

    @lauriedugdale

    unfortunately it seems the plugin author isnt a programmer? and was unable to help. I was wondering if there was a simple fix maybe a quick and simple conditional that I can use? something that sets the element to “display: none;” ?

Viewing 4 replies - 1 through 4 (of 4 total)
Skip to toolbar