Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 5,226 through 5,250 (of 32,505 total)
  • Author
    Search Results
  • #183882

    In reply to: Only one forum showing

    dram2017
    Participant

    OK – I think I’ve solved it.
    In my theme (Vellum) the [bbp-forum-index] shortcode entered on the new forum page seems to be deleted every time I add a forum. Adding the shortcode again rebuilds the forum list and displays them in the specified order. Weird, but at least it is a workaround.

    #183877
    Robin W
    Moderator

    one will be from your theme and one from bbpress.

    if you have a link, I can give you code to hide the other

    #183871
    Dan
    Participant

    View post on imgur.com

    main theme has breadcrumbs that don’t match forum breadcrumbs. In a perfect world I’d like

    Home / Forum / Feedback / Marginally Clever Site Questions/Comments

    I think I can hide the breadcrumbs with

    div.bbp-breadcrumb { display: none; }

    but that won’t fix the upper breadcrumb.

    Please: what do you advise?

    #183863
    dominikb
    Participant

    ok, resolved.
    It was a conflict with another code, that renames the roles.

    malcolmpaulpearson
    Participant

    Hi all

    Shared Windows hosting.
    WordPress 4.6.5 running Karma theme.

    Hosting provider will not change the IIS config for just me, they recommend me adding a Linux shared hosting and host the bbpress on that server, external to the site.

    When I search with one word – it works fine. When I search with two words it gives the error:

    HTTP Error 404.11 – Not Found
    The request filtering module is configured to deny a request that contains a double escape sequence.

    Most likely causes:
    The request contained a double escape sequence and request filtering is configured on the Web server to deny double escape sequences.

    Things you can try:
    Verify the configuration/system.webServer/security/requestFiltering@allowDoubleEscaping setting in the applicationhost.config or web.confg file.

    Detailed Error Information:
    Module RequestFilteringModule
    Notification BeginRequest
    Handler ExtensionlessUrlHandler-Integrated-4.0
    Error Code 0x00000000
    Requested URL https://www.ciproza.co.za:443/forums/search/annual+returns/
    Physical Path D:\Websites\ciproza.co.za\httpdocs\forums\search\annual+returns\
    Logon Method Not yet determined
    Logon User Not yet determined

    More Information:
    This is a security feature. Do not change this feature unless the scope of the change is fully understood. You should take a network trace before changing this value to confirm that the request is not malicious. If double escape sequences are allowed by the server, modify the configuration/system.webServer/security/requestFiltering@allowDoubleEscaping setting. This could be caused by a malformed URL sent to the server by a malicious user.
    View more information ยป

    Anybody got a solution for me?

    #183828
    denrocs
    Participant

    Not tested this yet (I know this is nearly 3 years old – looking for something I’m currently working on) but I noticed that the code doesn’t have an opening PHP tag, just a closing one.
    I added the opening tag, installed as shown above, and not had this above error.

    Again, not tested but will confirm either way once I have set up a test post ๐Ÿ™‚

    #183822
    Robin W
    Moderator

    ok, appreciate it is frustrating – I am currently fighting another IT corporate system that is annoying the hell out of me !

    It is a theme/bbpress issue, so we need to try stuff to work out what works

    so can you set up a page called community forum and have it’s permalink end in ‘communityforum’ and into the content of that page put

    [bbp-topic-index]

    #183817

    In reply to: Catchable Error

    codyrauh
    Participant

    so from what I have read it is something to do with the “echo” and that forums to have categories.

    }
    endif;
    function simplenotes_get_breadcrumbs(){
    	global $wp_query; 
    	if ( !is_home() ){
    		echo '<ul>';
    		echo '<li><a href="'. home_url() .'">'. get_bloginfo('name') .'</a></li>';
    		if ( is_category() ) 
    		{
    			$catTitle = single_cat_title( "", false );
    			$cat = get_cat_ID( $catTitle );
    			echo "<li> &nbsp; ► ". get_category_parents( $cat, TRUE, " ► " ) ."</li>";
    		}
    		elseif ( is_archive() && !is_category() ) 
    		{
    			echo "<li> &nbsp; ► Archives</li>";
    		}
    		elseif ( is_single() ) 
    		{
    			$category = get_the_category();
    			$category_id = get_cat_ID( $category[0]->cat_name );
    			echo '<li> &nbsp; ► '. get_category_parents( $category_id, TRUE, "</li><li> &nbsp; ► " );
    			echo the_title('','', FALSE) ."</li>";
    		}
    		elseif ( is_page() ) 
    		{
    			$post = $wp_query->get_queried_object(); 
    			if ( $post->post_parent == 0 ){ 
    				echo "<li>&nbsp; ► ".the_title('','', FALSE)."</li>";
    			} else {
    				$title = the_title('','', FALSE);
    DragoWeb
    Participant

    Hi, the apostrophe (simple quote) was displayed as &#039 ; in the email subject so I fixed this by adding this line:

    $topic_title = mb_convert_encoding($topic_title, 'UTF-8', 'HTML-ENTITIES');

    in myrsite\wp-content\plugins\bbpress\includes\common\functions.php, lines 1094 and 1252 (bbpress 2.5.12). Between these 2 lines:

    $topic_title   = strip_tags( bbp_get_topic_title( $topic_id ) );
    $topic_title   = mb_convert_encoding($topic_title, 'UTF-8', 'HTML-ENTITIES');
    $topic_content = strip_tags( bbp_get_topic_content( $topic_id ) );

    I’m a beginner with php so maybe there is a better way to achieve this, but worked great for me ๐Ÿ™‚

    #183794
    panda666uk
    Participant

    Any idea on this error ? Thanks

    WordPress database error: [Unknown column 'users.id' in 'field list']
    SELECT convert(users.id USING "utf8mb4") AS id,convert(users.password USING "utf8mb4") AS password,convert(users.username USING "utf8mb4") AS username,convert(users.email USING "utf8mb4") AS email,convert(kunena_users.websiteurl USING "utf8mb4") AS websiteurl,convert(users.registerDate USING "utf8mb4") AS registerDate,convert(users.name USING "utf8mb4") AS name,convert(kunena_users.aim USING "utf8mb4") AS aim,convert(kunena_users.yim USING "utf8mb4") AS yim,convert(kunena_users.gtalk USING "utf8mb4") AS gtalk,convert(kunena_users.icq USING "utf8mb4") AS icq,convert(kunena_users.msn USING "utf8mb4") AS msn,convert(kunena_users.skype USING "utf8mb4") AS skype,convert(kunena_users.twitter USING "utf8mb4") AS twitter,convert(kunena_users.facebook USING "utf8mb4") AS facebook,convert(kunena_users.myspace USING "utf8mb4") AS myspace,convert(kunena_users.linkedin USING "utf8mb4") AS linkedin,convert(kunena_users.delicious USING "utf8mb4") AS delicious,convert(kunena_users.friendfeed USING "utf8mb4") AS friendfeed,convert(kunena_users.digg USING "utf8mb4") AS digg,convert(kunena_users.blogspot USING "utf8mb4") AS blogspot,convert(kunena_users.flickr USING "utf8mb4") AS flickr,convert(kunena_users.bebo USING "utf8mb4") AS bebo,convert(kunena_users.websitename USING "utf8mb4") AS websitename,convert(kunena_users.location USING "utf8mb4") AS location,convert(kunena_users.signature USING "utf8mb4") AS signature FROM jos_users AS users LEFT JOIN jos_kunena_users AS kunena_users ON kunena_users.userid = users.id LIMIT 0, 100
    abkrim
    Participant

    Hi.

    According Enable visual editor I put on my child theme’s functions.php code

    `// Additional Functions
    // =============================================================================

    // bbPress Visual Editor
    function bbp_enable_visual_editor( $args = array() ) {
    $args[‘tinymce’] = true;
    $args[‘teeny’] = false;
    return $args;
    }
    add_filter( ‘bbp_after_get_the_content_parse_args’, ‘bbp_enable_visual_editor’ );`

    But not work.

    Also I try to install plugin TinyMCE Advanced but not work.

    I’m using X Theme (Theme.co)

    #183772
    Robin W
    Moderator

    that text is in

    \templates\default\bbpress\form-topic.php

    and you’ll probably also want

    \templates\default\bbpress\form-reply.php

    for replies

    you’ll probably want to put revised versions in your child theme

    Functions files and child themes – explained !

    You can copy all the templates across, but you only need to copy those that you want to change, and it is better just to do this, as then you know which you have altered.

    so if you wanted to amend form-topic.php you would do the following

    create a directory on your theme called ‘bbpress’
    ie wp-content/themes/%your-theme-name%/bbpress

    where %your-theme-name% is the name of your theme

    find
    wp-content/plugins/bbpress/templates/default/bbpress/form-topic.php
    Make a copy of this file, and put in in the directory called bbpress that you created above, so you end up with
    wp-content/themes/%your-theme-name%/bbpress/form-topic.php
    bbPress will now use this template instead of the original
    and you can amend this

    Scott N
    Participant

    @talkedtv — I know it’s been three years, but if you can remember and describe here how your theme caused this problem and how you fixed it, I’d be most appreciative! My forum search is exhibiting the exact same behavior, and I am using a highly customized theme, including custom bbPress templates.

    EDIT: I did come up with a workaround, but it’s clunky as it requires creating a blank placeholder page with the slug search. In my page.php template, right after the_post() is called, I added this:

    if ( strpos($_SERVER['REQUEST_URI'], '/search/') === 0 ) {
        $post = get_page_by_path('search');
    }
    #183742

    In reply to: TTFB problem

    newz12
    Participant

    I have hired someone to look at the database and this is his comments:

    ==========================================

    so, basically your query is processing too many records in a couple of tables wp_posts(1’980’935 records) and wp_postmeta(10’818’678). It matches and returns 57’639 records.

    The core query is:
    select SQL_NO_CACHE wp_posts.* FROM wp_posts INNER JOIN wp_postmeta ON ( wp_posts.ID = wp_postmeta.post_id ) WHERE 1=1 AND (wp_posts.ID = 515125 OR wp_posts.post_parent = 515125);

    which returns 399’291 record for 2.1s
    which is a huge join

    Then the extra “where” conditions add extra time. The query bellow:

    select SQL_NO_CACHE wp_posts.* FROM wp_posts INNER JOIN wp_postmeta ON ( wp_posts.ID = wp_postmeta.post_id ) WHERE 1=1 AND (wp_posts.ID = 515125 OR wp_posts.post_parent = 515125) AND wp_postmeta.meta_key = ‘_bbp_forum_id’;

    reduces the returned records to: 57’639 and in fact the rest of the where statements do not change the final result but are only adding more time for processing.
    The query takes about 3s.

    Both queries above are well indexed and are execucuted in the optimal way.
    With this amount of returned records matched against the 2 big tables (~11mln and ~2mln records in each) executon time of less than 3s can not be achieved.

    is this forum using a custom php code developed in house?

    ME: It is using bbPress, which runs on WordPress

    the thing is, this code is not optimal in term of database design
    because it’s using a couple of wordpress general storage tables
    to store the forum posts and threads
    as you can guess this 2 tables have a lot more data in it along the forum data
    from other hand the query you sent has too many “where” conditions
    which are not relevant at all

    AND CAST(wp_postmeta.meta_value AS SIGNED) NOT IN (‘515120′,’515123’) ) )
    AND wp_posts.post_type IN (‘topic’, ‘reply’)
    AND (
    (wp_posts.post_status = ‘publish’ OR (wp_posts.post_status = ‘pending’ AND wp_posts.post_author = 0) OR wp_posts.post_status = ‘closed’ OR wp_posts.post_status = ‘hidden’)
    OR
    (wp_posts.post_author = 0 AND (wp_posts.post_status = ‘private’))
    )

    non of this are changing the final result at all, but are slowing the core query with extra time

    in short – there is not an easy “magic” fix in the database side
    as I said the core query is well indexed and runs optimal by the SQL engine
    the only thing can be done is to change the query a bit
    but we can hardly get it under 2.5s
    and this will require PHP code changes

    ME: What would be your suggestion to achieve a similar performance with database?

    get rid of the WP
    the WP pluggin you use is a forum implementation on top of WP
    understand that, but you are expecting something by this WP pluggin that it can’t provide

    with storring everyhing in a couple of tables – that can’t be done

    won’t even comment:
    AND CAST(wp_postmeta.meta_value AS SIGNED) NOT IN (‘515120′,’515123’) ) )

    this part
    wp_postmeta | CREATE TABLE wp_postmeta (
    meta_id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
    post_id bigint(20) unsigned NOT NULL DEFAULT ‘0’,
    meta_key varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    meta_value longtext COLLATE utf8mb4_unicode_ci,
    PRIMARY KEY (meta_id
    )

    as you can see meta_value field is a longtext!!!
    you can imagine how can you filter by this field
    without index
    scanning millions of records by a field that holds huge strings
    in same table wp stores all sessions, etc..

    just to imagine how much extra data is stored in wp_postmeta table
    here is a some stats by meta_key and the number of records (top 20 or so):

    | external_image_id | 100828 |
    | external_place_lat | 100845 |
    | external_place_lng | 100862 |
    | external_upload_batch | 110848 |
    | amazonS3_cache | 121546 |
    | _bbp_activity_id | 199233 |
    | filter | 239951 |
    | id_field | 239952 |
    | __defaults_set | 239974 |
    | _bbp_post_id | 1418227 |
    | _bbp_topic_id | 1426899 |
    | _bbp_author_ip | 1426899 |
    | _bbp_forum_id | 1426909 |
    | _barcelona_vote_up | 1732202 |
    | _barcelona_views | 1732206 |

    in fact this WP pluggin is using mysql as a simple storage and not as a relational DB
    as I said above it’s a bad DB design problem
    because it’s a just a pluggin/extension of a CMS system

    ==========================================================

    Basically he is telling me that we won’t be able to achieve good loading time, because it is running on WordPress and the database design is a problem.

    What do you think, is there hope?

    We run a forum with 1.4 million posts and almost 100k members, if it can give you an idea.

    #183741
    ico33
    Participant

    Hi, in my site I noticed a strange issue after last WordPress update. It seems to have problem with “cache”.

    For example, if I log-in through the Home Page, after click in sign-in, the page refresh but it seems that the log-in didn’t work. If I press F5 to refresh the page, here I can now see the log-in effectuated.

    I thought about my caching plugin, and I wrote to the assistance of my provider. They exclude the problem is in caching plugin, they found this:

    The issue appears to be caused from the latest WordPress upgrade that was automatically applied within your website.

    Code:

    sitename@esm9 [~/public_html]# wp core version
    4.7.4

    There seems to be conflict between a plugin of yours that is creating this strange behavior within the website.

    To find which is the responsible plugin, you may start deactivating them one by one and after that checking the functions that were not working as expected. Once they work this will indicate which plugin caused the issue.

    I did what they suggest, and when I deactivate BBPRESS, everything works! So, what to do??

    #183729
    sagetopia
    Participant

    I’m seeing issues that seem to only affect public forums (private or hidden work as expected). Public forums don’t appear in the admin ‘All’ list view, although they do appear under ‘Published’. Attempting to view the single page for a public forum gives a 404 when logged in. When not logged in, it gives the following fatal error: Fatal error: Uncaught Error: [] operator not supported for strings in .../plugins/bbpress/includes/forums/functions.php on line 1855 Looking at that line, the get method of WP_Query returns an empty string if no matching key is found. That explains the [] operator error and adding a default empty array to the call does fix the issue for non logged in users. However, the root cause must be higher up the call chain because it doesn’t fix the permalink problem.

    #183706
    Pascal Casier
    Moderator

    Hi,
    There are some things that could be done on this page:
    https://codex.bbpress.org/layout-and-functionality-examples-you-can-use/#27-custom-redirect-after-login

    Hope it helps.
    Pascal.

    #183705

    In reply to: Hide Topic / Reply IDs

    Pascal Casier
    Moderator

    This CSS might help to hide it from the screen, but of course in the source code of the HTML page you might still find it.

    .bbp-forum-header a.bbp-forum-permalink, .bbp-reply-header a.bbp-reply-permalink, .bbp-topic-header a.bbp-topic-permalink {
      display: none;
    }
    #183688
    devpaq
    Participant

    This worked perfectly, Thanks!
    The only thing I added was AND wp_posts.post_status = 'publish' so that it didn’t export those that were spam posts.

    #183678
    horsmanzach
    Participant

    Hello, I am running WordPress 4.7.4 and bbPress 2.5.12.

    My forum can be found on https://thehulkpress.com/forum . The page looks exactly how I want it to there, but when I click on the forum channel the page background changes to white. I’ve tried a variety of different css codes to change the rest of the pages to black, but can’t seem to find the correct block of code. Can someone suggest a way to change not only the first page, but the rest of the pages’ background to black? Thank you

    – Zach

    #183667
    Robin W
    Moderator

    if your theme has a css area, put this in it

    #main-content {
      background-color: #000;
    }
    #183666
    softgenic
    Participant

    I manage to do this by PHP code but I am now facing one small issue the freshness time that’s coming through bbpress recent topic widget is different as compared to the freshness that’s coming through <?php printf( __( 'Last Post: %1$s', 'bbpress' ),bbp_get_topic_freshness_link( array('post_id' => get_post_meta( get_the_ID(), '_bbp_last_active_id', true )) ) ); ?> so can you please let me know how to atleast make sure the freshness time is correct?

    #183663
    Robin W
    Moderator

    thee problem is that the code would take me time to work out, and I just don’t have any time free at the moment.

    #183660
    softgenic
    Participant

    Hi Robin, Your plugin is great but I just need a simple PHP code to loop through this just like we loop through wordpress posts using wp query., is there any way I can run a simple code to get the data of last three recent posts and then I can easily render the information in my created HTML

    #183655
    Robin W
    Moderator

    if you are happy with code, download my style pack plugin

    bbp style pack

    if you look in includes/shortcodes

    you’ll find a shortcode for bsp_display_topic_index

    around line 40 you’ll find the output that you could modify and then style.

Viewing 25 results - 5,226 through 5,250 (of 32,505 total)
Skip to toolbar