Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 11,801 through 11,825 (of 32,521 total)
  • Author
    Search Results
  • #146888
    Robin W
    Moderator

    ok, so if it’s a memory thing then it’s filtering ok when you just have forums set up, as it filters to the displayed forum first, so has less of a list.

    The Topics.php is only used by two areas as far as I can remember. The first is if you simply do

    http://www.mysite.com/topics

    which lists all forum topics. I created the function to specifically sort out peoples ability to enter that url and get all topics listed, and so bypass whether they could see a forum.

    The second is the one you have discovered (and I didn’t realise was used there) and seems to be generating a memory issue.

    You could confirm this by typing your url with /topics after and it should fall over there as well.

    If this is the issue, then I’ll look closer at whether I can improve the code, or maybe Stephen has a solution !

    #146883
    lagrou
    Participant

    Merged your pull request…

    Reply to Replies, I had a look and they are stored in symposium_topics like other replies, so we should have them with little effort. In case you’d like to give it a try on WPS side, and be able to test their import, they are activated using roles, “Forum comment roles” under “Forum” tab.

    I’ll be happy to contribute to the bbPress Codex as well, with issues etc. Browsing other converters’ Codex, I do see where there will be issues with WP Symposium, [youtube], custom smilies {{cloud}}, etc.

    EDIT: oops fixed a copy/paste error in my prose…

    #146881
    Tom Dyer
    Participant

    ok – some more digging has brought this to the surface:

    Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 72 bytes) in /Users/tom/Sites/frenchentree/htdocs/wp-includes/wp-db.php on line 1828

    Which appears at the time $wpdb->get_col() is called. Could it be that we have too many forum topics? 🙁

    *edit* Currently we have 71,009 posts. Of which 70,728 are published.

    #146878

    In reply to: Newby a little lost

    Robin W
    Moderator

    yes, you should be able to just have the index.

    Check out

    Step by step guide to setting up a bbPress forum – Part 1

    and if that doesn’t directly help, come back with how you are set up – ie what does menu take you to, what is in that link/post/page/category etc.

    #146875
    Tom Dyer
    Participant

    Nope, I’ve not touched the Twenty fourteen theme since I added it. It’s been updated whenever required anyway though (I don’t like the seeing the update icon in the admin, so I tend to always keep things on the latest version whether I’m using it or not).

    This is a multisite install of WordPress though – Would that affect the $wpdb->get_col() visibility?

    #146873
    Tom Dyer
    Participant

    It’s the same – it seems that $wpdb->get_col() is still AWOL…

    #146868
    Tom Dyer
    Participant

    – that’s if I’m checking it correctly. I tried this:

    var_dump( property_exists( $wpdb, 'get_col' ) ); Which returned bool(false)

    Am I doing it right? I don’t understand how the object could be there, but the method not 🙁

    #146867
    Tom Dyer
    Participant

    Having poked around in the code myself, it appears to be falling over in inc/topics.php line 12.

    $post_ids=$wpdb->get_col("select ID from $wpdb->posts where post_type = 'topic'") ;

    I’ve checked and the $wpdb object is available, but it seems that the method get_col() is not… does anybody know why that might be? Or is there another method I could use to replace get_col() ?

    #146866
    Stephen Edgar
    Keymaster

    I have a huge affinity for the Roots theme, it is awesome, but it can catch you out, I just gave the latest v1.6 a run, using Twenty Fourteen as the theme everything works as expected as ‘keymaster’, moving a reply from one topic to another works as expected.

    The only errors I see are in the function pg_get_author_link (These are not related directly to @trymedo’s the issue though)

    Notice Undefined variable: args 1 wp-content/plugins/bbp-private-groups/includes/functions.php:245
    Notice Undefined variable: post_id 1 wp-content/plugins/bbp-private-groups/includes/functions.php:246

    #146864
    Tom Dyer
    Participant

    @robin-w Currently, the only error I’m seeing is this (which I can’t find a reference to within the bbp-private-groups plugin code):

    [23-May-2014 11:02:07 UTC] PHP Warning: call_user_func_array() expects parameter 1 to be a valid callback, function ‘blockusers_init’ not found or invalid function name in /Users/tom/Sites/frenchentree/htdocs/wp-includes/plugin.php on line 470

    #146858
    Stephen Edgar
    Keymaster

    Just to be clear on two things, first this is awesome the plugins you are writing and supporting Robin 🙂

    Second https://codex.wordpress.org/Forum_Welcome#The_Bad_Stuff

    * Forum members should not post their email addresses, ask others to post their email or solicit contacting people off of the forums.
    * Plugin and theme authors may post their contact URL or even their email address in their own support sub-forum, but that should be a last resort thing.
    * Forum members, including plugin and theme authors, should never ask for admin or FTP access to a server, MySQL, or WordPress installation.

    Thus far in this thread, nothing is ‘out of order’, these rules are designed to protect both user and supporter, if something does go horribly wrong and the ‘supporter’ breaks things really badly or the ‘user’ has a change of heart and accuses the ‘supporter’ of breaking their site things get ugly very quickly and neither party will be very happy.

    These rules are designed to safeguard all parties and the vast majority of time things can be explained using just the forums, just take your time and explain it clearly so the other party can reproduce the issue, step by step with the resulting outcome and what you’d expect the outcome to be.

    Edit: So carry on doing what your doing, I just thought I should point this out and probably should add this to our ‘create new topic form’ as a reminder…

    #146853
    demonboy
    Participant

    Mildly baffled by this. I’m trying to remove the pagination at the top of the forum topic page but leave it at the bottom (see here for an example). I can remove both by commenting out the code in pagination-topics.php, or I can remove both with display:none, but how do I remove the top one and not the bottom one? They share exactly the same properties.

    Thanks,

    Jamie

    #146852
    Stephen Edgar
    Keymaster

    I considered that the content could at least be imported, then the admin would do whatever he wants to with that content. But maybe the groups ownership and membership will be impossible to mimick at bbPress level solely, so it’s better to avoid importing rather than making public content that was private to begin with…?

    – Groups forums (either drop topics, leave them as parentless, or create hidden forums as per the group name)

    I don’t think leaving them parentless is the best way to go, maybe creating a hidden forum might be the way to go. Let’s leave this out for now, we can revisit this in the future easily enough and get v1 out and revisit this for v2.

    I’m adding a Users section to your own version of the converter module (based on other converters available). If we want to import user-related settings, like forums/topics subscriptions and favorites, is this possible ? WPS uses usermeta, and I would assume bbPress does so…?

    – user meta (forum subscriptions, favorites)

    Yes, mainly, I haven’t looked at importing subscriptions or favorites yet in any of the importers, will get there one day.

    What you have added looks fine via your latest commit here.

    WordPress database error: [Table ‘xxx.wp_bp_groups_groupmeta’ doesn’t exist]

    You only get this error if you don’t have BuddyPress installed and activated, I need to add some inline docs for this and help docs.

    How do you access a parentless topic in bbPress ? Could these be used for WP Symposium groups forum topics ?

    You will see them in the topic list in the backend, you won’t see them on the front end unless you make them a sticky or know the url but they will be publicly accessible. Finding them in the backend is not so easy unless you know the title of the topic. Not the best experience, but also was never really planned for, it was just never enforced that a topic must have a forum either.

    – Could you clarify what a forum and a category refer to, in bbPress terminology ? Is a category a subforum, which has necessarily a parent forum, while a forum has no parent ? In such a case, there should be a test over symposium_cats.cat_parent in callback_forum_type(), otherwise it can be simply disregarded…

    Both a forum and a category can have sub forums or sub categories, forums can have topics, categories cannot have topics.

    Thus symposium_cats.cat_parent is already being used with _bbp_forum_parent_id and this is how we get the forums, sub-forums, categories etc all ordered correctly in their correct nested levels.

    I think we are good, I’ll grab the latest shortly and the patch to bbPress Trac Ticket #2603 and I’ll take it for a test drive then commit it and it will be part of bbPress v2.6.

    #146826
    Robin W
    Moderator

    New version 1.6 available from wp-plugins

    https://wordpress.org/plugins/bbp-private-groups/

    or my site

    bbp Private Groups

    This version fixes the [bbp-topic-form] shortcode so that it only displays allowed forums (previously it showed all forums, but only allowed posting in authorised).


    @smileyriley21
    – love, wealth and happiness should now abound ! 🙂

    #146825
    Robin W
    Moderator

    Great – glad you’re fixed, and thanks for posting the latest code needed ! 🙂

    Stephen Edgar
    Keymaster

    Hmmmm…. Adding breadcrumbs to the ‘author’ details of topics and replies, that’s different, haven’t seen that done before 🙂

    Not sure if at the end of this I will have any form of an eloquent solution here for you…

    Technically it is actually working for you as the ‘include_current’ is the actual reply, not the topic, thus I presume if you set it to true you results would be:

    Forums › Assignment Submissions › Assignment 24: 1st 24 hours in Crown Point, Tobago > 3256
    Where the 3256 is the ID of the first reply in your thread linked above…

    And if you set it to true your breadcrumb for the first post, i.e. the actual topic would be:
    Forums › Assignment Submissions › Assignment 24: 1st 24 hours in Crown Point, Tobago

    The reasoning is that the breadcrumb function goes looking for ‘ancestors’ which includes the parent topic and any parent forums or categories in the hierarchy tree.

    You could do something like this, downside is you still have a extra > separator that you cannot hide without hiding all of them…

    a.bbp-breadcrumb-topic {
    display: none;
    }
    

    The alternative method would be to not use breadcrumbs at all for this and use something like this for the ‘parent’ forum link:

    <a href="<?php bbp_forum_permalink(); ?>"><?php bbp_forum_title(); ?></a>

    #146816
    Stephen Edgar
    Keymaster

    You can enable the full TinyMCE editor in bbPress, details are here.

    demonboy
    Participant

    I have added this code to my functions.php file

    function mycustom_breadcrumb_options() {
    	// Home - default = true
    	$args['include_home']    = false;
    	// Forum root - default = true
    	$args['include_root']    = true;
    	// Current - default = true
    	$args['include_current'] = false;
    
    	return $args;
    }
    
    add_filter('bbp_before_get_breadcrumb_parse_args', 'mycustom_breadcrumb_options' );

    … but that last argument only works for the original post, which returns something like this:

    Forums › Assignment Submissions ›

    On the replies underneath it includes the current location, something like this:

    Forums › Assignment Submissions › Assignment 24: 1st 24 hours in Crown Point, Tobago

    You can see this in action here.

    How do I remove that last part in the replies?

    NewSha
    Participant

    I want the users to get email alerts every time their forum role changes to a specific role.

    Namely, I have to notify them only if their role has changed from Spectator to Participant.

    I found a way to do this with standard WordPress roles, but it doesn’t work with bbPress roles.

    http://clicknathan.com/web-design/notify-a-wordpress-user-when-their-role-has-been-changed-to-a-specific-role/

    I tried changing if ($new_role == 'contributor') to if ($new_role == 'participant') and even to this if ($new_role == 'bbp_participant') – nothing worked.

    Perhaps someone knows the solution?

    WordPress version: 3.8.2
    bbPress version: 2.5.3

    #146797
    helmutforren
    Participant

    I had the same kind of problem, but with a different version of the functions.php file. Robin pointed out this post, and it worked after I adapted it slightly for my version. See my fix, which “zooms in” on the code a little further to more clearly point out the change, at https://bbpress.org/forums/topic/forum-still-not-working-right/#post-146790

    #146795
    helmutforren
    Participant

    Robin, your advice worked, once properly adapted. Thanks very much.

    For others, here’s how you get to the place to edit functions.php. From the Dashboard, select Appearance then Editor. Notice list of files on the RIGHT column. Find “Theme Functions (functions.php)” and click on that. Now you’ll be editing the correct file.

    For my version of Academica 1.2.2, there was only one occurrence of text “is_single”, and that was the right place.

    OLD SINGLE LINE OF CODE NEEDING CHANGE (see later for more lines to get context):

    
            echo get_category_parents( $cat, true, $sep ) . $before . get_the_title() . $after;
    

    NEW SIX LINES REPLACING LINE ABOVE (see later for more lines to get context):

    
            //support bbPress.  HgF per adaptation of akkkarki
            if (empty($cat)) {
                echo $before . get_the_title() . $after;
            } else {
                echo get_category_parents( $cat, true, $sep ) . $before . get_the_title() . $after;
            }
    

    OLD CODE (MORE LINES FOR CONTEXT):

    
    } elseif ( is_single() ) {
        if ( is_attachment() ) {
            global $post;
            echo 'post_parent ) . '">' . get_the_title( $post->post_parent ) . '' . $sep . $before . get_the_title() . $after;
        } else {
            $cat = get_the_category(); $cat = $cat[0];
            echo get_category_parents( $cat, true, $sep ) . $before . get_the_title() . $after;
        }
    

    NEW CODE (MORE LINES FOR CONTEXT):

    
    } elseif ( is_single() ) {
        if ( is_attachment() ) {
            global $post;
            echo 'post_parent ) . '">' . get_the_title( $post->post_parent ) . '' . $sep . $before . get_the_title() . $after;
        } else {
            $cat = get_the_category(); $cat = $cat[0];
            //support bbPress.  HgF per adaptation of akkkarki
            if (empty($cat)) {
                echo $before . get_the_title() . $after;
            } else {
                echo get_category_parents( $cat, true, $sep ) . $before . get_the_title() . $after;
            }
        }
    
    #146787
    lagrou
    Participant

    Back to topic, just updated the GitHub repo with the following:
    – Add User section
    – Fix & make use of callback_forum_status, add Forum status (Open or Closed)
    – Fix & make use of callback_sticky_status
    All this tested OK on my nested test install. I’m leaving the “pre-alpha code” warning, though.

    Some more questions raised at this stage:
    – How do you access a parentless topic in bbPress ? Could these be used for WP Symposium groups forum topics ?
    – Could you clarify what a forum and a category refer to, in bbPress terminology ? Is a category a subforum, which has necessarily a parent forum, while a forum has no parent ? In such a case, there should be a test over symposium_cats.cat_parent in callback_forum_type(), otherwise it can be simply disregarded…

    #146784
    dugfunny
    Participant

    Using this code I have made it to where only updates and rtmedia posts show up on my activity stream

    /**
     * Activity Stream Default Updates
     */
    function make_swa_show_notice_only( $retval ) {	
    	
    	 if ( bp_is_page( 'activity' ) ) {
    		$retval['action'] = 'activity_update, rtmedia_update';					
    	 }
    	
    	return $retval;
    	
    }
    
    add_filter( 'bp_after_has_activities_parse_args', 'make_swa_show_notice_only' );

    I would like bbpress forum posts to show up on my wall as well. What would i put next to

    ‘activity_update, rtmedia_update’

    in my code to make that happen? Thanks!

    #146772
    smileyriley21
    Participant

    Firstly, Thanks for building this module.

    I installed it, had a play and got it working in no time.

    On your support page you have the restriction “The shortcode [bbp-topic-form] will show the existence of all forums”. Is it possible to show only the forums that that user can access?

    If you can do this, I will love you forever and donate some cash as this will meet my clients requirements.

    Thanks for reading.

    demonboy
    Participant

    Well, I guess I should put my money where my mouth is when I say I’m fairly au fait with CSS! I managed to solve it and it was pretty obvious. Just swap the floating elements from left to right, where content becomes right and sidebar becomes left. Remember to end with the !important to override any other CSS. Code is thus:

    .bbpress.single-forum #main #content {float:right!important;}
    .bbpress.single-forum #main #sidebar {float:left!important;}
    .bbpress.single-topic #main #content {float:right!important;}
    .bbpress.single-topic #main #sidebar {float:left!important;}
Viewing 25 results - 11,801 through 11,825 (of 32,521 total)
Skip to toolbar