Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'theme'

Viewing 25 results - 20,376 through 20,400 (of 31,072 total)
  • Author
    Search Results
  • @mercime
    Participant
    #101581
    Boone Gorges
    Keymaster

    You will have te create a custom function, either in your theme’s functions.php or in plugins/bp-custom.php, that filters the output of that function and replaces it with the avatar of your choice. Eg, if your blog_id is 5,
    ‘function my_blog_avatar( $old_avatar ) {
    // Do some stuff to get the avatar you want, then
    return $new_avatar;
    }
    add_filter( ‘bp_get_blog_avatar_5’, ‘my_blog_avatar’ );`

    The ‘do some stuff’ part will depend highly on your setup. If by ‘the associated group’ you mean that you are using bp-groupblog, then you will likely have to do some direct queries of the groupmeta database table to find the group that is associated with a particular blog (I don’t think that the plugin stores that info in a place that is easily accessible by blog_id). Then you will use some permutation of bp_core_fetch_avatar() to pull up the avatar for that group_id.

    Good luck!

    Hugo Ashmore
    Participant

    You are perfectly able to move the adminbar, style it, create a positioning context of your choosing.

    This is a styling issue and as such you should do this work on a child theme to preserve any changes you make to stylesheets and/or files.

    As to how complicated this is is a question of your coding knowledge and BP/WP structure.

    Giving any more detailed advice is difficult without having specifics to hand on what you wanted to do.

    I’m puzzled by you remarking that you can live with the adminbar scrolling as this is not the default behavior, by default the adminbar is positioned ‘fixed’ i.e stays at the top of the browser viewport.

    Actually taking the adminbar links and placing them elsewhere – in effect removing the adminbar is slightly more complex but doable but again you would need a good idea on where they would be going.

    #101590
    Virtuali
    Participant

    try adding:

    `/* Add words that we need to use in JS to the end of the page so they can be translated and still used. */
    function bp_dtheme_js_terms() { ?>

    var bp_terms_my_favs = ”;
    var bp_terms_accepted = ”;
    var bp_terms_rejected = ”;
    var bp_terms_show_all_comments = ”;
    var bp_terms_show_all = ”;
    var bp_terms_comments = ”;
    var bp_terms_close = ”;
    var bp_terms_mention_explain = ”;

    <?php
    }
    add_action( ‘wp_footer’, ‘bp_dtheme_js_terms’ );`

    to your functions.php file.

    There is extra code in there, if you get a (cannot re-declare) notice, delete the code following your already called function.

    bgrun80
    Participant

    Cheers @boonebgorges.

    So, if I can clarify the whole process. Please tell me if I’m right or if I’m wrong,
    and I’ll post it up on my forum, and make a page in the codex if you want.

    When a visitor loads the URL of a Buddypress-supported site:
    1. the WordPress environment loads and loads the Buddypress plugin
    2. buddypress/bp-themes/bp-default is loaded (if you have activated that theme)
    3. as the visitor browses through different pages, functions are activated in those pages
    4. these functions draw their code from the core files (checking first if bp-custom.php contains same-named functions that will overwrite code in the core files)
    5. there are 9 core files
    6. these 9 core files require/include other groups of code from folders that are named the same way
    e.g. ‘bp-core.php’ requires/includes the files from the ‘bp-core’ folder
    7. The files in these folders are groups of code that share a similar category (e.g. classes) (e.g. bp-core/bp-core-classes.php)
    because modularizing them this way makes it easier to find the code you need.
    8. extra code that is hard to categorize clearly is simply put into the main file (e.g. bp-core.php)

    Questions:
    a. Is the above list right?
    b. Do the core files need to be loaded every time a user visits a page and activates a related function?
    e.g. if a user activates a function related to friends, does bp-friends.php need to be loaded?

    #101578
    luvs
    Member

    put in bp-custom.php, and functions.php, i get Parse error: syntax error, unexpected T_VAR in /home/content/47/6114047/html/wp-content/themes/*****/functions.php on line 116

    #101574
    @mercime
    Participant

    Check out this walkthrough to get a bird’s eye view of what kind of work is entailed and some tips to ensure compatibility with BP Template Pack.
    https://codex.buddypress.org/theme-development/bp-template-pack-walkthrough-level-easy-2/

    Btw, BP Template Pack still needs to be upgraded to BP 1.2.7 version.

    luvs
    Member

    @nahummadrid, does not work, post from simply does not appear. You are missing pieces.

    #101544
    Boone Gorges
    Keymaster

    I have seen this before. I think it might be a BP bug. If you have a development site, would you mind testing to see whether this is the case with all plugins deactivated (other than BP) and using the bp-default theme?

    #101529
    stan
    Participant

    I am having the same problem as kristine and I also use the same exact theme. I will post a screenshot. Any ideas on how to add a view profile option? I have been searching around for a couple days
    http://www.gamerebel.net/brit/problem.png

    #101522
    @mercime
    Participant

    @peternemser no, because it is not in the default theme.

    If you prefer, create a child theme of bp-default theme https://codex.buddypress.org/theme-development/building-a-buddypress-child-theme/, then copy the header.php of the bp-default theme into your child theme folder, then add this in `

    #101515
    kateM82
    Member

    Ah of course, sorry! I am using citizen Kane theme (although thinking of swapping to another that already has wp3.0 drop down menu styling built in).

    Here is the link, thanks Andrea!

    http://members.dropdeadgorgeousdaily.com/

    @mercime
    Participant

    The weird thing is that the BP Activity component link is working while the Members and Groups component links are not working.
    Do you have any membership plugin turned on which requires Is_user_logged in?
    If you change theme to bp-default theme are the links to Members and Groups working?

    #101506

    In reply to: Child Theme question

    modemlooper
    Moderator

    I would add it as a sub domain then. You could do a different install all together or put your WP install into multisite mode and use the instructions in the link below.

    https://codex.buddypress.org/getting-started/install-buddypress-on-a-secondary-blog/

    #101505
    modemlooper
    Moderator

    That file is the complete post form but you may need to edit it to make it work on other areas. I wouldn’t do it on a live site.

    You could try adding this somewhere in a theme file.

    <?php locate_template( array'activity/post-form.php'), true ) ?>

    #101501
    kelbycarr
    Member

    Thanks! Do you know what portion of the code there I would paste into the theme where I want an update box to appear?

    #101499

    In reply to: Child Theme question

    Nightwyrm
    Member

    At this stage, I’m looking at just using BP for internal site team use only e.g. for communications and organising people. We’re currently using Facebook Groups, which is good for our needs, but not everyone uses FB..

    #101498

    In reply to: Child Theme question

    modemlooper
    Moderator

    I think it depends of your site. If you have a blog site with social component added then stick with template pack. If you want more of a social site with a bit of blogging then i’d go with a full BP child theme.

    No wrong or right just different options. Upgrading a child theme is significantly easier than the template pack. Currently the template pack is two versions behind.

    #101497
    modemlooper
    Moderator

    You can use the code from plugins/buddypress/bp-themes/activity/post-form.php to cobble a post form on other areas of a site.

    #101475
    MrMaz
    Participant

    @r-a-y

    I am a big fan of Justin’s and have read that particular post several times in the past. I mostly agree with his arguments, but my view is even a bit more extreme, since even when you remove the term “framework” they still box you into an API that is impossible to break out of, which is not developer friendly in the long run.

    There are a lot of themes that I think do this on purpose, because it fits their business model :)

    Boone Gorges
    Keymaster

    @bgrun80 I’ve added you as an Editor on the codex. (The script that is supposed to handle this setup automatically has been acting buggy lately.)

    When you load a URL that matches a pattern that BP is looking for (eg /members/boonebgorges), BP first finds the corresponding data in the database (in this example, the profile data for a member matching the name ‘boonebgorges’) and then loads the theme file designated for this kind of data (members/single/home). In broad strokes, it’s not that different from how a standard WP post query works.

    The relationship between core files is conventional. For something like the groups component:
    – bp-groups/bp-groups-templatetags.php contains all function that are called from theme templates, along with the loop builder classes
    – bp-groups/bp-groups-filters.php contains the functions that modify the output of the groups component via apply_filters(), plus the application of any WP-native filters like kses
    – bp-groups/bp-groups-classes.php contains the database classes (for the most part, the -classes.php files should be the only place where SQL statements appear) as well as any other miscellaneous classes (like the BP_Group_Extension class, in the case of groups)
    – bp-groups/bp-groups-notifications.php contains the functions that format and send email notifications related to the group
    – bp-groups.php contains some setup functions for the component (like groups_setup_globals() and the functions that set up navigation), as well as any other functions that don’t have a natural home in any of the other files listed above.

    #101467
    r-a-y
    Keymaster

    MrMaz, the term you’re looking for is “theme framework”. Like Justin Tadlock’s Hybrid or Ian Stewart’s Thematic.

    Your argument is similar to Justin’s blog post on why advanced parent themes are not frameworks:

    Frameworks? Parent, child, and grandchild themes?

    bgrun80
    Participant

    Question: When a user logs into a Buddypress site, do all the core files load from the Buddypress root folder, or does it simply load the theme files?

    Basically, how does the big picture work?

    Also, what is the relationship between the core files and their respective directories?
    e.g. bp-blogs.php and the bp-blogs directory

    Cheers.

    #101458
    r-a-y
    Keymaster

    No need to hack BP.

    Put the following in your theme’s functions.php:

    `
    function ray_bp_get_send_public_message_link() {
    global $bp;

    return wp_nonce_url( $bp->loggedin_user->domain . $bp->activity->slug . ‘/?r=’ . $bp->displayed_user->userdata->user_login );
    }
    add_filter( ‘bp_get_send_public_message_link’, ‘ray_bp_get_send_public_message_link’ );

    function ray_bp_get_send_private_message_link() {
    global $bp;

    return wp_nonce_url( $bp->loggedin_user->domain . $bp->messages->slug . ‘/compose/?r=’ . $bp->displayed_user->userdata->user_login );
    }
    add_filter( ‘bp_get_send_private_message_link’, ‘ray_bp_get_send_private_message_link’ );`

    #101451
    MrMaz
    Participant

    @driz

    BuddyPress is already a theme. Look at bp-default. That is a full WP theme that for some reason was bundled with the plugin. There is a huge mess of code devoted to making this setup work. It is nearly impossible to freely modify the templates, even if you roll your own BuddyPress theme, because the javascript is so tightly bound to the ids and classes in the markup.

    I don’t think its reasonable anymore to call BP a plugin, since it does not enhance a WP site in the purest sense. It completely takes it over and defines an entirely new set of rules for how to customize the look of your site. That sounds like a theme to me.

    If you think about BP as a theme, then the only acceptable ways to solve the issue and stay true to WP is pages or custom post types. This only doesn’t make sense though because BP is made up of many components that should be making their OWN decisions about how they get displayed.

    So back to my original point. BP is defining too many rules, and forcing components to adhere to the default theme itself, instead of a theme prototype (which is how WP works). If BP was doing it the “right” way, then this whole issue would be moot, because each component would be deciding how its URL was determined, and the end user could decide if they liked it or not.

    I think this is in the scope of the topic because it gets into defining the problem that needs to be solved, which is important before working on a solution.

Viewing 25 results - 20,376 through 20,400 (of 31,072 total)
Skip to toolbar