Search Results for 'profile fields'
-
AuthorSearch Results
-
February 1, 2015 at 6:03 pm #233368
In reply to: Edit WordPress Profile and Xprofile in one screen?
peter-hamilton
ParticipantDon’t know how to do that, but you could add extra fields to your Buddypress profiles to achieve a similar outcome.
January 25, 2015 at 10:43 am #232909In reply to: How to assign a WP user role based on a registration
spiritix
ParticipantHello guys
What I used is:
– BuddyPress with combination of either bbP private groups plugin or Members plugin or Restrict Content Pro – bbPress plugin
– I created extended BuddyPress profile fields in registration
– I restricted access to the forum with one of above mentioned plugins
– I used my code mentioned in the beginningHow it looks like:
– my code works like a charm! once you choose User1 type in registration, it applies subscriber role, User2 subscriber as well, contributor for User3 – THIS WORKS.
– what does NOT work is restriction via plugins. Have no clue why. With members plugin od pivate groups, I set Forum1 to be accessable ONLY to User3 type of user, but User1 and User2 can access too! Why?! It has nothing to do with my code, after registration you can clearly check it in WP Users that the role has been assigned.If I knew hot to restrict access to the forum based on the WP Role, my code would be sufficient to solve this. Can you help with that part?
@youmin – are upi saying in BB 2.2 access to forum based on the WP role is fixed?January 25, 2015 at 7:50 am #232907In reply to: Add custom xprofile links
barodscheff
ParticipantYes, of course.
I would like to link the sports which are profile fields. For instance if you click on male/Basketball you should get an overview of all members who are also male and do the sport Basketball.
This is automatically possible in members loop but I would like to have it on my landing page.I hope it’s clear now.
January 24, 2015 at 10:38 pm #232897In reply to: How to assign a WP user role based on a registration
mcpeanut
ParticipantHey @youmin and @spiritix i hear you both on this matter, after much testing myself on how to do this i have realized the best way to do this is via a few other plugins.
firstly i would recommend using a membership plugin and a plugin to create your own registration forms as well as a roles capability management plugin, you can then overide the buddypress registration process (but you will lose the ability of integrating the custom fields you create for the buddypress registration unless you tie them into your own registration forms)
but the way i got around this myself without the problem of having to tie them with my registration forms was to add a buddypress profile progression plugin so once they have registered they will see a notice in the header showing the percentage of the profile they have completed encouraging them to fill the fields in “you could even integrate it with an awards system the more they fill in” its up to you. (to me this works perfectly fine as i can still add as many buddypress fields as an when i want and have a simple registration process to boot).if you mess around with this idea you will see that assigning a user to a specific role does infact work with the right combo of plugins and effort, i know this seems a long haul work around but the way i have set it up works fine for me. i may go into more detail for you guys when i have more time and explain exactly how mine works. plus this way if you do decide to implement some kind of pay per view membership for higher levels in the future your ready to go!
January 24, 2015 at 11:38 am #232878In reply to: Custom verification for profile fields
danbp
ParticipantThat’s not a BuddyPress related question. BP provides already a few checks over xprofile fields, but not strict security checking.
As you use contact form 7 plugin to build your fields, you have to check this plugin documentation to achieve this.January 22, 2015 at 4:36 am #232741In reply to: Hide Profile Field Group from Specific Member Type
modemlooper
Moderatorfind the template file edit.php in members/single/profile
locate
if ( bp_has_profile( 'profile_group_id=' . bp_get_current_profile_group_id() ) ) :
change to
if ( bp_has_profile( 'profile_group_id=' . bp_get_current_profile_group_id() . bp_custom_filter_xprofile_fields() ) ) :then add your function for field IDs
function bp_custom_filter_xprofile_fields() { $member_type = bp_get_member_type( bp_displayed_user_id() ); if ( 'member_type_here' === $member_type ) { return '&exclude_fields=3,5,9' ) ); } }you will have to find the IDs of the profile fields
January 14, 2015 at 12:04 am #231917In reply to: xProfile Required Fields Bug
r-a-y
KeymasterHi @caldwellysr,
Thanks for testing the 2.2-beta.
There was a bug concerning xProfile fields, which should be addressed in:
https://buddypress.trac.wordpress.org/changeset/9345If you feel comfortable removing the lines referenced in
bp-core/bp-core-template.php, please do so and retest.Thanks again for testing!
January 8, 2015 at 4:20 pm #231630In reply to: Locking some profiles fields
Oazar
Participanthello again Shane,
well it doesn’t work…
i created the file, placed it in at the root of the plugin folder, and then aked to exclude one field to begin with, but this won’t work.
maybe this has to do with “groups” ? i am using the x-profile plugon, and I have 3 groups of fields, so maybe I should also mention the group ID as well as the field ID ?
January 7, 2015 at 8:33 am #231579In reply to: How to "Like" ?
djsteveb
ParticipantI am guessing it would easy to add a function to one of the like / voter plugins mentioned above ( https://buddypress.org/support/topic/how-to-like/#post-231535 ) – that would also write something to the BP activity table – which would then show likes or votes on posts and such on the activity stream – if those like / vote buttons also work on media that is uploaded through rTmedia (or the new (beta) mediapress plugin) then that would be pulled into the activity feed.
The tricky part beyond that is that buddypress does not have an integrated media thing – so there would need to be some kind of bridge between rtmedia, or mediapress or whatever was handling the media to display “likes” somewhere on the profiles.
Maybe this is something the rtcamp or mediapress plugin guy can add that functionality or someone can create some kind of bridge / api thing to let the three seperate pieces all talk to each other – then you would need code in your theme to grab that database table and display numbers next to whatever…
I think rtmedia’s plugin displays a number next to the media tab in my bp-social theme (for number of pics / videos someone has uploaded) – I wonder where this “# of likes” is to be displayed? Just a total number of likes in the main profile fields area – or number of likes broken down by media uploaded, blog posts liked, activity updates liked, etc.
I like you thoughts on this @disha76 – I’d like to see this work – it sucks that BP does not have integrated media handling – it’s a major issue I have posted about in the past – brings us to this “4 separate things need to talk to each other” in order to get basic functions working / displayed.
it would be awesome if the mediapress guy would offer to give that code to core BP – but then again, it appears there is not much work going into updating / maintaining BP these days – so getting things updated seems to depend more on third parties doing code for side projects money from what I can tell. Which of course means paying for custom stuff today – a future WP or BP update could cause the voting / like plugin to break and need to be recoded (by a dev that may not be responsive) and the media plugins could break.. and your theme may not display correctly – so you may have to try to pay all those people to make updates to keep those functions working in the future – if you can get those people to come back to projects.
So – I hope it happens, but like many things buddypress – I would not hold my breath that something that can be modded to work today will not break in the future without a fix – I’ve had to let a previous buddypress like system go, and a few other plugins from around 1.5 that were nice.
January 6, 2015 at 3:37 am #231537In reply to: Men Woman Couple
djsteveb
ParticipantI stumbled upon something today that may be what are you looking to achieve here..
Introducing Conditional Profile Fields for BuddyPress plugin
I know nothing about how it works, but when I saw it, I thought about you post here and think that is kind of what you were asking to do…
January 4, 2015 at 10:40 pm #231477djsteveb
Participant@ch1n3s3b0y – there are options to create your own profile fields, so you could add a new profile field with a radio button eg – choose customer or expert.
There are also different membership plugins and stuff that might enhance that a bit more – plugins like s2member.. maybe even something like press permit…
as far as having a different profile page for each – I think that is going to take some fancy custom coding.. some if then statements and such.. you will likely have to post on a job board to get someone with some skills on that.. it may be tempting to custom code a theme like this – but ultimately I think it would be better to custom code a couple of plugins and drop those into a sidebar or something – eg – “if bp_profile-field-2=customer” then display these fields / this code…
IF you custom mod up a theme and things change in the future where you theme has issues with new buddypress, or you want something different for another reason – then it will be more custom coding to bring over your custom profiles stuff..
just some random thoughts from a BP user – I am not an expert on any of this.
January 4, 2015 at 6:00 pm #231462In reply to: creating custom link
tsabar
Participant<div class="register-section" id="profile-details-section"> <h4>Profile Details</h4> <div class="editfield field_1 field_first-name required-field visibility-public field_type_textbox"> <label for="field_1"> First Name (required) </label> <input id="field_1" name="field_1" type="text" value="" aria-required="true" > <p class="field-visibility-settings-notoggle" id="field-visibility-settings-toggle-1"> This field can be seen by: <span class="current-visibility-level">Everyone</span> </p> </div> <div class="editfield field_15 field_last-name required-field visibility-public alt field_type_textbox"> <label for="field_15"> Last Name (required) </label> <input id="field_15" name="field_15" type="text" value="" aria-required="true" > <p class="field-visibility-settings-toggle" id="field-visibility-settings-toggle-15"> This field can be seen by: <span class="current-visibility-level">Everyone</span> <a href="#" class="visibility-toggle-link">Change</a> </p> <div class="field-visibility-settings" id="field-visibility-settings-15"> <fieldset> <legend>Who can see this field?</legend> <ul class="radio"> <li class="public"> <label for="see-field_15_public"> <input type="radio" id="see-field_15_public" name="field_15_visibility" value="public" checked='checked' /> <span class="field-visibility-text">Everyone</span> </label> </li> <li class="adminsonly"> <label for="see-field_15_adminsonly"> <input type="radio" id="see-field_15_adminsonly" name="field_15_visibility" value="adminsonly" /> <span class="field-visibility-text">Only Me</span> </label> </li> <li class="loggedin"> <label for="see-field_15_loggedin"> <input type="radio" id="see-field_15_loggedin" name="field_15_visibility" value="loggedin" /> <span class="field-visibility-text">All Members</span> </label> </li> <li class="friends"> <label for="see-field_15_friends"> <input type="radio" id="see-field_15_friends" name="field_15_visibility" value="friends" /> <span class="field-visibility-text">My Friends</span> </label> </li> </ul> </fieldset> <a class="field-visibility-settings-close" href="#">Close</a> </div> <p class="description"></p> </div>January 2, 2015 at 2:00 am #231352In reply to: Hook for when a user first logs in
valuser
ParticipantHi @ndh01,
I think you could do this just with buddypress.
(just please backup database before….. etc)
Go to Profile Fieldsโ> (Click) Add New Field Group
Add New Field (text) say Field Name virgin
Then add the following to your functions.php
function vub_login_redirect($redirect_to, $set_for, $user){ global $current_user, $bp, $wpdb; $val = 'no'; if (bp_get_profile_field_data (virgin, $user -> ID )!=""){ $redirect_to = bp_core_get_user_domain($user->ID) .'/groups/'; }else{ xprofile_set_field_data( 'virgin', $user -> ID, $val); $redirect_to = bp_core_get_user_domain($user->ID) .'/profile/change-avatar/'; } wp_redirect( $redirect_to ); exit(); } add_action('login_redirect', 'vub_login_redirect', 20, 3);Alternatively you could as you have suggested create a new meta.
A useful plugin for that would be User Meta Manager
Add Custom Meta say a text field Name โ firsttimer
then add the following (instead of the above) to your functions.php
function vu_login_redirect($redirect_to, $set_for, $user){ global $current_user, $wpdb; $firsttimer = get_usermeta($user -> ID, 'firsttimer',single); $val = 'no'; if (!empty ($firsttimer)) { $redirect_to = bp_core_get_user_domain($user->ID) .'/groups/'; }else{ update_user_meta( $user -> ID,'firsttimer',$val); $redirect_to = bp_core_get_user_domain($user->ID) .'/profile/change-avatar/'; } wp_redirect( $redirect_to ); exit(); } add_action('login_redirect', 'vu_login_redirect', 20, 3);Obviously change the redirects to wherever you want the user to go.
January 2, 2015 at 12:57 am #231351In reply to: Reliable hosting for BuddyPress installations?
Dave Lozier
Participant@sbraiden – I recently helped migrate a site off of wpengine because of performance issues and the price wpengine wanted for more horse power under the hood. Their next level of service was going to cost $3200 a month. I suggested linode.com and was also amused by the fact that wpengine runs on top of linode.
The page generation times for wordpress/buddypress/bbpress along with various plugins (gravity forms, buddypress xprofile custom fields type, gravity forms upload rules, gravity forms wysiwyg, gd bbpress toolbox, cloudflare…) was not good. It is still not where we want it either, unfortunately.
The site is quite active, pushing 30,000 members and over 1.3+ million rows in the posts table. On average the page generation times are about 1.5 seconds for logged in users. Adding a new bbpress topic/reply can time out sometimes though. (still on the list to track down and fix)
We utilize Cloudflare out front for a CDN and their threat/spam protection. Their service is free but if you need more page rules to balance out caching the pro service level is $20 a month.
On linode we have a node balancer in front of two 4 core app server nodes. The app server nodes each connect directly to their own 8 core database nodes in a master master setup. This will be changing down the road once the database indexes are trimmed down with some denormalization. The cost for the node balancer, two 4 core and two 8 core nodes is $260 a month but that’s also allowing for some room to grow, capacity wise.
Server software is a combination of nginx, apache (threaded), php-fpm, glusterfs (upload directory only), memcache, zend opcode cache and mariadb. Nginx is the web server in front of apache which serves up static files from the glusterfs file system. Nginx is caching the static content being served up by apache along with full page caching (fastcgi) for anonymous visitors. Cloud flare is also caching the static content and to date we aren’t having any performance issues with IO and glusterfs.
I hope this helps. It can be done but it takes some effort (and money) to do so.
December 30, 2014 at 5:17 pm #231282In reply to: Locking some profiles fields
shanebp
ModeratorThis will hide fields on the profile edit page and on the register page.
You need to add the field IDs.
Put the function in bp-custom.php.function oazar_hide_profile_fields( $retval ) { if( is_super_admin () ) return $retval; if( bp_is_profile_edit() || bp_is_register_page() ) $retval['exclude_fields'] = '3'; //field ID's separated by comma return $retval; } add_filter( 'bp_after_has_profile_parse_args', 'oazar_hide_profile_fields' );December 27, 2014 at 12:38 am #231087In reply to: Access to BP functions in external code via wp-load
johnmontfx
ParticipantThanks Dan — while they are separate plugins I’m sure you’ll agree that they are very much joined at the hip (as bbPress even includes BuddyPress functions). What was really nice was the ability to bring in extended Vbulletin profile information over to to BuddyPress extended profiles at the same time as importing to bbPress. Took some custom coding, but the code in both plugins made it fairly clear about how to accomplish it. Makes it easy to use in both plugins.
As far as what I’m trying to do with BuddyPress, it’s basically the issue in the first post. I’ve traced the code a bit more and my main issue right now is simply figuring out if I could get access to the xprofile_get_field_data function. wp-load.php doesn’t seem to call the bp-xprofile-loader.php, so $bp->profile->table_name_fields is empty.
In the meantime, I’ve just issued some mysql db calls to grab the info…but I’d love to use the built in functions if I could.
December 26, 2014 at 9:46 pm #231083In reply to: Men Woman Couple
djsteveb
Participant@mariovisie – you say after you choose the radio button for man, when you login you always see the other fields… you mean when viewing a profile you see all the filed option? OR you mean if you click “edit profile” you see all field option?
I have not seen all fields show when viewing profiles that are already created, so I am confused if you are seeing this in this way.
as far as “Only an administrator must have the option to change this.” – I don’t know about setting permissions for that, another bp expert may be able to chime in on that – or maybe the “press permit core” plugin can lock that down somehow. Not sure on that one.
December 26, 2014 at 12:56 am #231046In reply to: Men Woman Couple
djsteveb
Participantunder “users” -> “profile fields”
add new field.
I choose “field type” radio buttons – you might use checkboxes or something.
put “guy” in the field option under radio buttons.
then click “add another option” text under that.
put “girl”
click add another option
“couple”December 24, 2014 at 8:39 am #231001Kookidooki
ParticipantHello Shanebp,
This is what I mean:
In Buddypress dashboard > Users > Profile Fields > Add New Field Group… it’s not creating a new group.
Is there incompatibilty between WP 4.1 and Buddypress cause it’s duplicating my profile fields. For example: it’s now showing my name field twice.. and the order of the groups are changing every time…Weird
December 23, 2014 at 8:54 pm #230940michaeltransmissions
Participantshanebp — I followed your suggestion and it worked like a charm. I also had to add some code to my functions.php file to be able to redirect calls to the WP Profile page to the BP Profile page because editing the the files you suggested didn’t affect restrict the fields on the WP Profile page (code for this below, if anyone wants).
My only question is the following – would changes to the files in the bp-templates directory get overwritten if I update the BP plugin? If so, it would be nice to find an alternative way to do this, but otherwise I just need to know so I can incorporate a restore of the code changes from a backup to my upgrade workflow document for this site.
Thanks,
Michaeladd_action ('init' , 'prevent_profile_access'); function prevent_profile_access(){ if (current_user_can('manage_options')) return ''; //if admin, exit //everyone else, redirect to the bp profile page, not the wp profile page! if (strpos ($_SERVER ['REQUEST_URI'] , 'wp-admin/profile.php' )){ wp_redirect (bp_loggedin_user_domain()); } }December 20, 2014 at 5:34 pm #230838In reply to: BuddyPress 2.1.1 Adding details to member-header.php
shanebp
ModeratorI cannot duplicate your issue.
In wp-admin, Users > Profile Fields, are your fields part of the ‘Base’ group of fields?
Or are they under another group, in another tab to the right of ‘Base’?btw: instead of
bp_get_profile_field_data, you should usebp_get_member_profile_data
That tutorial is for BP 1.5, very old.December 20, 2014 at 4:48 pm #230833In reply to: BuddyPress 2.1.1 Adding details to member-header.php
mdory89
ParticipantI should’ve explained more. In the WordPress admin panel, If you click Users-Profile Fields, the profile field created and placed into the member-header.php file doesn’t show at all.
Here’s a tutorial I followed: http://code.tutsplus.com/articles/developing-buddypress-themes-part-3-buddypress-15-member-pages-the-overall-user-experience–wp-21856
The code:
<?php $favorite_spot = bp_get_profile_field_data( 'field=Favorite Camping Spot' ) ; echo '<p class="profile-fields">My Favorite Camping Spot: ' .$favorite_spot. '</p>'; $necessary_item = bp_get_profile_field_data( 'field=One Necessary Item' ) ; echo '<p class="profile-fields">My One Necessary Item: ' .$necessary_item. '</p>'; ?>December 20, 2014 at 3:47 pm #230831In reply to: BuddyPress 2.1.1 Adding details to member-header.php
shanebp
Moderatorbut not in the admin menu profile fields section
What exactly are you referring to?
The adminbar at the top of each page? If so, member-header.php does not affect that.December 18, 2014 at 11:55 pm #230801shanebp
ModeratorHow will the ‘tags’ be used?
As the basis for filtering members?
Or just as ‘notes’ about each member?If the former, see the BP_User_Query codex page.
If the latter, you could use this premium plugin: BuddyNotes
Or you could simply create template overloads of these 2 files:
buddypress\bp-templates\bp-legacy\buddypress\members\single\profile\profile-loop.php buddypress\bp-templates\bp-legacy\buddypress\members\single\profile\edit.phpAnd check the fields via their id or name and then decide, based on who the logged-in user is, whether the fields should be displayed.
December 17, 2014 at 6:56 pm #230724In reply to: [Resolved] Hide possibility to change 'Base' name
danbp
ParticipantSorry to answer you with a big laught, it’s not html but php. ๐
You should also find the time to read more attentively the forum, or search by keywords.
in this case: hide xprofile fieldshttps://buddypress.org/support/search/hide+xprofile+fields/
You’re welcome. Glad you got it. ๐
-
AuthorSearch Results