Giter Site home page Giter Site logo

bp-groupblog's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bp-groupblog's Issues

Activity filter option

Hi Boone,

I've noticed that the activity filtering dropdown doesn't work, but before I change things, I was wondering about the intention of the code.

bp_groupblog_posts() adds an option with a value 'new_groupblog_post', but no activity ever has that type set. Changing the option value to 'new_blog_post' correctly filters the activity list, but seems like a duplicate of the BuddyPress 'Posts' filter on the sitewide activity page - indeed going there having set the option on the group page makes that the default filter option.

So then, is bp_groupblog_set_group_to_post_activity() supposed to replace the activity type with 'new_groupblog_post'? Or should the groupblog option value be 'new_blog_post'?

Cheers,

Christian

Plugin not aware of deleted blogs

When we delete a sub-site via the network admin/network/sites dashboard, the plugin doesn't realize this and the group blog admin tab breaks. We had to delete the "groupblog_blog_id" key for that group_id in the "wp_bp_groups_groupmeta" table manually.

Upgrade nags

I'm getting upgrade nags when using a clone of the 1.8 branch - seems like the WP repo is at 1.8.1, while the GitHub repo is at 1.8. Just saying :-)

Blog subdomain suggestion could exceed maximum allowable for DNS

When creating a blog, users are given an input field where they can specify their blog slug. The suggestion given for this slug (input field value) is generated from the blog title, but if the blog title is very long (> 63 chars), a subdomain name generated from that title will not be a valid subdomain.

jQuery errors using WP 3.5beta1 and buddyPress 1.7

using groupblog with WP 3.5beta1 and buddypress 1.7 leads to the following error showing up.

