Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 7,426 through 7,450 (of 32,505 total)
  • Author
    Search Results
  • lvictor
    Participant

    I’ve seen a ton of topics regarding not being able to see the forums at all, but nothing quite like my situation. I can see the top level for my forums, and it is listing topics & replies but I can’t get to them. Although I’ve imported the bbpress templates and css to my template directory, I’m unable to get past the top level for my forums at:

    STARFLEET Discussion Forums

    When I click on a category, topic, reply, I get a blank like this:

    http://sfi.org/topic/heres-a-test-topic/

    They do work when I switch to the default template, so is there a step I missed with the template? Is there code that needs to be added to the template header? Something else?

    antonydennis
    Participant

    Hello there…

    I am trying to implement a view of Buddypress that looks like the Facebook newsfeed – a single page, which lists topics, each one having an add reply form underneath, and then a list of the existing replies. I have made the list of topics and replies, but I’m having trouble putting a working add reply form underneath each topic.

    The loop structure I have used is:

    
    $forum_ID_list = //a list of forum IDs
    foreach ($forum in $forum_list)
        // WP_Query to get the topic ID list
        foreach ($topic in $topic_ID_list)
            // output topic
            // output new reply form -BUT HOW...?
            WP_Query to get the reply ID list
            foreach ($reply in $reply_list)
                // WP_Query to get the reply details
                // Output the replydetails
    

    So I am not using calls to bbpress() in the loop.

    My question is: with this loop structure, how do I implement the output of the new reply form?

    I have tried embedding the reply form as follows:

    
    <form id="new-reply-XXX" name="new-post" method="post" action="">
    	<fieldset class="bbp-form">		
    	<textarea class="bbp-the-content wp-editor-area" rows="3" cols="10" tabindex="101" name="bbp_reply_content" id="bbp_reply_content"></textarea>
    	
    	<input type="hidden" name="bbp_topic_id"    id="bbp_topic_id"    value="TOPIC_ID" />'
    	<input type="hidden" name="bbp_reply_to"    id="bbp_reply_to"    value="0" />';
    	<input type="hidden" name="action"          id="bbp_post_action" value="bbp-new-reply" />
    	<input type="hidden" name="_wpnonce"        id="_wpnonce"        value="99e426b2cf" />'; // NOT SURE WHAT THIS DOES AND IF I NEED TO CHANGE IT
    	<input type="hidden" name="_wp_http_referer"                     value="" /> // CAN THIS JUST BE LEFT BLANK?
    	<input type="hidden" id="bbp_redirect_to" name="redirect_to"     value="MY_HOME_PAGE" />
    	
    	<button type="submit" form="new-reply-XXX" tabindex="104" id="bbp_reply_submit" name="bbp_reply_submit" class="button submit">SEND</button>';
    

    When I use this form, I am redirected to my home page, but the reply is not added to the topic.

    So my questions are:

    1. Can I do it by looping this way using WP_Query, and if so, can you answer my questions in upper case above about the form so it will add the topic correctly?

    2. If I cannot used my WP_Query based loops, what other way can I loop and make the form work?

    I’m using bbpress 2.5.8 with Buddypress 2.3.3 and WP 4.0.8

    Thanks in anticipation! Antony.

    #168516

    In reply to: Shorten Freshness

    manteli
    Participant

    Hi Pascal! Thank you for your answer. I tried the bbP Toolkit plugin but it didn’t work either.

    I’m using the Enfold theme and have already tested 1) adding code to theme functions.php 2) using code snippets plugin which works fine with other active snippets 3) using code snippets after switching to basic theme for testing purposes. None of these worked.

    Maybe some of my plugins is conflicting, I keep searching and update this if I find the reason.

    #168506
    manteli
    Participant

    Using latest versions of WP and bbPress. I’ve been searching and searching, is there anyone who could help me to shorten the freshness to show only year(s) OR week(s) OR day(s) OR minute(s) instead of the whole time stamp?

    I found this https://codex.bbpress.org/layout-and-functionality-examples-you-can-use/#10-shorten-freshness-wording but it doesn’t seem to work properly. I don’t know if I’m missing something. I still got “1 hour, 20 minutes” etc. Is the code supposed to do this / is it possible to show only one time variable like this?

    50 seconds ago
    33 minutes ago
    2 hours ago
    3 days ago
    1 year ago
    etc

    I would be so happy if someone could help! Thanks!

    #168491
    Robkk
    Moderator

    Oh sorry forgot you wanted a forum feed with only topics, I was just focusing on group forum feeds in general.

    To display only a specific post type in the feed like topics, just add ?type=topic to the end of /feed. So in the end using the example url again it will be something like

    yoursite.com/forums/forum/group-forums-2/forum-name/feed?type=topic

    I think even this works too.

    yoursite.com/forums/forum/group-forums-2/forum-name/feed/?type=topic

    #168488
    Robkk
    Moderator

    I might have gotten the urls wrong I was pulling an all nighter yesterday.

    It should be something like this for regular forums.

    localhost/forums/forum/forum-name/feed/

    If you have forums in categories it would show up like this.

    localhost/forums/forum/category-name/forum-name/feed/

    It was just an example url, not anything particular to your site.

    Here is the url to the feed for the ios development group forum.

    http://layerunion.com/forums/forum/group-forums-2/ios-development/feed

    So you have to go to each of them like this. Where the “forum-name” is the actual forums name, and “yoursite.com” is your sites domain name.

    yoursite.com/forums/forum/group-forums-2/forum-name/feed

    #168487
    tlatch89
    Participant

    Hey everyone,

    I started styling up a little support/development forum for my clients to use. It requires a little bit more customization but I have most of the basics down.

    Wordpress – Latest
    BBPress – Latest
    Theme – Salient
    Website Forum Page – https://wapp.guru/support/

    I’m not using any short codes because this theme actually handles the default BBPress pretty well. I’m just letting the default post types do their thing with Yoast SEO attached. I’ve added a plugin that adds login, log out, and register buttons to the forum itself.

    1. How do I set up my site to where people can log in with a WordPress / Gravatar account?

    2. The profile page title does not show up and using the Yoast plugin I can’t find any way to target it. Any advice?

    View post on imgur.com

    3. What’s a good plugin to use for things such as easy navigation for users? I have a few of the widgets in the hamburger menu on the top left. There’s a default login form but nothing regarding registration so I hard coded a link in. There’s a little login form, but no register form. I’ve tried (bbk style pack) but it seems to just place links in the main navigation menu which I don’t really like. It just seems like it’s difficult to navigate around.

    Overall I know the forum is open source and requires a good bit of customization. I’m just looking for the simplest way without having to use 50 additional plugins that conflict with one another.

    Thanks!

    #168484

    In reply to: vBulletin import help

    With every iteration, bbPress writes to the _bbp_converter_query option to record the last successful query. You can use that to cross-check what the converter is putting out against what the records are that are being imported.

    Usually when this happens, it’s a database encoding issue, and MySQL is getting stuck on a specific character in a specific record.

    To confirm if this is the case, you’ll want to go back into phpMyAdmin (or your favorite database management tool) and bisect that range of posts to identify exactly which post in your vBulletin installation that bbPress is getting hung up on.

    For example, when I converted bbPress.org from bbPress 1.2 to bbPress 2.0, it got stuck on 8 individual posts that had had encoding issues from 10 years ago when someone changed the encoding from whatever it was to latin1, and because WordPress usually expected to be UTF-8 and we have HyperDB in the middle to route queries around, bbPress’s converter would do exactly what yours is doing.

    If it’s database encoding or some other anomaly, isolating what is goofy with exactly which post(s) is the only way to get around it. I’m anxious to hear what you figure out here, and very happy to improve our importer if there’s anything we can do on our end.

    #168476
    manueldo
    Participant

    Hi martineva! I am in the same situation and have the same problem, and tried the same as you without results.
    The only way I could “solve” it, was modifying the capabilities for the default particpant role in the core of the plugin.
    In the Primary caps I had to set moderate=true and then blocked all things that I don´t want the user do in the other options. Anyway I had to hardcode some other parts of the plugin because it inherits some moderator capabilities, eg. this user will be able to stick a topic.

    I know this is not the way to solve it but it is the only way I found. And like you, this is my first forum, and I am not a developer.

    I hope we could find other way soon!
    ps.) Sorry for my english, isn´t the best.

    #168473
    martineva
    Participant

    Hello there !
    I’ve been on troubble since a few days, just trying to let my forum users to delete their own topics.

    I tried several plugins, on WordPress, but it seems that even if I create a new role and custom it with the “delete topic” option, it won’t be memorized, maybe due to php bbpress capabilities ?? Anyway those plugins seem to create only WordPress roles, not bbpress roles. So even if there is “forum options” set, maybe it’s not the good way to do it properly.

    Then I’ve been reading this : https://codex.bbpress.org/custom-capabilities/, and I was able to set a new role, but still, even if the 'delete_topics' => true," is set, the users can’t see anything like a delete button on the front end (same with the “delete replies” option, BTW).

    Following this other thread https://bbpress.org/forums/topic/bbpress-custom-user-role/ I created a separated php file, but once again I could see no effect, worse : I got 404 pages instead of my website pages.

    I must say it’s my first forum, and I’m not a good coder, so if anybody could help me to get this solved, it would be very, very nice !

    #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

Viewing 25 results - 7,426 through 7,450 (of 32,505 total)
Skip to toolbar