Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 6,026 through 6,050 (of 32,505 total)
  • Author
    Search Results
  • #177396
    Robin W
    Moderator

    have you followed

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

    and what have you got for step 3?

    #177388
    Stephen Edgar
    Keymaster

    The dashes ———— usually indicate that the database connection has been lost, sadly this one bug I’ve not been able to nail down with the importer to fix and give a decent warning/error message.

    Basically a workaround is to open another tab in your browser to the dashboard page and refresh it every hour so and by doing so WordPress doesn’t “lose” the database connection

    #177378
    Robkk
    Moderator

    @lnangel well for IPs specifically, if you put her IP into the comment blacklist she will be blocked from posting in your forums.

    There are also cases where people don’t know that plugins can hook into the comment blacklist with their own custom list, like I have seen issues where a Mojo Marketplace plugin would cause this same error. So if she would use profanity that might be in a custom blacklist for the comment blacklist, she would be blocked.

    You can know if it was this, if she sees the error notice listed in the guide.

    She could go over the link limit settings in Settings > Disscussion too

    From there her actual posts would be set as pending I think.

    https://codex.bbpress.org/moderation-and-blacklisting/

    Other things could be spam plugins like Akismet that work with bbPress possibly being too aggressive.

    #177377
    Robkk
    Moderator

    So you are trying to configure BuddyPress with its own inbuilt bbPress v1 forums? I think the bbPress v1 in BuddyPress (BP Forums) has issues in the last few major version of BuddyPress.

    Why not look into just using the latest version of bbPress v2 and BuddyPress and use BuddyPress’ groups feature with bbPress.

    https://codex.buddypress.org/getting-started/installing-group-and-sitewide-forums/

    #177374
    thegarnet
    Participant

    I found the excellent article by Tanner Moushey on how to create groups programmaticaly: https://tannermoushey.com/2014/08/create-groups-buddypress/

    However I also need to create a forum for each group, and I can’t get his suggestion of using groups_new_group_forum to work. I read other posts of getting function doesnt exist error for bp_forums_new_forum (which groups_new_group_forum calls), but I believe I found the right requires to get that function, and everything it depends on, but now I am getting an error about null several layers down within bb code.

    Here is my code so far:

    <?php
    /* Show the errors in browser */

    error_reporting(E_ALL);
    ini_set('display_errors', 1);

    /** Load WordPress Bootstrap */
    require_once( dirname( __FILE__ ) . '/../admin.php' );

    /** Load WordPress dashboard API */
    require_once(ABSPATH . 'wp-admin/includes/dashboard.php');

    wp_dashboard_setup();

    do_action('bbpress_init');

    ?>

    <H1>Add Groups</H1>

    <?php

    $args = array(
    'group_id' => 0,
    'creator_id' => 0,
    'name' => 'California',
    'description' => 'For people located in California',
    'slug' => 'california',
    'status' => 'public',
    'enable_forum' => 1,
    'date_created' => bp_core_current_time()
    );

    ?>

    <p>Creating group '<?php echo $args[name] ?>'</p>

    <?php

    $newgroupid = groups_create_group($args);

    ?>

    <?php

    ////////////////////////////
    // Now creating a new forum

    // Not needed for get groups_create_group - this already got included
    // require_once(ABSPATH . 'wp-content/plugins/buddypress/bp-groups/bp-groups-forums.php');

    // For bp_forums_new_forum
    require_once(ABSPATH . 'wp-content/plugins/buddypress/bp-forums/bp-forums-functions.php');

    // For bb_new_forum
    require_once(ABSPATH . 'wp-content/plugins/buddypress/bp-forums/bbpress/bb-includes/class.bb-walker.php');
    require_once(ABSPATH . 'wp-content/plugins/buddypress/bp-forums/bbpress/bb-admin/includes/functions.bb-admin.php');

    // For bb_current_user_can
    require_once(ABSPATH . 'wp-content/plugins/buddypress/bp-forums/bbpress/bb-includes/functions.bb-capabilities.php');

    // Example from: http://buddypress.wp-a2z.org/oik_api/groups_new_group_forum/
    $newforumid = groups_new_group_forum($newgroupid,'California','For people located in California');

    ?>

    <table>
    <tr><td>Newly created group id:</td><td><?php echo $newgroupid ?></td><td>Groups</td>
    </tr>
    <tr><td>Newly created forum id:</td><td><?php echo $newforumid ?></td><td>Forums</td>
    </tr>

    </table>

    It throws this error:

    Fatal error: Uncaught Error: Call to a member function get_var() on null in /Users/eyespider/projects/justiceserved/local/wp-content/plugins/buddypress/bp-forums/bbpress/bb-admin/includes/functions.bb-admin.php:992 Stack trace:
    #0 /Users/eyespider/projects/justiceserved/local/wp-content/plugins/buddypress/bp-forums/bp-forums-functions.php(123): bb_new_forum(Array)
    #1 /Users/eyespider/projects/justiceserved/local/wp-content/plugins/buddypress/bp-groups/bp-groups-forums.php(47): bp_forums_new_forum(Array)
    #2 /Users/eyespider/projects/justiceserved/local/wp-admin/custom/add-groups2.php(67): groups_new_group_forum(38, 'California', 'For people loca...')
    #3 {main} thrown in /Users/eyespider/projects/justiceserved/local/wp-content/plugins/buddypress/bp-forums/bbpress/bb-admin/includes/functions.bb-admin.php on line 992

    #177373
    Robkk
    Moderator

    Do you only have bbPress activated, or do you have some bbPress image upload plugins activated as well?
    You can try some plugin troubleshooting if you haven’t yet.

    https://codex.bbpress.org/getting-started/troubleshooting/#plugins

    You can also reinstall bbPress and see if that fixes anything too.

    #177372
    Robkk
    Moderator
    #177371
    Robkk
    Moderator

    Instead of going through each template and possibly changing this, you can also use a php code function listed int this topic.

    https://bbpress.org/forums/topic/resizing-avatars/#post-148625

    The original source of their code seems to be from this guide.

    https://schaltgetriebe.wordpress.com/2014/04/06/increase-avatar-size-in-bbpress/

    #177370
    Robkk
    Moderator

    Are you just talking about the HTML tag like <video> </video>? And not some new taxonomy added to your site, possibly through plugin.

    If its the HTML tag you will need to use a php function like this.

    https://gist.github.com/ntwb/7797990

    You can download and edit Stephens plugin and just add your HTML tag like so.

    http://htmldog.com/references/html/tags/video/

                    // Images
    		'img'        => array(
    			'class'    => true,
    			'src'      => true,
    			'border'   => true,
    			'alt'      => true,
    			'height'   => true,
    			'width'    => true,
    		),
                
                    //Videos 
                    'video'        => array(
    			'autoplay'    => true,
    			'src'      => true,
    			'controls'   => true,
    			'loop'      => true,
    			'height'   => true,
    			'width'    => true,
                            'muted'    => true,
                            'poster'    => true,
                            'preload'    => true,
    		),
    
    		// Tables
    #177366
    Robkk
    Moderator

    Is this a site you created? It looks pretty darn good and it seems to try to not stay with bbPress’ default design, and everything is unique, which I very much like to see designers do.

    As for what you asked in this topic, you can do this with the help of some jquery, and a conditional whether the user is logged in or not.

    This will have links to basic code for a show/hide toggle for a simple div. Just remember to use the topic forms container ID in any code you are going to use.

    http://www.w3schools.com/jquery/jquery_hide_show.asp

    This is a possible recommendation of a conditional you should use in a function you would create with whatever modal login plugin you are using.

    if (!jQuery(this).hasClass('active') && !jQuery('body').hasClass('logged-in')) {

    #177365
    sfmPascal
    Participant

    Hi, here is what I did for my site:

    1. Installed Allow PHP Execute
    2. Create a page, for example “forum profile”
    3. Add this code:

    
    <?php
    if (!is_user_logged_in()) {
      header('Location: /my-account/');
    } else {
      $current_user = wp_get_current_user();
      $user=$current_user->user_nicename;
      $newURL = '/forums/users/' . $user;
      header('Location: '.$newURL);
    }
    ?>
    

    4. Now when you go to this page, which you now can add to any menu location supported by your theme, if not logged in, will redirect to your login page, otherwise redirect to their form profile link.

    Jarrod

    #177340
    ptrck_r
    Participant

    Hi, I added a new wordpress role and would like it to map new users not to the participant role but rather to spectator.

    So I added this filter in my functions.php.

    add_filter('bbp_get_user_role_map', 'assign_spectator_role');
      function assign_spectator_role($roles) {
        $roles['mynewrole'] = bbp_get_spectator_role(); 
      return (array) $roles;
    }

    Problem is that this filter does not get executed.
    If I add my role directly in the bbp_get_user_role_map function it works but not with the filter.
    The tools function ‘remap_roles’ also works fine.

    Any ideas how I can get it to work?

    Cheers.

    #177331
    Robin W
    Moderator

    In which case this is the easiest way.

    create a directory on your theme called ‘bbpress’
    ie wp-content/themes/%your-theme-name%/bbpress

    where %your-theme-name% is the name of your theme

    find
    wp-content/plugins/bbpress/templates/default/bbpress/loop-single-topic.php
    Make a copy of this file, and put in in the directory called bbpress that you created above, so you end up with
    wp-content/themes/%your-theme-name%/bbpress/loop-single-topic.php

    bbPress will now use this template instead of the original
    and you can amend this

    so go to line 60 which says

    <span class="bbp-topic-started-by"><?php printf( __( 'Started by: %1$s', 'bbpress' ), bbp_get_topic_author_link( array( 'size' => '14' ) ) ); ?></span>

    and change the ‘size’ => ’14’ to a larger number for instance ‘size’ => ’20’

    #177321
    atmojones
    Participant

    So mentions.min.js has this code

    bp.mentions.tinyMCEinit = function() {
    		if ( typeof window.tinyMCE === 'undefined' || window.tinyMCE.activeEditor === null || typeof window.tinyMCE.activeEditor === 'undefined' ) {
    			return;
    		} else {
    			$( window.tinyMCE.activeEditor.contentDocument.activeElement )
    				.atwho( 'setIframe', $( '.wp-editor-wrap iframe' )[0] )
    				.bp_mentions( bp.mentions.users );
    		}
    	};

    I think you’ll find that if you put an alert in a js file on forum page load that the if statement returns true. I guess it loads too early and tinyMCE isn’t initialized yet. Try loading in your functions.php a js file with this code:

    jQuery(document).ready(function($) {
    	
    	/* necessary to get @ mentions working in the tinyMCE on the forums */
    	window.onload = function() { 
    	      my_timing = setInterval(function(){myTimer();},1000);
    	      function myTimer() {
    	        if (typeof window.tinyMCE !== 'undefined' && window.tinyMCE.activeEditor !== null && typeof window.tinyMCE.activeEditor !== 'undefined') {  
    		        $( window.tinyMCE.activeEditor.contentDocument.activeElement )
    					.atwho( 'setIframe', $( '.wp-editor-wrap iframe' )[0] )
    					.bp_mentions( bp.mentions.users );
    				 window.clearInterval(my_timing);
    		    }
    	      }
    	      myTimer();
    	};
    })

    I don’t remember where I found this code, but it’s not mine, it just took a long time to find. I think just adding this will work but if it doesn’t get back to me and we’ll work this out

    #177279
    mmirlach
    Participant

    I just found a solution by using the same code in the CSS options of the bbp Style Pack plugin. Thanks!

    #177277
    mmirlach
    Participant

    I tried this but it did not work.
    I’m using the bbPress Toolbox plugin and and I did activate bbc code as the method to use quotes so all that happens is a < blockquote > tag added.

    I’ve added your suggestion to the css file, which I put in my child theme folder (themes/childtheme/bbpress/bbpress.css).

    No difference though, bbpress still uses the CSS from my style.css.

    #177276
    Robin W
    Moderator

    The two ‘test’ items below are easier, as they just use blockquote so you can add this to your css

    #bbpress-forums blockquote {
      color: green;
    }

    I presume that you don’t want to change the class in the other plugin?

    #177275
    mmirlach
    Participant

    Hi, I’m using bbpress on my upcoming videogame website:
    http://20160719.gaming-universe.de/guf/topic/testtest/#post-6864

    As you can see, the template uses information from the WP theme style.css.
    This is overall a good thing but the blockquote function looks off.
    I’m also using a couple of plugins so I feel that I might be able to change that via a CSS function but don’t understand CSS very well.

    When looking at the code, the blockquote seems to use a specific class from one of my plugins:
    blockquote class=”d4pbbc-quote”

    Can anyone point me to where I can change the CSS for the blockquote attribute?

    Thanks, Matthias

    #177266
    Robin W
    Moderator

    This is the default display.

    If you are into coding, you can check out

    Layout and functionality – Examples you can use

    or if coding is not your thing use my plugin Style Pack which will let you set up lots of stuff, including fixing the above

    https://wordpress.org/plugins/bbp-style-pack/

    #177265
    pkmnstop
    Participant

    I hope this is the right place for this. Sorry if it isn’t.

    The long and short of my issue is that everything is too compact on my forum index. I’ve made a page, with the forum index shortcode, and when it shows, a lot of it is packed together in a way I don’t particularly care for. Here’s a screen shot:

    See how all the sub-forums of the category is the title and basic stats? And how the Category shows it’s description? I’d like to have the sub-forums’ descriptions showing here, too. Is that possible? What would I need to change? Is there some plugin or check box I need to hit?

    Thanks in advance!

    mlwilkerson
    Participant

    After doing some more work on this, I think that while the visibility of my topic in the subforum is indeed broken after the Subforum’s ID is placed in the _bbp_hidden_forums option, that is only a symptom and not a cause.

    I think that the fundamental assumptions of this version of bbPress/BuddyPress preclude the use of Subforums. And evidence of this is that visibility sensitive areas of the code like this just come up with the wrong answer when subforums are involved.

    So for me, I think I’m going to stop trying to make subforums work until the core code changes to better support them.

    #177230

    In reply to: TOPIC FORM RE-SIZE

    hellojesse
    Participant

    PATH: includes/class-wp-editor.php

    Line 74: elseif ( $set[‘editor_height’] > 5000 )
    Line 75: $set[‘editor_height’] = 5000;

    if you change the last 5000 on line 75 to a smaller number – say 300 or whatever you prefer – then save the file, the ginormous box will re-size to that height.

    Good Luck

    #177225
    Robin W
    Moderator

    can you check if it is being logged as spam

    Akismet

    If the service catches a topic that is spam, you will see it in the WordPress backend in the topics section under spam, and the same process for replies.

    #177207

    In reply to: Edit New Topic page

    Robin W
    Moderator

    create a directory on your theme called ‘bbpress’
    ie wp-content/themes/%your-theme-name%/bbpress

    where %your-theme-name% is the name of your theme

    find
    wp-content/plugins/bbpress/templates/default/bbpress/form-anonymous.php
    Make a copy of this file, and put in in the directory called bbpress that you created above, so you end up with
    wp-content/themes/%your-theme-name%/bbpress/form-anonymous.php
    bbPress will now use this template instead of the original
    and you can amend this

    so you will need to take out lines 31-34 which say

    <p>
    			<label for="bbp_anonymous_website"><?php _e( 'Website:', 'bbpress' ); ?></label><br />
    			<input type="text" id="bbp_anonymous_website" value="<?php bbp_author_url(); ?>" tabindex="<?php bbp_tab_index(); ?>" size="40" name="bbp_anonymous_website" />
    		</p>
    
    

    You should do this in a child theme, but if you do it in your main theme keepo a record as you will need to do this again on any theme update.

    Functions files and child themes – explained !

    #177186
    jimandms
    Participant

    I am just getting set up with BBpress and am in the process of creating the forums.

    So I am running into problems.

    The first error I get is
    Error Image

    I click on OK to clear the error then click publish again then I get this error on a white screen:

    Fatal error: Cannot use object of type WP_Post as array in /srv/disk11/2110213/www/jimandms.com/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc/nxs_functions_adv.php on line 155

    I can go pull up the forum list and the forum that I just created is there. But I would still much rather not see any errors at all, of course.

    My website is http://jimandms.com if you would like to pay a visit for some reason.

    Thanks for reading!
    Jim

Viewing 25 results - 6,026 through 6,050 (of 32,505 total)
Skip to toolbar