Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 7,451 through 7,475 (of 32,520 total)
  • Author
    Search Results
  • #168468
    Rourke
    Participant

    Thanks @casiepa, you got me on the right track.

    In the proces I must have removed $arg['teeny'] = false; somewhere. Adding that made it work.

    I now made it like this, and it works like a charm:

    /* TinyMCE configuration */
    function bbp_load_custom_config( $config = array() ) {
    	$config['tinymce'] = array( 
    		'toolbar1' => 'bold, italic, underline, strikethrough | blockquote | alignleft, aligncenter, alignright, alignjustify | bullist, numlist | undo, redo',
    		'toolbar2' => 'link, unlink | outdent, indent | removeformat',
    		'plugins'  => 'wplink'
    	);
    	$config['quicktags'] = array ('buttons' => 'strong,em,link,block,del,ins,img,ul,ol,li,code,close');
    	$config['teeny'] = false;
    	return $config;
    }
    add_filter('bbp_after_get_the_content_parse_args', 'bbp_load_custom_config');
    add_filter('mce_buttons', 'bbp_load_custom_config');
    
    /* TinyMCE loading external plugins */
    add_filter('mce_external_plugins', 'my_custom_plugins');
    function my_custom_plugins() {
    	// Reading directories
    	$plugins = glob(get_stylesheet_directory() . '/js/tinymce/*' , GLOB_ONLYDIR);
    
    	if(count($plugins) > 0){
    		// Get the plugin name = directory name, and the URL
    		foreach ($plugins as $plugin ) {
    			$plugin_name = pathinfo($plugin, PATHINFO_BASENAME);
    			$plugins_array[ $plugin_name ] = get_stylesheet_directory_uri() . '/js/tinymce/' . $plugin_name . '/plugin.min.js';
    		}
    	}
    
    	return $plugins_array;
    }

    The last function assumes all external plugins are in /wp-content/themes/child-theme/js/tinymce/ and loads them into TinyMCE.

    #168459
    ynteligent
    Participant

    I found this tricky solution yesterday evening too…

    I created new template page where I put complete code from content-single-topic-lead.php and added $topic_id into brackets () almost everywhere- that worked for me…. But I am pretty shure that there is easier and bbpress / php more friendly way how to do this ….If you have any idea just let me know, for the moment I am going to use content-single-topic-lead.php code. I really appreciate your help.

    I am going to finish my page within few days, I learned a lot during the process, so I think that I can help other people on this support forum like you do…

    Thank you Robkk

    #168457
    vinaynellagi
    Participant

    Hi, I am trying to import from vBulletin 4.2.2 to BBpress The forum is pretty big with Data of 2.4 GB.

    Every time I start the import it gets stuck at 45458th record of topics with when it is executing this statement (I saw the number of records from WP Admin in under Topics section)

    —————————
    SELECT convert(thread.threadid USING “utf8mb4”) AS threadid,convert(thread.forumid USING “utf8mb4”) AS forumid,convert(thread.replycount USING “utf8mb4”) AS replycount,convert(thread.postuserid USING “utf8mb4”) AS postuserid,convert(post.ipaddress USING “utf8mb4”) AS ipaddress,convert(thread.title USING “utf8mb4”) AS title,convert(post.pagetext USING “utf8mb4”) AS pagetext,convert(thread.open USING “utf8mb4”) AS open,convert(thread.sticky USING “utf8mb4”) AS sticky,convert(thread.dateline USING “utf8mb4”) AS dateline,convert(thread.lastpost USING “utf8mb4”) AS lastpost FROM thread AS thread INNER JOIN post AS post USING (threadid) WHERE post.parentid = 0 LIMIT 45300, 100
    —————————

    I followed this but it stops again at every ~50 records.

    But When I run this query in the PhpMyAdmin i get proper results of 100 records. I have tried to sanitize all the data that looked suspicious to me. Can someone please guide me to identify this offending data. What should I watch out for ?

    I have setup my BBpress on it on my local server which sits on a RAMDisk of 10GB (Makes I/O, hence import process lighting fast). Is this an issue ?

    Or are there any logs that I can inspect to see what error occurred ?

    #168456

    In reply to: Author avatar issue

    Robkk
    Moderator

    Well that code is very specific for every button in your bbPress forums, but if it works I guess use it.

    I should have told you use this CSS instead earlier since it just pinpoints the quicktag toolbar buttons and not customize every input field in the content wrapper div.

    #bbpress-forums .quicktags-toolbar input.button {
        color: black;
    }
    #168455
    Robkk
    Moderator

    I expected that only lead topic appears, but it does not. There is a lead topic with all replies.

    That is how the shortcode should output. This is the description straight from the plugin for the function from the shortcode.

    Display the contents of a specific topic ID in an output buffer and return to ensure that post/page contents are displayed first.

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

    The best way is to probably make a new custom shortcode. I will test this out later today and see if I can just use something similar to the single reply shortcode, but just use the content-single-topic-lead.php template instead.

    #168453
    Robkk
    Moderator

    I just want to know what “bbPress ready” “works with bbPress” means
    What are some characteristics that make a “theme bbPress ready/compatible”?

    Most common theme related issues are not visible with the theme.

    If a WordPress theme is reviewed in an article and is said to work for bbPress

    There are quite a few, like a handful of paid themes that actual go out and style everything and add something custom in their forum layout. Some others just say it just works but do not really customize the layout much.

    Same thing with free themes, only a few I have seen actually customize the layout. There are some good free ones.

    What do the results imply when I search for themes for bbPress, what can I expect in general?

    The theme has no possible theme issues with bbPress and possibly some minor or major customization in the default bbPress forums look.

    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.)

    It is close to a traditional forum layout (except the categories/forum layout). Can you please explain exactly why some things might not understandable so I can help you better?? I do not want to try to assume things from what you meant by structure or the pages generated.

    In /forums page is the forum post type archive, same goes for the topic post type and /topics. In some themes they configure a custom page title for Archive pages. Since you can use the regular WordPress conditional is_archive() and affect bbPress, well it affects bbPress.

    Here is the code in the free version of that theme that outputs the Archives title for any archive using if_archive() and some extra conditionals to check if it is a category archive or an author archive and so on. Since the bbPress archive page does not follow one of the other conditionals, the title ends up just Archives.

    function ample_header_title() {
       if( is_archive() ) {
          if ( is_category() ) :
             $ample_header_title = single_cat_title( '', FALSE );
    
          elseif ( is_tag() ) :
             $ample_header_title = single_tag_title( '', FALSE );
    
          elseif ( is_author() ) :
             /* Queue the first post, that way we know
              * what author we're dealing with (if that is the case).
             */
             the_post();
             $ample_header_title =  sprintf( __( 'Author: %s', 'ample' ), '<span class="vcard">' . get_the_author() . '</span>' );
             /* Since we called the_post() above, we need to
              * rewind the loop back to the beginning that way
              * we can run the loop properly, in full.
              */
             rewind_posts();
    
          elseif ( is_day() ) :
             $ample_header_title = sprintf( __( 'Day: %s', 'ample' ), '<span>' . get_the_date() . '</span>' );
    
          elseif ( is_month() ) :
             $ample_header_title = sprintf( __( 'Month: %s', 'ample' ), '<span>' . get_the_date( 'F Y' ) . '</span>' );
    
          elseif ( is_year() ) :
             $ample_header_title = sprintf( __( 'Year: %s', 'ample' ), '<span>' . get_the_date( 'Y' ) . '</span>' );
    
          else :
             $ample_header_title = __( 'Archives', 'ample' );
    
          endif;
       }
    #168451
    ynteligent
    Participant

    Hello Robkk

    thank you for your reply, this is another easy way how to achieve the same result- Thanks. I made a new template in child theme and added few “<div class= ….. >” and than I used it as a template for forum – and it worked out.

    Anyway I have a diferent problem with my page – If I use shortcode [bbp-single-reply id=$reply_id] only one reply appears. When I use [bbp-single-topic id=$topic_id] i see topic and all replies- but I want to see topic only…. is there any easy solution for that ?

    I have already found a solution for that, but it is little bit tricky and I am pretty sure that there is easier way how to do it, but i do not know how….. Any idea ?

    Thank you anyway… Peter.

    #168447
    Robkk
    Moderator

    @tkserver

    Well I think @jovito just put shortcodes in a regular WordPress static page and just wants how it looks to be across all bbPress pages, and that is where the bbpress.php would help.

    with a custom file bbpress.php in my theme, would it be directed to that page when I hit submit for a new topic or new reply, instead of the topic page mentioned above?

    The bbpress templates using theme compatibility will use a template like page.php or bbpress.php in your theme, but the topic page content will be inside of the loop of that template. Instead of using a bbpress.php file, you can put single-topic.php from the extras folder and customize it and place it in your child theme root for a template specific to a single topic page.

    Is there sth like a template for the display of topics?

    These are all the templates that are being used in a single topic. Using single-topic.php in the root of your child theme will be the main template being used instead of a bbpress.php template or a page.php template.

    Also @jovito what kind of options for shortcodes are you talking about??

    #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

Viewing 25 results - 7,451 through 7,475 (of 32,520 total)
Skip to toolbar