themes/p2-buddypress/groupblog/_inc/custom.js line 162
Error: TypeError: $ is undefined
[Break On This Error]
....style.height=h+"px";e.valLength=vlen;e.boxWidth=ewidth}return true};this.each(f...

fatal error bp_root_domain()

If I activate the enclosed p2-buddypress theme I get the following error:

 mod_fcgid: stderr: PHP Fatal error:  Call to undefined function bp_root_domain() in /home/shawngaffney/public_html/wp-content/themes/p2-buddypress/header.php on line 44, referer: http://shawngaffney.com/video/wp-content/themes/p2-buddypress/style.css

translation files aren't being loaded from wp-content/languages

As I understand it, best practices for translating plugins involve putting the translations files (.po and .mo files) in wp-content/languages/plugins, since that way, they aren't overwritten every time the plugin is updated. WordPress provides for this by loading WP_LANG_DIR . '/plugins/' . $mofile with the function load_plugin_textdomain(). But bp-groupblog only runs this function if a translations file exists at WP_PLUGIN_DIR . 'bp-groupblog/languages/...', which means that it can't load files in wp-content/languages (this is at https://github.com/boonebgorges/bp-groupblog/blob/master/bp-groupblog.php#L75). A fix for this would be to remove the check for mofiles in plugins/bp-groupblog/languages which would allow WordPress to look in wp-content/languages.

Fix for broken 'enable group blog'

Hi Boone,

I'm working extensively with bp-groupblog over the next month or so, and would like to open a conversation with you about this plugin. The first thing to say is "thank you!"

Anyway, my first offering is this, which fixes the operation of general.js during the group creation process. It needs to declare jQuery as a dependency:

function bp_groupblog_add_js() {
    if ( bp_is_groups_component() && bp_is_action_variable( 'group-blog' ) ) {
        if ( file_exists( STYLESHEETPATH . '/groupblog/js/general.js' ) )
            wp_enqueue_script( 'bp-groupblog-js', get_stylesheet_directory_uri() . '/groupblog/js/general.js', array('jquery') );
        else
            wp_enqueue_script( 'bp-groupblog-js', WP_PLUGIN_URL . '/bp-groupblog/groupblog/js/general.js', array('jquery') );
    }
}

Also, when I set WP_DEBUG to true, I get errors creating the group blog because, on line 972 and 1003 of 'bp-groupblog.php', user properties are incorrectly referenced:

$groupblog_blog_id = wpmu_create_blog( $domain, $path, $blog_title, $current_user->id, $meta, $wpdb->siteid );

should be:

$groupblog_blog_id = wpmu_create_blog( $domain, $path, $blog_title, $current_user->ID, $meta, $wpdb->siteid );

I'll fork the project and submit pull requests in future, as this issue queue is a bit cumbersome.

Thanks again!

Christian

Warning on php line 18

This appears in the group..
Warning: include(): Filename cannot be empty in /home/forcannabis/public_html/wp-content/plugins/bp-groupblog/groupblog/inc/activity.php on line 18

Warning: include(): Failed opening '' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/forcannabis/public_html/wp-content/plugins/bp-groupblog/groupblog/inc/activity.php on line 18
screenshot-forcannabis us 2016-12-11 09-53-32

Duplicate IDs

@boonebgorges This is a bit of an odd one... so I'm asking your advice before submitting a PR.

The basic issue is that BP Groupblog produces two nav items with identical IDs by default:

  • A link with ID #group-blog in the Group Nav Menu
  • A link with ID #group-blog in the Group Admin Menu

Both of these are wrapped by <li> elements with identical IDs too, i.e. #group-blog-groups-li.

The effect of this is that on a default CBOX install, the Group Admin Menu item is styled by the same CSS intended for the Group Nav Menu item, resulting in an IconSweets icon being inserted before the link and throwing the Group Admin Menu out.

Given that the Group Admin Menu item's values are auto-generated by BuddyPress, it looks like the easiest nav item to amend would be the one in the Group Nav Menu. Most other links in that menu are prefixed by nav-, which seems reasonable. However, doing this will break the CSS applied to it by the CBOX theme - and probably by other themes too.

So, which route to choose? Long term, I favour changing the Group Nav Menu item. Do you have any thoughts on this?

Creating default object from empty value

php 5.4 now seems to have more strict standards. So I get this persistent error message in my error log:

[Mon Dec 10 10:47:47 2012] [error] [client 159.28.7.70] PHP Warning: Creating default object from empty value in
/usr/home/markp/www/esp/wp-content/plugins/bp-groupblog/bp-groupblog.php on line 83,

83 $bp->groupblog->image_base = WP_PLUGIN_DIR . '/bp-groupblog/groupblog/images';

PHP Fatal error when deleting post from Buddypress Group Blogs

I'm using Commons in a Box to manage the site where the error is happening.

From the apache error log: stderr: PHP Fatal error: Call to undefined function bp_blogs_delete_activity() in /srv/www/wordpress/wp-content/plugins/bp-groupblog/bp-groupblog.php on line 1137

link to bp-groupblog.php:1137 it appears that this function isn't being loaded from bp-blogs-activity.php in /bp-blogs/ (I'm not completely sure, just looking at this PHP cross reference...)

Disabling the bp-groupblog eliminates this issue.

Cross post from wordpress.org

group blog creation not recognizing settings

When I visit the page:
wp-admin/admin.php?page=bp_groupblog_management_page

I go to the validation tab and check the boxes for underscores, dashes, numbers and change the minimum number to 3

I then go in and create a new group and add a blog to the group.

During the process of adding a blog to the group, where you either select an existing blog or create a new blog, it is there that the problem arises.

I try to create a blog name code-ninjas It says only letters
I try to create a blog name code_ninjas it says only letters
I try to create a blog name codeninjas it says letters are needed and at least 3

Bottom line:
I cannot create a blog for the group in this area. I can only choose from an existing blog.

I probably tried every combination that I could think of, from having blog names with only letters, letters and numbers, letters numbers underscores, letters numbers dashes, and then letters from 3 to as many as 20 characters, but nothing works.

I am running WP 3.5alpha, with nightly buddyPress/bbPress and latest groupblog from a few months ago (last updated vs.)

btw
The install directions do not mention having to go into the network admin to activate group blogs. I tried going to the regular plugins page to activate the groupblogs plugin, but it does not show up there. It was only a matter of my saying screw-it and trying the network activate before I made it that far. Might want to update the install docs.

Redirect Group Home to Blog Home

Enhancement: when you set the Redirect to go from the Group Home to the Blog home page, you lose any ability to edit any of the other Admin items for the Group (avatar, description, etc).

The existing code in the Quick Admin functionality of Paul Gibbs BP-Labs https://github.com/paulgibbs/BP-Labs is a quick fix for this issue, adding an admin button to the Group Directory, accessible before you click on the Group icon and get redirected, but it might be helpful to build something directly into the plugin for administrators who enable this redirect, and then find they are "locked out" of the admin panel of their group.

If the global current_group isn't set, groupblog_screen_blog() should 404

For hidden groups, BP unsets $bp->groups->current_group in bp_groups_group_access_protection():

        // Hidden groups should return a 404 for non-members.   
        // Unset the current group so that you're not redirected
        // to the default group tab.                            
        if ( 'hidden' == $current_group->status ) {             
                buddypress()->groups->current_group = 0;        
                buddypress()->is_single_item        = false;    
                bp_do_404();                                    
                return;                                         
        } else {                                                
                bp_core_no_access( $no_access_args );           
        }                                                       

Then, when groupblog_screen_blog() runs, it can't look up the current group's blog ID or that blog's options, so there's no URL to redirect to. Instead it falls back to rendering the groups/single/plugins template. In our install we set the option redirectblog to 1 which I think should mean we never render a template on group blog screens, but instead either redirect to the blog or 404.

This only affects users who can't access the group.

I am about to submit a PR which changes the fallback so that a template is only loaded if there is a current group set. Without this patch, bp_core_load_template() breaks the bp_do_404() redirect and responds 200 OK instead.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.