Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 12,601 through 12,625 (of 32,504 total)
  • Author
    Search Results
  • #142711
    hbombs86
    Participant

    Just thought I’d reply to przwilson:
    I had the same problem and spent an entire day looking for the code. But I just found it.

    IT’s at bbpress/includes/common/shortcodes.php

    Around line 522 for me you’ll see the “largest” and “smallest” stuff. Edit it there and your problem is fixed. All you need to do is change the numbers.

    Cheers.

    #142705

    In reply to: Form To Forum Post

    PinkishHue
    Participant

    I’m very new to bbpress but have been working with WordPress for quite a while. I have a WordPress form (displayed using a custom page template) to post solution here: http://pinkishhue.com/an-alternative-to-tdo-mini-forms-for-wordpress/#workingsolution

    Perhaps this code could be altered to insert the post as a forum post instead of a regular post? Sounds like it shouldn’t be too complicated (maybe!)

    Hope that helps.

    #142695
    Robin W
    Moderator

    Yes, I was giving you the sort of code you need to write, in this case to write stuff to usermeta.

    As I said this is not a bbPress issue as bbPress just uses wp-posts, so you’d do better on their forum

    #142694
    Robin W
    Moderator

    “On this forum you have a nice clean bar showing create topic favorites and subscriptions, how can I create this on my forum. Does not have to be exactly the same but similar.”

    Answered in another post

    “Not sure if that’s the correct way to go about it but seems to work!”

    Suggest you read the setting up guides for how and where to change templates

    Codex

    “Also how can i fix the subscribe button/link as it is not displayed very well as you can see here. ”

    Agree, not quite sure where this displays, will look when I get a moment

    ‘Also i created a page which i put the shortcode for new topic form which i link to from the main forum page as a button. this is great but the form does not display well on the page. How can i fix this? the forum is really spaced out as you can see here ‘

    Not quite sure what this photo is showing, the button or the resultant page? Can you post the method or code you used on the “main forum page”

    #142691
    Robin W
    Moderator

    See the attached for some help

    Layout and functionality – Examples you can use

    Section 8

    #142675
    #142674
    gavpedz
    Participant

    Would be great if anyone has any suggestions on how to fix these things.

    I have now fixed the net topic form. I basically created a template for that page, pulling the code from form-topic.php

    Not sure if that’s the correct way to go about it but seems to work!

    #142670
    dzpoa
    Participant

    Hi all. Same here. This fixed the problem. Place inside the functions.php:

    function custom_bbp_has_replies() {
        $args['orderby'] = 'ID';
        $args['order'] = 'ASC';
        return $args;
    }
    add_filter('bbp_before_has_replies_parse_args', 'custom_bbp_has_replies' );
    
    function custom_bbp_show_lead_topic( $show_lead ) {
        $show_lead[] = 'true';
        return $show_lead;
    }
    add_filter('bbp_show_lead_topic', 'custom_bbp_show_lead_topic' );
    #142665

    In reply to: Forum display

    Robin W
    Moderator

    REPEAT : It would take a long time to go through what you would need to do – Basically it is all to do with styling and functions.

    The problem is that in answering this question I’d need to explain firefox and firebug, css, php bbpress structure and lots more.

    But to get you started – THIS IS NOT THE SOLUTION – but a couple of lines that will see you get further forward. you’ll need to look at “inline” as well to get the is horizontal.

    You could do a bar several ways, but the easiest is create a copy of your page template for bbpress to use

    see https://codex.bbpress.org/step-by-step-guide-to-setting-up-a-bbpress-forum/ section 8

    and then play with the following

    in css add

    #subnav {
    background: none repeat scroll 0 0 #2020ff;
    border-bottom: 1px solid #BBBBBB;
    font-size: 12px;
    margin-top: 81px;

    }
    and in you bbpress page template put under the header

    <div id=”subnav”>
    <ul id=”nav-user” class=”menu”>

  • Register
  • Lost Password
  • </div>

#142664

In reply to: LABELS

iol2014
Participant

I did again what you pointed out, and placed your code into the file functions.php of the theme but nothing changed…

