Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 25 replies - 1 through 25 (of 30 total)

  • martinbeaulne
    Participant

    @martinbeaulne

    I just activated the site tracking component.

    Well well. It works perfectly.

    My previous message was harsh. I’m glad you answered me instead of telling me to go **** myself. 🙂

    I still think all of this “Multsite” thing is pretty arcane…

    Thanks, people.


    martinbeaulne
    Participant

    @martinbeaulne

    Sadly, I never got it to work…


    martinbeaulne
    Participant

    @martinbeaulne

    @ubernaut

    I just didn’t realized I was in “tools” when I set up the network… So the answer is Yes, obviously, I set it up.

    As I said:
    « After installing my /en/ site, network enabled buddypress, set it up »
    –> if I “network activated” buddypress, it automatically means the multisite is set up.

    So, my question is : Anyone knows how to make buddypress multi blog enabled when BP_ENABLE_MULTIBLOG doesn’t change anything ?


    martinbeaulne
    Participant

    @martinbeaulne

    « in tools » ?


    martinbeaulne
    Participant

    @martinbeaulne

    I have done the exact steps I mentionned above. And I hit a wall.

    After installing my /en/ site, network enabled buddypress, set it up.. I realised BP_ENABLE_MULTIBLOG ( set to true, un wp-config.php ) is broken. Or I don’t know how to make it work.

    I just can’t find out how to enable buddypress in multi blogs. I can’t have a /subsite/member/martin/ profile page. It doesn’t exists.

    Anyone knows how to make buddypress multi blog enabled ?


    martinbeaulne
    Participant

    @martinbeaulne

    I just tried @lrv ‘s code and it works like charm.

    Even 9 months later ( uptade-wise ).


    martinbeaulne
    Participant

    @martinbeaulne

    Can someone shed light on a pretty simple question:

    Why people say Buddypress is a multisite plugin when, in fact, it is not.
    It only works on the main site. Not on the subsite.

    What is the point in saying it’s a multisite plugin when it’s not ?

    I spent lots of time moving my existing wp/bp site to root of my domain to make it multisite, then created a subsite, all this to make my site multi-language… Only to find out, later on, that I couldn’t* access my bp profiles, etc. from the subsite…

    Am I missing something ?

    I read this on some other page:
    « Allow BuddyPress to function on multiple blogs of a WPMU installation, not just on one root blog (More details about BP_ENABLE_MULTIBLOG):
    define ( ‘BP_ENABLE_MULTIBLOG’, true ); »

    at: https://codex.buddypress.org/getting-started/customizing/changing-internal-configuration-settings/

    And still, after adding this, the answer to « can I put multiple blogs id in define(‘BP_ROOT_BLOG’, 2); », is still « James: no ».

    .. ?


    martinbeaulne
    Participant

    @martinbeaulne

    @henrywright-1 : two words: multi language. I read your link, and almost all the comments. Someone tells the author about multi language, and the author seems to agree about the utility of multisite for multi language sites.

    And relying on plugins to translate content is not a solution, for many reasons.

    I read more and more about the multisite option, and it seems cool. But I’m not really happy about having to learn all that new stuff right now. It’s a free website I’m creating for fun and to help a community, you know..

    Since I already have the site at http://www.cinemacontact.com/fr/ ( when I started the project, I thought maybe I’d have to make some other versions of the site with other languages, so I put it in /fr/ directory right at the beginning… ), and I am guessing I’ll have to destroy it if I want to go multisite.

    As I read it, it seems like I’ll have to put a main site in the root, then other “sites” in /fr/ and /en/ and such… And I can’t just “move” my current /fr/ site to the root… I think.

    Does this looks logic ? The steps would be:
    1 – Install a fresh wordpress in cinemacontact.com’s root folder, with a new DB.
    2 – Customize the template and plugins exactly like I did for my /fr/ site.
    3 – Create a site, from the network admin, in the /en/ subfolder.
    4 – Copy the users from the DB already populated I used in my /fr/ site to the new root’s DB.
    5 – Test the /en/ site, with data and everything.
    6 – If it works, delete the /fr/ site and re-create it via the root network admin.
    7 – Translate the /en/ site and publish it.

    *Only at step 6 will be a brief interruption of service because I’ll be messing with my actual /fr/ site.

    Does that seem correct ? I don’t want to screw up, because people are actually using the site…

    Thanks a lot for your help..


    martinbeaulne
    Participant

    @martinbeaulne

    I would really prefer not relying on a plugin. And, if possible, not messing with multisite as I think it is overkill for the purpose.

    Again, I might be wrong, and I need more input from you…


    @ubernaut
    : You’re telling me I should organise my first site as the main multisite, create the second site via the network panel of my main multisite, and install wp_multi_network plugin to manage the users… ?
    I really hope there is a faster, easier way.

    If no one shed light on another simpler way, I’ll try this…


    martinbeaulne
    Participant

    @martinbeaulne

    I just tried the solution of removing the alphabetical sorting, and it worked for me too. Now, things seemed to work until I realised a strange thing…

    Instead of showing friend requests, it shows accepted friends with the accept or not buttons…

    I don’t understand. No way of seing the actual requests..


    martinbeaulne
    Participant

    @martinbeaulne

    You set me to the right direction. I got it working. Thanks.


    martinbeaulne
    Participant

    @martinbeaulne

    I tried to find bp_after_profile_avatar_upload_content somewhere in my buddypress files, and can’t find it…


    martinbeaulne
    Participant

    @martinbeaulne

    I guess someone knows if they are enqueued onlu on the change-avatar page ?

    Otherwise, where do I find it out / modify it ?


    martinbeaulne
    Participant

    @martinbeaulne

    Well well. I finally found, and I’m surprised the answer didn’t come from this thread.

    It is quite simple, in fact. Just need to use the function:

    
    xprofile_set_field_data($field, $member-id,  $value);
    

    So, with a simple form sending those three values, one can update a single field anywhere. As I wanted to let members update their fields directly from their member profile ( without using the very bad and obscure edit.php ), I put a form and the function in the member-header.php

    My form and function updates three fields.

    Here is the function, somewhere in the member-header.php file:

    
    <?php
    function updatedemo() {
        $id = $_POST['id-member'];
        $liendemo = $_POST['liendemo'];
        $champdemo = $_POST['champdemo'];
        $titre = $_POST['titre'];
        $champtitre = $_POST['champtitre'];
        $description = $_POST['description'];
        $champdescription = $_POST['champdescription'];
    
        xprofile_set_field_data($champdemo, $id,  $liendemo);
        xprofile_set_field_data($champdescription, $id,  $description);
        xprofile_set_field_data($champtitre, $id,  $titre);
    }
    if(isset($_POST['submit']))
    {
        updatedemo();
        
    }
    ?>
    

    And here is the form:

    
    <?php if ( bp_is_my_profile() ) { ?>
    	<form method="post" action="<?php bp_displayed_user_link(); ?>">
    
    	<?php if ( xprofile_get_field_data('25') == "" ) { ?>
    		<img src="http://www.cinemacontact.com/fr/images/form-demo-01.jpg"><br>
    
    	<?php }; if ( !xprofile_get_field_data('25') == "" ) { ?>
    		<img src="http://www.cinemacontact.com/fr/images/form-demo-01-1.jpg"><br>
    	<?php }; ?>
    
    		<img src="http://www.cinemacontact.com/fr/images/form-demo-02.jpg"><br><input type="text" name="titre" size="40"><br>
    		<img src="http://www.cinemacontact.com/fr/images/form-demo-03.jpg"><br><input type="text" name="liendemo" size="80"><br>
    		<img src="http://www.cinemacontact.com/fr/images/form-demo-04.jpg"><br>
    		<img src="http://www.cinemacontact.com/fr/images/form-demo-05.jpg"><br>
    		<textarea style="width:400px; height:75px;" name="description"></textarea>
    		
    		<input type="hidden" name="champdemo" value="lien-4">
    		<input type="hidden" name="champdescription" value="description-4">
    		<input type="hidden" name="champtitre" value="titre-4">
    		<input type="hidden" name="id-member" value="<?php echo bp_loggedin_user_id(); ?>"><br>
    		<input type="submit" value="Envoyer" name="submit">
    	</form>
    	<?php }; ?></h3>
    

    And this actually works.

    Maybe I didn’t ask correctly at the beginning of the thread. All I wanted to know was:
    « Oh, Martin, there is, indeed, a function to update xprofile fields: xprofile_set_field_data(), don’t need to start with edit.php file. »

    🙂


    martinbeaulne
    Participant

    @martinbeaulne

    So… no one can answer my question ?

    Is there any way to make a custom form in the header.php and use already built wp-bp functions to update the database ?

    Why copying almost exactly edit.php form to somewhere else doesn’t work ?


    martinbeaulne
    Participant

    @martinbeaulne

    What do you mean ?

    As I said, I copied the form action and values from the edit.php. I thought wp would process it the same way…


    martinbeaulne
    Participant

    @martinbeaulne

    No one knows where this string is located ( in which file ? ) ?


    martinbeaulne
    Participant

    @martinbeaulne

    I have the same question as Ben.

    I know we shouldn’t modify core files. I know there are .po and .mo files for translations. But creating an entire .mo file for only one ( 1 ) more translation is overkill ( since poedit doesn’t let you just “add” an entry to an existing .po file ). ( http://stackoverflow.com/questions/7680021/how-to-add-a-new-string-to-a-po-file-w-a-po-editor )

    I have a third-party theme, and I’ve copied the buddypress folder in it. In members/ there is an “activate.php” file where I changed some text.

    But the “Check Your Email To Activate Your Account!” is not in activate.php, nor register.php, nor anywhere else.

    So, the question is simple: where is located the string “Check Your Email To Activate Your Account!” ?

    ( Let me guess something else: there is no translation in the official translation files for this specific string, maybe, because it just isn’t in the registration php files ? )

    I think that’s what Ben wanted too.


    martinbeaulne
    Participant

    @martinbeaulne

    I am always amazed when people find that kind of obscure solutions…

    I would have searched for that answer all my life, I wouldnt’ve found it.

    I read the Famous’ last post, tried it, said to myself: « That will never work, too easy.. », and Boom ! Worked.

    Just changed the “$”, in the script, for “jQuery”, took out the call for the jquery .js file, and now the avatar cropping works like charm.

    Thanks-a-lot.


    martinbeaulne
    Participant

    @martinbeaulne

    http://martinbeaulne.com/kinocontact/bievenue/

    For the moment, there is not 15 choices, but there will be.


    martinbeaulne
    Participant

    @martinbeaulne

    Thanks. I’ll start from there.


    martinbeaulne
    Participant

    @martinbeaulne

    So I guess your answer is « No, there is no simple function to post values in the database ».

    Thanks anyways..


    martinbeaulne
    Participant

    @martinbeaulne

    If i hide the bottom tabs and the admin bar, each user can’t modify their profile.


    martinbeaulne
    Participant

    @martinbeaulne

    By “easy”, I meant “There must be simple functions for posting things to the database; but I don’t know them”. I often see people answering to questions with pages and pages of code from outer space, so I thought my little question would be a very simple one….

    Well.. Let’s make my question “less general”.

    I want to get rid of the bottom tabs of the member profile page. Still, I want the members to be able to edit their profile. I want to style that directly in the member-header.php page.

    I want that kind of thing:

    
    <div><?php 
    if ( bp_is_my_profile() )
      echo "Hi there, since it's your profile, you can edit the value of field number 46";
      echo '<form id="formtochangefield46" name="updatefield46" onSubmit=" " action=" "  method="post" >
      <div>New value</p></div>
      <div><input type="text" id="updatefield46" name="field46" size="20" style="width:150px;"   maxlength="150" value="">
      </div>
      <div><input type="submit" name="submit" value="Submit"></div>
      </form>';
    endif;
    $embed = wp_oembed_get( xprofile_get_field_data('46'), array( ‘width’ => 400 ) );
    echo $embed;
    ?><br></div>
    

    I guess there must already exist wp functions to… call the database and update a field from a form’s submitted values… I mean, how does one creates a custom register page ? It must be the same functions after all…

    I hope my question is more precise… And sorry for my english, I don’t really speak it.


    martinbeaulne
    Participant

    @martinbeaulne

    Still trying to find a shortcode or funtion to echo the Mentions like it appears on the member’s profile tab…

Viewing 25 replies - 1 through 25 (of 30 total)
Skip to toolbar