Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

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

    #142576
    FlyFishersCorner
    Participant

    Still searching for a solution to this. I deleted the live versions of the pages on the website as they were throwing too many errors for Google and decimating my SEO. Essentially what I’m getting is the following in my breadcrumbs:

    From my main index page, “Home > Forums”

    When clicking into one of the forums, I have, “Home > Forum > ForumName” So far so good!

    When clicking on an actual post within this forum, it blows up. Now I have “Home > Topic > TopicTitle” Clicking on the Topic link sends me to a 404 page. What I’d expect to get is “Home > Forum > ForumName > TopicTitle”

    As best I can tell, there must be some issue in my theme’s header.php that is creating the problem. I believe the relevant code section is as follows. I’ve fiddled with it to no end and can only get more errors by changing things.

    Perhaps a fresh set or sets of eyes might be able to see a solution. Anyone see anything immediately obvious that could be creating the issue?

    <div class="text-right">
    	<?php 
    	if (is_404()) {
    	echo '<ul class="breadcrumbs inline-list"><li><a href="'.home_url().'">'.__("Home","zatolab").'</a></li><i class="fa fa-angle-right"></i><li class="active">'.__('Not Found','zatolab').'</li></ul>';
    	} elseif (is_search()) {
    	printf( __( '<ul class="breadcrumbs inline-list"><li><a href="'.home_url().'">'.__("Home","zatolab").'</a></li><i class="fa fa-angle-right"></i><li class="active">%s</li></ul>', 'zatolab' ), get_search_query() );
    	} else {
    	if (zl_options('show_breadcrumbs') == "1"){ 
    	zl_breadcrumbs(); 
    		} 
    		 }
    		?>
    		</div>

    (EDITED for easier readability of code)

    #142574

    In reply to: admin bar

    Robin W
    Moderator

    Ok, I’ve worked out an easy(-ish) way to do this.

    a) Install the plugin WP Modal Login.
    Dashboard>plugins>add new>search “wp modal login” install and activate
    b) Settings
    Dashboard>settings>wp modal login
    you can play with the settings, but primarily you need to select a theme (later on you can play with the css to get it looking nice!)
    c) Then follow the post a couple up from the last in this link which has all the steps to add it to the menu
    NOTES:
    On step 4 – Whilst you can check all the options as he suggests, what you actually need to ensure are checked are “links” on the first line and Description under the “show advanced menu options”
    On step 5 – what you are creating is a new link, sop click “links” on the left hand side, and a dropdown with the url and link text will appear. Populate these two as he suggests and then add to the menu. Then look at the bottom right, and you’ll see this added as a custom item. Open this, and you’ll see the Description box, which is where you drop the shortcode.

    As I said, you can play with the css to get this looking how you want.

    Give it a go ! (I’m about to!)

    #142569
    BenM
    Participant

    Hi,

    Here is what I see using codestyling localisation :

    Loading Issue: Author is using load_textdomain instead of load_plugin_textdomain function. This may break behavior of WordPress, because some filters and actions won’t be executed anymore. Please contact the Author about that.

    Thanks.

    #142559

    In reply to: admin bar

    Robin W
    Moderator

    Yes that is really quite good looking, I’d like to copy that also !

    The inloggen is in the menu, so it is a call from menu item.

    The site is using wordpress twentytwelve, but I don’t know whether it’s a plugin or they have coded it for themselves.

    I have contacted the site to see if they’d tell us how they did it. If I get a reply I’ll let you know !

    Maybe another support person on here knows how to code this – it’s actually a wordpress rather than bbPress solution.

    #142557
    Robin W
    Moderator

    Which version of bbPress are you one, whilst I have your lines of code, my line 1766 of this file is in a different place than yours, and your line 1723 is my line 1700, suggesting you have extra stuff.

    Might be worth you downloading a fresh version of the plugin to your pc, and cracking open this file to see if it’s the same.

    #142555
    Zonic Mirage
    Participant

    Lines 1766 to 1784. It’s a comment block, but it looks like it was closed properly.

    /**
     * Handles the front end tag management (renaming, merging, destroying)
     *
     * @since bbPress (r2768)
     *
     * @param string $action The requested action to compare this function to
     * @uses bbp_verify_nonce_request() To verify the nonce and check the request
     * @uses current_user_can() To check if the current user can edit/delete tags
     * @uses bbp_add_error() To add an error message
     * @uses wp_update_term() To update the topic tag
     * @uses get_term_link() To get the topic tag url
     * @uses term_exists() To check if the topic tag already exists
     * @uses wp_insert_term() To insert a topic tag
     * @uses wp_delete_term() To delete the topic tag
     * @uses home_url() To get the blog's home page url
     * @uses do_action() Calls actions based on the actions with associated args
     * @uses is_wp_error() To check if the value retrieved is a {@link WP_Error}
     * @uses wp_safe_redirect() To redirect to the url
     */

    Here are lines 1723 to 1764

    /**
     * Fix counts on topic split
     *
     * When a topic is split, update the counts of source and destination topic
     * and their forums.
     *
     * @since bbPress (r2756)
     *
     * @param int $from_reply_id From reply id
     * @param int $source_topic_id Source topic id
     * @param int $destination_topic_id Destination topic id
     * @uses bbp_update_forum_topic_count() To update the forum topic counts
     * @uses bbp_update_forum_reply_count() To update the forum reply counts
     * @uses bbp_update_topic_reply_count() To update the topic reply counts
     * @uses bbp_update_topic_voice_count() To update the topic voice counts
     * @uses bbp_update_topic_reply_count_hidden() To update the topic hidden reply
     *                                              count
     * @uses do_action() Calls 'bbp_split_topic_count' with the from reply id,
     *                    source topic id & destination topic id
     */
    function bbp_split_topic_count( $from_reply_id, $source_topic_id, $destination_topic_id ) {
    
    	// Forum Topic Counts
    	bbp_update_forum_topic_count( bbp_get_topic_forum_id( $destination_topic_id ) );
    
    	// Forum Reply Counts
    	bbp_update_forum_reply_count( bbp_get_topic_forum_id( $destination_topic_id ) );
    
    	// Topic Reply Counts
    	bbp_update_topic_reply_count( $source_topic_id      );
    	bbp_update_topic_reply_count( $destination_topic_id );
    
    	// Topic Hidden Reply Counts
    	bbp_update_topic_reply_count_hidden( $source_topic_id      );
    	bbp_update_topic_reply_count_hidden( $destination_topic_id );
    
    	// Topic Voice Counts
    	bbp_update_topic_voice_count( $source_topic_id      );
    	bbp_update_topic_voice_count( $destination_topic_id );
    
    	do_action( 'bbp_split_topic_count', $from_reply_id, $source_topic_id, $destination_topic_id );
    }
    iejigna
    Participant

    Hi,
    In our site,
    Topics with the status – pending are counted in topic summary text but not listed in topic list(as its pending,)
    Topic count is stored in table name wp_postmeta with meta-key – _bbp_topic_count.
    _bbp_topic_count is count of all topics including ‘pending’ topic.

    How can I get count of topics with status ‘open’ in my summary?

    We are using bbpress version 2.5.3 and wordpress 3.8.1

    Asynaptic
    Participant

    @hillofbeans with respect, I don’t think that is what’s happening exactly. The bbpress team is not jumping up and down with joy to tackle this issue but as jjj said:

    bbPress and WordPress are designed to allow those with specific needs and wants to customize the codebase, and contribute the changes they needed up-stream to the parent project. If this is something multiple people would like, I suggest you group up and build it. If it works, and more people want it, we absorb it into bbPress core.

    This is why I searched and found previous discussions in the forum and a solution which was arrived at several years ago via a plugin (See above). It doesn’t seem like the creator of the plugin took it anywhere though, other than sharing it on the bbpress forums. They didn’t create a plugin officially at the plugin.wordpress.org or update it, etc.

    If I could make a constructive suggestion to the bbpress team, it would be that while they are very busy and it can seem like we are just throwing constant suggestions, critiques, etc. at them, it would be wise to set up a method to gauge the community’s interest or desire for specific issues.

    This can be done very simply with something like uservoice or similar ‘suggestion box’ apps where suggestions are shown and community members here can vote on them to show their interest towards them and move them up the priority list.

    I made a similar suggestion to the buddypress team and I read from jjj or boone that this inspired the recent survey (hopefully we’ll see the results of said survey soon!)

    That was great, btw! at the same time, a survey is a very short lived ‘snapshot’ whereas a uservoice type idea collector and sifter would be continuous

    of course, I’m not at all suggesting that we convert the bbpress or buddypress projects to ‘mob rule’! nope. just that when we have such a communication channel, things like this specific issue would be addressed (rather than linger for 7+ years) because there would be transparency and a collaboration between the wider community and the dev team

    🙂

    #142541
    Stephen Edgar
    Keymaster

    If you are using custom templates then adding <?php bbp_forum_subscription_link(); ?> should be all you need 🙂

    Here is the original source depending on what templates you are using: /templates/default/bbpress/content-archive-forum.php#L26
    and/or
    /templates/default/bbpress/content-single-forum.php#L16

    #142540
    glyndavidson
    Participant

    …no matter, I found one on the bbPress forums:

    <li class="forum-subscribe">
       <span id="subscription-toggle">
          <span id="subscribe-652">
              <a href="https://bbpress.org/forums/forum/requests-and-feedback/?action=bbp_subscribe&forum_id=652&_wpnonce=xxxxxxx" class="subscription-toggle" data-forum="652" rel="nofollow">Subscribe</a>
          </span>
       </span>
    </li>

    I’ll have a play with this and see what I can come up with.

    #142538
    glyndavidson
    Participant

    Thanks for taking the time to create a screenshot Stephen. Using the latest version of bbPress and TwentyEleven, I don’t have the Subscribe link.

    Is it possible to provide an example of the <a href=""> tag so that I might hardcode it into a template?

    Thanks again,

    Glyn

    HillofBeans
    Participant

    I’m with all the non-coders here. This url situation is nuts from a UX and SEO point of view.

    Having built over 200 WordPress sites in the last few years, I’m really surprised to find that bbPress has these fundamental structural flaws when it comes to url organization.

    This topic was raised 1 year and 9 months ago.

    Have we got any further with this?

    #142530
    Robin W
    Moderator

    OK FINAL ANSWER

    Have finally got it working in the menu (and corrected the error in the post above!) !

    so for menu have

    // Filter wp_nav_menu() to add profile link
    add_filter( 'wp_nav_menu_items', 'my_nav_menu_profile_link' );
    function my_nav_menu_profile_link($menu) { 	
    	if (!is_user_logged_in())
    		return $menu;
    	else
    		$current_user = wp_get_current_user();
    		$user=$current_user->user_login ;
    		$profilelink = '<li><a href="http://www.mysite.com/forums/users/' . $user . '/edit">My Profile/Edit Profile</a></li>';
    		$menu = $menu . $profilelink;
    		return $menu;
    }
    
    

    For on the forum page have

    //action to add "amend profile" to top of forums pages
    function rw_edit_profile () {
    	if (is_user_logged_in()) {
    	$current_user = wp_get_current_user();
    	$user=$current_user->user_login ;
    	$user_link = '<br><a href="http://www.mysite.com/forums/users/' . $user . '/edit">My Profile/Edit Profile</a>';
    	echo $user_link ; }
    }
    
    add_action('bbp_template_before_forums_loop','rw_edit_profile') ;
    
    
    #142528
    Zonic Mirage
    Participant

    Hello. Sorry for the slow response, but I tried again. Now it’s giving me

    Fatal error: fatal flex scanner internal error--end of buffer missed in /site/folders/wp-content/plugins/bbpress/includes/topics/functions.php on line 1766

    #142522
    vildvittra
    Participant

    I would like to display a list of all the moderators, to make it easier for the forum users to know who to contact in case of problems.

    Is there a shortcode or widget or something for this?

    Stephen Edgar
    Keymaster

    We also have a page with a few of the ideas we like that extent bbPress in different ways:

    Feature Plugins Tracking

    #142512

    In reply to: Image upload

    Frumph
    Participant

    ^ the user needs to have the correct rights for example

    
    function add_theme_caps() {
        $role = get_role( 'contributor' );
        $role->add_cap( 'upload_files' ); 
    }
    
    add_action( 'admin_init', 'add_theme_caps');
    

    If you want to add contributors and above to be able to upload_files, change that to subscriber if you want

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