Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 8,126 through 8,150 (of 32,570 total)
  • Author
    Search Results
  • #165539

    In reply to: bbPress Shortcode

    Acs-Yt
    Participant

    I added them into the “Simple Custom CSS” plugin, downloaded from wordpress.org.

    At the end, it looked like:

    @media and (min-width: 992px) {
     .bbpress .col-md-8 {
        width: 100% !important;
     }
    }
    

    and

    @media and (min-width: 992px) {
     .bbpress .col-md-8 {
        width: 100% !important;
     }
    }

    It is still not Full-Width 🙁

    gurselgunacar
    Participant

    Hello, i am trying to find a code or plugin to restrict url links in topics for non loged in users. For example :
    to download click here : http://www.blabla.com > non loged in users will see please register or log in to see links.

    #165535
    project_subdomain
    Participant
    <?php if ( bbp_is_single_forum('ID') ) :?>
    <div>…</div>
    <php endif;?>

    does not work (no div at all at forum with this ID).

    #165532
    Robkk
    Moderator

    Not sure yet but maybe using a conditional bbp_is_single_forum('ID') with ID being the id of the forum.

    #165530

    In reply to: bbPress Shortcode

    Robkk
    Moderator

    Where did you put the CSS?? Did you add !important to the end like this??

    width: 100% !important;

    #165527
    Robkk
    Moderator

    Okay I found a few fixes for this possible bug, I will need to contact the devs later to see if they had seen something similar before. One is an htaccess rewrite rule and the other is really something simple.

    Okay you can try the trailing slash fix mentioned here first to see if it helps, but you are not really experiencing a 404 error because the search term you are searching is stripped for some reason.

    bbPress 2.4 // ERROR // Search stopped working…

    As a test try setting your permalinks to default and try searching again to see if it will keep your search term and search for it. The query search?action=bbp-search-request&bbp_search=adwords is usually seen in the default permalink structure instead of /search.

    Also make sure you do not have a trailing slash in any of the slugs in Settings>Forums.

    The htaccess rewrite method is adding this to your htaccess file on your site that is uaually in the WordPress directory to solve the issue, but do not try this just yet, I don’t want you messing with your htaccess file

     # BEGIN bbpress search hack
    <IfModule mod_rewrite.c>
    	RewriteEngine On
    	RewriteCond %{QUERY_STRING} ^action=(.*)&bbp_search=(.*)$
    	RewriteRule ^/soeg/(.*)$ http://antonhoelstad.dk/soeg/%2/? [L]
    </IfModule>
    # END bbpress search hack
    #165520
    Robkk
    Moderator

    When I tested it, it doesn’t have the extra added query ?action=bbp-search-request&bbp_search=” like your site does.

    I also tested it with/without the forum root slug and it worked fine for me.

    #165519

    In reply to: bbPress Shortcode

    Robin W
    Moderator
    #165516

    In reply to: SMF Import Help Needed

    sharingsunshine_wp
    Participant

    I deactivated all the plugins and now I am getting this error

    WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'groups_table.forum_id = forums_table.forum_id LIMIT 0, 100' at line 1]
    SELECT convert(forums_table.the_forum_id USING "utf8mb4") AS the_forum_id,convert(forums_table.the_parent_id USING "utf8mb4") AS the_parent_id,convert(forums_table.the_topic_count USING "utf8mb4") AS the_topic_count,convert(forums_table.the_reply_count USING "utf8mb4") AS the_reply_count,convert(forums_table.the_total_topic_count USING "utf8mb4") AS the_total_topic_count,convert(forums_table.the_total_reply_count USING "utf8mb4") AS the_total_reply_count,convert(forums_table.the_forum_title USING "utf8mb4") AS the_forum_title,convert(forums_table.the_forum_slug USING "utf8mb4") AS the_forum_slug,convert(forums_table.the_forum_description USING "utf8mb4") AS the_forum_description,convert(forums_table.the_forum_order USING "utf8mb4") AS the_forum_order,convert(groups_table.forum_id USING "utf8mb4") AS forum_id FROM smf_forums_table AS forums_table INNER JOIN smf_groups_table AS groups_table USING groups_table.forum_id = forums_table.forum_id LIMIT 0, 100
    

    I made sure I am using your revision of code. I only have the bbPress plugin activated and I put the site in maintenance mode via .htaccess

    Thanks for helping me with this.

    Randal

    #165515
    Robkk
    Moderator

    What are the bbPress plugins you have on your site?? There has been some similar issues while using some specific plugins.

    Also did the user see the issue message somewhere in the form like the flood control errors in bbPress or was it displayed in place of the whole site?? This issue could also be a connection time out error on your server.

    https://codex.wordpress.org/Common_WordPress_Errors#Connection_Timed_Out

    #165514

    In reply to: bbPress Shortcode

    Acs-Yt
    Participant

    I’m sorry to ask, but as I’m very new to css & php, I really don’t know, where to paste this code.

    But nevertheless, thanks for the code.

    #165509

    In reply to: SMF Import Help Needed

    sharingsunshine_wp
    Participant

    Thanks for the code. I ran through the converter and this time it shows the correct topics and reply count until you actually look into each topic. All the topics I have checked are missing replies.

    The user count is still double even though I checked purge and it said no cleanup necessary.

    Looks like we are much closer so thanks for getting us there.

    Do I need to do anything to the forum to make it ready? I do have some mods on it do they need to be removed? I didn’t see anywhere saying to remove them so thought I would ask.

    #165504
    Robkk
    Moderator

    The information for adding new fields for topics could be helpful for adding fields to the reply form too. You may need to just change the word topic in any hooks used to reply, or just any word with topic with reply in the code.

    If you are just adding a simple text box for the reply form you can look over this example.

    add_action ( 'bbp_theme_before_reply_form_content', 'bbp_extra_reply_fields');
    function bbp_extra_reply_fields() {
       $waffle = get_post_meta( bbp_get_reply_id(), 'bbp_waffles', true);
       $pancake = get_post_meta( bbp_get_reply_id(), 'bbp_pancakes', true);
       echo '<fieldset class="bbp-form">';
       echo '<p><label for="bbp_waffles">Waffles</label><br>';
       echo "<input type='text' name='bbp_waffles' value='".$waffle."'></p>";
       echo '<p><label for="bbp_pancakes">Pancakes</label><br>';
       echo "<input type='text' name='bbp_pancakes' value='".$pancake."'></p>";
       echo '</fieldset>';
    }
    
    add_action ( 'bbp_new_reply', 'bbp_save_extra_fields', 10, 1 );
    add_action ( 'bbp_edit_reply', 'bbp_save_extra_fields', 10, 1 );
    
    function bbp_save_extra_fields($reply_id) {
      if (isset($_POST) && $_POST['bbp_waffles']!='')
        update_post_meta( $reply_id, 'bbp_waffles', $_POST['bbp_waffles'] );
      if (isset($_POST) && $_POST['bbp_pancakes']!='')
        update_post_meta( $reply_id, 'bbp_pancakes', $_POST['bbp_pancakes'] );
    }
    
    add_action('bbp_theme_after_reply_content', 'bbp_show_extra_fields');
    function bbp_show_extra_fields() {
      $reply_id = bbp_get_reply_id();
      $value1 = get_post_meta( $reply_id, 'bbp_waffles', true);
      $value2 = get_post_meta( $reply_id, 'bbp_pancakes', true);
      echo "Opinion on Waffles: ".$value1."<br>";
      echo "Opinion on Pancakes: ".$value2."<br>";
    }
    project_subdomain
    Participant

    Hi!
    I’m trying to display different divs for all topics of specific forums.
    Wrong:

    <?php if ( is_post(xyz) ) : ?>
    <div>..</div>

    or

    <?php if ($forum_id=xyz) : ?> 
    <div>..</div>

    Suggest to need to use get_topic_id to get current topic ids?
    Would be very happy for any help with this!

    #165494

    In reply to: SMF Import Help Needed

    Robkk
    Moderator

    You get the error from upgrading to 2.0.10??

    Also I can see SMF’s changelog and it mentions this. This might have caused an issue, but it could possibly be a simple fix.

    Fix for unsupported UTF8mb4 characters

    Here is the current SMF.php importer in

    /wp-content/plugins/bbpress/includes/admin/converters/SMF.php

    You can take a look at my gist file/download it and open in an IDE editor.

    https://gist.github.com/robkk/f3a83e6da6bd6bd38f00

    #165493

    In reply to: SMF Import Help Needed

    sharingsunshine_wp
    Participant

    I tried to find the code to actually see what is wrong with the sql statement. I followed these directions thinking the smf importer would be close by.

    ************
    You can also make your own custom importer using the included Example.php located in /bbpress/includes/admin/converters/Example.php to setup an import from any SQL database.

    However, I don’t have a /bbpress folder at the root is it in another subfolder? Or, has it been changed since this page was created?

    Thanks,

    Randal

    Robkk
    Moderator

    This custom CSS would help with your line-height issue.

    #bbpress-forums div.bbp-forum-author, 
    #bbpress-forums div.bbp-topic-author, 
    #bbpress-forums div.bbp-reply-author {
        line-height: 2em;
    }
    #165490
    Robkk
    Moderator

    You cannot see the topic form when logged in??

    Do you see any notices that show in the topic forms place??

    You can try to see if there is a theme/plugin issue first.

    Troubleshooting

    #165489

    In reply to: bbPress Shortcode

    Robkk
    Moderator

    @acs-yt

    Try this custom CSS to see if it would help make your forums full width.

    @media and (min-width: 992px) {
     .bbpress .col-md-8 {
        width: 100%;
     }
    }

    Use this to completely remove the sidebar with CSS.

    @media and (min-width: 992px) {
    .bbpress .col-md-4 {
         width: 0;
         display: none;
     }
    }
    #165485
    Robkk
    Moderator

    @goldlux does this work?? you of course need a way to set the featured image of a topic though.

    add_post_type_support('topic', array('thumbnail'));
    
    function ks_topic_icons() {
    	if ( 'topic' == get_post_type() ) {
    		global $post;
    	    if ( has_post_thumbnail($post->ID) )
    	    	echo get_the_post_thumbnail($post->ID,'thumbnail',array('class' => 'alignleft topic-icon'));
    	 }
    }
    add_action('bbp_theme_before_topic_title','ks_topic_icons');
    #165478

    In reply to: SMF Import Help Needed

    sharingsunshine_wp
    Participant

    Thanks for approving the post and I certainly will heed the links minimum from now on. I upgraded the later version and now I am getting this error.

    Repair any missing information: Continue
    
    WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'users_profile_table.the_user_id = users_table.the_user_id WHERE users_table.the_' at line 1]
    SELECT convert(users_table.the_users_id USING "utf8mb4") AS the_users_id,convert(users_table.the_users_password USING "utf8mb4") AS the_users_password,convert(users_table.the_users_password_salt USING "utf8mb4") AS the_users_password_salt,convert(users_table.the_users_username USING "utf8mb4") AS the_users_username,convert(users_table.the_users_nicename USING "utf8mb4") AS the_users_nicename,convert(users_table.the_users_email_address USING "utf8mb4") AS the_users_email_address,convert(users_table.the_users_homepage_url USING "utf8mb4") AS the_users_homepage_url,convert(users_table.the_users_registration_date USING "utf8mb4") AS the_users_registration_date,convert(users_table.the_users_status USING "utf8mb4") AS the_users_status,convert(users_table.the_users_display_name USING "utf8mb4") AS the_users_display_name,convert(users_table.the_users_aim USING "utf8mb4") AS the_users_aim,convert(users_table.the_users_yahoo USING "utf8mb4") AS the_users_yahoo,convert(users_table.the_users_jabber USING "utf8mb4") AS the_users_jabber,convert(users_profile_table.the_users_id USING "utf8mb4") AS the_users_id FROM smf_users_table AS users_table INNER JOIN smf_users_profile_table AS users_profile_table USING users_profile_table.the_user_id = users_table.the_user_id WHERE users_table.the_user_id != -1 LIMIT 0, 100
    
    #165465
    kachan64
    Participant

    You will have to use
    <?php echo do_shortcode(‘[bbp-topic-index]‘); ?>

    With this code, you can insert it anywhere you want just like a regular HTML

    #165459
    Robin W
    Moderator

    Try adding !important – your theme may be overriding the settings viz

    Layout and functionality – Examples you can use

    project_subdomain
    Participant

    As wordpress strips the break and text tags I’m looking for a solution to add line breaks to my bbp_user_decription div.
    Here is what did not work:
    1.) What I find everywhere is some sort of this added to functions.php:

    remove_filter('pre_user_description', 'wp_filter_kses');

    This does not work, also looking at wordpress’ recent incl/registration.php just saying this file is deprecated makes me think that this code should not get to work at all.

    2.) Alternatively I looked through my themes’files and used

    <?php echo nl2br(get_the_author_meta( 'user_description' )); ?>
    in content.php. Or <?php echo nl2br(get_the_author_meta( 'description' )); ?> in my author.php

    3.) Tried 1) and 2) with bbp_ at the beginning of each decription’s part.

    Nothing worked, break-or p-tags are just ignored.
    Also, is there a secure way to add break-tags only?
    Thanks for any help!

    #165410

    In reply to: bbPress Shortcode

    Robkk
    Moderator

    You would need to follow this and create a bbpress.php file and then come back and I will help you with some CSS that you might need.

    Getting Started in Modifying the Main bbPress Template

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