Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 12,626 through 12,650 (of 32,521 total)
  • Author
    Search Results
  • #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.

#142610

In reply to: LABELS

iol2014
Participant

Hello, thank you very much, I did as you wrote,
I re-saved the permalinks
I created a new page and inserted this shortcode [bbp-forum-index]
and breadcrumb now is: Home › Forums
while I changed the name of the root from ‘forums’ to ‘blogs’ because I want bbpress to show ‘blogs’ as its title and name everywhere in bbpress.
Thank you in advance

#142602

In reply to: admin bar

Robin W
Moderator

Ok, I had misunderstood.

The site you link to has these in their nav menu, they’ve just moved the nav menu to the top of the screen.

Most WP sites only give admin toolbar visibility to authors and above, as the backend is clearly different from their theme.

They then use sidebars to handle register, profile and login or use nav menus for these.

If you wanted to use the standard admin toolbar, then you’d not get a login, as the toolbar doesn’t show unless you are logged in, so it becomes self defeating !

If you want a login at the top right of your screen, you can use the php code in your theme’s header.php (or indeed anywhere you want to show it). You could add a background to make it look like a button

ie

<?php add_modal_login_button( $login_text = 'Login', $logout_text = 'Logout', $logout_url = '', $show_admin = false ) ; ?>

“in the code i pasted to the function.php, there is a note on the top saying it uses a plugin named “WordPress menu admin” i didnt seem to find it do you know what plugin he is using i dont want to download somthin wrong and mess this up.” – I didn’t see this, can you point me to which bit of code you are talking about.

#142594
jslom
Participant

I am posting a topic using this form, which specifies to post to post_parent ID 599.

Everything functions ok, but the topic will not show up in the frontend under the specified forum category.

It does show after posted, but in the backend. What am i missing to have it show up under the forum?

<?php /* Template Name: Question Form */ get_header();

if( 'POST' == $_SERVER['REQUEST_METHOD'] && !empty( $_POST['action'] ) &&  $_POST['action'] == "new_post") {

// Do some minor form validation to make sure there is content
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'];

// Add the content of the form to $post as an array
$new_post = array(
	'post_title'    => $title,
	'post_content'  => $description,
	'post_category'	=>	array($_POST['cat']),  // Usable for custom taxonomies too
	'post_parent' => 599,  // Forum ID to be posted to
	'post_status'   => 'publish',           // Choose: publish, preview, future, draft, etc.
	'post_type' => 'topic'  //'post',page' or use a custom post type if you want to
);
//save the new post
$pid = wp_insert_post($new_post);
wp_redirect(get_permalink($pid)); exit;
//insert taxonomies
} ?>

<div id="wrap">
	<div id="header">
    	<?php get_template_part('logo');
        get_template_part('nav'); ?>
    </div>
    <div id="content">
    	<div id="main">
            <?php get_template_part('searches'); ?>
            <div class="single-post-item">
                <h1>Form Test</h1>
                <div class="post-meta">Fill out the fields below, all of them are required!</div>
                <div class="inner-content">
                	<!-- New Post Form -->
                    <div id="postbox">
                    	<form id="new_post" name="new_post" method="post" action="">
                            <!-- post name -->
                            <p><label for="title">Title</label><br />
                            <input type="text" id="title" value="" tabindex="1" size="20" name="title" />
                            </p>
                            
                            <!-- post Content -->
                            <p><label for="description">Content</label><br />
                            <textarea id="description" tabindex="4" name="description" cols="50" rows="6"></textarea>
                            </p>
                            
                            
                            
                            
                            <p align="right"><input type="submit" value="Publish" tabindex="6" id="submit" name="submit" /></p>
                            <input type="hidden" name="action" value="new_post" />
                            <?php wp_nonce_field( 'new-post' ); ?>
                    	</form>
                        
                    </div>
                </div>
            </div>
        </div>
        <?php get_sidebar(); ?>
    </div>
</div>
<?php get_footer(); ?>
#142593
Stephen Edgar
Keymaster

Is that a bbPress site?

There are some docs on the codex to get you started modifying your bbPress setup

Codex

#142592
Stephen Edgar
Keymaster

* What are the best plugins to make bbpress mobile responsive?

bbPress included CSS is responsive, a few tweaks maybe needed if your theme is overriding these.

* I need as much facebook integration as possible, what plugins are there for bbpress?

No idea, I don’t have a Facebook account 😛

Have a look in the WP Plugins repo https://wordpress.org/plugins/search.php?q=bbpress+facebook

* Is there any @mention/quote functions that can be added to reply to people?

bbPress includes @mentions, i.e. @soprano linking to the user profile, if you want email notifications and the like add BuddyPress and enable the ‘Notifications’ component.

BuddyPress Components and Features

#142586

In reply to: admin bar

danieldude
Participant

thanks again robin.
i think im missing a plugin
the one that lets me choose this manu to be as a admin-bar menu…
in the code i pasted to the function.php, there is a note on the top saying it uses a plugin named “WordPress menu admin” i didnt seem to find it do you know what plugin he is using i dont want to download somthin wrong and mess this up.

#142582

In reply to: Form To Forum Post

jslom
Participant

Thanks @Robin W. I understand this is free, just like the millions of other scripts/software online.. What I don’t understand is how such a popular script has no developers support on their forums, or even documentation on how to achieve certain things within their script. I have used plenty of open source scripts, and have always had some type of reply or documentation from a person who knew about it.

I would of course post the solution if I had at least the right documentation to achieve it.

Here is what the wordpress documentation on how to insert a post, and I believe it would be somewhat the same within a bbpress post, but have no idea since it is not documented anywhere that I see.

https://codex.wordpress.org/Function_Reference/wp_insert_post

#142578
toddgeist
Participant

I am getting a 404 error when I navigate to a topic like this one

https://www.geistinteractive.com/support/topic/barcode-creator-1/barcode-creator-v1-0-released

I have reset permalinks many many times to no avail.

Any ideas?

Thanks

Todd

Viewing 25 results - 12,626 through 12,650 (of 32,521 total)
Skip to toolbar