Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 5,926 through 5,950 (of 32,519 total)
  • Author
    Search Results
  • #178006
    Robin W
    Moderator

    sorry the code is/was untested.

    Try this with a correction

    function add_custom_role( $bbp_roles ) {
     
    $bbp_roles['my_custom_role1'] = array(
    'name' => 'vip',
    'capabilities' => bbp_get_caps_for_role( bbp_get_participant_role() ) // the same capabilities as participants
    );
    return $bbp_roles;
    }
    add_filter( 'bbp_get_dynamic_roles', 'add_custom_role', 1 );
    #177999
    Stephen Edgar
    Keymaster

    On the importer screen there is an option to select what forum you are importing from, I presume you selected phpBB from that dropdown?

    #177984

    In reply to: First post not showing

    Robkk
    Moderator

    Install the other wpfix 2 plugin. It should have the same code snippet you are trying to use, without having to place any code anywhere.

    I recommend users who are beginners to not edit bbPress core files. Or any other plugin/theme/wordpress core files unless you know exactly what you are doing code wise.

    #177982

    In reply to: Threaded layout

    Robkk
    Moderator

    Okay, yeah this site does have an interesting layout.

    http://eat.at/swap/forum1/251729_Help_Need_recipe_for_fig_jam_ASAP

    From what I can see real quick.

    Your not going to edit the loop-single-reply.php file like @netweb suggested, because after clicking the reply title link you are redirected to a normal layout single reply. So to get this layout you are going to edit content-single-topic.php, remove the pagination, and place a custom template instead of loop-replies..php so that you won’t mess with replies in a forum profile.

    <?php if ( bbp_has_replies() ) : ?>
    
    	<?php bbp_get_template_part( 'pagination', 'replies' ); ?>
    
    	<?php bbp_get_template_part( 'loop',       'replies' ); ?>
    
    	<?php bbp_get_template_part( 'pagination', 'replies' ); ?>
    
    <?php endif; ?>

    Replace the above code with this for example.

    <?php if ( bbp_has_replies() ) : ?>
    
    	<?php bbp_get_template_part( 'loop',       'classic-threads' ); ?>
    
    <?php endif; ?>

    The code that will be in loop-classic-threads.phpwill be a copy of loop-replies.php and a very minimal loop-single-reply.php. Wherever say <?php bbp_get_template_part( 'loop', 'single-reply' ); ?> is called in the new loop-classic-threads.php file, I would just copy the whole loop-single-reply.php template where that get template function was and keep only the code you need.

    The code that is going to be in the area you put the loop-single-reply.php code is only going to have the username, date, maybe the reply positions, and reply title. The reply title is going to mostly come from a customized version of the bbPress reply title plugin. But you are going to output the reply title in the template as a link. A link (I think bbp_reply_url() is the right function ) to the single reply template, which is only 1 reply isolated, which bbPress can do.

    Does this help enough??

    I’m gonna see if I can recreate most of this layout later

    #177978

    In reply to: First post not showing

    Robkk
    Moderator

    You did try Robins plugin right. I think this plugin was created to solve this exact issue that might occur when using membership plugins. It mainly fixes a bug in bbPress that is triggered using these plugins.

    http://www.rewweb.co.uk/bbpress-wp4-fix/

    There is also this which basically includes the show lead function in the plugin, that is still here.

    https://codex.bbpress.org/bbp_show_lead_topic/

    http://www.rewweb.co.uk/bbpress-wp4-fix2/

    #177928

    In reply to: Threaded layout

    xmanca
    Participant

    Hi Stephen,
    I had actually created the custom template previously and tried what you said. But all it does is eliminate the content and this is why I moved on to try to identify what is going on in the function. I would much rather not touch the function code and do everything via custom template for a lot of reasons including staying safe with future updates.

    As it is, if I remove the reply_content code in the child theme, it still leaves the replies in there but just with no content in them other than the author area. If I remove the author area as well then I no longer see anything but there are no links to the replies.

    I tried figuring out some sort of reply_url but nothing has worked for me – where I’m stuck. The closest I’ve come is to use this:

    <?php bbp_reply_url(); ?>

    in that same area. The result is that I get plain text urls (not hyperlinks) in a thread tree of sorts. However those links do not link to the actual content of the reply. So what you get is like this:

    The topic is at the url http://testsite.com/forum/topic/test1/
    The content of the original post is at the top and underneath are urls like:
    August 27, 2016 at 9:04 pm http://testsite.com/forum/topic/test1/#post-10
    August 27, 2016 at 9:06 pm http://testsite.com/forum/topic/test1/#post-11
    August 27, 2016 at 9:03 pm http://testsite.com/forum/topic/test1/#post-8
    August 27, 2016 at 9:04 pm http://testsite.com/forum/topic/test1/#post-9

    If I go to any of those urls then it just displays the original post and scrolls down to where that URL exists in the tree below the original post content. The actual content of the reply is not displayed – just the content of the original post.

    Pascal Casier
    Moderator
    #177946
    istrix
    Participant

    @robin-w
    I undo my post above in functions file then paste the code you provide.

    Then…

    The site.domain page isn’t working

    site.domain is currently unable to handle this request.
    HTTP ERROR 500

    please help

    #177943
    Robin W
    Moderator

    if tyoun just want a role called VIP with participant capabilities, then undo whatever you did above, and then put this in your functions file

    function add_custom_role( $bbp_roles ) {
     
    $bbp_roles[''my_custom_role1'] = array(
    'name' => 'vip',
    'capabilities' => bbp_get_caps_for_role( bbp_get_participant_role() ) // the same capabilities as participants
    );
    return $bbp_roles;
    }
    add_filter( 'bbp_get_dynamic_roles', 'add_custom_role', 1 );
    #177936
    milliways2650
    Participant

    I have setup WordPress on a computer (Raspberry Pi3 running Ubuntu MATE 16.04) and it is working.

    I installed bbPress and am trying to import my phpBB Forum http://binnie.id.au/BulletinBoard/index.php

    It is unclear exactly what I need to enter in the “Import Forums” dialog.
    I have tried many different options. I am assuming that this is asking for MySQL details.

    My CPanel reports
    Server: Localhost via UNIX socket
    Server type: MySQL
    Server version: 5.5.48-cll – MySQL Community Server (GPL)
    Protocol version: 10
    User: iabi1038@localhost
    Server charset: UTF-8 Unicode (utf8)

    MySQL® Databases shows
    Database Size Privileged Users
    iabi1038_phpb1 2.32 MB iabi1038_phpb1

    I have tried

    Database Server binnie.id.au
    Database Name iabi1038_phpb1
    Database User iabi1038_phpb1
    Table Prefix phpbb_

    This chugs along, with no obvious errors, except it seems to find nothing.

    No reply_to parents to convert

    No replies to convert

    No tags to convert

    No super stickies to stick

    No stickies to stick

    No topics to convert

    No forum parents to convert

    No forums to convert

    No passwords to clear

    No users to convert

    Starting Conversion

    #177932
    istrix
    Participant

    Please help me create a new bbp role w/c is VIP.

    add_filter( 'bbp_get_dynamic_roles', 'ntwb_bbpress_custom_role_names' );
      
    function ntwb_bbpress_custom_role_names() {
        return array(
      
            // Keymaster
            bbp_get_keymaster_role() => array(
                'name'         => 'Administrator',
                'capabilities' => bbp_get_caps_for_role( bbp_get_keymaster_role() )
            ),
      
            // Moderator
            bbp_get_moderator_role() => array(
                'name'         => 'Moderator',
                'capabilities' => bbp_get_caps_for_role( bbp_get_moderator_role() )
            ),
      
            // Participant
            bbp_get_participant_role() => array(
                'name'         => 'Member',
                'capabilities' => bbp_get_caps_for_role( bbp_get_participant_role() )
            ),
      
            // VIP
            bbp_get_participant_role() => array(
                'name'         => 'VIP',
                'capabilities' => bbp_get_caps_for_role( bbp_get_participant_role() )
            ),
      
            // Spectator
            bbp_get_spectator_role() => array(
                'name'         => 'Guest',
                'capabilities' => bbp_get_caps_for_role( bbp_get_spectator_role() )
            ),
      
            // Blocked
            bbp_get_blocked_role() => array(
                'name'         => 'Banned',
                'capabilities' => bbp_get_caps_for_role( bbp_get_blocked_role() )
            )
        );
    }
    #177931
    Stephen Edgar
    Keymaster

    If you’re using any phpBB mods this might cause issues.

    You also need to make sure you use bbPress 2.6 alpha, which includes all the changes required , you cannot simply copy the changed phpBB.php file to a different bbPress version.

    To use the most up to date phpBB importer use bbPress 2.6-alpha as I pointed out, if you have to use the old phpBB version use bbPress 2.5.10.

    But as I’ve said, there are huge improvements to the phpBB importer in 2.6-alpha so updating phpBB to the latest version is my recommendation.

    nollies1
    Participant

    I’ve been silently lurking about here for a few months, this is my first official post.

    I always try to do my best flying solo per se when it comes to troubleshooting.

    Having said that, I have a quick question pertaining to the Codex ‘examples you can use’ in the functionality and layout section; if one of you might nudge me a bit then I would be most appreciative… I’m but a padawan with regard to coding/ comprehending the language, but I’m slowly learning little by little.

    For ease of reference, the example I am referring to is for the following (direct copy/paste of statement): “This solution lets you add an “edit profile” to your wordpress menu – this only appears as a menu item if the user is logged in.”

    To take this a step further, is it possible to get this working but not yielding it as being a main parent menu item?, perhaps it is achievable by changing some of the code in the example published in the codex?… or adding additional code?

    That is, if at present there is an existing menu of Home, About, Accounts, Contact us, etc. etc…. who might be able to provide me with clues on how one could read/interpret/tweak the code provided on that codex page such that the ‘edit profile’ looks and performs exactly as intended, but rather than showing up on the main nav menu to instead have it be revealed, let’s say, under the ‘Accounts’ item, i.e., as a child to Accounts…

    Yes this reveals what little I know in terms of understanding how to read code, and/but/so I’d appreciate any helpful suggestions on whether the above scenario is possible.

    Thanks for reading 🙂

    Cheers,

    #177919
    Robkk
    Moderator

    This issue is caused because the widget links have the same classes as other links throughout bbPress. In your theme mesocolumn, there is CSS in a bb-css stylesheet that bolds the forum titles.

    In this custom CSS I just set a default font-weight for any widget area.

    You may need to show your theme author this so that maybe they can add it or something similar to their theme.

    And I need to note this down as a possible issue that users might occur when customizing their forums/developing themes.

    This is custom CSS add it in the custom css area your theme provides.

    .widget-area li a {
      font-weight: normal;
    }
    #177918
    wautom
    Participant

    Hi All,

    I already spent two hours working on this, but failed miserably.

    I want to change the font of the topics listed in Recent Topics widget as normal, instead of bold style.
    Which code should I change?

    I tried in bbpress.css, line 166, it seems it has no effect at all.

    Please see this image: the font is too bold, I want it be normal

    Thanks very much.

    #177909
    Robkk
    Moderator

    Its a common issue related to WordPress comments theme styling having issues with bbPress replies since they have a common class attribute .reply.

    Since your theme is a free WP theme, I was able to test it out real quick to see the issues.

    Use all this custom CSS, add it into a child themes style.css file or in a custom css plugin.

    Know that if it does not work, try adding !important at the end, for example like this.

    Also know that some of the CSS is for your replies links color, so change that if you end up changing your links color so that it would match.

    .example {
      position: relative !important;
      right: auto !important;
    }

    Here is all the custom CSS you would need to use to fix your theme related issue.

    #bbpress-forums .reply a {
      position: relative;
      right: auto;
      bottom: auto;
      display: initial;
      padding: 0;
      border: none;
      font-size: inherit;
      text-transform: none;
      -webkit-transition: none;
      transition: none;
    }
    
    #bbpress-forums .reply a {
      border-color: inherit;
      color: #BF4D28;
    }
    
    #bbpress-forums .reply a:hover {
      color: #E6AC27;
      background-color: inherit;
    }
    #177898

    In reply to: Threaded layout

    Stephen Edgar
    Keymaster

    You shouldn’t need to edit any of bbPress functions.

    You can achieve what you are after by adding your own custom templates:

    This is a guide to getting started with these: https://codex.bbpress.org/themes/amending-bbpress-templates/

    This is a helpful reference for bbPress’ templates: https://codex.bbpress.org/themes/theme-compatibility/template-hierarchy-in-detail/

    What I think you’d be looking to do is make changes to your child themes loop-single-reply.php template so that only the links to replies are there by removing bbp_reply_content() .

    #177890
    Robkk
    Moderator

    Yeah you can probably do it. You may need to customize the bbPress templates in a child theme. Then just add a link where it says to login in html or php. I think the files you will need to edit are in the form-reply.php and form-topic.php files.

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

    #177877
    Robkk
    Moderator
    #177866
    siparker
    Participant

    You can use this

    Mediapress BBpress Gallery Insert From Editor


    It works with media press but even if you dont use mediapress it works by adding the img bbcode into the posts.

    #177836
    haddly
    Participant

    Hi there, sorry it has taken so long to reply to this.
    The code you gave me works but the email address overlaps with the text in the post.
    Any idea how to fix that?
    Thanks again

    #177814
    antoinemayer
    Participant

    Hi everyone 🙂

    I want my bbPress threads to be automatically marked as “solved” if the question (first message) gets 50 upvotes (yeah, I know that’s weird) and the upvotes/downvotes to get blocked. Yet, I want the thread to remain “open” even while it is solved, allowing users to keep on writing answers.

    Is there some code (something like “if $upvotes>=’50’ { $threadStatus=’Solved’ };”) I could use to achieve that?

    themichaelglenn
    Participant

    Alright, I probably didn’t do this in the best way, but I figured out how to “fork” your github code and create a separate branch but it’s under my username (I didn’t know if it’s okay to just go creating branches in someone else’s repository, so I just set up in my own):

    https://github.com/themichaelglenn/bbpress-vbulletin-permalink/tree/no-f-s-or-id-s-in-forums

    Again I need to make clear that I do not know what I’m doing – but whatever I did is working on my localhost and on my test site (which site will only be up long enough to test everything on an actual server, so no link to that site, sorry)

    I don’t know if I would still get the topic URLs forum/forum-name/ID-topic-name if I kept removing more code, to get it down to where we were only rewriting the topic URLs? I’d like to try that but I don’t know how much more I can remove before the plugin just stops working altogether.

    #177809
    Robin W
    Moderator

    bbp_get_topic_author_id( $topic_id )

    bbp_get_reply_author_id()

    #177792
    Robkk
    Moderator

    @evanevans333

    It seems that’s all we got to work with. Participant role is not supposed to be for wordpress Subscribers apparently. You need to become something else, to read topics and replies inside forums marked private, and I guess shouldn’t mark a forum private with bbPress unless it’s supposed to be private for Moderators and Administrators.

    That seems so … ridiculous if you pardon my French. That Forum Roles are not for forum privacy, but more for Forum administrative privacy.

    You are probably experiencing a bug, or just some issues with your current configuration, private forum should be for logged in users only. Also a specific forum for mods and admins might be a hidden forum.

    Im skimming through the topic right now, but I will look at this topic more tomorrow morning and see if I need to report any issues.

    What I say that we do is try to fix the private forum issue in bbPress by default without using Robins plugin for now, then when its fixed you can decide to use it later if you want to.

    Run the repair tools one at a time in Tools > Forums. There are a few that are definitely helpful like repairing private forum relationships.

    Editing user role caps for some users could cause issues as well, so we might need to refresh each roles caps, and remap the default ones to users.

    that I am supposed to set their privacy to Public and use some kind of FORUM PRIVACY plugin to make sure the content doesn’t get leaked out to Google and anonymous web surfers.

    If you want a forum for only logged in users setting a forum or parent forum private will do that. Other niche privacy features could be obtained through plugins.

    Now, the issue moving forward is, that topic and reply activity that go on inside those forums, is not properly being set to Private and so those Activities are showing up in widgets and shortcode locations and archives as public information

    Do you want all your forums to be private? It might be better to put anything bbPress as members only content, like just block off sections of your site to only members using a different type of plugin.

    If you do want some forums to be public, then I guess we can use some conditionals for some widgets to display different widgets for logged in users and those who are not. Like say the recent replies widget, I would display only replies from public forums to users not logged in in one widget, and display all replies to users who are not logged in another. If you do want to use Robins plugin, he does have custom widgets in it, but that is if you want group forums.

Viewing 25 results - 5,926 through 5,950 (of 32,519 total)
Skip to toolbar