Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 15,051 through 15,075 (of 32,581 total)
  • Author
    Search Results
  • #122496

    The thing that makes inline images tough is non-admin users cannot use the tag and shortcodes are not an option.

    Currently there is an issue on trac (#1916) that would make it where img tags do not get filtered out. Once that’s done it would open the gate for plugins to handle inline images pretty easily.

    #122495

    In reply to: Google Authorship

    That’s interesting, but not quite the approach he was asking about (from my understanding).

    I think he was referring to the google rich snippets that show up if the page supports the appropriate meta (http://yoast.com/push-rel-author-head/)

    You could use a good chunk of the code that is posted above (the part where it sets up a field for google+), then on topic pages get the topic user’s ID, and use that to put in the line above.

    #122493

    I think the only way to do what you want wil be using a completely custom login form that you pass to your own server for validation. You won’t be able to use the WordPress login form (or the function that generates it) at all.

    There are about a dozen different ways you can take this based on the 5 minutes I’ve thought about it. Really just depends if you’re going for elegant, easy, or some where in between. It’s going to take custom code regardless.

    mamasaywhat
    Participant

    Thanks guys – what ended up working was putting BOTH of those codes in the css. One or the other alone didn’t do anything. CSS is weird haha. Anyway, problem solved, looking forward to the next update!

    Martin ( Martin_C )
    Participant

    I got it to work in firefox by adding this when I had the same problem at appglobe.com:

    #bbpress-forums .bbp-user-section ul.bbp-topics {

    float: left !important;

    width:100% !important; /*forgot this one on my last post @mamasaywhat */

    }

    Try that or the code above by Jared Atcihison and it should work in firefox.

    #122489
    mouffles
    Participant

    the bad tweak :

    function bbp_filter_blog_editable_roles( $all_roles = array() ) {

    // Loop through bbPress roles
    foreach ( array_keys( bbp_get_dynamic_roles() ) as $bbp_role ) {

    // Loop through WordPress roles
    foreach ( array_keys( $all_roles ) as $wp_role ) {

    // If keys match, unset
    if ( $wp_role == $bbp_role ) {
    //unset( $all_roles[$wp_role] );
    }
    }
    }

    return $all_roles;
    }

    bbpress/core/capabilities/
    And then Moderators are back……. I’m sure i missed something but plugins like “members” don’t do the trick. And i just want basic forum moderation works now.

    I will never understand why endusers have to put their hands in the mess of bbpress and hack/tweak it just to use this plugin >:( I can’t trust in your plugin every updates are hell.

    Then, don’t work as a dirty pig, and update the doc when you change such important things like roles! It just a little more repectfull for end users.

    It’s a Firefox problem. All other browsers should show it correctly. Will be addressed in 2.3.

    Until then, this should fix it.


    .bbp-user-section {
    overflow: auto;
    }

    Martin ( Martin_C )
    Participant

    Oh, I see I forgot a “{” in my first code….it should be:

     

    #bbpress-forums .bbp-user-section ul.bbp-topics {float: left !important;}

    Martin ( Martin_C )
    Participant

    Try this at the bottom of your  CSS file:

    #bbpress-forums .bbp-user-section ul.bbp-topics
    float: left !important;
    }

    #122479

    In reply to: Google Authorship

    Martin ( Martin_C )
    Participant

    The following is what I use at AppGlobe:

    /* Add Google+ profile URL as profile contact method  */
    
    function appglobe_add_google_profile( $contactmethods ) {
    
       $contactmethods['google_profile_url'] = 'Google Profile URL';
    
       return $contactmethods;
    
    }
    add_filter( 'user_contactmethods', 'appglobe_add_google_profile', 10, 1);
    
    /* Remove nofollow, and ad author to the profile link */
    
    function appglobe_switch_nofollow_for_author($str) {
    
       $str = preg_replace(
    
       '~<a ([^>]*)\s*(["|\']{1}\w*)\s*nofollow([^>]*)>~U',
    
       '<a ${1}${2}${3}>', $str);
    
       return str_replace(array(' rel=""', " rel=''"), 'rel=author', $str);
    
    }
    
    add_filter( 'bbp_get_topic_author_link', 'appglobe_switch_nofollow_for_author' );

    And then in your user-profile.php (create a bbpress folder in your theme root, and copy it over) you can add this:

    
    <?php if( bbp_get_displayed_user_field( 'google_profile_url' ) ) : ?>
    
    <h2 class="author-subtitle">Google Profile</h2>
    
    <?php if( bbp_get_user_role(bbp_get_displayed_user_id()) == 'bbp_keymaster' || bbp_get_user_role(bbp_get_displayed_user_id()) == 'bbp_moderator') : ?>
    
    <a rel="me" class="bbp-user-url" href="<?php esc_url(bbp_displayed_user_field( 'google_profile_url' )); ?>"><?php bbp_displayed_user_field( 'google_profile_url' ); ?>
    
    </a>
    
    <?php else : ?>
    
    <a rel="me nofollow" class="bbp-user-url" href="<?php esc_url(bbp_displayed_user_field( 'google_profile_url')); ?>"><?php bbp_displayed_user_field( 'google_profile_url'); ?>
    
    </a>
    
    <?php endif; ?>

    Since I beleave only the first rel=me link on a page counts there would be best to use topic lead:

    add_filter( 'bbp_show_lead_topic', '__return_true' );

    …by doing so each page will be considered authored by the topic creator even if its paged.

    Alexander
    Participant

    [WP 3.4.2 + bbPress v2.2.2]

    I’ve searched around a bit for a way to do this – but have found no neat solution. All threads relating to this seem to be 2-3 years old and be for the bbPress standalone rather than the plugin.

    Basically what I want is a simple list displaying forums + topic count, in my page.php. Example:


    <ul>
    <li><a href="#">Forum title 1<span>Topic count</span></a></li>
    <li><a href="#">Forum title 2<span>Topic count</span></a></li>
    <li><a href="#">Forum title 3<span>Topic count</span></a></li>
    </ul>

    Etc.

    I know that there is a widget listing the forums categories, but I need the topic count as well for a better overview. Also, if easily doable, I need to exclude a forum category from the list.

    Any help would be greatly appreciated.

    #122463
    SydneyDesigner
    Participant

    To all those smart coding guys out there, please can someone help me with the bbP functions needed to complete the code below. I think there are two bbP functions needed – see square brackets [??…]. Or maybe someone has a better way of doing it.

    I’m trying to integrate BP1.6.1, the new bbP2.2.2 forums and WordPress SEO1.3.1.1 so that the WordPress SEO (meta) page titles are shown when a bbP Topic is being shown within a BP page (just like they are shown for native bbP forum pages).

    I’ve hooked functions into ‘bp_modify_page_title’ before and managed to extract ‘_yoast_wpseo_title’ before. So I’m part way there I guess.

    I also understand that I need to change the priority from 10 to 16 (or more) in line below (in buddypress>bp-core>bp-core-filters.php), to make bp_modify_page_title filter execute after, and hence overrule, WPSEO title which has priority 15 (in worpress-seo>frontend>class-frontend.php).
    add_filter( ‘wp_title’, ‘bp_modify_page_title’, 16, 3 );


    add_filter( 'bp_modify_page_title', 'new_page_title', 10, 4 );
    function new_page_title( $new_page_title, $title, $sep, $seplocation ) {
    global $bp, $bbp;
    /** If bbP Topic is being shown within a BP page then replace title with title input via Yoast WordPress SEO plugin */
    if ( [?? a bbp function that is true when bbP Topic is being shown within a BP page] && bp_is_active( 'groups' ) && !empty( $bp->groups->current_group ) ) {
    [?? a bbp function that loads the bbP Topic Post ID to $topic->ID];
    $new_page_title= get_post_meta( $topic->ID, _yoast_wpseo_title, true);
    }
    return $new_page_title;
    }

    If you can help please, and I can then get this to work, I’ll post the result back again so others can benefit.

    Many thanks.

    #122450

    In reply to: Forum Icons ?

    Martin ( Martin_C )
    Participant

    If you know CSS you can easily add some styles to your to style sheet. If you use the default templete, it could look like this:

    .bbPress.forum .entry-title {

    /*Styles to add icon image to the left of this element goes here*/

    }

    #122425
    Daniel.Haugen
    Participant

    Well, this is the logs from the time I activated the plugins:
    20121207T212805: www.conatu.net/wp-admin/admin-ajax.php
    PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 77824 bytes) in /hermes/bosoraweb064/b1399/ipg.conatunet/wp-includes/class-simplepie.php on line 3743

    20121207T212805: www.conatu.net/wp-admin/admin-ajax.php
    PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 77824 bytes) in /hermes/bosoraweb064/b1399/ipg.conatunet/wp-includes/class-simplepie.php on line 3743

    20121207T212806: www.conatu.net/wp-admin/admin-ajax.php
    PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 77824 bytes) in /hermes/bosoraweb064/b1399/ipg.conatunet/wp-includes/class-simplepie.php on line 3743

    20121207T213434: www.conatu.net/wp-admin/admin-ajax.php
    PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 77824 bytes) in /hermes/bosoraweb064/b1399/ipg.conatunet/wp-includes/class-simplepie.php on line 3743

    20121207T213434: www.conatu.net/wp-admin/admin-ajax.php
    PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 77824 bytes) in /hermes/bosoraweb064/b1399/ipg.conatunet/wp-includes/class-simplepie.php on line 3529

    20121207T213436: www.conatu.net/wp-admin/admin-ajax.php
    PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 77824 bytes) in /hermes/bosoraweb064/b1399/ipg.conatunet/wp-includes/class-simplepie.php on line 3529

    And btw, from where can I make forums?

    bruceleebee
    Participant

    I’m having the exact same problem. And like ffalder I can’t code, but usually Google my way out of a problem. But this time no luck.

    From my research it seems lots of people are having the same problem.

    I think the main issue here is the breadcrumbs.

    1) You create a custom ‘forum home page’ using short codes (or whatever means you like) to be your default page that users see as the homepage of your forum.

    2) A user try’s to get back to the ‘forum home page’ using the breadcrumbs by clicking the text “forums” in the breadcrumbs.

    3) Unfortunately it just redirects to the forum slug chosen in Settings, not your actual ‘forum home page’. And that forum slug is always defaulted to an archives page.

    4) So setting that slug to the same as your ‘forum home page’ does not work, because woprdpress overrides your ‘forum home page’ created in step 1 and defaults it to an archives page.

    Sorry for re-hashing this, but it’s sometimes better to make it a little clearer. At least in my own head anyway.

    I don’t know how simple this is or not, but one solution that comes to mind is to have an option in Settings that lets you decide where the ‘forums’ text link in the breadcrumbs will point to. If you can choose to have it point to your ‘forum home page’ then all would be solved right?

    This person suggested changing the breadcrumbs in the core of the plugin, but obviously it’s not very desirable since it’s changes to the core. And I also cannot find the file that they edited. Think it might have been a mod to an old version: http://mysitemyway.com/support/topic/infocus-bbpress-20-root-slug

    Pippin Williamson
    Participant

    It should be possible with some custom code tweaks. Are you comfortable with a little PHP?

    #122416
    Martin ( Martin_C )
    Participant

    Since I wan’t only replies ( not created topics and replies) I’ve created a filter function:


    function ag_force_replies_only( $query, $user_id ) {

    if( bbp_is_single_user() ) { // Just in case

    $query = bbp_has_replies( array(
    ‘post_type’ => array( bbp_get_reply_post_type() ),
    ‘post_parent’ => ‘any’,
    ‘posts_per_page’ => bbp_get_replies_per_page(),
    ‘paged’ => bbp_get_paged(),
    ‘orderby’ => ‘date’,
    ‘order’ => ‘DESC’,
    ‘author’ => $user_id,
    ‘show_stickies’ => false,
    ) );
    }

    return $query;

    }
    add_filter(‘bbp_get_user_replies_created’, ‘ag_force_replies_only’, 10, 2);

     

    Now is shows replies only: http://appglobe.com/forums/users/martin/replies/

    #122410

    In reply to: How to use converter?

    Shane Gowland
    Participant

    Have you followed the Import Forums guide on the Codex? If so; where did you get stuck?

    #121413
    LabSecrets
    Participant

    Making a child theme is beyond the scope of this forum, but there are plenty of good resources if you google “create a wordpress child theme”.  In a nutshell, you need “at least” to have a new folder, with a style.css file that references the proper header elements of your parent, including its name and the location of the parent theme’s style sheet.

    If you are using the shortcode method, please try the default method instead, which is to change bbPress’s default root slug to something that is “NOT” an existing page (try “sitewide-forums” for example). This will allow you to keep your existing page / shortcut method index. Please show us what happens when you do this? (provide the URL)

    #121409
    LabSecrets
    Participant

    You have several issues going on here, but they are directly related to your theme. As is very common, it appears to me that your theme has a conditional statement in the template file that builds archive pages. As such, it’s treating the content for bbPress forums as excerpts, as well as applying some unwanted styling.

    Have you tried to build a page using the shortcode method? If so, what was the result? If you found it worked properly, then the issue as suggested above, and you could try to modify your theme or child-theme files to add a similar conditional that looks for bbPress and forces it to use the_content() instead of the_excerpt(). See: https://bbpress.org/forums/topic/non-functional-index-page-when-bbpress-2-1rc4-is-used-with-woothemes-canvas-5-05/

    If this page is being built with shortcodes (I don’t think it is from what I see) then what is the result if you try the default forum index method? We outline both methods in our step by step video here: http://labzip.com/the-definitive-guide-to-buddypress-bbpress-configuration/

    We’ll get you there… 😉

     

     

    #121407
    LabSecrets
    Participant

    What is your site url? I can give you some suggestions on where to place the code for a login-box so it shows up on the top of a page.

    Also, if you prefer, you can build your forum site index using shortcode / page method… this would give you flexibility of having your default theme sidebar, etc. available to you.

    Not sure? Check out our updated step by step guide that covers the two methods for creating a forum index page:

    http://labzip.com/the-definitive-guide-to-buddypress-bbpress-configuration/

    Cheers!

    spence

    #121402

    In reply to: Categories

    Len
    Participant

    Hi Ishr,

    In Stephen Edgar’s reply that I linked to he posted a link to a gist on GitHub. Place the code he referenced in your child theme’s functions.php file.

    Make sure to backup that file before editing it just in case something goes wrong and you can easily revert.

    #121388
    smbassett
    Participant

    I understand widgets and sidebars but I how is
    /forums/ rendered. It is not a page, post or blog. I don’t understand how to add a sidebar to this.

    My work around is to create a PAGE and add the forumns via a shortcode but it seems like there should be an option to add to /forums/ (of course I am sure I am missing something simple)

    #121386

    In reply to: bbPress permalinks

    LabSecrets
    Participant

    Fundamentally you need to understand that the use of the prefix is designed to put a unique prefix in place when you’re on a forum index page vs when you are on a topic index page. As such, it is not possible with the default code to show “/forum/topic” if ou mean both are prefixes.

    I suggest you use the plural term “forums” as your base, then “forum” and “topic” as your prefixes.

    If you like, have a watch of our comprehensive guide video:

    The Definitive Guide To BuddyPress & bbPress Configuration

     

    cheers!

    spence

    #121383
Viewing 25 results - 15,051 through 15,075 (of 32,581 total)
Skip to toolbar