Search Results for 'Add BuddyPress Styles to a Theme'
-
AuthorSearch Results
-
March 24, 2009 at 7:23 pm #40821
In reply to: Purely Genius Way to Add Custom Profile Fields
keston
ParticipantI’ll try to set a little plugin or something later, but for the moment you can follow this method, it’s the Fishbowl81’s code adapted for ebay editor kit:
Edit your bp-xprofile-filters.php by placing the following code after the custom buddypress filters:
/* Display ebay listings field */
function bp_profile_ebay_display( $field_value
"", $field_type = "", $field_id = "" ) {{ // clean up input
return "<script language='JavaScript' src='http://lapi.ebay.com/ws/eBayISAPI.dll?EKServer&ai=lwa%7Bfwvw%7Esa%7Cwsyw%60&bdrcolor=CCCCCC&cid=0&eksize=1&encode=UTF-8&endcolor=FF0000&endtime=n&fbgcolor=FFFFFF&fntcolor=000000&fs=0&hdrcolor=FFFFFF&hdrimage=1&hdrsrch=n&img=y&lnkcolor=75179C&logo=3&num=5&numbid=n&paypal=n&popup=n&prvd=9&r0=4&shipcost=n&si=".addslashes($field_value)."&sid=BP&siteid=0&sort=MetaEndSort&sortby=endtime&sortdir=asc&srchdesc=n&tbgcolor=FFFFFF&tlecolor=FFFFFF&tlefs=0&tlfcolor=000000&toolid=10004&track=5336248810&watchcat=63850&width=350'></script>";
}
}
function bp_profile_ebay_groups( $group_name
"") {if($group_name == "My Ebay listings"){
remove_filter( 'bp_the_profile_field_value', 'xprofile_filter_link_profile_data', 2);
add_filter( 'bp_the_profile_field_value', 'bp_profile_ebay_display', 2, 3);
}else{
add_filter( 'bp_the_profile_field_value', 'xprofile_filter_link_profile_data', 2, 3);
remove_filter( 'bp_the_profile_field_value', 'bp_profile_ebay_display', 2);
}
return $group_name;
}
add_filter( 'bp_the_profile_group_name', 'bp_profile_ebay_groups', 10, 1 );
Also it depend of your css code but it can be useful to put this in your member theme’s stylesheet (base or your custom stylesheet).
td.data table td{
margin:0px;padding:0px;
Then create a profile field group named “My Ebay listings” and a profile field like ebay username and you’re done!
March 17, 2009 at 8:49 pm #40249In reply to: wp-signup vs register
Simon
ParticipantNot specifically… although I have tried using the loader.php to load styles via custom.css over base.css. No effect. I can’t see a reference to bp_styles() in the buddypress templates anywhere… any idea where should I be looking?
Cheers.
update: Scratch that… found it in member theme. But adding that to the home theme has no effect (and it doesn’t appear to be included in the default bp home theme anyway).
March 14, 2009 at 7:22 am #39993In reply to: FaceBuddy free theme for BuddyPress
Sgrunt
Participanti’ve made some changes to the loader.php to correctly add the stylesheet. We’re still in beta but i think that we’re going to see the light!
March 13, 2009 at 10:27 am #39901In reply to: FaceBuddy free theme for BuddyPress
nicolagreco
ParticipantWhy have you written to replace the member-themes directory??
You can change the name of facebuddy theme directory

is that under gpl? <– if yes i’ll add styles for the bpdev-autosuggest plugin
March 6, 2009 at 8:56 pm #39393In reply to: Is it possible to have custom themes for groups?
nicolagreco
Participantif (the group is XBOX) add_action(‘wp_print_styles’, ‘your style hook’)
i made a good set of functions in bpdev theme to add stylesheet with condition, look here:
http://trac.bp-dev.org/plugins/browser/trunk/bpdev-theme/bpdev-theme-extra.php
look line 9:
function bpdev_theme_register_style( $slug, $name, $callback, $default = 'off', $admin_show = 'on', $condition = true, $priority = 1 ) {it means that with this function you will be able to add styles in wordpress/buddypress integrating them in the bpdev admin interface to activate or deactivate them,
in your example you need a plugin like that called for example my-styles-bpdev.php
<?php
/*
Author: Nicola Greco
Author URI: http://nicolagreco.com
*/
require_once( 'bp-core.php' );
require_once( 'bpdev-core.php' );
function bpdev_search_css() {
global $group_obj;
bpdev_theme_register_style(
'my-styles', // your style slug name
'XBOX Styles', // your style name
'xbox_styles_function', // callback
'on', // status "on" on default
'off', // off will not display it in admin interface
$group_obj->id = 1; // the group ID
);
}
function xbox_styles_function() { // example of css content
?>
#header {
background: #FFF;
}
<?php
}
add_action( 'bpdev_theme_extra_setup_globals', 'bpdev_search_css' ); // it will add the style
?>March 5, 2009 at 10:23 pm #39328In reply to: Where to start theming
Andy Peatling
KeymasterIt’s okay to do anything you want with the theme files, just as you would do in WordPress.
You don’t need the loader.php stuff if you don’t want to, however, it does add some extra functionality, such as cross theme CSS and the ability to selectively load styles.
You should also read this:
https://codex.buddypress.org/getting-started/using-the-buddypress-themes/
January 8, 2009 at 8:10 pm #35912In reply to: Blank screen in new created blog
yu
Participantnope, this is not php error. this is blog creation error. when i create new blog from ‘/wp-admin/wpmu-blogs.php’ – it’s config is not correct. ‘Default theme’ and ‘Default stylesheet’ are set to ‘default’. Dunno what it mean, but when i change this line to ‘buddypress-home’ – new blog works like a charm ) is there anything i can do to make ‘dafault’ theme works for new created blogs? or automate ‘buddypress-home’ adding to this fields? oO
-
AuthorSearch Results