#142663
gavpedz
Participant

Hi all so i have been playing with my bbpress install a little to get what i want and am almost there!

All i would like to do now is tidy it up a little but could do with some help!

On this forum you have a nice clean bar showing create topic favorites and subscriptions, how can i create this on my forum. Does not have to be exactly the same but similar.

Also how can i fix the subscribe button/link as it is not displayed very well as you can see here.  photo NewPicture1_zps663a6175.png
Also i created a page which i put the shortcode for new topic form which i link to from the main forum page as a button. this is great but the form does not display well on the page. How can i fix this? the forum is really spaced out as you can see here  photo NewPicture2_zps466d0fa3.png

Any help on any of this would be great

#142658
Robin W
Moderator

It’s do-able undoubtably, but not sure how much code you’d need to change.

Why are you wishing to do this?

#142655
Robin W
Moderator

Really a wordpress not a bbPress question, and quite a techy area

This is the code that I use to add a location to user details, which should help get you started.

//this function adds the updated town and county info to the database
function bbp_edit_user_tc( $user_id ) {
	$town = ( $_POST['town'] ) ;
	$county = ($_POST['county'] ) ;

	// Update town user meta
	if ( !empty( $town ) )
		update_user_meta( $user_id, 'town', $town);

	// Delete town user meta
	else
		delete_user_meta( $user_id, 'town' );
		
	//Update county user meta
	if ( !empty( $county ) )
		update_user_meta( $user_id, 'county', $county);

	// Delete county user meta
	else
		delete_user_meta( $user_id, 'county' );
}
add_action( 'personal_options_update',         'bbp_edit_user_tc' );
add_action( 'edit_user_profile_update',        'bbp_edit_user_tc' );

}
#142653

In reply to: Forum display

Robin W
Moderator

It would take a long time to go through what you would need to do – Basically it is all to do with styling and functions.

The basics are covered in the documentation in the codex https://codex.bbpress.org/ and some of the step by step stuff and layout will help you.

#142652

In reply to: LABELS

Robin W
Moderator

umm, Now I’m a bit confused.

The filter only affects the bbp breadcrumb, so that fact that your theme doesn’t have breadcrumbs is irrelevant.

If you just add that code to your themes functions, it will be used by bbPress as it loads and not display.

I presume that’s where you put the previous code to change to blogs? If not try that code again!

Whilst you can add it to a default theme such as twenty eleven, keep a note of it, as any theme upgrade will overwrite it. you should consider a child theme to let you make changes without affecting the core code and themes see https://codex.bbpress.org/step-by-step-guide-to-setting-up-a-bbpress-forum-part-2/ for some info on child themes

#142651

In reply to: LABELS

iol2014
Participant

it seems to be a never ending story hahah 🙂 thanks a lot for helping me
there is no breadcrumb into this theme ‘twenty eleven’: no page and no posts has it, other than the page which contains bbpress shortcode…
I searched in bbpress editor, for the code you wrote, but I didn’t find it exactly

#142646
jslom
Participant

I have a form, with multiple inputs that I am trying to get posted to the wordpress “post_content”. I am able to get the title field and only one other field to post successfully, only when making a field name “description” instead of “description[]”, but have no idea how I can get the rest to submit into the post_content. I would like the inputs posted like the image I have created below.

