Search Results for 'theme'
-
AuthorSearch Results
-
January 1, 2011 at 3:38 am #101636
@mercime
ParticipantTo remove the admin bar completely
https://codex.buddypress.org/theme-development/modifying-the-buddypress-admin-bar/hiding-the-buddypress-admin-bar/Happy New Year !
December 31, 2010 at 3:43 pm #101581Boone Gorges
KeymasterYou 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!
December 31, 2010 at 8:47 am #101598Hugo Ashmore
ParticipantYou 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.
December 31, 2010 at 6:04 am #101590In reply to: Important Buddypress Function not working
Virtuali
Participanttry 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.
December 31, 2010 at 1:47 am #101580bgrun80
ParticipantCheers @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?December 31, 2010 at 1:28 am #101578In reply to: Important Buddypress Function not working
luvs
Memberput 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
December 30, 2010 at 11:58 pm #101574@mercime
ParticipantCheck 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.
December 30, 2010 at 7:02 pm #101556luvs
Member@nahummadrid, does not work, post from simply does not appear. You are missing pieces.
December 30, 2010 at 5:15 pm #101544In reply to: Activity stream ”Load More” looping content
Boone Gorges
KeymasterI 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?
December 30, 2010 at 7:41 am #101529In reply to: Add users profile fields to the activity page
stan
ParticipantI 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.pngDecember 30, 2010 at 3:41 am #101522In reply to: Adding A Link To Profile Homepage
@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 `
- `
`
<li class=”selected”>
<a href="” title=””>`
The benefit of the “custom code” in functions.php is that you don’t have to copy over the header.php to your child theme folder.
December 30, 2010 at 1:17 am #101515In reply to: How do I edit/customise the members profile page?
kateM82
MemberAh 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!
December 30, 2010 at 12:05 am #101510@mercime
ParticipantThe 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?December 29, 2010 at 11:12 pm #101506In reply to: Child Theme question
modemlooper
ModeratorI 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/
December 29, 2010 at 11:09 pm #101505In reply to: Any plugin/hack to allow update space in top bar?
modemlooper
ModeratorThat 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 ) ?>
December 29, 2010 at 9:55 pm #101501In reply to: Any plugin/hack to allow update space in top bar?
kelbycarr
MemberThanks! Do you know what portion of the code there I would paste into the theme where I want an update box to appear?
December 29, 2010 at 9:33 pm #101499In reply to: Child Theme question
Nightwyrm
MemberAt 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..
December 29, 2010 at 9:27 pm #101498In reply to: Child Theme question
modemlooper
ModeratorI 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.
December 29, 2010 at 9:23 pm #101497In reply to: Any plugin/hack to allow update space in top bar?
modemlooper
ModeratorYou can use the code from plugins/buddypress/bp-themes/activity/post-form.php to cobble a post form on other areas of a site.
December 29, 2010 at 2:16 pm #101475In reply to: Why using pages for BP sections is a bad idea
MrMaz
ParticipantI 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
December 29, 2010 at 2:03 pm #101474Boone 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.December 29, 2010 at 6:45 am #101467In reply to: Why using pages for BP sections is a bad idea
r-a-y
KeymasterMrMaz, 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:
December 29, 2010 at 5:58 am #101464bgrun80
ParticipantQuestion: 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 directoryCheers.
December 29, 2010 at 4:52 am #101458In reply to: Persistent Caching and Private Messaging
r-a-y
KeymasterNo 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’ );`December 29, 2010 at 2:30 am #101451In reply to: Why using pages for BP sections is a bad idea
MrMaz
ParticipantBuddyPress 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.
-
AuthorSearch Results