Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

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

  • njones7
    Participant

    @njones7

    Ok so oddly enough its working now, tbh im not sure what i did to fix it either :\


    njones7
    Participant

    @njones7

    I changed WP_Debug to true but there is nothing coming up on the page


    njones7
    Participant

    @njones7

    Im assuming you mean debug log in the browser? If so i went to the media library and loaded up the console, its not reporting any errors or warnings though


    njones7
    Participant

    @njones7

    Anyone got anything on this? It is clearly buddypress that is causing this problem, which means that if i ever want to do anything with the media library I have to disable buddypress, which is going to be a no from me.


    njones7
    Participant

    @njones7

    Problem solved, closed


    njones7
    Participant

    @njones7

    It was working perfectly fine up until this though? just did it out of nowhere


    njones7
    Participant

    @njones7

    Sent them a message, apparently you cant put it anywhere else on the page except in the nav bar. I need it as a simple contact button on the sidebar.


    njones7
    Participant

    @njones7

    Bumping because i have been searching for something like this with no luck


    njones7
    Participant

    @njones7

    Is anybody able to assist with something like this?


    njones7
    Participant

    @njones7

    FIXED

    Ended up nesting my original if code within a !bp_is_my_profile() if condition which worked.

    Thanks for the light bulb moment @shanebp

    Closed.


    njones7
    Participant

    @njones7

    Okay so that seems to work alright, echoing YES on own profile and NO on other profile (and the opposite if i put !bp_is_my_profile(), it also doesn’t seem to mess up the layout just doing it like that so (somehow) when used in that small bit of code and only as !bp_is_my_profile (a true check works but its not what i need) the layout messes up.


    njones7
    Participant

    @njones7

    https://gist.github.com/anonymous/53a6c1369a1ad21c7259a5d2f41da845

    this is the code to display the number with **** to replace the last 4 digits, i am using JS to control the toggle of the number so when clicked will reveal the digits. It works like this but when i change the if statement to;

    if (current_user_can('client') && !bp_is_my_profile())

    it throws the entire profile page layout out of wack.


    njones7
    Participant

    @njones7

    Probably should also this is what my code looks like for that

    <td class="data"><?php 
    
    bp_the_profile_field_value();if(23 == bp_get_the_profile_field_id()) {
    $phonenum = xprofile_get_field_data("Mobile Number");
    
    $first_part = substr(preg_replace( '/\s+/', '', $phonenum ), 0,-4);
    				$hidden_part = substr(preg_replace( '/\s+/', '', $phonenum ),strlen($first_part));
    				?>
    				<div style="cursor:pointer;"id="hidden-number" data-last="<?php echo $hidden_part;?>"><?php echo $first_part;?><span></span></div>
    				<?php
    			 }?>								
    				</td>
    
Viewing 13 replies - 1 through 13 (of 13 total)
Skip to toolbar