Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 11,101 through 11,125 (of 32,521 total)
  • Author
    Search Results
  • #149991

    In reply to: Full Width Forum Help

    Robin W
    Moderator

    sorry, sorry – missed that bit 🙂

    Ok will start typing again !

    in your bbpress.php

    change the lines that say

    <div class=”content-wrap”> 
    <div id=”content”>
    

    to

    <div class=”bbpress-wrap”> 
    <div id=”bbpress-content”>
    
    

    Then go into

    wp-content/themes/oxygen/style.css

    and at the end of this file put

    .bbpress-wrap {
    width : 100% ;
    }
    #bbpress-content {
    float: left;
    margin: 0 0 30px;
    width : 100% ;
    }

    .bbpress #sidebar-secondary {
    display:none ;

    }

    What this does is get bbpress to use the bbpress-wrap with a width of 100% instead of content-wrap, as content-wrap is used by the other pages and need to be 67%.

    Then .bbpress #sidebar-secondary is set to display none, so that this disappears

    Now if that all works, it is possible that an upgrade of oxygen will take out these changes, so you really need to create a child theme and put both the bbpress.php and the style.css changes in there. See

    Functions files and child themes – explained !

    Do come back if that deosn’t all work, without the theme I can’t test here !

    #149990
    ssplwork
    Participant

    Do I password protect the page that the forum short code is on, or what? Password protecting the page does nothing. I’m running the Enfold theme by Kriesi.

    I need to make a set of users have access to the forums, and password protect everything inside of them, and certain people be able to edit, and all be able to post.

    #149989

    In reply to: Random Topic Link

    Robkk
    Moderator

    @robin-w, @joejozwowski

    i found the code to create a random post link that you can use as a reference , when creating a random topic link

    got it from http://cazue.com/articles/wordpress-create-a-random-post-button-2013

    add_action('init','random_post');
    function random_post() {
           global $wp;
           $wp->add_query_var('random');
           add_rewrite_rule('random/?$', 'index.php?random=1', 'top');
    }
     
    add_action('template_redirect','random_template');
    function random_template() {
           if (get_query_var('random') == 1) {
                   $posts = get_posts('post_type=post&orderby=rand&numberposts=1');
                   foreach($posts as $post) {
                           $link = get_permalink($post);
                   }
                   wp_redirect($link,307);
                   exit;
           }
    }

    link to show

    <a href="/?random=1">Random Post</a>

    creating a menu link , idk how to bring that link up in the menu

    #149987

    In reply to: Full Width Forum Help

    aussiestar14
    Participant

    Hey, I didn’t fix anything! The normal page http://www.curlyhorse.info/forum is working because I inserted a short code and choosed full width. The actual forum is still not working: http://www.curlyhorse.info/forum/ausbildung/
    We still need help!

    #149975
    GreedyMan
    Participant

    I created link to user’s profile by code:

    <?php
    	global $current_user;
    	 				get_currentuserinfo();
    	 				//echo '<pre>';
    	 				//print_r($current_user);
    	?>
    <ul class="hd-account">
    	<?php $first_name = $current_user->user_firstname; $last_name = $current_user->user_lastname;?>
    	<li><a href="<?php echo home_url().'/forums/profile/'.$current_user->user_login.'/'; ?>">Xin chĂ o, <?php if ($first_name == '' || $last_name == '' ) echo $current_user->display_name; else echo $first_name.' '.$last_name; ?></a></li>
    	<li><a href="<?php echo wp_logout_url(home_url()); ?>">Thoát</a></li>
    </ul>

    I create this in theme’s header.php (not TwentyEleven …). Example, I have a link like that http://localhost/cars/forums/profile/namnguyen/. I click it and get an error “404 not found”, I don’t know why. Can someone help me?

    #149973
    Stephen Edgar
    Keymaster

    I have just had a quick look at this and with a fresh WordPress 3.9.1 install and bbPress 2.5.4 with define('FORCE_SSL_ADMIN', true); I cannot see an issue, everything works as expected using both WordPress’ ‘Lost Password’ (https://example.com/wp-login.php?action=lostpassword) or using the bbPress shortcode [bbp-lost-pass] on a page.

    I also went through using the bbPress login widget with custom pages for ‘lost-password’ and ‘register’ using both http:// and https:// as the URL’s in the Widget and again everything worked as expected.

    I’d any other plugins you may be using that change any of WordPress’ login/authentication to narrow down the issue.

    #149970
    Robkk
    Moderator

    However, even after enabling threaded replies, I’m still unable to achieve the same result with the nested reply. When I click “reply” in the top corner of the 4th post down, for example, it just scrolls to the initial reply form beneath the first post, instead of opening up a new reply form beneath the 4th post.

    i dont really know then it might be edited threaded replies to bring up the reply form, i checked there code and on the reply link has

    <a href="/topic/to-go-to-college-or-to-move-to-la-and-act/?bbp_reply_to=335515&_wpnonce=62ed053836#new-post" class="bbp-reply-to-link" onclick="return addReply.moveForm('post-335515','335515','new-reply-335513','335513');">Reply</a>

    most of this code is normal except i think

    onclick="return addReply.moveForm('post-335515','335515','new-reply-335513','335513');

    the 335515 is most likey the post id

    other than that i have no idea how to do this , but i mean if i find out in the future i will update this topic.

    If you figure it out in the future before me i would like you to update this topic.

    #149969
    MarximusMG
    Participant

    @robkk You rule, thanks for the help! Here’s a site I’m just using to mess around with these customizations on: http://revyved.com/forums/topic/just-stumbled-on-this/

    I was able to successfully move the reply form to beneath the first post in each topic, thanks to your suggestion to enable show lead topic, as well as moving the line of code in content-single-topic.

    However, even after enabling threaded replies, I’m still unable to achieve the same result with the nested reply. When I click “reply” in the top corner of the 4th post down, for example, it just scrolls to the initial reply form beneath the first post, instead of opening up a new reply form beneath the 4th post.

    #149965
    kopperwoman
    Participant

    I’m having a similar problem to dustinarmstrong. But its not exactly the same.

    I’m trying to fix a broken forum set up for a client. I did not do the forum installation (he did it himself) AND the forum is installed on a live site that gets lots of web traffic so I don’t want to do anything that might impact the website overall.

    Here’s my situation:
    1) BBPress was installed (I don’t have details about when and how),
    2) a page was created with the [bbp-forum-index] shortcode on it
    3) the forum didn’t work, so my client contacted me to fix it
    4) I went into settings > forums and changed the forum root slug from the default “forum” to “travel-forums” (the name of the page where the shortcode lives. The error message “Possible bbPress conflict: Forum slug” showed up next to the slug field after saving the settings.
    5) I also changed the single forum slug from the default “forum” to “travel-forums”. The error message “Possible bbPress conflict: Forums base” showed up next to the slug field after saving.

    In my case, the forum page DOES show up at http://foobar.com/travel-forums but it is empty except for the welcome text that I had entered into the forum main window. (So it just says “Welcome to our forum” without any of the discussion topics showing up.

    Also, I have the “Recent Topics” widget enabled on my sidebar and my three test discussion topics DO show up there. When I click on any of them they take me to the correct URL but the pages are blank. So, for example, when I click on “test topic” in the widget I land on http://foobar.com/travel-forums/topic/test-topic/ and the page displays the topic header “Test topic” and the topic question “what do you think about travel?” but it doesn’t display any of the posts.

    I’m not sure if this behavior is related to the slug conflict error messages or if something else is wrong.

    I’m trying to follow the advice that Stephen Edgar gave.

    First up, I think this is probably true in my case:

    most likely you have something else either titled or using the slug discuss and this includes any items in trash as even though they are in the trash they still reserve that slug and it is not released until the item is removed from the trash.

    This is probably a stupid question but How do I empty the trash to make sure that the old slug is removed?

    Second, I’d like to try this:

    To fix this try resetting your permalinks. In your WordPress Administration Screens navigate to Settings > Permalinks, select a different permalink structure and save. Then select your preferred permalink structure and save again.

    but since my website is live and has been for a long time (and has lots of blog posts using the custom structure already) I’m concerned that this could permanently break the existing links. Any thoughts on this?

    #149962
    Stephen Edgar
    Keymaster

    Awesome…

    (The ———– issue is typically login credentials expiring in WordPress between WordPress and MySQL)

    #149949
    Robin W
    Moderator

    which page from my theme does bbpress display using?

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

    your theme is a paid one, so I can’t just download and have a quick look.

    #149942
    Doug Smith
    Participant

    Thanks, Stephen. I was just about to update this conversation with the same thing now that I’ve had a chance to look through the code.

    I talked with @jjj about this at WordCamp Milwaukee and he suggested creating a Trac ticket for it, which I have done. https://bbpress.trac.wordpress.org/ticket/2668

    Robkk
    Moderator

    Do you know how I would go about hiding the “Create New Topic” form at the bottom of the page, now that I’ve made the link at the top to go to the “New Topic” standalone page?

    copy content-single-forum.php into your bbpress folder
    and delete any instance that say <?php bbp_get_template_part( 'form', 'topic' ); ?>

    that should do it

    #149936
    Robkk
    Moderator

    @marximusmg yeah this is pretty easy

    copy content-single-topic into your bbpress folder in your child theme.

    then just move <?php bbp_get_template_part( 'form', 'reply' ); ?>

    just below <?php bbp_get_template_part( 'content', 'single-topic-lead' ); ?>

    #149927
    Stephen Edgar
    Keymaster

    You can also use WordPress’ custom profile fields:

    https://codex.wordpress.org/Plugin_API/Filter_Reference/user_contactmethods

    And an example plugin here using the above method:

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

    #149922
    Stephen Edgar
    Keymaster

    Why not change the code back to what it was then?

    You should look up some CSS resources and use your browsers ‘inspector’ to look at how to make CSS changes to your theme, use your favourite search engine to find these.

    #149921
    Stephen Edgar
    Keymaster

    bbPress will use that forum.php file as a wrapper template for all of bbPress pages and that is most likely what the issue is.

    I’d suggest if you need a wrapper template to work with your theme you copy the contents of your themes page.php to a file named bbpress.php.

    Then copy any bbPress templates you want to customize to your themes folder.

    See these for more info on copying bbPress templates and child themes:

    Functions files and child themes – explained !


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

    #149920

    In reply to: moderating bbpress

    Stephen Edgar
    Keymaster

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

    And if you are looking for either registration or topic/reply captch check out the plugins available as there are a few that do registration and at least one for captcha topics/replies:

    Plugins

    Stephen Edgar
    Keymaster

    Much of what happens when the ‘moderation’ is triggered from comment moderation has not been added to bbPress until the code I’ve added recently.

    If your comfortable with PHP you could take a look at what I have thus far in the following tickets:

    This first one handles post of what is coming for moderation:
    https://bbpress.trac.wordpress.org/ticket/2645

    This second one is for the template to notify the user that there topic/reply is pending moderation, I haven’t started on this due to needing to implement everything in the above #2645 first, now that I got most of the code finished for that yesterday I plan on looking at this in the next few days.

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

    Keep an eye on those tickets and that should give some hints of what is happening.

    #149917
    Stephen Edgar
    Keymaster

    You cannot have both the ‘forum root’ and ‘forum slug’ the same as you have seen in that you get a ‘slug conflict’ warning, I’d suggest you leave the ‘forum root’ slug as travel-forums but change your forum slug back to forum.

    To check the ‘trash’ visit your ‘posts’, ‘pages’, and ‘forums’ sections in WordPress and you should see if you have any posts, pages, or forums in the ‘trash’ (or bin if your using English UK WordPress language packs).

    Have a look at those and let me know how it goes.

    #149915

    In reply to: Forum subscriptions

    Stephen Edgar
    Keymaster

    Emails previous to bbPress 2.5.4 were sent out out to each recipient email individually (one email per user), since bbPress 2.5.4 we now only send a single email with all the recipients as BCC (Blind Carbon Copy) and all emails are sent using as you state a default email address of noreply@domain.tld.

    bbPress also works fine to send emails with many of the WordPress mail plugins and should work as we are using WordPress’ wpmail function to send them.

    Stephen Edgar
    Keymaster

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

    The above document outlines the different behaviours between adding the ‘bad word’ to the ‘blacklist’ or ‘comment moderation’ sections and what the users see, in the next release of bbPress there will be a notice if the ‘bad word’ was added in ‘comment moderation’ and the user will know that there submission is pending moderation, the blacklist behaviour will not be changing.

    #149909
    Stephen Edgar
    Keymaster

    Open up your punBB config.php file, it should be located in the root folder of your punBB install and should contain something similar to this:

    $db_host = 'localhost';
    $db_name = 'import_punbb';
    $db_username = 'root';
    $db_password = 'root';
    $db_prefix = 'punbb_';

    That table prefix punbb_ is what I suspect is incorrect.

    #149908
    Stephen Edgar
    Keymaster

    I see you do not have a database table prefix in your settings?

    Check your phpBB database tables, most likely they have a prefix of phpbb_

    Here is a snip from my phpBB database, as you can see the database is named ntwb_phpbbv3 and all my tables have a prefix of phpbb_, check what your database prefix is and try adding that to your settings.

    #149904

    In reply to: My impressions so far

    Stephen Edgar
    Keymaster

    That ‘warning system’ will remain plugin territory for a while even though I have a specific use case that this is important for it, it will still remain that way for a while, just because the functionality CAN be performed does not explicitly mean that it should be included with bbPress core.

    As I mentioned above ‘Featured Plugins’ will most likely evolve to become a more refined list and the power and flexibility of bbPress allows us to do this without forcing/giving every user the ‘kitchen sink’ just because we can.

    “bbPress is forum software, made the WordPress way.” and just like WordPress’ philosophy we are making “Decisions, Not Options”. And for example this decision extends to user profile custom fields, if you want these for post authors in WordPress, you look to a custom function or plugin, bbPress is the same, a custom function or a plugin.

    bbPress utilizes WordPress Template Hierarchy to allow sites, theme authors and plugin developers to make amazing forum sites powered by bbPress and simply creating a set of pages that work with all the themes out there is not a one size fits all, some themes use tables, some divs, some unordered lists, responsive, non responsive, the combinations are endless and as said we try our best to ensure template compatability but removing the flexability just to limit designers and developers to no longer have these options available to them is something I doubt we will change for quite a while. We would like to include an additional set of default templates in bbPress, but that’s another project we just have not got to yet, bbPress already fully supports numerous templates though currently it only ships with one set.

    I come from a phpBB background and have spend many weeks in ‘other’ forums databases whilst supporting the ~25 importers included with bbPress, the current way the WordPress database schema is structured is partially a limitation on what options we have available to us and still keep bbPress light and compact without adding new tables to the database.

Viewing 25 results - 11,101 through 11,125 (of 32,521 total)
Skip to toolbar