Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 7,601 through 7,625 (of 32,519 total)
  • Author
    Search Results
  • #167861
    ChrissiLisa
    Participant

    Hello,

    how can I give different childforums there own style ?

    Is there a hook like “before show topics” where I can place my own css style ?
    I counldnt find anything in the codex.

    Thanks,
    bye
    ChrissiLisa

    #167859
    Robkk
    Moderator

    @gin_marcin

    You can also use the code I posted here. It is straight from that plugin.

    Show 5 Recent Topics without Pagination Just like on bbpress.org homepage

    #167857
    gin_marcin
    Participant

    I found now a solution with bbp Stylepack and the provided shrotcodes:

    [bsp-display-topic-index show=’5′ forum =’10’ show_stickies=’true’ template = ‘short’]

    now only the topics from one forum are displayed

    thx for help !
    Marcin

    #167854
    Pascal Casier
    Moderator

    Yeah, this seems to remove it. Place it somewhere where you can add CSS:

    .bbp-topic-form .bbp-form legend {
    	display: none;
    }

    Pascal.

    #167851
    ChrissiLisa
    Participant

    Hello,

    I use this function (in functions.php) to show extra fields over a topic form:

    add_action ( 'bbp_theme_before_topic_form_content', 'bbp_extra_fields');
    function bbp_extra_fields() {
    
    	
    	/*Extra-Felder Baufinanzierungsberater*/
    	if($GLOBALS['forum']=='baufinanzierungsberater'){
    
    		echo '<div id="baufinanzierungsberater_edit_box"><div style="width:50%;float:left;">';
    
       			$value1 = get_post_meta( bbp_get_topic_id(), 'nachname', true);
       			echo '<label for="nachname">Nachname</label>';
       			echo "<input type='text' name='nachname' value='".$value1."'><br />";
    
       			$value2 = get_post_meta( bbp_get_topic_id(), 'vorname', true);
       			echo '<label for="vorname">Vorname</label>';
       			echo "<input type='text' name='vorname' value='".$value2."'><br />";
    }}

    This works. But when I want to edit the fields after saving the topic, the fields are gone. Which action do I have to use to show the fields?

    Thanks,
    best regards
    ChrissiLisa

    #167848
    gin_marcin
    Participant

    hi Pascal,

    Thanks – I was hoping that I do not have to “code” anything 🙂 and can use something already prebuild and only exchange the forum Id.

    THX
    Marcin

    #167846
    Pascal Casier
    Moderator

    Hi,

    That shortcode calls the content-single-forum.php template file. So you’re options are to copy that file to your theme and edit it (but this will be reflected globally, not just in the shortcode).
    Or create your own shortcode based off the bbPress one and have it use a custom template file.

    Pascal.

    #167843
    gin_marcin
    Participant

    Hi,

    Is there a way I can show a topic list from just one forum on a page ?
    I already tried the standard widgets – e.g. recent topics – but this one shows topics from all forums. Additionally I used the shortcode [bbp-single-forum id=00] but this shows beside the list also the creation of a new topic – I only would like to have the list.

    Thanks
    Marcin

    P.S. Working local; WP 4.3.1; bbPress 2.5.8; Theme GeneratePress

    #167839
    PittNZK
    Participant

    Ok, I figured it out.
    Just wrote a small plugin adding the “newzik” protocol :

    <?php
    /**
    * Plugin Name: NZK links support
    * Plugin URI: http://newzik.com/
    * Description: Adds support to newzik:// links
    * Version: 1.0
    * Author: Pierre Mardon
    * Author URI: http://newzik.com/
    * License: None
    */
    
    /**
     * Extend list of allowed protocols.
     *
     * @param array $protocols List of default protocols allowed by WordPress.
     *
     * @return array $protocols Updated list including new protocols.
     */
    function wporg_extend_allowed_protocols( $protocols ){
        $protocols[] = 'newzik';
        return $protocols;
    }
    add_filter( 'kses_allowed_protocols' , 'wporg_extend_allowed_protocols' );
    ?>
    #167838

    Topic: richer toolbar

    in forum Installation
    denaize
    Participant

    Hi

    I’m looking for bbpress, it works well but toolbar lacks a bit of ergonomics.
    My members needs smiley, classical [quote] a quote[/quote] or [code]C code[/code] and picture/files attachement.

    how do I get it ?

    Thank you in advance

    WP 4.3.1 and last bbpress

    #167834
    fabwintle
    Participant

    Hi,

    I am aware I can use the shortcode [bbp-single-tag id=181] to display forum posts associated with the tag 181. However, I’d like to pull content assoociated with more than one tag.

    Could someone please help me?

    Thank you

    #167831
    Robkk
    Moderator

    @mica123

    When you said you got this.

    bbpress
    Response headers:
    cache control: max-age=2592000

    I think you just selected something similar to this in your dev tools.

    bbpress.css?ver=2.5.8-5815

    This is a CSS file, and the cache information you are outputting is just the browser cache information for that CSS file.

    Usually you might find this in your htaccess file for code for browser caching, and this exactly for some CSS files.

    ExpiresByType text/css A2592000

    In the list of names of files being requested, you can try to pick another CSS file like

    responsive.css?ver=1.9.7.7

    And you should see the caching age be the same thing since it is a CSS file.

    Most of the time the browser caching code would be present in your htaccess file wrapped in something like this.

    <IfModule mod_expires.c>

    But there could also be WordPress plugins that add browser caching like some minify plugins.

    You and your dev have to backtrack and find out where and what is causing the browser caching. It is tough for me to find it on my end without a bunch of guessing, but if you want me to try to take a look at it, you can contact me through email here. https://robkkdev.wordpress.com/contact/

    Also that custom login script would not cause this type of issue.

    Also you can delete this piece of code since you are probably not using it correctly.

    wp_enqueue_script( ‘custom-login’, get_stylesheet_directory_uri() . ‘/css/style-login.js’ );

    #167827
    Pascal Casier
    Moderator

    So they were the same…

    The only option I see is to really insist with your current provider, sorry for not being able of more help.
    For the application caching, a lot of pages exist, like http://www.sitepoint.com/common-pitfalls-avoid-using-html5-application-cache/

    BEFORE DOING THE NEXT LINES, MAKE SURE YOU HAVE DIRECT ACCESS TO YOUR FILES ON THE SERVER IN CASE IT GOES WRONG.
    Just a test to see if it helps, can you go in your dashboard, ‘Appearance > Editor’, choose on the right the ‘Header’ (header.php) file and when the file opens, find somewhere the <head> tag and copy the following lines just below :

    <meta http-equiv="cache-control" content="max-age=0" />
    <meta http-equiv="cache-control" content="no-cache" />
    <meta http-equiv="expires" content="0" />
    <meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" />
    <meta http-equiv="pragma" content="no-cache" />	

    If it helps, it could be a workaround for now, but you should not keep this forever.

    Keep subscription to this topic. If I find something else, I’ll post it here, but for now I have no clue.

    Pascal.

    #167822
    Robkk
    Moderator

    This is a common theme issue related to the theme styling absolute positioning the comment reply link for WordPress comments.

    Use this custom css to fix the issue. Add it in your child themes style.css file or anywhere you can add custom css like in a custom css plugin.

    #bbpress-forums .reply {
        position: relative;
        top: inherit;
        right: inherit;
        line-height: inherit;
        font-size: inherit;
    }
    #167810

    In reply to: internal server error

    Pascal Casier
    Moderator

    Hi peoriachuck,

    Thanks for solving most of your own issues 🙂

    Are you a keymaster when you try to view the trashed topics ?
    Who can view the trash is depending on the permissions you have. Check ‘view_trash’ on https://codex.bbpress.org/getting-started/before-installing/bbpress-user-roles-and-capabilities/

    Pascal.

    #167808
    Robkk
    Moderator

    It is a common issue where CSS for WordPress comments reply link has conflicts with actual reply posts in bbPress.

    Copy this custom css in your child themes style.css file or in anywhere you can put custom css like in a custom css plugin.

    #bbpress-forums .reply {
        font-size: inherit;
        padding: inherit;
        position: relative;
        right: inherit;
        top: inherit;
    }
    #167790
    zbgc
    Participant

    Hi all,

    Running WP 4.3.1 and BBPress 2.5.8

    The issue: Forum replies appear above forum content in this theme (have tested using vanilla 2015 theme and there’s no problem). The partial solution is to play with CSS.

    I’ve got a CSS plugin (Simple Custom CSS) and making changes in there, and I’ve managed to get the reply content to appear in almost the right place using:

    ul.forums li {position: relative;}

    However, this means the content appears above the bb-reply-header DIV.

    Any help appreciated 🙂

    Thanks

    L.

    #167787
    Robkk
    Moderator

    I had to get to get a confirmation from Stephen but

    _bbp_topic_count = only published topics

    _bbp_total_topic_count = published/spam/unapproved/trashed topics. Basically the actual total topic count.

    #167784
    gperez-tl
    Participant

    Hi @robkk . Thanks for the comments.

    I’m posting the code. However, the issue may not be at that level. It’s true that sometimes part of the info is ok, and part is wrong. But actually the whole page is being cached. Prove of this is that when I added the html headers (see above) the browsers wouldn’t recognize that tags until I reloaded page with ctrl+F5

    USERNAME
    $user = wp_get_current_user();
    echo $user->user_firstname;

    USER PHOTO
    get_avatar( bbp_get_displayed_user_field( ‘user_email’, ‘raw’ ), apply_filters( ‘bbp_single_user_details_avatar_size’, 150 ) )

    USER NAME UNDER PHOTO
    bbp_get_user_nicename() <- this one sometimes is not being cached as far as I can say

    ———

    I’ll try with another theme. But I’m not sure the views7templates will be recognized. I’ll try and let you know. Thanks for the suggestiong.

    ———


    @mica123
    Nice to know that changing the server solves the issue. That points in one direction. But let’s try to discover what’s the problem with server configuration.

    #167779
    Robkk
    Moderator

    @gperez-tl

    Post the code you are using for the custom howdy message in the toolbar. I do not think this would cause an issue but just double checking.

    Do the same thing with the profile menu items code.

    Just know that you said these were bbPress’s issue although the menu system and the WordPress toolbar are both part of WordPress. The registered menu and menu location are your theme. I do not know how bbPress could cause an issue with this.

    So, (visiting any author’s profile and) clicking on some of these items will show the author’s data, while clicking in others will retrieve current user profile data or something.

    Wait so clicking on anyone’s frontend forum profile could show the current users profile for some reason, or is it just the menu links as you stated.

    You did not edit the user profile templates heavily? you said you are receiving issues with users profiles.

    IF you haven’t already try to track down what is causing the issues you are getting. Since you have a custom theme see if the issue persists in a default theme like twenty twelve, deactivate all plugins but bbPress.

    Troubleshooting

    Your profile pages shouldn’t just be magically be cached by bbPress.

    You may need to create me a test user account so that I can confirm of the issue you are getting, and to also test other areas the cache issue might be present.

    #167775
    Pascal Casier
    Moderator

    Hi mica123,
    Would you mind installing the ‘WP Overview (lite)’ plugin
    and paste here the cache info from the dashboard widget like: WP (Hyper, Super, W3 Total) Cache 0 (since wp2.5), Simplepie Cache 0 Age 0 seconds (since wp2.8)

    Maybe also install the ‘Send System Info’ plugin and send me the info by email.

    Then deactivate the plugins as they might use resources that you don’t want to loose.

    Pascal.

    #167769
    gperez-tl
    Participant

    Adding these metatags to profile pages seems to work. But I have to go through 5 pages and reload with ctrl+F5 to make this happen:

    <meta http-equiv="cache-control" content="max-age=0" />
    <meta http-equiv="cache-control" content="no-cache" />
    <meta http-equiv="expires" content="0" />
    <meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" />
    <meta http-equiv="pragma" content="no-cache" />		

    Code is:

    function head_meta_tags() {
      
        if ( bbp_is_single_user() ) {
           // try to avoid cache in profile pages
            echo '  <meta http-equiv="cache-control" content="max-age=0" />
                    <meta http-equiv="cache-control" content="no-cache" />
                    <meta http-equiv="expires" content="0" />
                    <meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" />
                    <meta http-equiv="pragma" content="no-cache" />';
        }
    }
    add_action( 'wp_head', 'head_meta_tags' , 2 );
    #167767
    gperez-tl
    Participant

    Just to mention that I tried this headers in php side but they wont take effect:

    header("Expires: 0");
    header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
    header("Cache-Control: no-store, no-cache, must-revalidate");
    header("Cache-Control: post-check=0, pre-check=0", false);
    header("Pragma: no-cache");
    #167761
    Robkk
    Moderator

    This is going to increase the font-size of the topic and reply content of the same exact specified font size on your site.

    Add this custom CSS to your child themes style.css file or anywhere else you can put custom CSS like a custom CSS plugin.

    .bbp-topic-content p,
    .bbp-reply-content p {
        font-size: 1rem;
    }

    If you want to increase the font size of other areas of the forum be more specific.

    #167760
    Pascal Casier
    Moderator

    Technically possible as Robkk indicates, ok, but just make sure to keep it under control.
    I’m not sure what maximum number of forums has been tested for visualization and handling inside the different shortcodes and functions.

    Pascal.

Viewing 25 results - 7,601 through 7,625 (of 32,519 total)
Skip to toolbar