Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 10,876 through 10,900 (of 32,521 total)
  • Author
    Search Results
  • Stephen Edgar
    Keymaster

    Have you played with bbp_parse_args() yet? This is used ~100 times in bbPress to allow you to change array arguments ‘before’ or ‘after’.

    BuddyPress introduced bp_parse_args in BuddyPress 2.0, and as they have some good docs and we don’t yet here for bbPress check this out:

    https://codex.buddypress.org/plugindev/using-bp_parse_args-to-filter-buddypress-template-loops/

    So for the bbPress function bbp_list_replies() you’d use bbp_before_list_replies_parse_args

    https://bbpress.trac.wordpress.org/browser/tags/2.5.4/includes/replies/functions.php#L2192

    Does this get you on the right track? I hope so as I’ve never played with custom walkers πŸ˜‰

    #150888
    Stephen Edgar
    Keymaster

    What you should do is tweak the arguments passed to the breadcrumb so you can add/change the CSS classes (and or HTML elements) for the breadcrumbs, the plugin extends what is already listed in the codex docs and shows you all of the options available and you should be able to tweak it for what you are after.

    https://gist.github.com/ntwb/7781901

    Layout and functionality – Examples you can use

    #150886
    Stephen Edgar
    Keymaster

    See the link Robin posted in the other topic or here it is.

    #150885
    Stephen Edgar
    Keymaster

    At a guess, it’s hard to guess without a link or screenshots I’d say your themes including some template content you don’t actually want.

    Depending on your theme you need to make a copy of your page.php file and rename it bbpress.php.

    To add new fields to a users profile you can add new fields, see this plugin for an example and the relevant WordPress Codex docs:
    https://gist.github.com/ntwb/c70caf5a0aa9d3062a6d
    https://codex.wordpress.org/Plugin_API/Filter_Reference/user_contactmethods

    #150882
    Stephen Edgar
    Keymaster

    A quick look the following tweaks your background colors to match (colors are not exact though) and they should be tweaked to match your themes color scheme etc.

    
    #bbpress-forums div.odd, 
    #bbpress-forums ul.odd,
    #bbpress-forums div.even, 
    #bbpress-forums ul.even,
    #bbpress-forums li.bbp-header {
    background-color: #113450;
    }
    
    #bbpress-forums div.bbp-forum-header, 
    #bbpress-forums div.bbp-topic-header, 
    #bbpress-forums div.bbp-reply-header {
    background-color: #112350;
    }
    

    #150877
    hitkid
    Participant

    Thank you @robin-w for the great and speedy reply.

    I was just trying to remove the breadcrumb in the content-archive-topics.php template to test if that’s the file I’m suppose to edit. Really I want to rearrange and do a whole lot of different things. Like what it says in the Amending bbpress templates codex entry.

    Note* All the forum templates work great! Unlike the topic templates, any change I make to these files appears in the forum index as they should: archive-forums.php>content-archive-forums.php>loop-forums.php>loop-single-forums.php

    That’s a great entry in the codex.

    7. How can I remove all the breadcrumbs from the templates and set them at the top of the page?

    Moving around the breadcrum is more of what I want to do, but I can’t find the template file for the topics to add the <div class=”truebreadcrumbs”> to the bbp_breadcrumb(); to be able to use css to move it around. If that makes sense.

    Sorry if I’m being confusing and I thank you very much for your help πŸ™‚

    #150868
    Robin W
    Moderator

    if you want to get rid of the breadcrumb use

    Layout and functionality – Examples you can use

    what else do you want to achieve?

    #150866
    hitkid
    Participant

    I’m trying to get rid of and change the layout of the: bbp-template-notice info and bbp-breadcrumb, in the topics index. So Home>Forums>Test Topic. I’m having trouble figuring out if there is a bug, or I’m missing something, or I just have the template hierarchy wrong.

    How I believe the template hierarchy works: archive-topics.php>content-archive-topics.php>loop-topics.php>loop-single-topics.php

    I figure the changes I would need to make would be in archive-topics.php or content-archive-topics.php, but when I delete the <?php bbp_breadcrumb(); ?> as a test it’s still there.

    When I make changes to loop-topics.php and loop-single-topics.php, it works fine. It’s just those two page templates.

    I’ve tried editing the bbpress.php file from:

    <?php /* Start loop */ ?>
    	<?php while (have_posts()) : the_post(); ?>
    		<article <?php post_class() ?> id="post-<?php the_ID(); ?>">
    			<header>
    				<h1 class="entry-title"><?php the_title(); ?></h1>
    			</header>
    			<div class="entry-content">
    				<?php the_content(); ?>
    			</div>
    		</article>
    	<?php endwhile; // End the loop ?>

    and swapping the content for <?php bbp_get_template_part( ‘content’, ‘archive-topic’ ); ?>. That worked but it messed with my forums index.

    I’ve taken a look in the codex to try and figure out what I’m doing wrong and feel lost.
    tep-by-Step Guide to Creating a Custom bbPress Theme

    Getting Started in Modifying the Main bbPress Template

    Sorry if this is a bother, but I’m completely stumped as to what’s going on

    #150862
    Robin W
    Moderator

    Not sure why you only want editing in the backend. Indeed I’m not sure why you want anyone to have access to the backend at all, apart from admins !

    However presuming that you actually just want no-one to change their profiles

    You will need to modify
    wp-content/plugins/bbpress/templates/default/bbpress/user-details.php

    make a copy of this file, and put in in a directory called bbpress within your theme, so you end up with
    wp-content/%your-theme-name%/bbpress/user-details.php

    The take out lines 63-69

    <li class="<?php if ( bbp_is_single_user_edit() ) :?>current<?php endif; ?>">
    						<span class="bbp-user-edit-link">
    							<a href="<?php bbp_user_profile_edit_url(); ?>" title="<?php printf( esc_attr__( "Edit %s's Profile", 'bbpress' ), bbp_get_displayed_user_field( 'display_name' ) ); ?>"><?php _e( 'Edit', 'bbpress' ); ?></a>
    						</span>
    					</li>
    
    				<?php endif; ?>
    
    

    This will stop any front end editing

    Robin W
    Moderator

    this is interesting…

    Your link

    Philosophical Movies – I want them

    only shows that the coder has changed the lines
    ‘You must be logged in to reply to this topic’
    in
    form-reply.php

    form-reply.php is called by

    content.single.topic.php

    on line 44.

    Now you could change line 44, BUT and here’s the issue, we are talking php, which is a pre-processor, so by the time it creates the page, you can’t have a conditional and it has processed, so a ‘click to do reply form’ from this .php is not simple.

    There’s loads on the net about this eg

    http://stackoverflow.com/questions/20738329/how-to-call-a-php-function-on-the-click-of-a-button

    google something like php click link to do function

    All of it talks about using ajax – soemting that is entirely alien to me, and I can’t find an example to use, they all lose me in jargon I don’t know.

    It’s definitely do-able, but I don’t know how !!

    #150860
    Robin W
    Moderator

    I’ve just recut my topics shortcode to allow you to do just that

    bbp additional shortcodes

    #150850

    In reply to: Hide author/admin

    Robin W
    Moderator
    #150847

    Hi,

    I would love to get some advice on where to dive into the code to look at this. Everything must be set up correctly – because otherwise, it would never work. What functions should I start looking at to see what isn’t getting called that should be?

    David

    #150846
    lemolee88
    Participant

    @netweb sorry i am not good at php and english, can you give me The complete code?

    Very sorry to have wasted your time. But it is really important to me.In addition to you, I do not know who can help me!

    #150833
    Stephen Edgar
    Keymaster

    Your first question you can easily do with a WordPress page and link to it and any other FAQ’s you may want to have on your site.

    To extend your profiles you will need a plugin, search the plugin repo’s for either a plugin compatible with bbPress or check out BuddyPress our sister project that includes this functionality out of the box.

    Twitter/Facebook sharing is also plugin territory

    Your 3 sections, just make 3 forums or 3 categories each with a forum.

    https://bbpress.org/plugins/ https://wordpress.org/plugins/

    Other than that take a look at some of the sites people are linking to here or check out some of the example sites https://bbpress.org/about/examples/ and some of bbPress’ docs https://codex.bbpress.org/getting-started-with-bbpress/ https://codex.bbpress.org/

    #150831
    Stephen Edgar
    Keymaster

    I just split this topic, bumping a two year old topic is of no help to the previous posters and 9 times out of 10 won’t be helpful for yourself either πŸ˜‰

    I’m not exactly sure what you are after or you have already fixed it as your forums look ok.

    To answer the specific question though, make a copy of your themes page.php file and rename it to bbpress.php, though as stated I’m not sure you need this.

    #150819

    In reply to: Hide author/admin

    Stephen Edgar
    Keymaster

    This is because your theme appears to be inserting bbPress within a page that lists the ‘author’.

    You may need to make a copy of your page.php and rename bbpress.php and remove anything ‘extra’ that may be being inserted there.

    #150817
    Stephen Edgar
    Keymaster

    Seems a little weird, if you set the number of rows to 100 which is the default it should only take a few seconds before you see either “Converting forums” or “Converting Users”.

    I would double check your phpBB config.php file (it should be in the root folder of your phpBB install.

    e.g.

    
    // phpBB 3.0.x auto-generated configuration file
    // Do not change anything in this file!
    $dbms = 'mysqli';
    $dbhost = '';
    $dbport = '';
    $dbname = 'your_db_name';
    $dbuser = 'your_db_user_name';
    $dbpasswd = 'your_db_user_password';
    $table_prefix = 'phpbb_';
    $acm_type = 'file';
    $load_extensions = '';
    

    Make sure you use the correct table prefix.

    #150816

    Topic: mobile layout

    in forum Showcase
    Yolle
    Participant

    Hi.
    I have been partly successful in changing the mobile layout of the bbpress. I have managed to make avatars smaller in the mobile layout and also more aligned to the left, as well as the author name and author role. However, I can’t seem to find the correct code to make the content of the reply (bbp-reply-content?) more to the left or to make the space smaller between the author info and the text.
    Photo of the problem
    Surely there must be a very simple solution to this?
    Thanks!

    #150814
    widlak
    Participant

    I recently switched to the Graphene theme (which I must say is quite awesome!!!), mainly because I wanted something that I could integrate a forum into without creating a separate site or subdomain. Plus this was the only theme that looked great right out of the box.

    With that said, if this is a bbPress issue and not a theme issue, I will certainly seek help in a different location. I am horrible with code but with simple instruction, I could navigate my way around it.

    I uploaded the bbPress plugin, created a page, and promptly began placing the shortcode in the widget areas for loggin in and registering. The default log-in was already filled out for me and I clicked the ‘Log-In’ button and when I refreshed my screen it took me to the home page. I reopened my WP log-in screen and when I logged in, it took me to my home screen again, not my WP admin panel. Am I doing something wrong? I want to be able to integrate everything in this theme without having to leave and log-in to an entirely different site. Please help.

    Thanks

    #150813
    Stephen Edgar
    Keymaster

    With the existing code in the original topic and along with this snippet I had else where you should be fine to put it all together:

    To get the child/sub forums from the current forum page use bbp_forum_get_subforums() and then pass those ID’s to post_parent__in (Note the double underscore). You can also go the other way to get ‘parents’ of the current forum with bbp_get_forum_ancestors().

    e.g. To include forum ID’s 2, 5, 12 and 14 add the post_parent__in

    
    if ( bbp_has_topics( array( 'orderby' => 'rand', 'posts_per_page' => 1, 'post_parent__in' => array( 3, 5, 12, 14 ) ) ) ) {

    e.g. To exclude forum ID’s 7, 11, 19 and 21add the post_parent__not_in

    
    if ( bbp_has_topics( array( 'orderby' => 'rand', 'posts_per_page' => 1, 'post_parent__not_in' => array( 7, 9, 11, 19 ) ) ) ) {
    #150812
    Stephen Edgar
    Keymaster

    bbPress should work fine using the ‘default’ settings including the default slugs:

    The shortcode should be [bbp-forum-index] (You used bbb and not bbp)

    The Japanese translations for forum and forums are the same, these should be different based on how the Japanese language uses plurals in this context as if they are the same this will cause a problem for bbPress, I had to use フォーラ so it was different from フォーラム πŸ˜‰

    Here it all is working for me, my domain is http://en-au2.wp.nw/build, yours would be http://careerkokusai.com/ and everything is using ‘native’ Japanese for the permalinks πŸ™‚

    bbPress Settings (Slugs/Permalinks) https://cloudup.com/iFKwgluP_5g

    Page with (Back end) [bbp-forum-index] https://cloudup.com/icgezwdk6Vk

    Single Page (Front end) with Menu link showing the above page フォーラム https://cloudup.com/iy4i3RksjRI

    Forums (Front end) https://cloudup.com/iltDJlyKqXK

    Single Forum (Back end) https://cloudup.com/iAvcWJ7qBs6

    Single Forum (Front end) https://cloudup.com/i061G0kJwtx

    Single Topic (Back end) https://cloudup.com/i-hfrIBhgT0

    Single Topic (Front end) https://cloudup.com/iOMAKPqAlmu

    Stephen Edgar
    Keymaster

    Simply it is not us here at bbPress (or BuddyPress) that would write the code to add support for that software to use with our software, it is up to them if they want to add support or not.

    #150801
    EzYRiDaH
    Participant

    Hi there,
    First of all I am not a hardcore coder. Used to code 20 years ago, so I can read a lot of the syntax, but am quite new to the javascript, php etc. Can handle myself a bit in sql though.

    I am trying to migrate a very big MyBB forum to bbPres (1,7 mlj posts and 63k discussions). Tried to do it directly on my VPS, but it took way too long. Ages…

    After some trial and error I was able to make a complete dump of the MyBB as SQL and imported it on my Mac’s MAMP. I was one happy muppet and kicked of the conversion.

    Whatever I do I keep getting the same messages. No error messages, just that there is nothing to convert. I have tried every scenario I could think of that could go wrong. Localhost port, userid/pass on database, prefix etc etc. Whatever I do, even leave blank fields to get some kind of error message, I still get the same result. Absolutely nothing to convert.

    I’ve checked the code but could not find any error handling. Could be there, but I am not too familiar on linking php code files.

    I get the feeling this is some kind of MAMP issue because I got it to run on my VPN.

    Any help / suggestions are more than welcome.

    Thanks in advance!

    Robin W
    Moderator

    Apologioes if I’m being thick, but line 29 of bbpress/templates/default/bbpress/form-reply.php says

    <legend><?php printf( __( 'Reply To: %s', 'bbpress' ), bbp_get_topic_title() ); ?></legend>
    

    Is that not the line you want to get rid of/change?

Viewing 25 results - 10,876 through 10,900 (of 32,521 total)
Skip to toolbar