Search Results for 'buddypress'
-
AuthorSearch Results
-
October 24, 2012 at 11:19 pm #143909
modemlooper
ModeratorYou have to pass id # of field a string wont work.
`$data = xprofile_get_field( 2, bp_displayed_user_id() );
print_r($data) ;`
This will not give you a members choice. It will only return the default visibility you set up in admin. to get a users visibility on a field you get from user meta.
`$user_visib = get_user_meta( bp_displayed_user_id(), bp_get_user_meta_key( ‘bp_xprofile_visibility_levels’ ), true );
print_r($user_visib) ;`
October 24, 2012 at 5:42 pm #143906evagorasc
ParticipantAha. Problems.
So, following the advice of @modemlooper I got this working just fine. Anything created under Buddypress custom user fields can display fine in the bbPress loops, using something like this:
`
$user_location = xprofile_get_field_data( ‘Location’, bbp_get_reply_author_id() ) ;
if (strlen($user_location) > 0 ) :
echo ‘Location: ‘ . $user_location . ‘
‘;
endif;
`However, how do I make sure I follow the custom fields’ restrictions regarding visibility? In BuddyPress we can create a custom field and set its visibility to be either:
1) Anyone
2) Logged In Users
3) My FriendsFurthermore, these fields’ visibility can be allowed to be changed by each user.
So, before simply displaying a custom field for just everyone, I need to run the required checks to verify that it should be displayed for the anonymous/logged-in user. I tried getting a reference to the actual field, like this but the var_dump() doesn’t help me much:
`$user_location_field = xprofile_get_field( ‘Location’, bbp_get_reply_author_id() ) ;`
This is the var_dump($user_location_field):
`object(BP_XProfile_Field)[29]
public ‘id’ => null
public ‘group_id’ => null
public ‘parent_id’ => null
public ‘type’ => null
public ‘name’ => null
public ‘description’ => null
public ‘is_required’ => null
public ‘can_delete’ => null
public ‘field_order’ => null
public ‘option_order’ => null
public ‘order_by’ => null
public ‘is_default_option’ => null
public ‘default_visibility’ => null
public ‘allow_custom_visibility’ => string ‘allowed’ (length=7)
public ‘data’ => null
public ‘message’ => null
public ‘message_type’ => string ‘err’ (length=3)`Even though I see a couple of public methods like “default_visibility()” and “allow_custom_visibility()”, they don’t really help. Their value doesn’t even change even when I change the field properties in the CMS.
October 24, 2012 at 3:15 pm #143903modemlooper
Moderatorfixed in 2.0.3
October 24, 2012 at 2:22 pm #143898elmindo
Participant@mercime thanks!
Here’s the source codes of the following separately in pastebin.com
– loop-page.php: http://pastebin.com/rC4W3k0Z
– functions.php: http://pastebin.com/wSt1cg15
– sidebar-page.php: http://pastebin.com/HrzsVHbF
– header.php: http://pastebin.com/MgsbGE4f
– index.php: http://pastebin.com/9Fu2EhFM
– footer.php: http://pastebin.com/U0u8WJu8October 24, 2012 at 1:56 pm #143897yidamweb
Participant1. Thanks; I managed to create a menu item of this name (the default menu item had got deleted by mistake), and linked it to the Members page using the URL given in BP>> Members>>Members page. This solved the problem.
2. I am still struggling with resizing user images in the front end in a straightforward manner, and would appreciate your sharing how image resizing was handled by you.
Thanks in advance.
October 24, 2012 at 1:34 pm #143896In reply to: new users can’t register
ript247
ParticipantHi @PAUL GIBBS I apologize that I trolled into your topic yesterday, as I was not about to create a new topic. Far as the other topics they were within the same support criteria that I needed. And you are right I haven’t discovered an answer.
I am using the latest version of buddypress and WordPress 3.4.2,which I installed via the dashboard and after review I do not have have within my editor/ftp directory called bp-custom.php file.
October 24, 2012 at 12:20 pm #143891@mercime
Participant== How to create a list of members registered with the community, a la BP Support? ==
@yidamweb that’s normal for list of members using the BP Default theme, child theme of BP Default theme or a WP theme with the BP template pack plugin.
== Currently, the image has to be cropped and is not automatically reduced to size. ==
If the image uploaded to be used as avatar is greater than 150px x 150px, then it will be cropped one way or another.
October 24, 2012 at 11:40 am #143893@mercime
Participant@elmindo Working with the framework will be more complicated than usual, but we’ll give it a try.
Post the source codes of the following separately in pastebin.com
– loop-page.php
– functions/theme-layout-functions.php
– sidebar-page.php
– header.php
– index.php
– footer.phpOctober 24, 2012 at 11:25 am #143895@mercime
Participant@chiangmai please post at plugin’s forum at https://buddypress.org/community/groups/bp-album/forum/
October 24, 2012 at 10:09 am #143894In reply to: [Resolved] Make all members active
angslycke
Participant@r-a-y: Thanks for the help with this! I haven’t found a plugin which searches through inactive members and creates an activity for them. One thing to note about the above code is that the user will show up as most recent active user in widgets such as the Members widget and in the Members directory so you might want to change the date to a few days/weeks back to prevent that.
October 24, 2012 at 6:16 am #143885In reply to: new users can’t register
Paul Wong-Gibbs
KeymasterPlease please stop posting this on multiple topics. If you haven’t had a reply yet, it means no-one’s sure what the fix is.
How did you install BuddyPress? What versions of WordPress and BuddyPress are you using? Do you have a bp-custom.php file (if so, what’s in it)?
October 24, 2012 at 5:10 am #143883modemlooper
ModeratorTurn resend.php into a page template and place it in your theme folder. create a page and attach the page template to it
October 24, 2012 at 1:55 am #143881In reply to: User Registration Problems
ript247
Participant@shawn38 you disappeared, so I changed your role about an hour ago. If you are are still willing to help, I can change it back please
October 23, 2012 at 11:35 pm #143876In reply to: Activity Stream Change…
richcoy
ParticipantThanks @modemlooper I’ll check that out.
October 23, 2012 at 8:30 pm #143872In reply to: Members profiles as products to a cart like system
shanebp
ModeratorThere is no existing plugin, afaik.
You’ll need to write some custom code or hire somebody to do that:
https://buddypress.org/community/groups/bp-jobs-board/forum/October 23, 2012 at 8:29 pm #143871shanebp
ModeratorPlease submit a ticket to https://buddypress.trac.wordpress.org/
October 23, 2012 at 7:01 pm #143870jaybird2214
ParticipantI am having the same issue. I switched back to the default theme and the issue is still there so it must be something within the core files. I am looking into the issue now.
October 23, 2012 at 6:50 pm #143869In reply to: [Resolved] Logout error
9087877
Inactive@yangman it may be because I am using the same notepad++ from like 3 years ago and I have failed to update the software.
October 23, 2012 at 6:39 pm #143868evagorasc
Participant@modemlooper thank you for your help.
October 23, 2012 at 6:14 pm #143867modemlooper
ModeratorWhen you are not in a BuddyPress loop you can get BP content by using WP author id as it returns same id.
October 23, 2012 at 6:08 pm #143865In reply to: Continuum Magazine Theme Alignement
@mercime
Participant@dyst4f Based on the HTML structure of your theme, you need to change 16 template files within the 6 BP folders transferred to your continuum theme folder in server during the compatibility process.
October 23, 2012 at 4:58 pm #143862evagorasc
Participant@modemlooper Thank you! That did it.
get_the_author_id() as well as bbp_get_reply_author_id() seem to both work just fine.
get_post_author_id() and $bp->displayed_user->id don’t seem to work for me though.October 23, 2012 at 4:38 pm #143861modemlooper
Moderator`$user_id = $bp->displayed_user->id;
$location = xprofile_get_field_data( ‘Location’, $user_id ) ;
echo ‘Location: ‘ . $location;if that doesnt work try getting the_author_ID(); or get_post_author_id();`
October 23, 2012 at 4:29 pm #143860In reply to: Users are telling me they can’t register…
October 23, 2012 at 4:19 pm #143859evagorasc
ParticipantMade some progress with this, but still need help. I figured that I could simply add something like this underneath the avatar:
Code:$location = xprofile_get_field_data( ‘Location’, 10 ) ;
echo ‘Location: ‘ . $location;However, notice the hard-coded “10” there which is an ID. This needs to be the ID of each user in the replies table and it changes with each table row inside the “loop-single-reply.php” file. I don’t mind changing the template file and keeping a record for it when upgrades come, but how do I know the ID of each user in the bbPress posting loop?
-
AuthorSearch Results