Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 13,201 through 13,225 (of 32,585 total)
  • Author
    Search Results
  • #140210
    Stephen Edgar
    Keymaster

    Thanks, indeed it does help, gets some of those pesky regex strings half sorted out.

    It be extremely keen on seeing what JOIN expressions you used to join the posts & topics table as if I remember correctly this was the only thing holding me back from including this as one of the new featured importers in bbPress 2.5.

    #140208
    Stephen Edgar
    Keymaster

    You probably want to look into WordPress’ ‘Conditional Tags’
    https://codex.wordpress.org/Conditional_Tags

    And then a list of bbPress’ conditional tags https://codex.bbpress.org/bbpress-conditional-tags/

    #140207
    Stephen Edgar
    Keymaster

    You can also go down the path of add Post Thumbnails to your forums and topics, not so much replies though unless you have some awesome templates 😉

    There is some example code in this thread:

    Add Featured Image to the BBpress Index

    #140206
    Stephen Edgar
    Keymaster

    The creator/developer of bbPress or the Mods, can not help in translations, they just have to trust anybody whom submits a translation.

    Kind of correct, all the translations are handled by the same translation process for WordPress

    https://codex.bbpress.org/bbpress-in-your-language/

    Using pt_BR as an example if you take a look at: https://translate.wordpress.org/projects/bbpress/dev

    You will see that Portuguese (Brazil) is at 94% translated, 975 strings translated and 60 strings untranslated.

    @tvieira If you open this link it shows you the 60 strings that have yet to be translated for bbPress. You can update these strings yourself and then contact the Brazilian translator team via one of these links to get these translations approved. Once approved they should then become available via WordPress’ automatic updates in the very near future.

    https://br.wordpress.org/contact/
    https://br.forums.wordpress.org/
    http://wp-brasil.org/

    #140204
    Stephen Edgar
    Keymaster

    I know many sites that are using bbPress for code are using the ‘Crayon Syntax Highlighter’ plugin. Have you had a look at this plugin? Will that do what you require?

    #140197
    Alex
    Participant

    The “js minify” feature of performance plugins such as W3TC breaks the bbpress Visual editor. Which code can I add to the “exclude” list to make it work again? Ie. I’m looking for the bbPress TinyMCE/Visual editor js code to add to that list.

    WP 3.8
    bbPress 2.5.1

    #140189
    Lynqoid
    Participant

    Hi,

    .bbp-template-notice {
    display: none !important;
    }

    and

    .bbp-template-notice p {
    display: none !important;
    }

    Are causing the message that no search results were returned to be hidden, which causes part of the blank page. Along with that you also have a minus margin on your sliderdiv which cause a lot of the bbpress forum to go underneath it.

    Good luck!

    #140187
    Lynqoid
    Participant

    I’m not 100% on what is happening without seeing a site link, if you can find out where the coupons are being rendered then you could wrap them in if(!is_bbpress()) { }

    #140185
    Lynqoid
    Participant

    If you want to make the tickbox ticked by default you could use a small bit of jQuery

    jQuery("#checkbox").prop('checked', true);

    Then just include it in the admin or frontend – where ever you need it.

    #140184
    s1r0n
    Participant

    i don’t know why this one was so hard for the support people to answer, but the hook I was looking for was

    add_filter( 'bbp_get_reply_content', 'lp_access_enforcement', 99,2);

    this allows me to take the content just before it is posted on the screen and manipulate it how I want. now my forums here

    http://thelightningpath.com/forum/subject/the-need-for-spirit-to-sustain-a-growing-baby/

    can be locked down. people now need to pay for a subscription to get access to certain forums on my site.

    i’m posting this for anybody else that might want to expand on bbpress’s limited access functionality.

    #140183
    jreeve
    Participant

    I’m trying to make this checkbox checked by default: Create a Group -> 4. Forum -> Group Forum -> “Yes. I want this Group to have a forum.”

    I found the code that handles this at /plugins/bbpress/includes/extend/buddypress/group.php, a function called create_screen. I’d like to customize this function, so I copied the function to a plugin script. I figure I have to do something like

    remove_action(‘whereever_the_hook_for_the_group_creation_thing_is’, ‘create_screen’);
    add_action( ‘whereever_the_hook_for_the_group_creation_thing_is’, ‘create_screen’ );

    to get my custom version to replace the stock version, but I don’t know where the hook is or how to go about finding it.

    wesleyjohns24
    Participant

    The dialog in bbPress for inserting a link into a post by default shows a search box and a list of existing content on the site.

    I am using WooCommerce on the same WordPress installation as bbPress. The problem is that WooCommerce coupons use Pages. This means all of my coupons (often ones that are created for specific people or specific purposes) can be publicly displayed in this list.

    I’ve edited my css to display: none; this section, but I’m not satisfied with this solution as it is still possible for someone to change the css and view these pages.

    Is there a way I can disable this feature? How might I go about modifying the code to remove it?

    #140177
    gijs5
    Participant

    Hi Stephan,

    The minibb database is 124 mb, so thats pretty big 🙂
    The code is pretty ugly now, but maybe I’ll clean it up later. It’s pretty simular to yours.

    I used this in the callback_html function.
    return htmlspecialchars_decode(str_replace(array('$'), array('$'), $this->deCodeBB($field)), ENT_QUOTES);

    And I used the minibb deCodeBB function to form bbcodes:

    public function deCodeBB($msg) {
    
    	$pattern=array(); $replacement=array();
    
    	$pattern[]="/<img src=\"(.+?)\"([^\>]+)>/i";
    	$replacement[]="[img]\\1[/img]";
    
    	$pattern[]="/<a href=\"(.+?)\"([^\>]+)>(.+?)<\/a>/i";
    	$replacement[]="[url=\"\\1\"]\\3[/url]";
    
    	$pattern[]="/<[bB]>(.+?)<\/[bB]>/s";
    	$replacement[]="[b]\\1[/b]";
    
    	$pattern[]="/<[iI]>(.+?)<\/[iI]>/s";
    	$replacement[]="[i]\\1[/i]";
    
    	$pattern[]="/<[uU]>(.+?)<\/[uU]>/s";
    	$replacement[]="[u]\\1[/u]";
    
    	$pattern[]="/<font color=\"(#[A-F0-9]{6})\">(.+?)<\/font>/is";
    	$replacement[]='[font\\1]\\2[/font]';
    
    	$pattern[] = '/<div class=\"quote\"><div class=\"quoting\">Quoting: (.+?)<\/div><br>(.+?)<\/div>/is'; 
    	$replacement[] = "[quote=\\1]\\2[/quote]"; 
    
    	$pattern[] = '/<div class=\"quote\">(.+?)\<\/div>/is'; 
    	$replacement[] = "[quote]\\1[/quote]"; 
    
    	$pattern[] = '/<div class="codex">(.+?)\<\/div>/is';
    	$replacement[] = "[code]\\1[/code]"; 
    
    	/* YouTube code */
    	$pattern[]="/<object width=\"297\" height=\"245\"><param name=\"movie\" value=\"http:\/\/www\.youtube\.com\/v\/([a-zA-Z0-9-_]+)\"><\/param><param name=\"wmode\" value=\"transparent\"><\/param><embed src=\"http:\/\/www\.youtube\.com\/v\/([a-zA-Z0-9-_]+)\" type=\"application\/x-shockwave-flash\" wmode=\"transparent\" width=\"297\" height=\"245\"><\/embed><\/object>/i";
    	$replacement[]="[youtube=http://www.youtube.com/watch?v=\\1]";
    	/* --YouTube code */
    
    	$msg=preg_replace($pattern, $replacement, $msg);
    	$msg=str_replace ('<br>', "\n", $msg);
    	if(substr_count($msg, '[img\\2]')>0) $msg=str_replace('[img\\2]', '[img]', $msg);
    
    	if(function_exists('smileThis')) $msg=smileThis(FALSE,TRUE,$msg);
    
    	return $msg;
    }

    Hope this helps.

    Cheers.

    #140161
    RukiaR7
    Participant

    So I have a main forum with about 5 different sub forums.
    I would like the main forum to have a background image, and the 5 sub forums to have their own. The topics in the main forums will keep the main forum background image and the topics in the sub forums will keep that particular sub forum background image as well. Is it possible?

    If there is no easy way I figure I could hack it. Create pages with the different backgrounds, make the forums transparent, and iframe it. Or insert the php code to call the forums in on that page, how to do that I don’t know but I guess I’ll figure it out if no one can help here as I expect. Would be great if a plugin could do all this but I doubt such a one exists. Thanks for any help.

    #140140
    KnightOfAmsterdam
    Participant

    Hello people of bbPress.
    I’m having one weird issue with my bbPress forum on the website I’m building.
    I can’t quite let you see it, but I have attached an image.

    The problem I'm having.

    I’m quite sure that this isn’t a CSS error, but rather some HTML bug of some kind.
    I what I can’t figure out is where this is in the code.
    The forum is adding “split” attributes to its elements, I’ve tried removing those.

    What I’m wondering is, is this a HTML bug or is this a bug in a php loop?
    Please answer this as soon as possible.

    Thanks in advance,
    The knight of Amsterdam

    markthedoc
    Participant

    Hey Robin, thanks for the reply.

    How would I hide the whole bbp-replies table on the topic page as
    <?php bbp_reply_content(); ?>
    just hides the cell.

    Thanks for your help with this.

    #140138
    Stephen Edgar
    Keymaster

    It was late last night and maybe I was seeing things, I have just tried to reproduce the issue and cannot.

    The fix for this was Trac Ticket #2476 and in changeset r5187.

    Can you check the contents of this file on your server please, it should match this file at Line #92
    /includes/users/functions.php#L92

    'url' => 'comment_author_url'

    #140136
    ronthai
    Participant

    Nevermind, I found the problem. I remembered I did this before:

    I have a statistics plugin that uses the server time instead of the WP timezone settings.

    Therefore I added <?php date_default_timezone_set('Asia/Bangkok'); ?> to the plugins php and that was in the sidebar always present.

    Now I removed it the Edit Allowed Time works correct.

    #140121

    In reply to: Hide Sidebar

    pmuktan
    Participant

    I pasted this code under main wp-config.php and side is gone.
    function disable_all_widgets( $sidebars_widgets ) {
    if ( function_exists(‘is_bbpress’) ) {
    if (is_bbpress()) {
    $sidebars_widgets = array(false);
    remove_all_actions(‘bp_register_widgets’);
    unregister_sidebar( ‘bp_core_widgets’ );
    }
    }
    return $sidebars_widgets;
    }

    add_filter(‘sidebars_widgets’, ‘disable_all_widgets’, 1, 1);

    My question is how do we remo Options like Topic Type and Topic Status ???

    Thank you.

    #140117
    Hansaplastique
    Participant

    I really love bbPress and have been gratefully using it on my website.

    No disrespect intended, and just a friendly request for consideration,…

    Would it be possible to make the backtick functionality for posting optional?
    Ie. a setting in the config page saying something like “Use backticks for code posting”?

    I’m running into situations where the actual content a user wants post should have backticks in it, without the filtering modifying it (for example shell related code examples).

    Modifying the core files of bbPress is of course not a real option, just a temporary bandaid at best, and I know others have been looking into the backtick debacle as well (for example GhettoBSD).

    #140116

    In reply to: Hide Sidebar

    Robin W
    Moderator

    you can use ‘widget logic’ plugin to control what is shown in sidebars. for bbpress the logic is

    is_bbpress() to display and
    !is_bbpress() to hide

    or if you want a forum specific sidebar use ‘bbpress WP’ tweaks plugin.

    Profile images use the gravatar image see http://en.gravatar.com/ for details

    #140103
    ronthai
    Participant

    Darn, 10 minutes just past, could not edit anymore.
    Why are we doing so difficult?
    Simple css did the job as always: .bbpress .wpns_wrapper { display:none ! important;}

    #140102
    ronthai
    Participant

    Nothing seems to work, either gone WP side also or no changes.

    Maybe it could be done inside the php?
    Only if it is easy, the page number under the forums page is not the end of the world.

    
    /*
    Plugin Name: Page navi slider
    Plugin URI: 
    Description: An advanced, fully customizable and actually responsive navigation plugin using jQuery slider 
    Version: 1.2.2
    Author: Iznogood1
    Author URI: denisns1@free.fr
    */
    
    //Installation / Uninstallation
    require_once(dirname( __FILE__ ) . '/inc/install.php');
    
    //Administration
    require_once(dirname( __FILE__ ) . '/inc/settings.php');
    
    //Display the plugin
    require_once(dirname( __FILE__ ) . '/inc/frontend.php');
    
    //Version
    function wpns_version(){
    	$v=get_plugin_data(__File__);
    	return $v['Version'];
    }
    
    //Load style and JS
    function wpns_style_and_scripts() {
    	wp_register_style('page_navi_slider_style', plugins_url('style/page-navi-slider.css', __FILE__) );
      wp_enqueue_style('page_navi_slider_style' );
    	wp_enqueue_script('page-navi-slider-script',  plugins_url('/js/page-navi-slider.min.js', __FILE__),	array( 'jquery', 'jquery-ui-slider' ), true);
    	wp_enqueue_script('jQueryUiTouch',  plugins_url('/js/jquery.ui.touch-punch.min.js', __FILE__),	array( 'jquery' ), true);
    	if(ereg('MSIE 7',$_SERVER['HTTP_USER_AGENT'])){
    		wp_register_style('page_navi_slider_styleIE', plugins_url('style/page-navi-slider.ie.css', __FILE__) );
    		wp_enqueue_style('page_navi_slider_styleIE' );
    	} 
    }
    
    //Localization
    load_plugin_textdomain( 'page-navi-slider', '', dirname( plugin_basename( __FILE__ ) ) . '/lang' );
    
    //Actions and filtes
    add_action( 'wp_enqueue_scripts', 'wpns_style_and_scripts' );
    register_activation_hook(__FILE__, 'wpns_install' ); 
    register_deactivation_hook(__FILE__, 'wpns_remove_auto_display' ); 
    register_uninstall_hook(__FILE__, 'wpns_uninstall');
    wpns_auto_display();
    
    //Main function
    function page_navi_slider(){
    	//Prepare pagination	
    	global $wp_query, $wp_rewrite;
    	$wp_query->query_vars['paged'] > 1 ? $current = $wp_query->query_vars['paged'] : $current = 1;
    	$pagination = array(
    		'base' => @add_query_arg('page','%#%'),
    		'total' => $wp_query->max_num_pages,
    		'current' => $current,
    		'show_all' => all,
    		'type' => 'array',
    		prev_next => false,
    	);
    	
    	if( $wp_rewrite->using_permalinks() )
    		$pagination['base'] = user_trailingslashit( trailingslashit( remove_query_arg( 's', get_pagenum_link( 1 ) ) ) . 'page/%#%/', 'paged' );
    	
    	if( !empty($wp_query->query_vars['s']) )
    		$pagination['add_args'] = array( 's' => str_replace( ' ' , '+', get_query_var( 's' ) ) );
    	
    	//Display the plugin
    	$page_links=paginate_links( $pagination );
    	wpns_frontend($current,$wp_query->max_num_pages,$page_links,get_option('wpns_settings'));
    }
    
    #140099
    Stephen Edgar
    Keymaster

    Pushing my knowledge in this are so a quick stab before I go for the night (11pm here)

    Rather than is_single have a look at is_archive

    #140091
    Stephen Edgar
    Keymaster

    The main bbPress conditional tag is is_bbpress

    Try <?php if ( !is_bbpress ) : ?>

Viewing 25 results - 13,201 through 13,225 (of 32,585 total)
Skip to toolbar