Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

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

  • William
    Participant

    @william_oneb

    Now, there is a “Custom CSS” section in my Theme. Will pasting the modified code there work?

    I’m not sure give it a try.


    William
    Participant

    @william_oneb

    @konberg, if you this code, all labels on the registration form will be lower case.

    #buddypress .standard-form label, #buddypress .standard-form span.label {
        text-transform: lowercase;
    }

    If you just use the other code below, only labels on radio buttons will be lower case.

    #buddypress .standard-form div.radio div label {
        text-transform: lowercase;
    }
    

    because other fields, not radio boxes, also got lowercased

    This is so because you used this code.

    #buddypress .standard-form label, #buddypress .standard-form span.label {
        text-transform: lowercase;
    }

    William
    Participant

    @william_oneb

    @konberg you probably did not create the child theme properly. Try pasting that code directly in “style.css” of your active theme and see if it works. Don’t paste it in child theme first.

    I tested the code from my end and it worked.

    It’s also likely that your web browser has cached your website. Try clearing the cache, restart your browser, and see if you notice the changes. If that does not work try visiting the website from another web browser such IE, Google Chrome, Firefox etc. You can even use a different computer to do so.


    William
    Participant

    @william_oneb

    @RafVin Here’s how to hide “All Members” tab with CSS.

    Find a file called “style.css” in the wordpress active theme, add the code below and re-upload the file.

    #buddypress div.item-list-tabs ul li.selected a {
        display: none !important;
    }
    

    Warning! When you update your theme, you’ll loose these CSS changes so try doing this in a child theme if you’d like to retain the changes when you update your theme.

    Showing custom tasks under personal? Well that requires some custom PHP coding or probably a plugin. Hopefully, someone will help you with this.


    William
    Participant

    @william_oneb

    @konberg find a file called “style.css” in the wordpress active theme, add the code below and reupload the file.

    #buddypress .standard-form div.radio div label {
        text-transform: lowercase;
    }

    Warning! When you update your theme, you’ll loose these CSS changes so try doing this in a child theme if you’d like to retain the changes when you update your theme.

    Let me know if that works.


    William
    Participant

    @william_oneb

    My opinion: For simplicity, Let the user figure out that he/she needs a child theme. Period.


    William
    Participant

    @william_oneb

    By the way @henrywright is one of the BuddyPress Core developers who joined team recently but look at where he said that the code should be put. He actually meant “style.css” not “function.php”. What do you say about this @style960? Even the core developer himself is not recommending the child theme!


    William
    Participant

    @william_oneb

    If anyone agrees with my opinion please say something. Not everyone is a web developer and therefore the shortest route is probably the best with these type of people.


    William
    Participant

    @william_oneb

    I know @style960. Look, probably not all members are using default themes such 2015 which get updated every now and then OK? Some themes will never get updated anyway. Some people just want to get the work done as soon as possible and once they realize that they are loosing the changes with updates then they can find a solution to that. What’s the use of giving these people lengthy tutorials that are going to get them frustrated and they quit half way? They should start small then improve on that. If you’re a programmer at all, you first started by writing a very simple program that says “Hello World!” not a super complicated program. This is what I’m doing here!


    William
    Participant

    @william_oneb

    @bennyhoang

    Paste this code in your theme’s functions.php

    function bennyhoang ($atts) {
             // Start by checking if the user if logged in
              if ( is_user_logged_in() ) {
             // Let's grab the user id
             $user_id = bp_loggedin_user_id();
             // Let's find a field called name. (REPLACE "NAME" WITH THE NAME OF THE FIELD YOU WANT)
             $Name = xprofile_get_field_data( 'Name' ,$user_id);
             // Let's output that field
             return $Name;
       } 
    }
    
    add_shortcode( 'benny', 'bennyhoang' ); 

    [benny] is your shortcode! Use it your pages/posts!


    William
    Participant

    @william_oneb


    William
    Participant

    @william_oneb

    @life5000, Please find a file called style.css in your active theme, put this code there, save the file and reupload that file. Of course 300% is way too large but hey, I want you to see that your changes are actually working. Please adjust that size accordingly e.g 140%

    #activity-stream p {
        font-size: 300%;
    }

    William
    Participant

    @william_oneb

    The most likely reason for this kind of appearance is Bootstrap Classes conflicting with Buddypress CSS classes. For example, if buddypress has a class called “label” and bootstrap also has a class called “label” then bootstrap’s label class will be used in place of buddypress’s label class.


    William
    Participant

    @william_oneb

    You don’t really need a child theme. You can just “inspect element” with your web browser and find the class or element you want to modify with CSS. Once you find it, go to your active theme’s style.css and write new code to change the appearance.

    If I’m not wrong, you need the child theme if you just want to modify the registration form layout or template. Hope that points you in the right direction.


    William
    Participant

    @william_oneb

    I get it now. Maybe there’s no way I’m gonna achieve what I wanted.


    William
    Participant

    @william_oneb

    OK here’s how I’d use the hook @shanebp.

    function william_bp_core_activated_user(  $user_id, $key, $user ) {
    // do something with $user_id
    };
    add_action( 'bp_core_activated_user', 'william_bp_core_activated_user', 10, 3 );

    I’d like to assign the user id to another variable. Something like this:

    $userid = william_bp_core_activated_user();

    The above assignment statement doesn’t work though. Any idea how I’d make it work?


    William
    Participant

    @william_oneb

    Is this even possible?


    William
    Participant

    @william_oneb

    Hi @canadianmusicnetwork, did you manage to change?


    William
    Participant

    @william_oneb

    Thanks @henrywright The above code did not echo the key but this one did.

    function william_oneb_key() {
          if ( empty( $key ) ) {
          $key = bp_current_action();
          echo "The activation key is ";
          echo $key;
      }
    }
    add_action( 'bp_after_activate_content', 'william_oneb_key' );

    The final bit would be to query the user id using the key that we just obtained. Do you mind helping me with this one too? Probably a code?


    William
    Participant

    @william_oneb

    Thanks for your reply @henrywright. So how would I go about retrieving the activation key? I’d appreciate if you can at least give me a code that just prints the activation key on the activation page and I’ll try to query the database for the user ID.


    William
    Participant

    @william_oneb

    Before making the image your background, try changing background color to something like RED and see if you are targeting the right CSS class


    William
    Participant

    @william_oneb

    No @henrywright. At this point, the user has just clicked on the activation link in email.


    @shanebp
    suggested this function. It’s working but I can’t get it to return an id that I can store in a GLOBAL variable so that I can use it somewhere else on activation page with this hook:

    
    bp_after_activate_content

    Here’s the function that @shanebp suggested.

    function william_bp_core_activated_user(  $user_id, $key, $user ) {
         // do something with $user_id
         // there is no return for add_action, only add_filter
    };
    add_action( 'bp_core_activated_user', 'william_bp_core_activated_user', 10, 3 );

    William
    Participant

    @william_oneb

    No need for screenshot if it’s working. You can change the design of everything on your site by first inspecting element so that you can get the exact IDs and classes. Here’s a video to get you started https://www.youtube.com/watch?v=F7fUtZh6APw (Might not be the best video though LOL)

    Once you get the exact id or class, you can override their designs. Basic familiarity with CSS could be of great help.

    Please google for more info about inspecting element


    William
    Participant

    @william_oneb

    @canadianmusicnetwork it’s actually working from the account you created for me!!! Let me take a screenshot!!


    William
    Participant

    @william_oneb

    @canadianmusicnetwork I don’t think you’re placing the code in the right place ( in a file called style.css). I tested the code on my buddypress site and changed the color to WHITE and it’s actually working.

    Here’s the code again:

    #buddypress #activity-stream p {
        margin: 5px 0px;
        color: #FFFFFF;
    }

    I logged in successfully.

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