Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 14,151 through 14,175 (of 32,519 total)
  • Author
    Search Results
  • #134988
    akapope
    Participant

    Hey BBPress!

    I was wandering if ya’ll can help me out with this. So I have my theme styled so that each Forum gets its own background through the style.css file using the following lines:

    .postid-17 {
    background: #000000 url(http://alysiaworld.com/wp-content/uploads/2013/06/alysiasea.jpg) center top no-repeat fixed;
    }

    where postid-17 is the correlating WordPress post associated with the Forum.

    The problem now is that when you visit a Topic within the Forum, the background goes back to the default image :/

    I am thinking that there should be a code to pull the topics Parent Forum “postid” and then force the background to the topic.

    I hope that makes sense. I can dig through code, but I am not so skilled with writing my own yet.

    Thanks in advance for your help.

    WordPress and BBPress are running the latest versions:

    Site – htp://alysiaworld.com
    Theme – Twentytwelve

    #134987
    kettlewell
    Participant

    @johnjamesjacoby I believe this link is the source of the problem… I think if this page is updated to be made current, it will solve a lot of confusion.

    https://codex.bbpress.org/step-by-step-guide-to-creating-a-custom-bbpress-theme/

    #134986
    kettlewell
    Participant

    Update:

    I’ve figured it out.

    Part of it was my theme using the post_type_archive_title()

    Part was needing to set a filter:

    function test_support() {
      return 'Support';
    }
    add_filter('bbp_get_forum_archive_title', 'test_support');

    And part of it is needing to modify the default bbpress theme by placing it in my own theme directory, and modifying the hard-coded instances of Forums and Topics.

    A future enhancement / feature would be some sort of an options file to allow this text to be modified in one place somewhere…

    #134975
    MJ
    Participant

    Hi

    I want to change the Output of the “Recent post” to make it similar as simple-press. Like this:
    Forum: Forum Title
    Topic: Topic Title
    by: Author – Time

    I found the code for widgets at:
    bbpress/common/widgets.php

    But I am afraid that if I changed this, it would be overwritten by the next bbpress update. Any ideas if I can I have a “child widget” or something?

    Thanks

    #134971
    xmasons
    Participant

    Add this into your functions.php

    function disable_our_feeds() {
    	wp_redirect(get_option('siteurl'));
    }
     
    add_action('bbp_feed', 'disable_our_feeds', 1); // Disables BBPress feeds
    add_action('do_feed', 'disable_our_feeds', 1);
    add_action('do_feed_rdf', 'disable_our_feeds', 1);
    add_action('do_feed_rss', 'disable_our_feeds', 1);
    add_action('do_feed_rss2', 'disable_our_feeds', 1);
    add_action('do_feed_atom', 'disable_our_feeds', 1);
    #134965
    Justinvarnes
    Participant

    First off, I’m an idiot when it comes to this stuff but I’m trying to learn.

    I’m not sure where I went wrong, but iI have both Simple: Press and bb_press as plugins. I want to import my Simple:Press forum to the bbPress forum and delete Simple:Press. I tried following these instructions:

    https://codex.bbpress.org/import-forums/

    But when I tried to do the conversion, I didn’t know where to find the name of the database info, so I left it blank.

    Tried the conversion anyway and it said there are no topics, forums, users, etc to convert.

    Where can I find the name of the database, etc so I can fill that form out correctly OR..

    Is that even what I should be doing?

    Thanks in Advance!

    #134958

    In reply to: Non latin permalinks

    arohmann
    Participant

    I can confirm this issue, and I believe it to be a bug with how forum threads are looked up. Perhaps one of the team here can confirm the issue?

    Steps to reproduce:

    1. Create a thread using greek characters
    2. Right click, and “copy link” then paste in new tab. This WORKS.
    3. Now copy the URL directly out of the address bar and paste in new tab. This DOESN’T WORK

    The difference I’m seeing is that the outputted forum URLs are encoded using lowercase a-f characters, but if you copy from the address bar (depending on browser or OS) the encoding letters are A-F uppercase.

    For example:
    ce%bf – accepted by bbPress and given the correct page
    CE%BF – goes to 404

    Normal WordPress pages can handle either just fine.

    I’ve tested this for a bit and got the same results in both Chrome and Firefox on OS X. It really looks like a bug where bbPress can’t tell the difference, or it’s not an exact match. Either way, this could be a big issue! To users, the links look exactly the same, and they can have issues sharing links.

    Thanks! Hoping to get some more feedback here.

    Best regards

    #134948
    maisdesign
    Participant

    Hi, actually I’m trying to develop a WP plugin that will let users create a post and a forum with same title.
    You can check and fork my code on GitHub https://github.com/maisdesign/MDPostEforumsCreator

    As you can see actually one of the features I’m looking for is the equivalent for wp_dropdown_categories in BBPress.
    With this drop down I’ll be able to let the user choose the parent forum for the forum he is creating.

    I can’t find any documentation about it, am I missing something?

    #134947
    _sushi
    Participant

    I am having a bit of trouble integrating my WooTheme “canvas” with bbpress. I have read the “Theme Compatibility” article. I understand what it says but i am not sure when looking at the template PHP files that comes with bbpress where in my code i need to put the template code, and which part of the bbpress template code to use.

    I also switched to the “TwentyEleven” theme and it worked fine. I tried comparing the WooTheme code to TwentyEleven using Firebug, and i can see there is an obvious difference in the code. But i am lost as to what to change.

    I have setup all the correct settings in the Dashboard area.

    Any help would would be greatly appreciated.
    I am using WordPress 3.5.1
    and bbpress Version 2.3.2

    EDIT: I am having a bit of trouble with too much website traffic shutting my site down when i post the page address. So maybe if someone can point me in the direction of more info on intergrating bbpress with different themes. As stated above i have read the Theme compatibility article.

    maisdesign
    Participant

    Hi, actually I’m trying to develop a WP plugin that will do almost the same thing you were trying to do.
    But, my lack of knowledge and the lack of documentation (I can’t find it!) aren’t helping me very much.
    This is what I have actually:
    https://github.com/maisdesign/MDPostEforumsCreator

    As you can see in my index.php file that is here:

    <?php
    /*
    Plugin Name: Post And Forum Creator by MaisDesign & Stestaz
    Plugin URI: http://maisdesign.it
    Description: You give it a title and it automatically create a blank post and forum with that title, that's it!
    Version: 1.0.0
    Author: MaisDesign & Stestaz
    Author URI: http://maisdesign.it
    License: 
    License URI: 
    */
    /* Documentazione:
    	Quello che sto cercando di ottenere è di svolgere tutto in una sola pagina, sono certo che non serva richiamare BBHOST e compagnia bella per inserire un cavolo di articolo ma sono le 2.20 AM e non so più che pesci pigliare!
    	In fondo a questa pagina troverai del codice commentato, se ci sono bestemmie nei commenti lasciale dove stanno, sono di buon auspicio :-P
    */
    /* Definiamo la versione */
    
    if (!defined('MD_POSTFORUM_CREATOR_VERSION_KEY'))
        define('MD_POSTFORUM_CREATOR_VERSION_KEY', 'md_postforum_creator_version');
    
    if (!defined('MD_POSTFORUM_CREATOR_VERSION_NUM'))
        define('MD_POSTFORUM_CREATOR_VERSION_NUM', '1.0.0');
    
    add_option(MD_POSTFORUM_CREATOR_VERSION_KEY, MD_POSTFORUM_CREATOR_VERSION_NUM);
    
    /*
        * This example will work at least on WordPress 2.6.3, 
        * but maybe on older versions too.
        */
       add_action( 'admin_init', 'md_postforum_creator_init' );
       add_action( 'admin_menu', 'md_postforum_creator_menu' );
       
       function md_postforum_creator_init() {
           /* Register our stylesheet. */
           wp_register_style( 'mdPostforumCreatorStyle', plugins_url('css/mdpostforumstyle.css', __FILE__) );
    	       wp_register_script( 'mdPostforumCreatorScript', plugins_url( '/js/alajax-1.2.js', __FILE__ ) );
       };   
       function md_postforum_creator_menu() {
           /* Register our plugin page */
           $page = add_submenu_page( 'options.php', 
                                     __( 'MDPFC Plugin', 'md-postforum-creator' ), 
                                     __( 'MDPFC Plugin', 'md-postforum-creator' ),
                                     'administrator',
                                     __FILE__, 
                                     'md_postforum_creator_manage_menu' );
      
           /* Using registered $page handle to hook stylesheet loading */
           add_action( 'admin_print_styles-' . $page, 'md_postforum_creator_styles' );
    		add_action('admin_print_scripts-' . $page, 'md_postforum_creator_scripts');
       };   
       function md_postforum_creator_styles() {
           /*
            * It will be called only on your plugin admin page, enqueue our stylesheet here
            */
           wp_enqueue_style( 'mdPostforumCreatorStyle' );
       };
       function md_postforum_creator_scripts() {
            /* Link our already registered script to a page */
            wp_enqueue_script( 'mdPostforumCreatorScript' );
        };
       /*function md_postforum_creator_manage_menu() {
       };*/
       add_action('admin_menu', 'register_md_postforum_creator_menu');
    function register_md_postforum_creator_menu() {
       add_menu_page( 'MDPFC Options', // $page_title
                      'MDPFC Options', // $menu_title
                      'manage_options', // $capability
                      'md-postforum-creator-menu-page-slug', // $menu_slug
                      'md_postforum_creator_menu_page', // $function
                      plugins_url( 'md-postforum-creator/images/mdpostforum.png' ), /* $icon_url*/
                      3 ); /* $position*/
    };
    
    function md_postforum_creator_menu_page() {
       /* Does the user have the right permissions?*/
       if (!current_user_can('manage_options')) {
          wp_die( 'Sorry, you do not have permission to access this page.');
       };
      if(isset($_POST['new_post']) == '1') {
        $post_title = $_POST['post_title'];
        $post_category = $_POST['cat'];
        $post_content = $_POST['post_content'];
    
        $new_post = array(
              'ID' => '',
              'post_author' => $user->ID, 
              'post_category' => array($post_category),
              'post_content' => '', 
              'post_title' => wp_strip_all_tags($post_title),
              'post_status' => 'draft'
            );
    
        $post_id = wp_insert_post($new_post);
    };          
    echo '
    <form action="'.admin_url('admin.php?page=md-postforum-creator-menu-page-slug').'" method="post">
        <input type="text" name="post_title" size="45" id="input-title"/>
        <input type="hidden" name="new_post" value="1"/>';
    	wp_dropdown_categories('orderby=name&hide_empty=0&exclude=1&hierarchical=1');
        echo '<input class="subput round" type="submit" name="submit" value="Post"/>
    </form>';
    };?>

    My plugin is almost complete, what I can’t understand is How to create also a forum with same title of the post created by the form.

    Is there anyone who can send me to the right direction? Thank you.

    #134916
    Nate
    Participant

    @johnjamesjacoby

    First of all,

    You can drop the attitude. I work in digital marketing for a living and have done so successfully for many, many years, dealing with everything between Drupal, WP and proprietary software, and your response in this thread is easily the most unprofessional, immature, and frankly, baffling I’ve come across.

    Understand that I’m under ZERO obligation to report security flaws in codex.bbpress.org to you. I DID contact you via Facebook (evidence here: http://imgur.com/gDcoOYG) out of sheer freaking goodwill. I also tried alerting you to this on the forum. Here’s the FAQ Security that you linked to: “You should also contact the plugin developer either via email (if it’s listed in the plugin source code), or by posting in the support forum on their plugin page asking how best to send them details.”

    I couldn’t find your e-mail address, and brought it up here without hesitation — with that said, it shouldn’t come as a surprise that the lack of response generally shown on these forums is concerning toward a security flaw. Half the time it’s littered with spam for thai prostitutes anyway. Why would I assume that the thread would even be glanced at? Hence why I used Facebook to reach out to you.

    And rather than inform you of bbPress.org login issues, I could have simply chuckled and chosen another open source platform of which to host my community. Or are you so self-righteous that you think multiple users complaining of the SAME login issues are probably just “doing it wrong” ??

    In the words of the great Wayne Campbell, are you mental?

    Your last question “How I managed to login” is already addressed within my post and in a post I made last week. I’m glad you did your homework.

    If you’re ready to have an adult, professional conversation about this, let me know. Or check your Facebook messages from YESTERDAY AFTERNOON, when I addressed them.

    #134914

    I’ve received no message on Facebook (it’s also a poor approach to reporting security issues.)

    Please read this page on the WordPress Codex.

    Not fair to say I’ve ignored something I didn’t receive. I’m curious how you’re managing to login and post anything here, if logins are broken?

    #134912
    Tecca
    Participant

    @redknite, put this in your loop-single-reply.php file:

    <?php $user = get_userdata( bbp_get_reply_author_id() );
    if ( !empty( $user->user_nicename ) ) {
    $user_nicename = $user->user_nicename;
    echo "@".$user_nicename;
    } ?>
    #134909
    redknite
    Participant

    @pjtna or @sambora5150 can you tell me how you got this to work? Where did you put the code? and was it exactly like above or did you have to add additional code?

    #134885
    rossagrant
    Participant

    I’ve been experiencing similar results for a few months now, BUT only on topics with more than a few subscribers.

    It seems that BBPress is waiting for a confirmation that the email notifications have been sent to subscribers BEFORE it releases the rest of the php script and allows the page to refresh for the actual person posting.

    The post is actually posted very quickly if you look at the forum on another browser whilst the browser used to actually post is still processing.

    I’ve set up a TRAC ticket here and have been investigating it for a while.

    https://bbpress.trac.wordpress.org/ticket/2162#comment:8

    I’m wondering if there is a better way to handle the notifications?

    I’m no coder though unfortunately.

    #134882

    In reply to: Image upload

    Shmoo
    Participant

    Yeah but they don’t wish to be like other forum software I guess.

    bbPress wants to stay very clean, lean en mean I think. They hope somebody will ever make plugins for bbPress to accomplish all those tasks even history has proven Plugins aren’t the best way to go forward.

    Anyway,
    The code-snippet should go in the template that handles the form-stuff.

    Find the next files.
    wp-content / pluings / bbpress / templates / default / bbpress / form-topic.php
    wp-content / plugins / bbpress / templates / default / bbpress / form-reply.php

    Copy & paste ( don’t drag & drop ) both files to your theme folder inside a new fodler called bbpress.
    wp-content / themes / your-theme-name / bbpress / ** paste them here **

    Open the files and search for a line that say:
    <?php bbp_the_content( …. ); ?>

    Line 66 and 92 I think it is.
    Change the code and Save it.

    Refresh the page and you should see a Media upload button above the toolbar.

    #134881

    In reply to: Image upload

    joesed
    Participant

    Hi Shmoo

    Thanks for your reply. If you can let me know where this code should go (i.e. which file and approximate line number), that’d be much appreciated.

    I’m really surprised that bbpress doesn’t have much better image upload functionality. If it did it would be right up there with other forum software. As it is, it seems inferior.

    Once again, thanks

    Joe

    Viktor Szépe
    Participant

    Please help to make these plugins compatible. WPML 2.8.2 and bbPress 2.3.2

    [Sat Jun 08 12:41:04 2013] [error] [client 80.98.70.185] PHP Notice: bbp_setup_current_user was called <strong>incorrectly</strong>. The current user is being initialized without using $wp->init(). Please see <a href="http://codex.wordpress.org/Debugging_in_WordPress">Debugging in WordPress</a> for more information. (This message was added in version 2.3.) in /home/davidprog/dev/keszul.tk/server/wp-includes/functions.php on line 2959, referer: http://keszul.tk/wp-admin/plugins.php?activate=true&plugin_status=all&paged=1&s=

    wpml forum link

    #134878
    Shmoo
    Participant

    Well to now what file you have to get isn’t really that difficult, you just need a little understanding of what files will be loaded when view a specific page.

    This is a good sheet to show you the logic, but it can be difficult te read.
    https://codex.wordpress.org/File:Template_Hierarchy.png

    This one explains in my opinion much better whats going.

    The anatomy of a WordPress theme

    But it’s not too difficult, lets say you’re on the homepage of your website.
    Often the index.php is need to start. If you open the index.php you see at the top something like this <?php get_header(); ?> the funny thing about PHP is that you can alsmost read-/understand what it is going to do. Like the code tag above says get_header so on that position it will grab the header.php file and open it. Keep following all those files and you will be okay.
    Think of it as LEGO – building blocks – it needs a few blocks to make a house and a webpage is the house.


    For the forum (bbPress) side I can tell you that the homepage of the forum is the page where it shows all forums & categories. This is called an archive page and not a regular page.php what most people would think when they first start.
    Normally if it’s an archive page WordPress would load the archive.php template but because we have a Post_Type created by bbPress called Forum we can add the Post_Type_Name behind the archive.php – like this: archive-forum.php

    When you copy that archive-forum.php file form your extra’s (plugins) folder to your Theme folder and open it you will again see the <?php get_header(); ?> stuff and all other typically WordPress stuff.

    To remove the sidebar of the main forum-page you just go into that archive-forum.php template and delete the code that called the sidebar: <?php get_sidebar(); ?>
    Just like the header it’s telling you what it does -> GET Sidebar ( load the sidebar files )

    It’s really just trying and not being afraid. Them ore you do it the better you get at it.

    *** Never try to edit files on a working website – online ***

    Install WordPress + your website on your computer locally, get a code editor – edit the files and check if everything is working. When your finished editing and everything is Fonzy cool you can upload and overwrite the files at your online-server.

    You know how I got my start (years ago) while not knowing what files to edit – By just opening some files I thought could be the files I needed. Typing 55555555555 or something else inside the file – Save it – reload the page in the browser and if 55555555555 didn’t show-up on the webpage I knew it wasn’t that template I was looking for and kept searching for the right one.

    Don’t be afraid to make mistakes… You gonna make some trust me, but when you have a back-up file or you can simply undo your edit inside the Code-editor ( CMD + Z ) you’re all fine.

    #134877
    Shmoo
    Participant

    Try to install some Debug plugins they will give you some answers about why things take so long to load.

    https://codex.wordpress.org/Debugging_in_WordPress
    – at the bottom is a list of good plugins.

    #134876

    In reply to: Image upload

    Shmoo
    Participant

    There is an option but it’s so WordPress. (half done)

    This will add a WP Media upload button above the form.

    
    <?php bbp_the_content( array( 'context' => 'topic', 'media_buttons' => true, ) ); ?>
    
    #134875
    Shmoo
    Participant
    #134872
    tommysvr
    Participant

    Alternatively, if I could show a user_meta field for each post, that would work too. I’m struggling with the code below too.

    global $current_user; get_currentuserinfo(); get_user_meta($current_user->ID, 'membership', true);

    #134871
    tommysvr
    Participant

    Hi all,

    I have a little issue since bbPress switched to its own user roles. I was previously showing an image under a users avatar based on this role (ie admin, subscriber).

    With the new method, it just shows the bbPress role of participant or key master. This is a problem because my registration forms put the user in WordPress role.

    My question is this: is there a way to output the WordPress role rather than the bbPress role? Here is what I’m using at the moment:

    $role = bbp_get_user_display_role(bbp_get_reply_author_id($reply_id));

    <div class="bbp-reply-author <?php echo $role; ?>">

    Any help is greatly appreciated!

    #134856
    Shmoo
    Participant

    You probably have a misunderstanding of the word Forum and Forums it happens a lot.

    A Forum is a common name for a support forum like we have at WordPress of bbPress or any other website online. They all call the page Forum or Support or Community.
    But a Forum can also be ONE single item like a category inside other Forums. Thats why the landing-page you’re looking for is: yourwebiste.com/forums/ ( list all forums together )

    But you can make your own landing-page by going into WordPress backend and Add a New Page + paste one of those Shortcodes to make it more easy.
    https://codex.bbpress.org/shortcodes/

Viewing 25 results - 14,151 through 14,175 (of 32,519 total)
Skip to toolbar