Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 6,751 through 6,775 (of 32,505 total)
  • Author
    Search Results
  • #172730
    Robkk
    Moderator

    I would say maybe just place the default bbPress login widget instead of your themes custom one, or customize the widgets settings if it has an option to remove the modal login, or remove the deregister widget code that has possibly removed the default bbPress login widget.

    #172726

    In reply to: How to hide a user IP

    tech55541
    Participant

    Hello,
    Please use this CSS code.

    #bbpress-forums div.bbp-topic-author a.bbp-author-name, #bbpress-forums div.bbp-reply-author a.bbp-author-name {
    display: none;
    }

    Please let me know if this worked for you.

    #172714
    blandow
    Participant

    Awesome — used the code snippet for the child’s function.php and it worked!

    Thank You

    #172695
    Nicolas Korobochkin
    Participant

    Hi @mairag. Updated step by step tutorial with working source code example available in next article https://wpmag.ru/2015/wordpress-multisite-signup/ (on Russian but you can use Google Translator to translate this) 🙂 Inside article you can find the links to Github with source code. Feel free to leave any questions here.

    #172694
    farbewerk
    Participant

    WP 4.4.2
    BBPress 2.5.8

    I’m creating a custom import module from the Example.php file that comes with the installation. I’ve filled in the table and field for everything that is available from the previous forum software (WebWiz) and have commented out sections that don’t have information to map.

    Upon start, the importer trips up at the Join part of the forum section. I need to know what to put in these areas:

    		// Setup the table joins for the forum section
    		$this->field_map[] = array(
    			'from_tablename'  => 'groups_table',
    			'from_fieldname'  => 'forum_id',
    			'join_tablename'  => 'forums_table',
    			'join_type'       => 'INNER',
    			'join_expression' => 'USING groups_table.forum_id = forums_table.forum_id',
    		//	'from_expression' => 'WHERE forums_table.forum_id != 1',
    			'to_type'         => 'forum'
    		);
    

    The “groups_table” and the “forum_id” fields are the ones I don’t know where to find.

    On a realted subject, what of these mapping statements are absolutely 100% necessary to get a successful import? I can send anyone the module code if that helps.

    #172689
    Robin W
    Moderator

    suggest you turn on debugging and see what come up

    https://codex.wordpress.org/Debugging_in_WordPress

    #172676
    shadynicnack
    Participant

    Here is what I figured so far….

    – I had created a new file wp-custom-config.php
    – Use define define( ‘NEW_HOST’, host name); and other details.
    – And add code for DB connect like below

    $newdb = new wpdb($DB_USER, $DB_PASSWORD, $DB_NAME, $DB_HOST);
    $newdb->show_errors();

    – Included this file in wp-config.php file.

    So the wp-customer-config.php looks like:

    $DB_NAME_EXT = ‘database’;

    /** database username */
    /*define(‘DB_USER_EXT’, ‘username’);*/
    $DB_USER_EXT = ‘username’;

    /** database password */
    /*define(‘DB_PASSWORD_EXT’, ‘password’);*/
    $DB_PASSWORD_EXT = ‘password’;

    /** database hostname */
    /*define(‘DB_HOST_EXT’, ‘host’);*/
    $DB_HOST_EXT = ‘host’;

    global $newdb;
    $newdb = new wpdb($DB_NAME_EXT, $DB_USER_EXT, $DB_PASSWORD_EXT, $DB_HOST_EXT );
    $newdb->show_errors();

    Like I mention before, I have included it or should I say required it in the wp-config.php at the bottom after require_once(ABSPATH . ‘wp-settings.php’) and looks like…

    require_once(ABSPATH . ‘external-config.php’);
    _______________________________________________________

    FIRST QUESTION: – I read that you can use $newdb in any file any where. How would you do that? Can I see examples?

    SECOND QUESTION: I want to use the $newdb for the login page. So instead of using the $wpdb, I want to use $newdb to pick and check username and password. How would I do that? Would I need to make a custom login page or can I go into the code and switched databases around? Whats the best practice?

    #172670
    Robkk
    Moderator

    @shadynicnack

    You are probably going to end up using this plugin, I do not really have much knowledge of setting it up for what you want though.

    https://wordpress.org/plugins/hyperdb/
    https://codex.wordpress.org/HyperDB

    #172657
    Robin W
    Moderator

    suspect this is what you are after – add it to your functions page in your child theme

    add_filter( 'register_url', 'my_register_page' );
    function my_register_page( $register_url ) {
        return home_url( '/register/' );
    }
    

    https://codex.bbpress.org/functions-files-and-child-themes-explained/

    #172656
    DL
    Participant

    Stephen and all,

    I guess this turned out to be harder than I hoped?

    Looking at this thread I see that I never posted the Github code for the attempt to create a Zikula/Dizkus to bbPress converter, here it is if anyone would take a look.

    https://github.com/damon18/dizkus-bbpress

    Thanks

    #172652
    awal16
    Participant

    I already have a page created in WP with the [bbp-forum-index] code in it. So, I don’t understand it.

    #172643
    uschesch
    Participant

    Pascal, I found the code to add to enqueue my child style sheet.

    wp_enqueue_style( ‘child-style’, get_stylesheet_uri(), array( ‘parent-style’ ) );

    I added it, and all works well.

    Thank you so very much!

    karlbenn73
    Participant

    Hi All

    I’m still new to BBPress and to WordPress if I’m to be honest…

    I am using the Woo Storefront Theme.

    I have created a new page on my website and called it “forum” and then used the
    [bbp-forum-index] shortcode on that page.

    1. I have installed a plugin that allows me to turn off my page title but for some reason BBPress seems to be overriding this feature which is working fine on all my other pages? How do I turn my page title off within BBPress?

    2. I have also set up a few forums, one of them called “School Community Discussion”
    Inside this “parent” forum I have created two child forums called “Michael Mount Waldorf School” and “Moore House Academy”

    When I click on one of the child forums to post a new topic, there is no “new post” window for me to add a new post. This window is only available at the parent forum level!? How do I resolve this?

    3. I must say that I’m dumbfounded that BBPress doesn’t have a “Post new Topic” button that will allow you to click and then select whichever forum you want to post into from a dropdown menu. I there any way to create a button like this?

    Thx
    Kb

    #172636
    shadynicnack
    Participant

    So where do you place the code? Do we make a new file and include it in the wp_config? Do we do each query/set per page or in a function? Is it possible to use an external database connecting to your login?

    #172635
    awal16
    Participant

    I followed the steps, but the right sidebar doesn’t show up, the main-sidebar is still vissible.

    My code in the functions.php:

    
    function rkk_widgets_init(){
    	register_sidebar(array(
    		'id' => 'bbp-sidebar',
    		'name' => __( 'Forum sidebar', 'rkk' ),
    		'description' => __( 'Sidebar voor het forum', 'rkk' ),
    		'before_widget' => '<div id="%1$s" class="forum-widget %2$s">',
    		'after_widget' => '</div>',
    		'before_title' => '<h3 class="widget-title">',
    		'after_title' => '</h3>'
    	));
    }
    add_action('widgets_init', 'rkk_widgets_init');
    

    The code in the sidebar.php:

    
    <?php if (is_active_sidebar('main-sidebar') && !is_bbpress()) : ?>
    	<div id="secondary" class="widget-area" role="complementary">
    		<?php dynamic_sidebar('main-sidebar'); ?>
    	</div><!-- .widget-area -->
    	
    <?php elseif (is_active_sidebar('bbp-sidebar') && is_bbpress()) : ?>
    
    	<div id="secondary" class="widget-area" role="complementary">
    		<?php dynamic_sidebar('bbp-sidebar'); ?>
    	</div><!-- .widget-area -->
    <?php endif; ?>
    

    In the backend, the forum widget does appear, and I can add Widgets to it. Only on the front-end, on forum pages, he doesn’t show the right sidebar.

    #172632
    Pascal Casier
    Moderator

    Hi,
    Start from this article: https://codex.bbpress.org/layout-and-functionality-examples-you-can-use/#26-creating-a-bbpress-specific-sidebar
    Come back if you need anything else.
    Pascal.

    #172621
    Robin W
    Moderator

    not really a bbpress question, but this should help – in effect you do each query/set with the connection details.

    $user="xxx";
    $password="yyy";
    $database="zzz";
    $host="aaa";
    $con=mysqli_connect($host,$user,$password,$database);
    $query="select user_email from wp_users where ID=".$id ; 
    $result = mysqli_query($con,$query) or die("failed to get result1"); 
    

    or

    to update

    $update= "UPDATE wp_posts SET post_content =\"".$post2."\" WHERE ID=".$id2 ;
    mysqli_query($con,$update)  ;	
    	
    #172619
    Robin W
    Moderator

    ok I wouldn’t worry about the structure, just create the forums and use multiple shortcodes to build your page

    eg

    [bbp-single-forum id=3] 
    [bbp-single-forum id=6] 
    [bbp-single-forum id=8] 
    
    

    That way you control the flow

    I’d then switch off breadcrumbs and use the sidebar as navigation.

    #172618
    shadynicnack
    Participant

    I’m a bit new and trying to get back into wordpress again. I have a wordpress website that needs to use the wordpress database that we first set up, and 2 external databases to obtain information and even at times to edit, and update information. Tried using external database but that is for one external database coming in. Want to use an external database to first set up login meaning when they enter username and password, it will find it through g h the external database. So my question is… What is the best way this situation? If it is coding, is there some tutorials that I can do this?

    Did some research, and someone said that I can use this code in the functions.php to help access another database… Is it functions pho in main or themes?

    $newdb = new wpdb($DB_USER, $DB_PASSWORD, $DB_NAME, $DB_HOST);
    $newdb->show_errors();

    So I add this in the functions, but where do I put the second database’s info like host, username, password and etc? Where do I put the query code at?

    Will this work to connect to an external databases?

    Please Help!!!!

    #172607

    In reply to: forum page

    bodybyloud
    Participant

    I’m having the same issue. I’m using divi theme and bbpress shortcode for forum index. http://bodybyloud.com/Bodybyloud%20LoudTalk%20Forums/forum/introduction/ the post page comes up when you click on the Introduction forum I created.
    wordpress- 4.4.2
    bbppress – 2.5.8

    Robkk
    Moderator

    @swstarone this could be bbPress theme compatibility/WordPress theme related issue, an seo plugin could possibly cause this, title tag updates in WordPress could cause this too.

    you can notice that there no username or nickname displaying on the page.

    This could be a bbPress theme compatibility issue/theme issue. The title could be outputted if the page is_single(), but the user profile pages do not do this.

    https://bbpress.trac.wordpress.org/ticket/2545

    This php code snippet could help with the issue though.

    function rkk_add_title_to_user() {
        ?>
            <h1 class="entry-title"><?php bbp_displayed_user_field( 'display_name' ); ?></h1>
        <?php
     }
     add_action( 'bbp_template_before_user_details', 'rkk_add_title_to_user' );
    #172590
    Robkk
    Moderator

    Sorry for the late reply.

    If it is pending the only thing in bbPress’ code that can add posts into pending is when a post contains a word in the comment moderation input box in Settings > Discussion and like I said before some plugins could add their own blacklist and hook into this, so make sure you have some spam plugins while you are testing this.

    In the past there was a user that had to approve posts manually because a plugin at the root of the users server called “mojo marketplace” has a hidden blacklist inside of it that affected the posts.

    You may also want to remove the “http” and “wwww” in your blacklist as this may be affecting it too.

    #172589
    mojomo
    Participant

    I’m using a child theme and I’m trying to make CSS adjustments to the forum list. I need to get rid of float + width because the numbers are not aligned with the titles (topic, voices, replies, last post). Whatever I try, bbpress ignores my changes. I tried adding the new CSS to style.css in my child theme as well as adding it to Jetpack’s custom CSS. I did even add the extra code to functions.php in my child theme so that bbpress style could be overwritten without using !important. Using !important doesn’t work either. I really don’t know what else to try. My theme is not perfect for bbpress, so I need to tweak a few things.

    #172587

    In reply to: Editing “Reply To”

    Robkk
    Moderator

    Copy the default bbPress templates to a folder called bbpress in a child theme then you can edit the templates how you would like.

    The files you are looking for is form-anonymous.php and form-reply.php.

    Here is a guide that will explain this a little more.

    https://codex.bbpress.org/themes/theme-compatibility/

    #172586
    uschesch
    Participant

    Oh, I apologize. I reread Pascal’s suggestion and realized that I did not do one step, which I am assuming is very important. I did not enqueue my style sheet after the code. Unfortunately, I don’t know how to do that.

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