Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 7,476 through 7,500 (of 32,569 total)
  • Author
    Search Results
  • #168434
    Pascal Casier
    Moderator

    Just to be sure, can you do a var_dump of $plugins_array just before the return in your my_custom_plugins function ?
    Can you confirm it’s an array, because you did not initialize it as one:
    $plugins_array = array();

    and also remove it as parameter from your function…

    See https://codex.wordpress.org/Plugin_API/Filter_Reference/mce_external_plugins

    #168428
    Toni
    Participant

    MultiSite with bbPress plugin – the latest
    One subsite dedicated to bbPress forum

    I just want to know what “bbPress ready” “works with bbPress” means
    What are some characteristics that make a “theme bbPress ready/compatible”?
    What do the results imply when I search for themes for bbPress, what can I expect in general?
    – If a WordPress theme is reviewed in an article and is said to work for bbPress
    – If I search WordPress themes using bbPress keyword

    I have been struggling with themes, like all bbPress newbies. I don’t understand the structure of bbPress – the layout, navigation, hierarchy and the pages it generates. It’s a new surprise with each theme I try. (Yes, I have used Theme 2015 to check things.)

    Surprise Example:
    theme Ample, forum looks great but the Home/Forums/… (bbPress breadcrumb navigation) “Forums” page renders all the topics with the heading “Archives”, I had to use Edit Menu to add a custom link to add that page to the WP menu, and I had created a page to list only the forums with the bbPress short code, but then it was not part of the bbPress nav, and it was unusable – too bizarrely rendered to try to correct.

    I prefer not to have to get into editing generated pages and editing whatever to get the breadcrumb navigation/menus to correlate. Little comprehension, skill, or time.

    Thank you

    #168425

    In reply to: Author avatar issue

    leirof
    Participant

    Ok, that’s good, I found !

    #bbpress-forums .button {
      background-color: gray;
      color: red;
    }
    #168423
    Rourke
    Participant

    get_stylesheet_directory_uri() in a var_dump() returns http://www.site.com/wp-content/themes/hueman-child so that seems to be good.

    #168420
    Rourke
    Participant

    I’m not getting this to work.

    I have the following code for adding the emoticons plugin. The plugin file is located at /wp-content/themes/theme-child/js/tinymce/emoticons/plugin.min.js:

    add_filter('mce_external_plugins', 'my_custom_plugins');
    function my_custom_plugins($plugins_array) {
    	$plugins = array('emoticons'); //Add any more plugins you want to load here
    
    	//Build the response - the key is the plugin name, value is the URL to the plugin JS
    	foreach ($plugins as $plugin ) {
    		$plugins_array[ $plugin ] = get_stylesheet_directory_uri() . '/js/tinymce/' . $plugin . '/plugin.min.js';
    	}
    	return $plugins_array;
    }

    And for the buttons customization I use:

    function bbp_enable_visual_editor( $buttons = array() ) {
    	
    	$buttons['tinymce'] = array( 
    		'toolbar1' => 'bold, italic, underline, strikethrough, blockquote, alignleft, aligncenter, alignright, alignjustify, justifyfull, bullist, numlist, outdent, indent, undo, redo, link, unlink, table, fullscreen',
    		'toolbar2' => 'formatselect, fontselect, fontsizeselect, styleselect, strikethrough, outdent, indent, pastetext, removeformat, charmap, wp_more, emoticons, forecolor, wp_help,media,image', // 2nd row, if needed
    		'plugins'  => 'paste,emoticons'
    	);
    	$buttons['quicktags'] = array ('buttons' => 'strong,em,link,block,del,ins,img,ul,ol,li,code,close');
    	return $buttons;
    }
    add_filter('bbp_after_get_the_content_parse_args', 'bbp_enable_visual_editor');
    add_filter('mce_buttons', 'bbp_enable_visual_editor');

    It doesn’t load the visual editor, unless I remove emoticons from the plugins. I don’t see the my_custom_plugins() function doing anything. What am I doing wrong?

    #168414
    Pascal Casier
    Moderator

    Hi,

    Using the shortcode should only show the forums you are allowed to see.
    As administrator/moderator you could see the private ones in the list.
    As participant you should not be able to see it.

    Did you test the access from a user in the ‘participant’ role ?

    Thanks, Pascal.

    paragbhagwat
    Participant

    Hello All,

    I am creating a page which has a short code [bbp-forum-index] and i wanted to know if there is a way to filter out all private forums since this page is only supposed to show public forums.

    Thanks,
    Parag

    #168411
    Robkk
    Moderator

    It works for me if I passed the reply/topic post author’s ID, it doesn’t update immediately though. Running the repair tools for calculating each users counts one by one in Tools > Forums fixed that.

    I think auto-updating the count is part of the latest dev version though.

    Here is the code I used to test it very quick. I just placed this in loop-single-reply.php.

    <?php print bbp_get_user_reply_count( bbp_get_reply_author_id() ) ?>

    #168410
    Rourke
    Participant

    Actually just found the answer by looking at another plugin. There is a hook for it: mce_external_plugins.

    I had some trouble finding it, so it might be usefull for someone else.

    #168409
    Loc Pham
    Participant

    Hi Pascal,
    Yes, I passed in the user id for admin and I’ve always got “0” back and admin had created many topics already.

    bbp_get_user_post_count(1, false);

    Thanks.

    #168408
    Rourke
    Participant

    I want to customize the TinyMCE editor with so called mini-plugins. For example, I have the emoticons mini-plugin that I want to use. When I place it in the folder /wp-includes/js/tinymce/plugins I’m able to use it through a custom wordpress plugin or the functions.php from my theme. But as far as I know this mini-plugin can get removed when wordpress gets updated.

    That’s why I want to know if it’s possible to use these TinyMCE mini-plugins inside my (child) theme instead of just throwing them into core?

    #168404
    o.m.j
    Participant

    unless I’m missing something…I added the below code to my child theme style.css & now pagination top & bottom is gone…

    .bbp-pagination-count {
    display: none;
    }

    #168401
    Pascal Casier
    Moderator

    Hi o.m.j,

    CSS will not help you in this case, not even nth-child or things like

    #bbpress-forums .bbp-pagination-count {
    	display: none;
    }
    #bbpress-forums .bbp-pagination-count ~ .bbp-pagination-count {
    	display: block;
    }

    will not work because the pagination is inside different divs and other elements.

    The only possibility would be somewhere going for a javascript like

    window.onload = function(){
        document.getElementsByClassName('bbp-pagination-count')[0].style.display = 'none';
    }

    (not tested yet) or go for some coding.

    Pascal.

    #168395

    In reply to: Delete “Header”

    Robkk
    Moderator

    You can use this custom CSS to hide it.

    #bbpress-forums li.bbp-header {
        display: none;
    }

    Or you can copy loop-topics.php to your child theme in a folder called bbpress. And remove these lines.

    <li class="bbp-header">
    
    		<ul class="forum-titles">
    			<li class="bbp-topic-title"><?php _e( 'Topic', 'bbpress' ); ?></li>
    			<li class="bbp-topic-voice-count"><?php _e( 'Voices', 'bbpress' ); ?></li>
    			<li class="bbp-topic-reply-count"><?php bbp_show_lead_topic() ? _e( 'Replies', 'bbpress' ) : _e( 'Posts', 'bbpress' ); ?></li>
    			<li class="bbp-topic-freshness"><?php _e( 'Freshness', 'bbpress' ); ?></li>
    		</ul>
    
    	</li>
    #168392
    Loc Pham
    Participant

    Are these three functions broken because I’m receiving zero posts/topics/replies when they’re executed:

    bbp_get_user_post_count()
    bbp_get_user_reply_count()
    bbp_get_user_topic_count()
    #168385
    o.m.j
    Participant

    can someone pls post the code to achieve this using a filter in child theme functions.php

    or maybe a style edit?

    *EDIT* disregard…I used this to remove both

    .bbp-pagination-count {
    display: none;
    }

    #168384
    sucre
    Participant

    Hi all you guys,
    i’ve been trying to display a specific forum in a specific category. Like all categories must have a different forum.

    To do this, i added a text field to the category with Advanced Custom Fields plugin. Then i write [bbp-single-forum id=196] in that field. (196 is the id number of the forum that i want to display for this category)

    To show this, i added this codes to category page in my theme

    <?php 
    $category_id = 'category_' . get_queried_object_id();
    $dforum = get_field( 'forum', $category_id ); 
    ?>
    <?php echo do_shortcode($dforum);
    ?>
    

    it’s working great. However, if you enter a topic (ex. a topic)the page goes to sitename.com/topic/a. But i want to read this topic in the category page. I tried to use iframe but i doesnt work. Please help.

    my site (click forum tab) : http://www.dizimoon.com/kategori/yabanci-diziler/game-of-thrones

    #168378
    ynteligent
    Participant

    Hello,

    I have a page, where I wanted to use shortcode [bbp-single-topic id=$topic_id]. I expected that only lead topic appears, but it does not. There is a lead topic with all replies.

    Is there any way how to display Lead topic only (no replies)?

    Thank you for any peply… Peter

    PS: I tried to use <?php bbp_get_template_part( ‘content’, ‘single-topic-lead’ ); ?> but I did not find out how to use it with specific topic_id….

    #168375
    ynteligent
    Participant

    Hello,

    I have a page, where I wanted to use shortcode [bbp-single-topic id=$topic_id]. I expected that only lead topic appears, but it does not. There is a lead topic with all replies.

    Is there any way how to display Lead topic only (no replies).

    Thank you for any peply… Peter

    PS: I tried to use <?php bbp_get_template_part( ‘content’, ‘single-topic-lead’ ); ?> but I did not find out how to use it with specific topic_id….

    #168372
    Pascal Casier
    Moderator

    Sorry, that page doesn't exist!

    #168366
    Robkk
    Moderator

    The “Forums” page lists all the topics – not the Forums, is that normal?

    It is if you set in Settings > FOrums for the forum root to display topics by freshness.

    Using that shortcode can work too I guess.

    #168364
    Robkk
    Moderator

    It might be better to create a bbpress.php instead of a regular static WordPress page, because that 1 static page will not work for all of the bbPress pages. If you create a bbpress.php, all your bbPress pages will use that template instead.

    See if this guide helps you any.

    Getting Started in Modifying the Main bbPress Template

    Since you using shortcodes you can echo the shortcodes in the bbPRess template like this.

    <?php echo do_shortcode("[shortcode]"); ?>

    #168360

    In reply to: Author avatar issue

    Robkk
    Moderator

    @leirof

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

    #bbpress-forums div.bbp-the-content-wrapper input{
      color: #000;
    }
    #168359

    In reply to: 404 error

    Robkk
    Moderator

    Can you see the forums on the frontend of your site??
    Are you saying you cannot see it in the backend in Forums > All FOrums??

    While testing your theme everything works fine for me.

    You can try some troubleshooting to see if this is hopefully not a cache issue, or see if a plugin is causing the conflict, or if running the repair tools in Tools > Forums helps.

    Troubleshooting

    #168356
    Robkk
    Moderator

    Try this php code snippet. Add it to your child themes functions.php file or in a functionality plugin that can hold custom php code snipppets.

    add_filter ('bbp_get_title_max_length','rkk_change_title') ;
    
    Function rkk_change_title ($default) {
    $default=90 ;
    return $default ;
    }
Viewing 25 results - 7,476 through 7,500 (of 32,569 total)
Skip to toolbar