Here is the code I currently have that works for the title only.


    <?php /* Template Name: Question Form */ ?>
    
    
    <?php
    if( 'POST' == $_SERVER['REQUEST_METHOD'] && !empty( $_POST['action'] ) &&  $_POST['action'] == "new_post") {
    if (isset ($_POST['title'])) {
    	$title =  $_POST['title'];
    } else {
    	echo 'Please enter a title';
    }
    if (isset ($_POST['description'])) {
    	$description = $_POST['description'];
    } else {
    	echo 'Please enter the content';
    }
    $tags = $_POST['post_tags'];
    $new_post = array(
    	'post_title'    => $title,
    	'post_content'  => $_POST['description'],
    	'post_parent' => 599,
    	'post_status'   => 'publish',
    	'post_type' => 'topic'
    );
    $topic_meta = array(
    'forum_id'       => $new_post['post_parent']
    );
    $topic_id = bbp_insert_topic($new_post, $topic_meta);
    wp_redirect(get_permalink($topic_id)); exit;
    }
    ?>
    
    
    <form id="new_post" name="new_post" method="post" action="">
    
    <p class="question"><label>Title</label><input name="title" type="text">

    
    <p class="question"><label>Description</label><input name="description[]" type="text">

    
    <p class="question"><label>Your First Name</label><input name="description[]" type="text">

    
    <p class="question"><label>Your Last Name</label><input name="description[]" type="text">

    
    <p align="right"><input type="submit" value="Publish" tabindex="6" id="submit" name="submit" />

    
    <input type="hidden" name="action" value="new_post" />
    
    <?php wp_nonce_field( 'new-post' ); ?>
    
    </form>

I don’t know how to add the other fields to be a part of post_content.
I have tried a few other things, but have been unsuccessful. I would appreciate any help very much!

#142645

In reply to: LABELS

Robin W
Moderator

code to remove it is

function bm_bbp_no_breadcrumb ($param) { return true;
 }
add_filter ('bbp_no_breadcrumb', 'bm_bbp_no_breadcrumb');
#142635

In reply to: BBPress in italian

Stephen Edgar
Keymaster

I think you need to name the files bbpress-it.mo and bbpress-it.po

#142632
storm72087
Participant

Hi guys,

I’m trying to tinker with my bbPress forum and the font sizes of the parent forums and sub forums. I found this code (#bbpress-forums li a) and entered it into my custom CSS field, but it affects both parent and sub forum titles. How do I target the parent forum titles and sub forum titles separately.

Thanks!

#142627
Robin W
Moderator

you could try the following plugin that I use

bbpress notify

It lets you set who receives

once installed go to dashboard>settings>forums and you’ll see options.

These are set at WP-roles, so you would probably have your moderators as editors. If you a code person, I’m sure you could mod the plugin to look for bbpress moderators.

#142625

In reply to: LABELS

Robin W
Moderator

sorry should have put the actual code in the post !

//function to change name forums in breadcrumb to Blogs 
function mycustom_breadcrumb_options() {
    $args['root_text']    = 'Blogs';
	return $args;
}
add_filter('bbp_before_get_breadcrumb_parse_args', 'mycustom_breadcrumb_options') ;

#142621

In reply to: Topic & Reply count

Skez
Participant

Thanks for your reply Robin but unfortunately it doesn’t seem to work.
For me the line with <?php bbp_list_forums()?> is line 44 and not 30.

I’m not completely sure I am doing it right, I change the following in the file bbpress/templates/default/bbpress/loop-single-forum.php<?php bbp_list_forums()?> to

<?php bbp_list_forums(array (
'show_topic_count' => false,
'show_reply_count' => false,
'separator' => '',
));?>

Is that correct? I tried different endings as well, since the original line ends with just )?> I tried ending the new one also like that but all it gives me when I reload the forums is the following
Parse error: syntax error, unexpected ‘=’, expecting ‘)’ in /home/virtual/mydomain.com/public_html/familjen/wp-content/plugins/bbpress/templates/default/bbpress/loop-single-forum.php on line 45

If <?php bbp_list_forums()?> is line 44 then line 45 has to be 'show_topic_count' => false,

I’m very confused here!

WAIT A MINUTE NOW! It was just me not realizing the => represents => but => turned to => when I copied it into this post so now it works. Many thanks!

#142619

In reply to: Topic & Reply count

Robin W
Moderator

No problem !

Item 2 on the attached

Layout and functionality – Examples you can use

#142617

Odd. Could be a bug in several different places, but bbPress does use BuddyPress’s bp_core_current_time() function before calling bp_activity_add() in BBP_BuddyPress_Activity::record_activity().

I’d start your trouble shooting there, and see what time is being calculated.

Viewing 25 results - 12,601 through 12,625 (of 32,504 total)
Skip to toolbar