Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

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

  • nit3watch
    Participant

    @nit3watch

    `
    the thing you want to hide
    `


    nit3watch
    Participant

    @nit3watch

    yip its Plesk. Thanks hnla


    nit3watch
    Participant

    @nit3watch

    I put this together some time ago though should still work. change gcode and dress code to what you would like. Save it as what ever you would like, with a php extension and place it in your plugins. Active and gl :P I also greated some group map plugin some time ago thats floating around on the forums.. you would have to search or wait for gpress.

    `<?php
    /*
    Plugin Name: BuddyPress Group Dress Code
    Plugin URI:
    Description: This plugin adds an additional field to group creation for a dress code
    Version: 1.0
    Revision Date: June 25, 2010
    License: GNU General Public License 2.0 (GPL) http://www.gnu.org/licenses/gpl.html
    Author: Charl Kruger
    Author URI:
    */

    /* Show group dresscode number in group header */
    $gdcode_show_dresscode_in_header = true ;

    /* – HERE BEGINS THE CODE – */

    // create the form to add the field
    function gdcode_add_dresscode_form() {
    ?>

    <input type="text" name="group-dresscode" id="group-dresscode" value="” />

    <?php

    }
    add_action( ‘groups_custom_group_fields_editable’, ‘gdcode_add_dresscode_form’ );

    // Save the dresscode number in the group meta – perhaps use serialize() and maybe_unserialize()
    function gdcode_save_dresscode( $group_id ) {
    global $bp;

    if($bp->groups->new_group_id)
    $id = $bp->groups->new_group_id;
    else
    $id = $group_id;

    if ( $_POST )
    groups_update_groupmeta( $id, ‘gdcode_group_dresscode’, $_POST );
    }

    // Get or return the dresscode number
    function gdcode_group_dresscode() {
    echo gdcode_get_group_dresscode();
    }
    function gdcode_get_group_dresscode( $group = false ) {
    global $groups_template;
    if ( !$group )
    $group =& $groups_template->group;
    $group_dresscode = groups_get_groupmeta( $group->id, ‘gdcode_group_dresscode’ );
    $group_dresscode = stripcslashes( $group_dresscode );
    return apply_filters( ‘gdcode_get_group_dresscode’, $group_dresscode );
    }

    // show dresscode number in group header
    function gdcode_show_dresscode_in_header( $description ) {
    global $gdcode_show_dresscode_in_header;
    if ( gdcode_get_group_dresscode() && $gdcode_show_dresscode_in_header ) {
    $description .= ‘

    ‘. __(‘Dress code’, ‘gdcode’).’: 

    ‘.gdcode_make_dresscode_for_group().”;
    }
    return $description;
    }
    add_filter( ‘bp_get_group_description’, ‘gdcode_show_dresscode_in_header’ );

    // show number for an individual group
    function gdcode_make_dresscode_for_group() {
    global $bp, $wpdb, $gdcode_args;

    $group_dresscode = gdcode_get_group_dresscode();
    $group_dresscode = ‘

    ‘.$group_dresscode.’

    ‘;

    return $group_dresscode;
    }

    add_action( ‘groups_create_group_step_save_group-details’, ‘gdcode_save_dresscode’ );
    add_action( ‘groups_details_updated’, ‘gdcode_save_dresscode’ );
    ?>`


    nit3watch
    Participant

    @nit3watch

    Thanks hnla Ill give it a go.

    The theme im working on is from bp 1.2.8


    nit3watch
    Participant

    @nit3watch

    @hnla basically I want the ability to replace the buddypress main nav with wordpress menus: via Appearance > Menus.

    Being able to have a custom menu like:
    Home
    Community
    -Activity
    -Members
    Groups

    What would be the best way to implement this?


    nit3watch
    Participant

    @nit3watch

    You can thank Boone for the answer below. Replace scope=groups with what ever filter you’d like to apply.

    Changing the tabs is an appearance issue; it doesn’t have any effect on the activity items shown.

    Try the following function in your functions.php or bp-custom.php. The logic is this: If the query string is empty (as it is when you first visit the activity page) and there is nothing in the POST variable that says which scope to show (that is, the user has not clicked ‘All Activity’ and thus set an AJAX request into effect), then show only my group content.

    `function bbg_my_groups_activity_default( $qs ) {
    if ( empty( $qs ) && empty( $_POST ) ) {
    $qs = ‘scope=groups’;
    }

    return $qs;
    }
    add_filter( ‘bp_ajax_querystring’, ‘bbg_my_groups_activity_default’, 999 );`


    nit3watch
    Participant

    @nit3watch

    use back ticks `
    or use Pastbin


    nit3watch
    Participant

    @nit3watch

    maybe past the widget code so we could have a look.


    nit3watch
    Participant

    @nit3watch

    Good to see a fellow south african :D


    nit3watch
    Participant

    @nit3watch

    one thing I over-looked is limiting the line height, Im going to look into this tomorrow though if anyone knows of a solution please don’t be shy :P

    Also is there a filter specific to group updates only, thus excluding ‘joined group’ and ‘created group’?


    nit3watch
    Participant

    @nit3watch

    I will update the theme during next week, got a lot of work I have to get through before I can focus on the theme.. You can have a look at the theme trac and take note of what tammie has said if you are going to use it now


    nit3watch
    Participant

    @nit3watch

    working nicely, just need to filter out ‘joined the group.. and created group.. and remove ‘view’ and delete’.

    Once im done using it for what i need ill turn it into a widget for the community :D

    `function bp_limit_group_activity_content() {

    $group_activity_length = 100; //character limit

    $group_excerpt = substr(bp_get_activity_content_body(), 0, $group_activity_length); //truncate excerpt according to lenngth
    if(strlen($group_excerpt) < strlen(bp_get_activity_content_body())) {
    $group_excerpt = $group_excerpt.’..’ ;
    }

    echo “

    “.$group_excerpt.”

    “; //finally display excerpt
    }`

    and then calling it by
    `

      <li class="” id=”activity-“>

      <a href="”>

    `


    nit3watch
    Participant

    @nit3watch

    Found a solution, just cleaning up the function and adding ‘read more’ and so on, will post it when im done.


    nit3watch
    Participant

    @nit3watch

    well this is what I came up with, though it doesn’t work. Help would greatly be appreciated.
    `function bp_limit_group_activity_content() {

    $g_activity_desc = bp_activity_content_body();

    $limit_desc = substr($g_activity_desc,0,10);

    return $limit_desc;
    }
    `


    nit3watch
    Participant

    @nit3watch

    on a good note, it seems Tammie ( from wpmu dev ) is reviewing the theme now and she has pointed out valid things. I’m guessing @karmatosed = Tammie because of her avatar in the images posted.


    nit3watch
    Participant

    @nit3watch

    Added a version which is stable and all errors sorted out. Only thing left to do; is work on the styling of the main nav bar as anything other that of ‘home’ selected doesn’t reflect the selected colour..

    The guy reviewing my theme has pointed out that there should be a option to disable/enable the admin bar. Iv’e documented this in the readme.txt so Im not going to bother with it and he also pointed out that having a crap load of menus will kinda break the theme – if you want to use that many menus, good luck! link to the menu

    I specifically included the custom menu/drop down menus as to reduce ‘cluttered menus’.


    nit3watch
    Participant

    @nit3watch

    @hnla lol dude sorry im a fool. ‘*space*odd’

    Working great >.<


    nit3watch
    Participant

    @nit3watch

    hnla im not sure what you are talking about here: first you need the space as mentioned bit earlier ‘ odd’ ‘ even’

    All I have done is whats in the pastbin file, except I changed the css as mentioned. Is ther anything else I am meant to add? could you not past the example that worked for you?

    Sorry Im sounding stupid but cant get where its going wrong


    nit3watch
    Participant

    @nit3watch

    @hnla ok these are the only edits I have made, though I see you said via jQuery though I haven’t implemented andys one – was I supposed to and if yes, how?

    Still not printing out odd or even.

    the forums not liking something in my code so its on past bin


    nit3watch
    Participant

    @nit3watch

    @hnla, may contain inaccuracies despite being on line 19 as apposed 20, your example was very explanatory though its not working?

    I implemented the above though when I check the activity entries, it isn’t printing them out as even/odd. There has been a change to entry.php which is most likely the culprit?


    nit3watch
    Participant

    @nit3watch

    Turn on debugging, as I spotted a few deprecated functions pop up in warnings.
    Ye rushing doesn’t help, all good n green now :P

    Thanks hnla, I saw you posted something similar concerning forum topics.. and ye the link was dead.

    Anyway ill give it a go in the morning, and im linking back to blogs and forum topics on how the functionality has been implemented.


    nit3watch
    Participant

    @nit3watch

    lol need to upload a new version again.. ganna rather wait a day or two and sort out things poperly


    nit3watch
    Participant

    @nit3watch

    @naijaping links at the top of the first post


    nit3watch
    Participant

    @nit3watch

    when using `div.activity ul.item-list li:nth-child(odd) { background: #F2EFE5; }`
    it works in ff, gc but not in ie. any one found a solution for this?


    nit3watch
    Participant

    @nit3watch

    I just uploaded a new version, still in beta but making a few improvements. Note that if you have any questions, read the readme.txt first.

    @hnla Im still searching regarding Faux columns, though if you could maybe have a look at the theme in the mean time I could reach a solution sooner.

    Thanks and cheers

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