Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'questions'

Viewing 25 results - 2,326 through 2,350 (of 2,990 total)
  • Author
    Search Results
  • #71535
    jivany
    Participant

    I took another look at this and I think I have a potential solution.

    You can filter xprofile_get_field_data and make sure that the return value is not a blank or some other non value. The downside of this method is I think you would need to then set the returned string to a known value that indicates it is not populated. The only reason I say this is ideally, you probably want to make bp_custom_get_member_list_xprofile_data return FALSE if the string is blank but I don’t think you can do this within the filter.

    As for your second issue, a really hallf-assed way to do it is with two loops. I’m sure there’s a more elegant way but I’ve never written elegant code. ;)

    That said, I don’t see a way to dump out two groups in one loop but I’m not very familiar with this code.

    5947865
    Inactive

    http://wpquestions.com/ maybe create something like this? =)

    #71507
    jivany
    Participant

    Yes, but your custom_xprofile call just does an “echo”. echo will always return something. Something might be a string or it might be a blank but it will always return something. You can’t test a function return value if you aren’t returning a value. Inside custom_xprofile, you need a “return TRUE” or something like that to be able ot use it in a boolean logic check that the if does.

    #71428
    Gianfranco
    Participant

    It’s really just tjis that I need for problem #1:

    <?php if (custom_xprofile('About me') ) : ?>

    <h3>About me:</h3>

    <?php custom_xprofile('About me'); ?>

    <?php endif; ?>

    If the About me field is filled, it should display

    <h3>About me:</h3>

    if it is not filled in, it shouldn’t display the h3 heading.

    And with the above snippet, it always displays it. It’s the conditional statement that I cannot get right.

    #71422
    jivany
    Participant

    I think you need to look at what @DJPaul said. If your function always returns true then you’re always going to output something, even if that something is blank.

    function custom_xprofile( $field ) {
    echo bp_custom_get_member_list_xprofile_data( $field );
    }

    That echo will always return something. You need to dig into bp_custom_get_member_list_xprofile_data and see if there’s a way to determine if $field exists.

    #71411
    Gianfranco
    Participant

    And another thing I am trying know (Question #2) is if it is possible to use a conditional statement to check if more than 1 group has fileds that has been filled in and return something accordingly:

    <?php if ( bp_has_profile('profile_group_id=9') || bp_has_profile('profile_group_id=7') ) : ?>
    <?php while ( bp_profile_groups() ) : bp_the_profile_group(); if ( bp_profile_group_has_fields() ): //groups loop ?>

    <div id="widget1">

    (stuff from group 9)

    (stuff from group 7)

    </div>

    <?php endif; endwhile; ?>
    <?php endif; ?>

    After experimenting, I couldn’t make it work.

    I need that because in my design I’d like to output a “Personal stuff” widget that has a graphic title and background, and it should display only if some fields from groups 9 and 7 are filles in, otherwise it should’t.

    Is that achievable?

    That is a guru question, isn’t it?

    #71409
    Gianfranco
    Participant

    Thanks jivany. I corrected that.

    However, that is not the source of the porblem.

    I am trying to achieve different things.

    One is to say, if that field is not filled in, don’t output this block.

    Something like:

    <?php if (custom_xprofile('About me') ) : ?>

    <h3>About me:</h3>

    <?php custom_xprofile('About me'); ?>

    <?php endif; ?>

    But as simple as it is, sometimes I am lost on PHP basics.

    #71408
    Paul Wong-Gibbs
    Keymaster

    Nah, you can leave semi-colons off the end of lines when it’s used like that. Good spot though. It’s because your function just retrieves the value from the database, and if it’s blank, then it’s blank. Problem is, you are printing the <h3> regardless.

    #71382
    jivany
    Participant

    You’re missing a semi-colon after the custom_xprofile call. That will likely bugger up PHP and might be the source of your issue.

    #10292
    Gianfranco
    Participant

    Question #1:

    I am using the following technique to get single profile values for members pages.

    This in “bp-custom.php”:

    // Get single value from profile fields

    function custom_xprofile( $field ) {

    echo bp_custom_get_member_list_xprofile_data( $field );

    }

    function bp_custom_get_member_list_xprofile_data( $field ) {

    global $site_members_template;

    return xprofile_get_field_data( $field, $site_members_template->member->id );

    }

    And this is the snippet for an “About me” widget:

    <?php if ( bp_has_profile('profile_group_id=7') ) : ?>

    <h3>About me:</h3>

    <?php custom_xprofile('About me') ?>

    <?php endif; ?>

    I get the value right, but the problem is that on members profile that DIDN’T fill in the “About me” field, the heading (h3) “About me” still shows. Not the value, just the heading.

    Is there something wrong in my conditional statement?

    Here’s my structure for the sidebar (I want some widgets on all pages and profile fields widgets on members pages):

    <?php if (!bp_is_member()): //if not profile ?>

    // widgets

    <?php else: ?>

    <?php if ( bp_has_profile('profile_group_id=7') ) : ?>

    <h3>About me:</h3>

    <?php custom_xprofile('About me') ?>

    <?php endif; ?>

    // other widgets

    <?php endif; ?>

    #71149

    In reply to: Create a Site Forum

    Craig Sunney
    Participant

    Good questions.

    Uploaded to /forums/ [yes]

    Add line to wp-config

    #71113
    r-a-y
    Keymaster

    Try this:

    https://buddypress.org/forums/topic/which-file-do-i-need-to-edit-registration-questions#post-45514

    Or you can use an invite plugin – the invite code would be the answer and you manually need to add the question yourself.

    #10244
    jwack
    Participant

    I posted this same questions over at WP site but I know alot of people hang here now. Anyway, I was wondering if anyone has a list of tested themes that they use? I am looking to include about 20 wordpress themes with MU. Themes with a custom header function would be a bonus.

    I found a list here http://wprocks.com/wordpress-tips/list-of-themes-that-support-custom-image-header/ but they all seem kind of old.

    #70868
    eborg9
    Member

    You know maybe the problem is us lowly users. If we didn’t depend on plug in developers so much to keep their projects functioning then it wouldn’t be an issue.

    I never saw this as an issue with Single user WP plug ins so this is all new to me.

    What I don’t understand is, I always assumed that plug in developers had other services that were paid services and creating plug ins was a way to not only contribute to the platform, but to show their expertise and make their names known in the community.

    If a plug in goes unfixed and crashes a users or a company’s website, and support for it goes unanswered..how does that help you as a professional ?

    And when you do release a premium paid plug in in the future, why would I take a chance that you won’t go missing in action again when it comes to support?

    And why would I contribute to a plugin that doesn’t work and hasn’t been updated or answered support questions since late 2009?

    Unfortunately some of what could have been/would have been some of the most used plug ins are on that list with no sign of the original developer updating them.

    So now, instead of contributing to that developer for their hard work, I have to hire someone else to make it function correctly or build me a new one.

    That really sucks.

    I’m with Magganpice. I’d be more than happy to make a contribution to Buddypress Registration Options and Ahjira Recent Sitewide Articles, if they would just update them so they actually work.

    #10230

    I have a limited amount of wordpress experience. I have an existing blog running on the latest version of wordpress, and would like to add BP as a section of that blog. I have a couple questions:

    1) Can I just use the Buddy Press plug-in with my exising wordpress blog, and make the BP features (social network, forum, etc.) available as a section of my existing blog?

    2) Assuming #1 is not possible, can I – create a subdirectory in my existing blog (the blog is installed in the root directory), install a new (additional) install of wordpress in that subdirectory, with a seperate MySql database from the main one, and run BP on that wordpress install. So, BP would be running in a subdirectory, on a completely seperate wordpress install and database.

    Is there any reason this won’t work? And, is there any reason that I might not want to do this?

    Thanks,

    Steve

    #70812

    In reply to: Newbie questions

    jivany
    Participant

    1. Does BuddyPress need WORDPRESS MU or can it be created in a WORDPRESS ordinary blog – in addition do I have to find a hosting platform to host it – or can I just use the standard WORDPRESS blooging platform ?

    BuddyPress can run on either WordPress or WordPress MU. If you want your users to be able to create their own blogs, you need to run MU. If you don’t want your users to create their own blogs, you can use regular WordPress.

    2. The BuddyPress example looks quite complex (from the point of view of people viewing a site which uses it) eg you would normally describe a theme for a website on a first page then have categories eg if I did a music site – I would say have counties in the UK or towns say Cambridge, Hertford, …. and then have sub categories for ttypes of music eg choral, orchestral,folk….. – is all this sort of thing achievable with BUDDYPRESS ?

    Buddypress is just a plugin for WordPress that adds the social media applications (status updates, forums, groups, etc) . Anything you can do with WordPress you can do when you have Buddypress installed. You can still have a regular blog-like website with the Buddypress social media additions.

    3. I am a programmer and have used databases (SQLITENING/SQLITE) using development tools such as POWERBASIC – with Buddypress both on the client and server ends – is it possible to program in database links to connect with apps written in POWERBASIC which connect to SQLITENING/SQLITE databases (as dotnetnuk seems to do for proprietory Microsoft SQL databases) ?

    I’m not sure I understand this question. Buddypress is just a plugin for WordPress. There is no (typical) client/server model. Your webserver runs WordPress that runs Buddypress. The client is the users web browser. That said, you can program anything you want in any language and create the required interfaces to interact with WordPress, it’s database, or anything else. This isn’t going to be trivial though.

    4. Can you recommend a good (cheap) development platform for BUDDYPRESS/WORDPRESS ?

    Download XAMPP or MAMP and install it on your local PC. These will allow you to install WordPress on your local machine for development, testing, etc.

    #10216

    Topic: Newbie questions

    in group forum Installing BuddyPress
    John Lever
    Member

    Dear All,

    I am considering using BUDDYPRESS – but have the following extremely simple questions that confuse me at present :

    1. Does BuddyPress need WORDPRESS MU or can it be created in a WORDPRESS ordinary blog – in addition do I have to find a hosting platform to host it – or can I just use the standard WORDPRESS blooging platform ?

    2. The BuddyPress example looks quite complex (from the point of view of people viewing a site which uses it) eg you would normally describe a theme for a website on a first page then have categories eg if I did a music site – I would say have counties in the UK or towns say Cambridge, Hertford, …. and then have sub categories for ttypes of music eg choral, orchestral,folk….. – is all this sort of thing achievable with BUDDYPRESS ?

    3. I am a programmer and have used databases (SQLITENING/SQLITE) using development tools such as POWERBASIC – with Buddypress both on the client and server ends – is it possible to program in database links to connect with apps written in POWERBASIC which connect to SQLITENING/SQLITE databases (as dotnetnuk seems to do for proprietory Microsoft SQL databases) ?

    4. Can you recommend a good (cheap) development platform for BUDDYPRESS/WORDPRESS ?

    Best Regards,

    John Lever

    #70746
    eborg9
    Member

    Having the same issue. i really want this plug in to work, are you still answering questions or helping with this ?

    #70700
    birdy47
    Participant

    @Ray

    I swore it was a file I had edited but I guess not. I did what you said and had it fixed in seconds. Perfect. Thanks so much! :)

    – Birdy

    #70699
    mrjarbenne
    Participant

    Thanks r-a-y, this potentially answers my https://buddypress.org/forums/topic/creating-tos-hurdles forum post. Need to investigate further.

    #70698
    r-a-y
    Keymaster

    @birdy43

    Try logging into the WP backend. Navigate to “BuddyPress > General Settings”.

    Under “Full Name Field Name”, change this from the default “Name” to whatever you want.

    @mrjarbenne

    You need to create a custom function for outputting your questions and another one to validate your questions.

    function my_custom_questions() {
    // your questions would go here - would be an input field of some kind

    // eg.
    echo '<label for="my_question">Please enter something for this new field</label>';
    echo '<input type="text" name="my_question" id="my_question" value="" />';
    }
    add_action('bp_before_registration_submit_buttons', 'my_custom_questions');

    function my_custom_validation() {
    // here you'd check the submitted input fields, you'd probably do a check to see if the question is blank, if not return an error message

    // would be something like this:

    global $bp;

    // checking if an input field of "my_question" is blank
    if ( $_POST['my_question'] == "" ) {
    $bp->signup->errors['my_question'] = 'You must type in something for the field "my_question".';
    }
    }
    add_action('bp_signup_validate', 'my_custom_validation');

    #70696
    mrjarbenne
    Participant

    Can you break this down a touch further for the new guy. Do hooks get added to the function.php file in your theme?

    #70695
    birdy47
    Participant

    Ok, a few months ago I manually edited a file and simply changed the text “Real Name” to “Verify User Name”. All I want to do now is change it back to what it was originally. I won’t be editing code…just a simple text name but I need to know what path/file I have to edit in order to do this.

    Thanks again, Birdy

    #70687
    r-a-y
    Keymaster

    You shouldn’t be editing core files.

    BP has a ton of hooks you can use to get your custom questions on the registration page.

    You could just hook into the following actions and then your custom questions will appear:

    add_action('bp_before_registration_submit_buttons', 'YOUR CUSTOM QUESTIONS');
    add_action('bp_signup_validate', 'YOUR VALIDATION ROUTINE');

Viewing 25 results - 2,326 through 2,350 (of 2,990 total)
Skip to toolbar