Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 8,151 through 8,175 (of 32,570 total)
  • Author
    Search Results
  • #165409
    Robkk
    Moderator

    It looks like it is inheriting different templates for the forum archive and the single forums. From the looks of it the second image looks correct to me. It is displaying the title, but you have leftover post data from your theme like the extra breadcrumbs.

    If you did create a bbpress.php rename it to something like bbpressa.php so that it won’t load anymore.

    Now if you have what the file still installed, go to the forum archive or /?post_type=forum and see if the page template is different from what the General Forum page has.

    The reason why I am saying do this, is to see if bbPress could be inheriting two different templates. It would make sense if the Forum archive would use page.php or even archive.php, and in some cases the single forum pages could be inheriting single.php.

    #165405
    Robkk
    Moderator

    whoops sorry I messed up the CSS a little. I edited the code above try that now.

    #165397
    Robkk
    Moderator

    You can try that, but it usually only affects one specific page. Doing it this way means you have to put a shortcode for every bbPress page. It is easier in the end to just create a bbpress.php file in your theme from your page.php file. You can also just tell me your theme (hopefully it is not paid) then I could just do it for you.

    #165395
    Robkk
    Moderator

    Not entirely sure really but I have tested themes that add next and prev post nav links to bbPress on accident and it seems to work. You may need to add the php tag to the bbPress forum templates, maybe just output it in a bbpress.php file with a condtional to only show on single forums.

    https://codex.wordpress.org/Function_Reference/posts_nav_link

    Getting Started in Modifying the Main bbPress Template

    bbPress Conditional Tags

    #165390
    Robkk
    Moderator

    @peterdadams

    There should be a vBull importer in bbPress.

    The W3 Total Cache would help optimize bbPress. Of course it is more important to have high performance hardware on your site, use an opcode cache, possibly an object cache (the plugin helps add a backend file), and keeping your database tidy. Page cache can become a little tricky in some situations but it should be fine using w3 total cache with bbPres.

    bbPress is translatable and there are translations for specific langauges.

    bbPress could work in multilingual sites. It might be better to just allow your users to contribute their content in their language though. There is an issue using WPML though.

    #165388
    Robkk
    Moderator

    @lightbay

    Is there anyway you could embed a forum into another page?

    Not the whole bbPress forums like some Iframe embed like some other forums, you can use this shortcode to embed a single forum though.

    [bbp-single-forum id=$forum_id]

    Display a single forums topics. eg. [bbp-single-forum id=32]

    To find the ID, add a plugin like Reveal IDs to help you out find the IDs of all your forums. After installing it go to Forums > All Forums and you should see each forums ID next to it.

    There are of course other ways of finding a posts ID and you may not need to install the plugin, it is just better and easier for users.

    #165387
    Robkk
    Moderator

    This should help.

    /*styling to move 'Subscribe' to right hand side */
    .single-forum .subscription-toggle  {
        padding-left: 10px;
    }
    Robkk
    Moderator

    1. Not entirely sure what the topic frame is, but I like how the title looks good on your site already.

    2.

    div.bbp-reply-header {
        clear: none;
    }

    If you need help styling your forums you may need to use the bbp style pack plugin. There are a lot of CSS styles on your site that I can see causing some minor issues with other areas on bbPress, like the Forum Header labels that say Topic and Freshness. You may also need to use a darker image/background for your single forum pages.

    #165385
    Stephen Edgar
    Keymaster

    If you select a different forum from the dropdown, e.g. SMF what error do you get?

    Can you also try using an incorrect password, you should be seeing some kind of errors here rather than nothing each time.

    #165381

    In reply to: several forum

    Robkk
    Moderator

    You might need to look into using LearnPress and this plugin. I think it should do what you want, but you may need to leave a support topic on the plugin’s below support forum just to make sure.

    https://wordpress.org/plugins/learnpress-bbpress/

    Or this might be custom development for a plugin.

    But what you can do is at the bottom of each post just insert one of the single forum shortcodes.

    Like this.

    [bbp-single-forum id=$forum_id]

    You can find the forum id by using a plugin like Reveal IDs to make life easier, and all you have to do is go to Forums > All Forums in the WordPress backend to see all of your forums ids.

    Shortcodes

    Same thing with topics if you to assign topics for each post.

    #165380

    In reply to: SMF Import Help Needed

    Robkk
    Moderator

    Since you still need help on this. First do not import SMF to phpbb, just try leaving it in SMF and import from there. users have had problems importing from phpBB lately but not SMF.

    You have to make sure you are not using a remote database.

    Make sure to always check the import troubleshooting.

    Import Troubleshooting

    Run through this topic to see if you have any similar issues others may of have, and Stephen may have answered already.

    https://bbpress.org/forums/topic/smf-import-to-bbpress/

    #165378
    Robkk
    Moderator

    You need help with bbPress using a certain theme template?? Is that what you are saying??

    This guide will help you (I hope), I am not entirely sure you want specifically though. I bet the information is useful to learn though.

    Getting Started in Modifying the Main bbPress Template

    #165369
    Robkk
    Moderator

    Try some troubleshooting, and also link to your site to a forum where the error occurs. Also tell me your WordPress and bbPress versions are.

    Troubleshooting

    #165359
    Robin W
    Moderator

    you can use the shortcode [bbp-topic-index] in a new page – this will show the latest 15 topics across all forums with pagination.

    azteca1001
    Participant

    hi guys!
    first of all, this is my very first installation, and i have really not very much experience with content managment systems in general, so be soft on me please.

    second, everything actually seems to work, except for the fact, that apache2 returns an error 404 for each and every single page, that i would like to open from bbpress.

    i created some forums, and posted a test post in there.

    that content i found in the mysql database in the wp_posts table, so the communication to the mysql database basically works.

    but from the looks of it, when you try to call that contnet, apache seems to be looking in the actual filestructure for those files/that content, rather than within the mysql database.

    the very only hint that i could find on the net, was that something with my htaccess file could be wrong.
    so as regular expressions make basically not much sense do decifer, when you haven’t the single first clue, what is supposed to go through them, i cannot tell, whether what i i found in these files is correct, here is, what /etc/pordpress/htaccess contains:

    
    # For rewrite rules needed for making WordPress URL friendly
    # See Options -> Permalinks for details and please use the defaults,
    # especially in mind when hosting several blogs on one machine!
    
    ##
    ## Configuration for a single blog hosted on / (root of the website)
    ##
    #<IfModule mod_rewrite.c>
    #RewriteEngine On
    #RewriteBase /
    #RewriteCond %{REQUEST_FILENAME} !-f
    #RewriteCond %{REQUEST_FILENAME} !-d
    #RewriteRule . /index.php [L]
    #</IfModule>
    
    ##
    ## Configuration for a multi-site wordpress installation using subdomains
    ##
    #<IfModule mod_rewrite.c>
    #RewriteEngine On
    #RewriteBase /
    #RewriteRule ^index\.php$ - [L]
    ## uploaded files
    #RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]
    ## real files dealt directly
    #RewriteCond %{REQUEST_FILENAME} -f [OR]
    #RewriteCond %{REQUEST_FILENAME} -d
    #RewriteRule ^ - [L]
    ## other go through index.php
    #RewriteRule . index.php [L]
    #</IfModule>
    

    /usr/share/wordpress/.htaccess
    contains exactly the same,

    /var/www/wordpress/.htaccess
    contains:

    
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress
    

    /var/www/wordpress/wp-content/plugins/buddypress/bp-forums/bbpress/bb-admin/includes/defaults.bb-htaccess.php
    contains this:

    
    <?php
    
    $_rules = <<<EOF
    # BEGIN bbPress
    
    Options -MultiViews
    
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase %PATH%
    
    RewriteRule ^page/([0-9]+)/?$ %PATH%index.php?page=$1 [L,QSA]
    RewriteRule ^forum/([^/]+)/page/([0-9]+)/?$ %PATH%forum.php?id=$1&page=$2 [L,QSA]
    RewriteRule ^forum/([^/]+)/?$ %PATH%forum.php?id=$1 [L,QSA]
    RewriteRule ^forum/?$ %PATH% [R=302,L,QSA]
    RewriteRule ^topic/([^/]+)/page/([0-9]+)/?$ %PATH%topic.php?id=$1&page=$2 [L,QSA]
    RewriteRule ^topic/([^/]+)/?$ %PATH%topic.php?id=$1 [L,QSA]
    RewriteRule ^topic/?$ %PATH% [R=302,L,QSA]
    RewriteRule ^tags/([^/]+)/page/([0-9]+)/?$ %PATH%tags.php?tag=$1&page=$2 [L,QSA]
    RewriteRule ^tags/([^/]+)/?$ %PATH%tags.php?tag=$1 [L,QSA]
    RewriteRule ^tags/?$ %PATH%tags.php [L,QSA]
    RewriteRule ^profile/([^/]+)/page/([0-9]+)/?$ %PATH%profile.php?id=$1&page=$2 [L,QSA]
    RewriteRule ^profile/([^/]+)/([^/]+)/?$ %PATH%profile.php?id=$1&tab=$2 [L,QSA]
    RewriteRule ^profile/([^/]+)/([^/]+)/page/([0-9]+)/?$ %PATH%profile.php?id=$1&tab=$2&page=$3 [L,QSA]
    RewriteRule ^profile/([^/]+)/?$ %PATH%profile.php?id=$1 [L,QSA]
    RewriteRule ^profile/?$ %PATH%profile.php [L,QSA]
    RewriteRule ^view/([^/]+)/page/([0-9]+)/?$ %PATH%view.php?view=$1&page=$2 [L,QSA]
    RewriteRule ^view/([^/]+)/?$ %PATH%view.php?view=$1 [L,QSA]
    RewriteRule ^rss/?$ %PATH%rss.php [L,QSA]
    RewriteRule ^rss/topics/?$ %PATH%rss.php?topics=1 [L,QSA]
    RewriteRule ^rss/forum/([^/]+)/?$ %PATH%rss.php?forum=$1 [L,QSA]
    RewriteRule ^rss/forum/([^/]+)/topics/?$ %PATH%rss.php?forum=$1&topics=1 [L,QSA]
    RewriteRule ^rss/topic/([^/]+)/?$ %PATH%rss.php?topic=$1 [L,QSA]
    RewriteRule ^rss/tags/([^/]+)/?$ %PATH%rss.php?tag=$1 [L,QSA]
    RewriteRule ^rss/tags/([^/]+)/topics/?$ %PATH%rss.php?tag=$1&topics=1 [L,QSA]
    RewriteRule ^rss/profile/([^/]+)/?$ %PATH%rss.php?profile=$1 [L,QSA]
    RewriteRule ^rss/view/([^/]+)/?$ %PATH%rss.php?view=$1 [L,QSA]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^.*$ %PATH%index.php [L]
    </IfModule>
    
    # END bbPress
    EOF;
    
    $_rules = str_replace( '%PATH%', bb_get_option( 'path' ), $_rules );
    

    if i set the permalinks from “nice links” to php=dafb51fd1? , then i get

    Oops! That page can’t be found.

    any ideas, please?

    thanks in advance and yours, azteca.

    #165355
    strategeek
    Participant

    Here is a working code. Hooray!

    function displayTagElements($selectedTags, /* $userRole, */ $task){
       $html= array();
    $tags = get_categories(array('hide_empty' => 0, 'taxonomy' => 'topic-tag'));
    $selectedTagsArray = explode(',', $selectedTags);
    if($userRole != 'bbp_participant' || $task != 'edit') {
        $html[] = "";
        foreach($tags as $tag) {
            $selected = '';
            if (in_array($tag->name, $selectedTagsArray)) {
                $selected = 'checked';
            }
            $html[] = "<input type='checkbox' name='bbp_topic_tags[]'".$selected." value=". $tag->name .">". $tag->name;
        }
    } else {
        $html[] = $selectedTags;
    }
    return implode('', $html);
    #165344

    In reply to: bbPress Shortcode

    Robin W
    Moderator
    #165343
    Robin W
    Moderator

    Before Posting

    in particular

    ]https://codex.bbpress.org/getting-started/troubleshooting/

    #165334
    Acs-Yt
    Participant

    Hi,

    I was not able to find a shortcode like [bbPress_forum] to add a forum on a page. Is there a code available?

    #165331
    Robkk
    Moderator

    the bbpress.php template looks fine to me.

    There might be other custom functions for bbPress somewhere though? or cache?

    Try some troubleshooting. See if it is a plugin issue, issue is only present in your custom theme, and maybe run the repair tools to recalculate.

    Troubleshooting

    #165329
    23creative
    Participant

    @strategeek

    its been a while and im not 100% sure this will work (in terms of sanitation checks) but if you change

    $html[] = '<select class="chzn-select" multiple="multiple" name="bbp_topic_tags[]" id="bbp_topic_tags">';
                foreach($tags as $tag){
                    $selected = '';
                    if (in_array($tag->name, $selectedTagsArray)) {
                       $selected = 'selected="selected"';
                    }
                    $html[] = '<option '.$selected.' value="'.$tag->name.'">'.$tag->name.'</option>';
                }
            $html[] = '</select>';

    to

    foreach($tags as $tag){
        $selected = '';
        if (in_array($tag->name, $selectedTagsArray)) {
          $selected = 'checked="selected"';
        }
       $html[] = '<input '.$selected.' type="checkbox" name="bbp_topic_tags" value="'.$tag->name.'">'.$tag->name;
    }

    i haven’t tested it but it should get you close

    #165326
    Robkk
    Moderator

    @casiepa Thanks for creating a plugin to solve this problem for users. It is greatly appreciated. I have a few questions though.

    How do I use it??

    The setting are confusing me a little bit, and it doesn’t seem to show the subscriptions, but I do not really know where to manage them in the plugin. I just see a list of users with a button that says `[has role]’. I also do not think your plugin works for sub-forums/child forums of categories.

    How does it work exactly??

    I try to set it up, but I am still confused. Also there are a few errors while activating it with debug set to true in my wp-config.php file.

    define('WP_DEBUG', true);

    https://codex.wordpress.org/Debugging_in_WordPress

    Robkk
    Moderator

    @leng7881’s code worked for me @ghoush

    Leng7881
    Participant

    Log’s who knew? From further examination due to the log telling me to look I found that I have a gh_ in front of the function name when declaring it. There error is also in your updated code above. Now that I took that out it works great. Here is the code without the minor syntax error and thank you for this.

    function post_published_create_topic( $ID, $post ) {
        $checkduplicate = get_post_meta( $ID, 'gh_topic_created',true);
        if ( empty( $checkduplicate ) ) {
            $author = $post->post_author;
            $name = get_the_author_meta( 'display_name', $author );
            $title = $post->post_title;
            $permalink = get_permalink( $ID );
            $excerpt = $post->post_excerpt;
            $subject = sprintf( '%s: %s', $name, $title );
            $message = sprintf ('[b]%s[/b]' . "\n" . 'By %s' . "\n\n" . '[i]%s[/i]' . "\n\n" . 'View: %s' . "\n\n", $title, $name, $excerpt, $permalink );
            $tags = wp_get_post_tags( $ID, array( 'fields' => 'names' ) );
    
            $new_post = array(
                'post_title'    => $subject,
                'post_content'  => $message,
                'post_parent' => 72,
                'post_status'   => 'publish',
                'post_type' => 'topic'
            );
            $topic_meta = array(
                'forum_id'       => $new_post['post_parent']
            );
            $topic_id = bbp_insert_topic($new_post, $topic_meta);
            if ( !empty( $topic_id ) ) {
                add_post_meta($ID, 'gh_topic_created', 'true', true);
                $term_taxonomy_ids = wp_set_object_terms( $topic_id, $tags, 'topic-tag' );
                bbp_update_forum(array('forum_id' => 72));
            }
        }
    }
    add_action( 'publish_post', 'post_published_create_topic', 10, 2 );
    #165318
    Jake Hall
    Participant

    As I expected, was something to do with the rewrite rules. Was a very simple fix, I simply started messing with the rewrite until it worked. This is how mine works flawlessly should anyone have the same issur and somehow stumble across this thread.

    Note: This is for lighttpd. This is not an Apache or Nginx solution.

    # This is mainly a fix for bbPress and its functions
    url.rewrite = (
        "^/(wp-admin|wp-includes|wp-content|gallery2)/(.*)" => "$0",
        "^/(.*)\.(.+)$" => "$0",
        "^/(.+)/?$" => "/index.php/$1"
      )
    }

    All I did here was remove the additional forward slash within each rule.

    Now my links work perfectly!

Viewing 25 results - 8,151 through 8,175 (of 32,570 total)
Skip to toolbar