Robin W (@robin-w)

Forum Replies Created

Viewing 25 replies - 12,326 through 12,350 (of 14,219 total)
  • @robin-w

    Moderator

    @robin-w

    Moderator

    it is in

    \bbpress\templates\default\bbpress\form-reply.php

    However it would be easiest to change the text using a function which you put in your functions file

    //This function changes the text wherever it is quoted
    function change_translate_text( $translated_text ) {
    	if ( $translated_text == 'old text' ) {
    	$translated_text = 'new text';
    	}
    	return $translated_text;
    }
    add_filter( 'gettext', 'change_translate_text', 20 );

    Functions files and child themes – explained !

    @robin-w

    Moderator

    I also moved template-full-width.php, to my child theme, and called it bbpress.php. After doing this, nothing has changed except now the forum specific sidebar, that came with the theme, does not show up.

    so what would you like to happen, all I can see on your site is your forum with a sidebar

    @robin-w

    Moderator

    So basically on the forum, when someone clicks edit my profile at the top of the page, it goes to the backend. Even though, it would be preferable to go to the front end.

    I would not let users see the toolbar, this is really just for admins.

    You need to disable the toolbar – add this to your functions file

    add_filter('show_admin_bar', '__return_false');
    

    then put the profile into your menu

    Layout and functionality – Examples you can use

    @robin-w

    Moderator

    No problem

    @robin-w

    Moderator

    great – pleased its doing the trick !

    @robin-w

    Moderator

    sorry if I wasn’t so busy, I’d have a crack at it 🙂

    @robin-w

    Moderator

    You explain me in detail with code?

    Can you explain what you are trying to do and where on your site eg put a shortcode on the front page, add a widget that does this etc.

    @robin-w

    Moderator

    you’d do better to just steal the replies widget I wrote for private groups

    download

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

    and then open up and edit

    includes/pg_forum_widgets.php

    line 464 onwards has the replies widget, I’m pretty sure that lines 539 to 542

    //PRIVATE GROUPS Get an array of IDs which the current user has permissions to view
            $allowed_posts = private_groups_get_permitted_post_ids(new WP_Query($query_data));
            // The default forum query with allowed forum ids array added
            $query_data['post__in'] = $allowed_posts;
    

    is all that’s added to the orginal code, so remove those lines.

    and line 574 contains the size

    you can just fork all that to the end of the file into your functions file

    @robin-w

    Moderator

    I’d suggest that you

    1. create a test site (which everyone should have in nay case !)

    and

    2. Google sql tutorial video, and work out how to code my statements

    3. go into phpmyadmin on your test site and play until you get it right

    4. Come back and post the resultant code to help others

    sorry, but almost all of the stuff I have learn’t has been by spending time googling to find some examples, and then hours getting it to work 🙂

    In reply to: EDIT TOPIC in BBPRESS

    @robin-w

    Moderator

    great – glad you’re fixed !

    @robin-w

    Moderator

    yes it should be as bbpress just uses wp_query once args has been parsed.

    see

    https://codex.wordpress.org/Class_Reference/WP_Query dates are quite a way down

    untested but something like

    $week = date( 'W' );
    $year = date( 'Y' );
    bbp_has_topics( array( 'year' => $year, '&w' => $week ) );
    

    would do last 5 days

    @robin-w

    Moderator

    ok, on the specific forum search, it is probably plugin or theme related

    Plugins

    Deactivate all but bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.

    Themes

    If plugins don’t pinpoint the problem, as a test switch to a default theme such as twentytwelve, and see if this fixes.

    but since you say you don’t really want that, you could disable the forum search

    Layout and functionality – Examples you can use

    and to add forum searches to the main search use

    function filter_search($query) {
        if ($query->is_search) {
    	$query->set('post_type', array('post', 'pages', 'forum', 'topic', reply'));
        };
        return $query;
    };
    add_filter('pre_get_posts', 'filter_search');
    

    This is untested code, I copied it from another forum, but should work, come back if it does or doesn’t to help future readers of this thread!

    @robin-w

    Moderator

    Thanks, Rob

    @robin-w

    Moderator

    I’d say the issue was more with the widget not taking up the column space it could – rthe widget below is much wider. This is fixed usually with css rather than widget code.

    Sorry but an training today or I’d take a look, perhaps rob will

    @robin-w

    Moderator

    you could do, but since you’re into code, I’d just amend line 1157 on bbpress/includes/common/widgets.php, and make a note to change it again on upgrades

    Not the recommended way, but practical !

    @robin-w

    Moderator

    If you want to match an existing theme or website color, install ‘colorcop’

    http://colorcop.net/

    It lets you see what colour any part of your screen is

    @robin-w

    Moderator

    Hey great – glad you’re fixed, and thanks for posting your solution, it means that I can advise this for future !

    @robin-w

    Moderator

    great, do come back when you’ve succeeded !

    @robin-w

    Moderator

    yes, you would be looking in the usermeta table 9noramlly called wp_usermeta at meta-key wp__bbp_subscriptions

    this is comma deliminated, so if I was user ID 3, and was subscribed to topics 10, 12 and 15, and forums 1, 3 and 6, I would see

    user_id 3
    meta_key wp__bbp_subscriptions
    meta_value 1,3,6,10,12,15

    So to add category 246, you would just add this to the end, or create if not there

    Someone cleverer than me out to be able to give you a sql string or two that would do this which you could run on phpmyadmin.

    Logically you’d create two statements, the first would say

    for all the user_id’s if wp_bbp_subscriptions exists, then make the meta_value equal to the meta_value concatenated with ‘,246’
    Then second one
    for all user_id’s if wp_bbp_subscriptions does not exist, make meta_key wp_bbp_subscriptions equal to 246.

    I’m not good enough at sql to code this without lots of checking – anyone good at this stuff?

    In reply to: EDIT TOPIC in BBPRESS

    @robin-w

    Moderator

    I don’t know either of the two plugins, but essentially I don’t let anyone have access to the backend of my site – it jars with the front end.

    https://codex.bbpress.org/bbpress-user-roles-and-capabilities/

    contains a list of the capabilities, and most restriction plugins should list these, and you hopefully should be able to find or see edit_topics as a capability that you can restrict.

    It may well be that one plugin is conflicting with the other as they both sound like they are trying to do the same job.

    @robin-w

    Moderator

    It could be a theme or plugin issue

    Plugins

    Deactivate all but bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.

    Themes

    If plugins don’t pinpoint the problem, as a test switch to a default theme such as twentytwelve, and see if this fixes.

    @robin-w

    Moderator

    Could be a number of things.

    1. check that you are not present on multiple screens in the same browser, sometimes leaving yourself logged in on one screen whilst logged out on others can do funny things.

    then it could be a theme or plugin issue

    Plugins

    Deactivate all but bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.

    Themes

    If plugins don’t pinpoint the problem, as a test switch to a default theme such as twentytwelve, and see if this fixes.

    @robin-w

    Moderator

    yes wordpress will overwrite your current site.

    Most host providers allow you to create subdomains, so if you have

    http://www.mysite.com

    your can create

    test.mysite.com

    I’d suggest you create a test site, and install wordpress on there, keeping your existing site as is.

    Then you can create wordpress pages, and copy/paste text and upload pictures to the test site to make it look like (or better than!) your current site.

    When you are happy, you can then wipe your live site, install worpress (your host provider should help you to do this if you don’t know how).

    You can then export and import the pages and posts from your test site to your live site very easily using the built in exporter/importer.

    pic

    @robin-w

    Moderator

    In fact took a look today and done !

    bbp additional shortcodes

    You now have a template of ‘short’ which just does the titles and topics, no search or other stuff.

    see the web for full details on how to do this, but for example

    [bbp-display-topic-index show=’5′ forum=’29’ template=’short’ ]

Viewing 25 replies - 12,326 through 12,350 (of 14,219 total)