Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 10,351 through 10,375 (of 32,504 total)
  • Author
    Search Results
  • #153550
    jessy
    Participant

    Rewrite your theme styles with this, paste this on very bottom on style.css or into <head> tag section and wrap t with <style text/css></style>:

    #bbpress-forums p.bbp-topic-meta span {
       white-space: nowrap;
       background: none;
       border: none;
    }
    #153547
    jessy
    Participant

    Do you really need this shortcode? I am sorry about this, but for many reasons it is enough to use just video from youtube, because, if you will use the video than you will need CDN also. And this shortcode in my opition do not have nice css stylesheet.

    #153544
    jessy
    Participant

    Install plugin bbPress2 shortcode whitelist.

    just write string: video into that small text area

    #153542
    jessy
    Participant

    Install plugin bbPress2 shortcode whitelist

    And to settings write video

    #153539
    jessy
    Participant

    Into your function.php paste this code, you will allow to Custom Post Type forum – bbPress have featured images in admin.

    add_theme_support( 'post-thumbnails', array( 'forum' ) );
    add_post_type_support('forum', 'thumbnail');
    #153538
    mannmithund
    Participant

    Thank you.

    The theme supports videos, i.e. no issues to add them to regular blog posts.

    Added the code, this results in Fatal error: Call to undefined function video().

    #153537

    In reply to: Size font bbpress

    jessy
    Participant

    1, Go to Appearance => Editor => Style.css edit this file section Reset from mayer, and find there “font-size: 100%; font: inherit;” change it into font-size: 16px; remove font: inherit

    Reset section would look like this:

    /* ------------------------------------------------------------------------- *
     *  Reset - http://meyerweb.com/eric/tools/css/reset/ v2.0 | 20110126
     * ------------------------------------------------------------------------- */
    html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, 
    pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, 
    samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, 
    fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, 
    canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, 
    section, summary, time, mark, audio, video { margin: 0; padding: 0; border: 0; font-size: 16px; vertical-align: baseline; }
    article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {	display: block; }
    ol, ul { list-style: none; }
    blockquote, q { quotes: none; }
    blockquote:before, blockquote:after, q:before, q:after { content: ''; content: none; }
    table { border-collapse: collapse; border-spacing: 0; }

    Let me know if you need help.

    #153536
    jessy
    Participant

    If your theme support this shortcode on posts and pages we can assume your shortcode is working fine, but bbPress is for security reasons blocking.

    Place this code into functions.php

    function jm_bbp_shortcodes( $content, $reply_id ) {
    	return video( $content );
    }
    add_filter('bbp_get_reply_content', 'jm_bbp_shortcodes', 10, 2);
    add_filter('bbp_get_topic_content', 'jm_bbp_shortcodes', 10, 2);

    Let me know if you need help.

    #153535

    Topic: broken

    in forum Troubleshooting
    Lazylonewolf
    Participant

    Using the li(list) HTML tag causes the reply to be broken. Any idea how to fix this?

    <img src=&quot;http://fc05.deviantart.net/fs70/f/2014/292/8/3/broken_li_by_radstylix-d83ea8x.png&quot; alt=&quot;<li> html breaks reply" />
    

    Top part of the black line shows a reply without li, while below it shows what happens if li is used.

    #153534
    jessy
    Participant

    Two solutions:

    1, Go to Settings => Forums it is settins for bbPress and just find Forum root should show and choose Topics by Freshness

    2, You need to use shortcode [bbp-single-forum id=2766]

    It is simple, create one forum and use your single forum ID, you can find it if you hover over the forum in the admin, check the bottom the link and there is the ID, replace it to your shortcode in custom page.

    If you need help, let me know.

    #153533
    mannmithund
    Participant

    Hello there

    I fail in inserting / embedding an m4v video into a forum posts. Posts show text and images as intended, but for videos, just the smart tag is shown:

    [video width="640" height="640" m4v="video.m4v"][/video]
    

    What am I doing wrong?
    I run wordpress 4 and bbpress 2.5.4

    Help is much appreciated.

    – MannMitHund

    #153522
    Robin W
    Moderator

    Great – presume you’re fixed if not

    Layout and functionality – Examples you can use

    #153519
    esportsstream
    Participant

    Ok do to fix it i had to write that code in the actual funtions.php file of my main theme

    #153517
    esportsstream
    Participant

    So i made a new file called bbpress-functions.php and put this into it

    <?php
    //code to add tutor role 
    
    function add_apply_role( $bbp_roles )
    {
    	/* Add a role called apply */
    	$bbp_roles['bbp_apply'] = array(
    		'name' => 'apply',
    		'capabilities' => custom_capabilities( 'bbp_apply' )
    		);
    	return $bbp_roles;
    }
     
    add_filter( 'bbp_get_dynamic_roles', 'add_apply_role', 1 );
    
    function apply_role_caps_filter( $caps, $role )
    {
    	/* Only filter for roles we are interested in! */
    	if( $role == 'bbp_apply' )
    		$caps = custom_capabilities( $role );
     
    	return $caps;
    }
     
    add_filter( 'bbp_get_caps_for_role', 'apply_role_caps_filter', 10, 2 );
    
    function custom_capabilities( $role )
    {
    	switch ( $role )
    	{
    		 
    		/* Capabilities for 'apply' role */
    		case 'bbp_apply':
    			return array(
    				// Primary caps
    				'spectate'              => true,
    				'participate'           => true,
    				'moderate'              => false,
    				'throttle'              => false,
    				'view_trash'            => false,
     
    				// Forum caps
    				'publish_forums'        => false,
    				'edit_forums'           => false,
    				'edit_others_forums'    => false,
    				'delete_forums'         => false,
    				'delete_others_forums'  => false,
    				'read_private_forums'   => false,
    				'read_hidden_forums'    => false,
     
    				// Topic caps
    				'publish_topics'        => true,
    				'edit_topics'           => true,
    				'edit_others_topics'    => false,
    				'delete_topics'         => false,
    				'delete_others_topics'  => false,
    				'read_private_topics'   => false,
     
    				// Reply caps
    				'publish_replies'       => true,
    				'edit_replies'          => true,
    				'edit_others_replies'   => false,
    				'delete_replies'        => false,
    				'delete_others_replies' => false,
    				'read_private_replies'  => false,
     
    				// Topic tag caps
    				'manage_topic_tags'     => false,
    				'edit_topic_tags'       => false,
    				'delete_topic_tags'     => false,
    				'assign_topic_tags'     => true,
    			);
    			break;
     
    		default :
    			return $role;
    	}
    }
    

    I have no idea where i put this file in my site directory……

    #153508
    Daniel J. Lewis
    Participant

    Any update to this? I, too, have a large bbPress forum and I see the following in my error log:

    
    SlowTimer [6357ms] at runtime/ext_mysql: slow query: SELECT SQL_CALC_FOUND_ROWS  wp_13_posts.ID FROM wp_13_posts  INNER JOIN wp_13_postmeta ON (wp_13_posts.ID = wp_13_postmeta.post_id)\nINNER JOIN wp_13_postmeta AS mt1 ON (wp_13_posts.ID = mt1.post_id) WHERE 1=1  AND wp_13_posts.post_type = 'topic' AND (wp_13_posts.post_status = 'publish' OR wp_13_posts.post_status = 'closed') AND (wp_13_postmeta.meta_key = '_bbp_last_active_time'\nAND  (mt1.meta_key = '_bbp_forum_id' AND CAST(mt1.meta_value AS SIGNED) != '133643') ) GROUP BY wp_13_posts.ID ORDER BY wp_13_postmeta.meta_value DESC LIMIT 0, 25
    
    #153507
    Robin W
    Moderator

    The issue is related to how wp4.0 looks at search and in particular at the ‘s’ parameter submitted to wp-query. wp4.0 does it differently and what didn’t look like a search to previous wp versions now does when sent from bbpress functions.

    Hence why your $query->is_search was affected

    #153506
    mkoenen
    Participant

    I had the same problem. After upgrading to WP 4.0 only sticky topics were visible. I tried the patch/plugin “bbpress wp4 fix”. I could now see all topics, but when I clicked on any one of them only the first forum topic would open. The URL was correct, but the wrong topic appeared in the page. I deactivated the plugin and after some more research, found that I had a piece of code in my functions file that interfered with the topics showing. Here is the code that caused the problem:

    //exclude from search results
    function fb_search_filter($query) {
    if ( !$query->is_admin && $query->is_search) {
    $query->set('post_type', array('course_unit') ); // id of page or post
    }
    return $query;
    }
    add_filter( 'pre_get_posts', 'fb_search_filter' );

    I don’t know why this code is a problem, but I no longer needed it. I deleted it and now my forums are working just fine.

    #153500

    In reply to: Forum not showing up

    Robin W
    Moderator

    ok, pasting urls into a page won’t really do it

    you can either enter

    [bbp-forum-index]
    

    or if you are using custom menu’s you can enter the url as a menu item

    #153499

    In reply to: Size font bbpress

    Robin W
    Moderator

    @ricsca2
    bbpress does have a css of its own as yiou found earlier, but tries to use much of the one from the host theme

    I am trying to write a bbpress css plugin where you can set areas simply

    eg

    Header : Colour? size? etc.

    but progress I slow whilst I work out what bits of the bbpress.css code do and when

    Tell me which parts you are still having trouble with eg breadcrumb and I’ll try and help further

    #153495

    In reply to: Size font bbpress

    Ricsca2
    Participant

    @robin-w With the code you’ve written now the various parts of the forum is bigger.
    The problem is that I can not change manualente all parts of the theme.
    The theme for bbPress does not have a css because it goes to get the css of wordpress theme right?

    As ever with the theme HUEman this does not happen?

    Very thanks

    #153468

    In reply to: Size font bbpress

    Robin W
    Moderator

    Without a url or screenshot I can’t really help further – there are several places where bbpress has font sizes eg

    
    #bbpress-forums ul.bbp-lead-topic,
    #bbpress-forums ul.bbp-topics,
    #bbpress-forums ul.bbp-forums,
    #bbpress-forums ul.bbp-replies,
    #bbpress-forums ul.bbp-search-results {
    	font-size: 12px;
    	}
    
    #bbpress-forums .bbp-forums-list li {
    	font-size: 11px;
    }
    
    #bbpress-forums div.bbp-forum-title h3,
    #bbpress-forums div.bbp-topic-title h3,
    #bbpress-forums div.bbp-reply-title h3 {
    	font-size: 16px;
     	}
    
    #bbpress-forums .bbp-forum-info .bbp-forum-content,
    #bbpress-forums p.bbp-topic-meta {
    	font-size: 11px;
    	}
    

    and lots more

    I can only suggest you try some of the above in your custom css BUT put ‘!important’ after the px part to ensure that it is not overwritten eg

    #bbpress-forums ul.bbp-lead-topic,
    #bbpress-forums ul.bbp-topics,
    #bbpress-forums ul.bbp-forums,
    #bbpress-forums ul.bbp-replies,
    #bbpress-forums ul.bbp-search-results {
    	font-size: 12px !important;
    	}
    
    #153460
    TullariS
    Participant

    Hello everyone!

    Just spotted an issue with bbp_filter_modify_page_title(). It tried to fetch the current topic to add its title to <title> but uses post_status = ‘publish’. This fails if the topic is set to closed.

    My suggestion is to change line 127 from:

    'post_status' => 'publish',

    to

    'post_status' => 'any',

    Best regards

    #153455

    In reply to: Just change ALL Text.

    Robin W
    Moderator

    not as such

    There is a POT file

    bbpress/languages/bbpress.pot

    see

    https://codex.wordpress.org/Translating_WordPress

    so you could in theory translate bbpress into your words

    #153452

    In reply to: 404 on Edit my post

    Robin W
    Moderator

    Since you paid for a theme (and it has so much “we are great” on it’s website), suggest you raise this with them first to see if they can give you amended code

    #153446
    josuawahyudi
    Participant

    just resolve my problem!

    this is what i do:

    1. change my permalinks to “postname” just like robin suggested
    2. i create “.htaccess” file (since i dont have that file)

    this is how to create that file:
    – simply open your notepad
    – copy paste this code:

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

    – save as “.htaccess” (you will get file with extension txt)
    – copy file with FTP to sites/domain/www
    – rename file, erase txt extension

    DONE!
    my child forum is active now!

Viewing 25 results - 10,351 through 10,375 (of 32,504 total)
Skip to toolbar