Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 10,851 through 10,875 (of 32,504 total)
  • Author
    Search Results
  • #150905
    Stephen Edgar
    Keymaster

    Ooops, for the topic form, take a look in content-single-forum.php and you’ll find:
    <?php bbp_get_template_part( 'form', 'topic' ); ?>

    #150904
    Stephen Edgar
    Keymaster

    If you want paste your templates (or code snippets) in a Gist and I’ll take a look and see if anything stands out… https://gist.github.com/

    Unless you have named the files incorrectly, this is what they should be:

    content-archive-topic.phploop-topics.phploop-single-topic.php

    You have an extra s on two of the three 😉

    #150903
    hitkid
    Participant

    Thanks again @netweb

    Okay, I’m glad too see I wasn’t editing the wrong templates. I was paranoid that I was doing that. Unfortunately, this means something is going on with my archive-topics.php and content-archive-topics.php templates. The other two work great.

    What I’m trying to do is add things like: elements, classes, ids, functions I’ve built move around the functions already in the archive-topics.php and content-archive-topics.php templates and so on. When I do this and save changes they don’t appear.

    It doesn’t even look like my topic index is using the proper templates because in the content-archive-topics.php template file there is a search function that isn’t appearing in the topic index when I click on a topic off the forum index. eg home>forums>this-is-a-topic.

    Also you can create a topic on the topic index page in the website, but I can’t find a call to the form-topics template in any of the topic templates stated in the topic heiarchy. Unless it’s called in another way that’s not something like this:

    <?php bbp_get_template_part( 'form', 'topic' ); ?>

    What could be going on and why could this be ?

    Again I thank you for your help!

    #150902
    Stephen Edgar
    Keymaster

    I am sorry, I am not writing custom plugins for people for free, let alone your assumption that that is what you expect, not going to happen.

    If you need some custom code written post an advert on http://jobs.wordpress.net

    #150898

    In reply to: Importing SMF

    Stephen Edgar
    Keymaster

    Also if you are going to use versions of the importer from the source repo you will need to ensure you also are using the matching the revision of converter.php.

    Also not quite sure how you landed on the r5191 revision, there are quite a few since then and a few before!

    #150897

    In reply to: Importing SMF

    Stephen Edgar
    Keymaster

    It looks like you left out the table prefix, SMF typically uses smf_

    Double check by opening your SMF Settings.php file in the root folder of your SMF install:

    
    ########## Database Info ##########
    $db_type = 'mysql';
    $db_server = 'localhost';
    $db_name = 'db_name ';
    $db_user = 'db_user ';
    $db_passwd = 'db_passwd ';
    $ssi_db_user = '';
    $ssi_db_passwd = '';
    $db_prefix = 'smf_';
    $db_persist = 0;
    $db_error_send = 1;
    
    #150894
    Stephen Edgar
    Keymaster

    Argh! Both 😉

    Wherever you are testing all of this, the phpBB database must be on the same MySQL database server, not the same actual database, just the same server.

    I’m not entirely sure what the ‘wp-united’ does to the phpBB members table but there are a couple of topics here on bbpress.org about it.

    Lets skip trying to import phpBB members for a minute and just go with forums, topics and replies for starters. So try your import again without selecting to import “Users”, this should be a good test to make sure that you have a connection to the database and you are indeed using the correct prefix, I expect as you note it most likely should be phpbb3_ as per your phpBB config file.

    #150893
    hitkid
    Participant

    @netweb Thank you very much! I will try this.

    The only thing I’m kind of left confused about is how the index for topics works? In the Amending bbpress templates codex entry it states the templates for forums work like this:

    The index for the forums starts by using

    content-archive-forum.php

    If you open this up you will see that it them calls a further template by using the function bbp_get_template_part

    <?php bbp_get_template_part( ‘loop’, ‘forums’ ); ?>

    (this translates to loop-forums.php)

    this in turn calls

    <?php bbp_get_template_part( ‘loop’, ‘single-forum’ ); ?>

    (this translates to loop-single-forum)

    and so on.

    So the template hierarchy for the the forums index would look like this:
    archive-forums.php>content-archive-forums.php>loop-forums.php>loop-single-forums.php

    Would the template hierarchy for the topics index look like this:
    archive-topics.php>content-archive-topics.php>loop-topics.php>loop-single-topics.php

    Thanks again for taking the time to help me!

    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.

Viewing 25 results - 10,851 through 10,875 (of 32,504 total)
Skip to toolbar