Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 25 replies - 76 through 100 (of 162 total)
  • @grosbouff

    Participant

    @Travel-junkie :

    why is that a problem for you to store all this in a blog ?

    You say you cannot/don’t want to use blogs…

    Cannot : why ?

    Don’t want : because it means you should use the dashboard to post a classified ?

    I’m thinking about a way to be able to post them directly from buddypress.

    The thing is that for me, a classified component SHOULD need a category system, and that is something that’s difficult to code… Using the custom post types would make that very easy.

    Well, tell me what you think of that.

    Thanks !

    @Bowe : maybe that I can release that as it is. But releasing it as a reliable component would mean that I should finish the tags & categories system and debug it… and I’m not sure I want put more time in something that will no more be useful in some weeks, or will need more code to make the upgrades possible.

    Except if you’re ready to edit the categories directly in phpmyadmin….

    @grosbouff

    Participant

    @grosbouff

    Participant

    @Porscheheritage : yes your bp-sitewide-featured-posts-widgets.php should be under

    /var/www/vhosts/porscheheritage.com/httpdocs/wp-content/plugins/bp-sitewide-featured-posts/bp-sitewide-featured-posts-widgets.php and bp-sitewide-featured-posts.php shuold be under /plugins.

    @All : updated to v0.2 (there was a permalink bug)

    @grosbouff

    Participant

    @grosbouff

    Participant

    @grosbouff

    Participant

    Ok, I finally get it by using $wpdb->prepare when my sql query is built and not before (when I build the arguments)…

    Thanks for the help !

    @grosbouff

    Participant

    (I need the quotes around $group, so :)

    $more_sql[‘group’] = $wpdb->prepare(“cm.meta_key = ‘groups’ AND cm.meta_value LIKE ‘%%”$group”%%'”);

    print_r($more_sql[‘group’]);

    returns

    cm.meta_key = ‘groups’ AND cm.meta_value LIKE ‘%”8″%

    as it should (thanks !)

    then

    print_r(“SELECT DISTINCT {$fields_to_get}

    FROM {$bp->classifieds->table_name} c

    INNER JOIN {$bp->classifieds->table_name_classifiedmeta} cm ON cm.classified_id = c.id

    {$query_where}

    {$group_by}

    {$sort_by}

    {$order}

    {$pag_sql}

    “);

    works but not with prepare :

    print_r($wpdb->prepare( “SELECT DISTINCT {$fields_to_get}

    FROM {$bp->classifieds->table_name} c

    INNER JOIN {$bp->classifieds->table_name_classifiedmeta} cm ON cm.classified_id = c.id

    {$query_where}

    {$group_by}

    {$sort_by}

    {$order}

    {$pag_sql}

    “));

    which returns nothing… :( :( :(

    help! :)

    @grosbouff

    Participant

    Dweanus; it’s funny that you ask for that because I just thought about it yesterday and now it’ in the core !

    @grosbouff

    Participant

    Hi JJJ, thanks for your explantions.

    I think this is something you could put it the documentation…

    And for you guys, you can check the plugin I wrote.

    My BuddyPress installation will be only for french people so i don’t need “international names”…

    @grosbouff

    Participant

    Thanks, I hope i’ll release it this week or the week after…

    @grosbouff

    Participant

    I think i’ll release my Classifieds component this week or the next one…

    @grosbouff

    Participant

    @grosbouff

    Participant

    Finally, Widget Logic is great…thanks !

    @grosbouff

    Participant

    I’ve done a plugin for that.

    BuddyPress is fun ;)

    https://buddypress.org/forums/topic/new-plugin-buddypress-real-names

    @grosbouff

    Participant

    Yes only for site admin…

    @grosbouff

    Participant

    Yes but this is one more plugin and I’d like to avoid having too much of them.

    …

    @grosbouff

    Participant

    It syncs first name and last name too.

    @grosbouff

    Participant

    Here’s a piece of code to replace the displayed nickname by name+firstname.

    change $first_name_field_id and $name_field_id to match your fields.

    /**

    NAME + FIRSTNAME | START

    */

    function user_name_firstname($fullname,$user_id=false) {

    global $bp;

    global $site_members_template;

    $first_name_field_id=40;

    $name_field_id=39;

    if ( !$user_id ) $user_id=bp_get_the_site_member_user_id();

    if ( function_exists(‘xprofile_install’) ) {

    $first_name= xprofile_get_field_data($first_name_field_id, $user_id );

    $name = xprofile_get_field_data($name_field_id, $user_id );

    if ($name) {

    $fullname = $name;

    if ($first_name) $fullname.=‘ ‘.$first_name;

    }

    wp_cache_set( ‘bp_user_fullname_’ . $user_id, $fullname, ‘bp’ );

    }

    return apply_filters( ‘user_name_firstname’, $fullname );

    }

    add_filter( ‘bp_get_the_site_member_name’, ‘user_name_firstname’,9);

    /**

    NAME + FIRSTNAME | END

    */

    Now I have to find a way to order the directory member results by Name+Firstname… Any idea ?

    @grosbouff

    Participant

    @DJPaul : Yes, nickname is a better appelation ! Why does this have change ? And why can’t this field be renamed in the admin (Profile Field Setup) ?

    @David : great ! I’ll use it too.

    But this doesn’t help me for what I want to do : display users in the member component following there name, not their nickname.

    …How could I do ?

    1) Can I change the field name in phpMyAdmin or is it a bad idea ?

    2) How can I display Name+Firstname when listing users,instead of Name (Nickname I mean)

    3) How can I order members in the directory following Name then Firstname ?

    @grosbouff

    Participant

    Here’s what I did :

    function my_excerpts($content = false) {

    // If is the home page, an archive, or search results

    //if(is_front_page() || is_archive() || is_search()) :

    $content = strip_shortcodes($content);

    $content = str_replace(‘]]>’, ‘]]>’, $content);

    $content = strip_tags($content);

    $excerpt_length = 20;

    $words = explode(‘ ‘, $content, $excerpt_length + 1);

    if(count($words) > $excerpt_length) :

    array_pop($words);

    array_push($words, ‘…’);

    $content = implode(‘ ‘, $words);

    endif;

    $content = ‘<p>’ . $content . ‘</p>’;

    //endif;

    // Make sure to return the content

    return $content;

    }

    add_filter(‘bp_create_excerpt’, ‘my_excerpts’);

    (it works, but I don’t know how to limit this to the activity only….well, I don’t need it for the moment.)

    @grosbouff

    Participant

    I founded out in the doc :

    add_action( 'wp_footer', 'bp_core_admin_bar', 8 );

    @grosbouff

    Participant

    David, the loop of group works; this template path is ok.

    It’s for showing the single group (home.php) that it does not work…

    @grosbouff

    Participant

    PS : and it works with the default theme too.

    But not with mine…

    Another example : I have a custom index.php template in directories/group.

    I changed almost nothing, but this :

    <?php locate_template( array( 'directories/groups/groups-loop.php' ), true ) ?>

    into

    <?php locate_template( array( '../bp-sn-parent/directories/groups/groups-loop.php' ), true ) ?>

    as I don’t have a custom group-loop.php.

    With this, the groups are shown, but when I click on a single group I have : “The page you were looking for was not found.”

    Don’t know if it can help you understanding the problem.

    @grosbouff

    Participant

    Yes I have…

    @grosbouff

    Participant

    Well, I agree with WordPressfan…

    But i’m still stuck :)

Viewing 25 replies - 76 through 100 (of 162 total)
Skip to toolbar