Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 14,976 through 15,000 (of 32,581 total)
  • Author
    Search Results
  • #124193
    bbarton
    Participant

    Having trouble copying over the template. I basically want to use a different header file called get_header(‘bb’) for the BB templates. I read the codex and a few other post and no luck. Here’s what I’ve done:

    Uploaded most recent bbPress Plugin and WordPress install

    This is what bb plugin tree looks like:

    -includes
    -languages
    -templates
    –default
    —bbpress FOLDER
    —css FOLDER
    —extras FOLDER
    —js FOLDER
    bbpress-functions.php

    From my understanding of the bb theme-compatability codex, I copied the contents of the extras folder into a folder in my theme called bbpress.

    I added add_theme_support( ‘bbpress’ ); to the after_setup_theme hook

    Now it should work!?! Should I be copying the contents of default folder into the bbpress folder of my theme?

    #124190
    robbiegod
    Participant

    Is there a parameter that goes with the bblogin shortcode that you can tell what url to redirect too after someone logs in? I want it to always go to my forums homepage, but that doesn’t seem to work.

    I made a new page and added the bblogin shortcode in the main content block. Problem is after i login using this forum it keeps me on this page instead of sending me to the forums main page.

    Got any ideas how to change the redirect_url via the shortcode?

    #124173
    robbiegod
    Participant

    hepdoll –

    what i did was i made a new page and used the shortcode to show the register form like Lynq said. I could add whatever text above the form i wanted in the main content block.

    This creates a new problem. When i use this form, it doesnt redirect me to where my forums are…I will make my own thread to see if i can an answer to that question.

    #124119
    Stephen Edgar
    Keymaster

    The entire site here at bbpress.org is powered by WordPress and bbPress

    Have you looked at using some shortcodes on WP pages to get what you are after?
    https://codex.bbpress.org/shortcodes/

    Theres widgets too https://codex.bbpress.org/widgets/

    #124115
    Lynq
    Participant

    Have you setup the page using the shortcode?

    #124114
    imagei
    Participant

    nope….
    OK – here is some of the code from firebug. :

    #bbpress-forums ul {
    list-style: none outside none;
    margin: 0;
    padding: 0;
    }
    #bbpress-forums li {
    list-style: none outside none;
    margin: 0;
    }

    These are the styles that I would have thought controlled the bulleting of lists but the code seems to already indicate no style for the unordered lists?
    I have tried adding both:

    list-style: none;

    and:
    list-style: none !important;

    and:
    list-style: none outside none !important;

    to all of the #bbpress style entries that I can find (only in firebug preview, not actual changes) but the little blighters remain steadfast.

    ?????

    #124064
    Pietro
    Participant

    So Guys ??
    No any help ?? πŸ™

    #123125
    erwinodendaal
    Participant

    More about this problem:

    In a page I pasted the shortcode [bbp-forum-index]. This shows the forums that are available. The url of one forum is for example:
    http://www.stichtinginspiratiekring.nl/forums/forum/ledeninformatie/
    That url is not correct. All urls that are generated are not correct.

    I changed the permalinks to standard. That gives for example a url as:
    http://www.stichtinginspiratiekring.nl/?forum=ledeninformatie

    404 again.

    #123124
    Stephen Edgar
    Keymaster

    If you are just trying to copy/move forums/topics/replies from a bbPress 2.2.3 install eg site1.com to a bbPress 2.2.3 install on site2.com you can ‘export’ these via WordPress’ built-in tools (/wp-admin/export.php) and then import to site2.com using the Import (/wp-admin/import.php) tool.

    If you are importing from bbPress ‘Stand Alone’ 1.1 or 1.2 you should look for a file named ‘bb-config.php’ and that will contain the correct info you need to import with the bbPress Forum Import tool.

    eg.

    // ** MySQL settings - You can get this info from your web host ** //
    /** The name of the database for bbPress */
    define( 'BBDB_NAME', 'my_database_name' );

    /** MySQL database username */
    define( 'BBDB_USER', 'my_database_username' );

    /** MySQL database password */
    define( 'BBDB_PASSWORD', '1234567890' );

    /** MySQL hostname */
    define( 'BBDB_HOST', 'localhost' );

    And a little further down in that file is the bbPress table prefix
    $bb_table_prefix = 'bb_';

    They are the values you would use in the bbPress Import Tool setting.

    #123106
    Stephen Edgar
    Keymaster

    Quite sure if you have reset the permalinks as I noted in the previous post if that does not fix it then it is definitely the ‘URL Rewrite’ module settings in IIS. (Thats is if you have it installed as you do need it for rewrites with IIS)

    The easiest Windows option is to use the Microsoft Web Platform Installer (Web PI) and follow the guide outlined here:
    https://codex.wordpress.org/Installing_WordPress#Easy_5_Minute_WordPress_Installation_on_Windows
    http://www.microsoft.com/web/gallery/wordpress.aspx

    If you are manually installing IIS, MySQL & PHP then you have some work ahead of you getting your environment configured correctly and need to make sure you have the ‘URL Rewrite’ module installed and working with IIS http://www.iis.net/downloads/microsoft/url-rewrite#additionalDownloads

    I have not tried any of the ‘WAMP’ (Windows, Apache, MySQL, PHP) packages referenced here but that is another option.
    https://codex.wordpress.org/Installing_WordPress#WAMP

    #123105
    apet083
    Participant

    Thanks Stephen. So it is something to do with my rewrite rules? I am using Windows 7 on IIS 7.5 so those links don’t really help me much.
    I have XDebug running on Notepad++ to debug my php code, would it be worth it if I stepped through the code in which it’s creating the URL? If it would be worth it, any idea where to start?
    I have already looked at bbp_get_reply_url method calls in some of the bbp files but nothing has really helped much.

    Thanks
    Ana

    P.s. butterflies is the name of the FORUM, not the topic title. The rewrite ignores the topic title completely.

    #123104
    Stephen Edgar
    Keymaster

    Your topic replies URL should be displaying in the format:

    http://localhost/sitename/forum/topic/butterflies/#post-158277

    When I set my bbPress settings to the same settings you use above these are the URL’s:

    Forums base: forum (Note: Default bbPress setting is ‘forums’)
    Topics base: topics (Note: Default bbPress setting ‘topics’)
    Forum Prefix ticked (Note: Default bbPress setting ‘ticked/checked’)
    Forum slug: forums (Note: Default bbPress setting is ‘forum’)
    Topic slug: topic (Note: Default bbPress setting ‘topic’)

    http://localhost/sitename/forum/forums/butterflies/

    http://localhost/sitename/forum/topic/test-topic/

    http://localhost/sitename/forum/topic/butterflies/#post-158277

    I would try resetting your permalinks. In your WordPress Administration Screens navigate to Settings > Permalinks, select a different permalink structure and save. Then select your preferred permalink structure and save again.

    If you have no luck I would read up on the LAMP/MAMP (Linux/Mac, Apache, MySQL, PHP) package you are using on what settings are needed for mod_rewrite to work on your local machine.

    There are also a few (and a few broken links here) installing WordPress Locally
    https://codex.wordpress.org/WordPress_Installation_Techniques#Installing_WordPress_Locally

    #123102
    apet083
    Participant

    Hi I am having an issue with my forum URL rewrite rules/slugs/permalinks.
    At the moment I am testing this in my dev environment.
    I have a page that is called FORUM and contains my recent topic and forum shortcodes. This page is located at localhost/sitename/forum

    My slug settings are:
    Archive Slugs
    Forums base: forum
    Topics base: topics

    Single Slugs
    Forum Prefix ticked
    Forum slug: forums
    Topic slug: topic
    Topic tag slug: topic-tag
    Reply slug: reply
    User slug: user
    Topic view slug: view

    When I navigate to a forum the URL looks like this:

    http://localhost/sitename/forum/forums/butterflies/

    When I navigate to a topic inside that forum, the URL looks like this:

    http://localhost/sitename/forum/topic/test-topic/

    When I reply to a topic, the URL rewrites to this:

    http://localhost/sitename/forum/forums/butterflies/#post-158277

    So obviously this is an incorrect URL and just takes me back to the forum home page with the list of recent topics.

    How can I make the URL format be consistent? Something like:
    http://localhost/sitename/forum/forum-name/test-topic/#post-158277

    Thanks

    #123101
    Gawain Lynch
    Participant

    I’m having a problem where a number of our users are sending around URLs to discussions in private forums to other users, when those URLs are clicked, if the user is not logged in they get a 404.

    I want to write a plugin that directs users to the login page if they are not already, and only then return a 404 if they don’t have ‘read_private_forums’…

    Can anyone familiar with the bbPress code base point me to where bbPress evaluates this access?

    #123100
    Stephen Edgar
    Keymaster

    Run the ‘Repair Tools’ after the importer has finished importing everything

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

    #123099
    Stephen Edgar
    Keymaster

    As per the link you mention above https://codex.bbpress.org/import-forums/

    You should be able to import with these settings:

    – Select the source platform that you are importing from: bbPress
    – Database Name eg. old_bbpress_db
    – Database User Name eg. db_user
    – Database User Password eg. ********
    – Table Prefix eg. bb_

    #123092
    Muntasir M. Aumio
    Participant

    I’d like to import my bbpress forum(with user, topics and replies) from one site to another.
    Is it possible?
    Both domain are in the same server. So, I see the database is same for both domain on the server.
    http://codex.bbpress.org/import-forums/
    I’m not very clear about that. And It doesn’t work for me as well.
    Can anyone help me ASAP.
    I’m in A SERIOUS trouble.
    Please.

    #123086
    erwinodendaal
    Participant

    I have the “Members”-plugin installed. After updating bbPress and changing all roles of the users from “(wordpress-)”participants” into “subscribers”, the “participant”-roles of bbPress were empty. Now all subscribers can participate in the private forums. Not what I’ve had in mind…

    But in my functions.php I have a script to notify users of their updated capabilities. It starts with:
    function user_role_update( $user_id, $new_role ) {
    if($new_role == 'bbp_participant') {

    But that doesn’t seem to work anymore. Did the name of the bbPress participant role change? Will
    function user_role_update( $user_id, $new_role ) {
    if($new_role == 'participant') {

    work?

    Lynq
    Participant

    If you want to do it yourself then I would recommend looking here first: https://codex.wordpress.org/Theme_Development – It tells you a bit about getting to grips with wordpress themes in general and then you can move onto bbPress which sits inside your wordpress theme.

    Good luck.

    #123073
    josephmiddleton
    Participant

    Greetings all, I hope everyone is having a safe holiday season.

    When I upgraded to 3.5 and I go to the page that houses bbpress forums, these are the error messages my browser is displaying…

    Webpage error details

    User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 4.0; .NET CLR 2.0.50727; .NET4.0C; .NET CLR 3.5.30729; InfoPath.2; OfficeLiveConnector.1.5; OfficeLivePatch.1.3; .NET CLR 3.0.4506.2152; BRI/2; BOIE8;ENUS)
    Timestamp: Mon, 17 Dec 2012 01:41:19 UTC

    Message: Object required
    Line: 191
    Char: 1
    Code: 0
    URI: http://joseph.heavenboundministry.com/jjblog/?forum=discussion-forum

    Message: ‘length’ is null or not an object
    Line: 2
    Char: 14331
    Code: 0
    URI: http://joseph.heavenboundministry.com/jjblog/wp-includes/js/jquery/jquery.js?ver=1.8.3

    Message: ‘length’ is null or not an object
    Line: 2
    Char: 14331
    Code: 0
    URI: http://joseph.heavenboundministry.com/jjblog/wp-includes/js/jquery/jquery.js?ver=1.8.3

    Message: ‘length’ is null or not an object
    Line: 2
    Char: 14331
    Code: 0
    URI: http://joseph.heavenboundministry.com/jjblog/wp-includes/js/jquery/jquery.js?ver=1.8.3

    Message: ‘length’ is null or not an object
    Line: 2
    Char: 14331
    Code: 0
    URI: http://joseph.heavenboundministry.com/jjblog/wp-includes/js/jquery/jquery.js?ver=1.8.3

    Message: ‘length’ is null or not an object
    Line: 2
    Char: 14331
    Code: 0
    URI: http://joseph.heavenboundministry.com/jjblog/wp-includes/js/jquery/jquery.js?ver=1.8.3

    Thank you all for helping me fix my web site, Thanks and happy holidays…

    Joseph

    #123064
    Hansaplastique
    Participant

    I have no idea – it seems that this is a tinyMCE plugin?
    I haven’t played with 3rd party tinyMCE plugins yet – but if you tell me how to install it, then I wouldn’t mind testing it for you.

    Bottomline is that you’ll have to look for the “keyword” to get the button to become visible (in this case “preview” according to this link). Add that keyword to the “array_push” list.

    One plugin I use (WP Smileys) requires that I make a few minor modifications;

    In functions.php (in the code above, just below “add_filter(‘mce_buttons_2’, ‘add_tinymce_buttons_2’);”), I had to add:

    // Restore the smileys plugin
    add_filter(“mce_external_plugins”, “s4w_tinymce_addplugin”);
    add_filter(‘mce_buttons’, ‘s4w_tinymce_registerbutton’);

    #123057
    Hansaplastique
    Participant

    I guess the code formatting didn’t work again … wish I could edit.

    #123056
    Hansaplastique
    Participant

    Thanks Stephen – and here I thought the “code” button would do that for me πŸ˜‰
    I’ll paste the code again, as you can see I removed some buttons (that have no purpose anyway) and added some …


    add_filter('tiny_mce_before_init', 'tinymce_other_css_for_content');

    function bbp_mce_override( $args = array() ) {
    $args['teeny'] = false;
    return $args;
    }
    add_filter( 'bbp_after_get_the_content_parse_args', 'bbp_mce_override' );

    if (!is_super_admin()) // remove/add buttons for non admins
    {
    function add_tinymce_buttons($buttons)
    {
    $arr_size=count($buttons);
    $remove_these=array('blockquote','wp_adv','fullscreen','wp_more');

    for ($counter=$arr_size; $counter>=0; $counter--)
    {
    if ( in_array($buttons[$counter],$remove_these) )
    {
    unset($buttons[$counter]);
    }
    }

    array_push($buttons,'separator','cut','copy','paste','separator','undo','redo','separator','sub','sup','forecolor','backcolor','charmap');

    return $buttons;
    }

    function add_tinymce_buttons_2($buttons)
    {
    unset($buttons);
    return $buttons;
    }

    add_filter('mce_buttons', 'add_tinymce_buttons');
    add_filter('mce_buttons_2', 'add_tinymce_buttons_2');
    }

    For some of these to work I had to expand the allowed_tags in WordPress (be carefull when doing this) using the following code;


    function my_allowed_html_tags_in_comments() {
    define('CUSTOM_TAGS', true);
    global $allowedtags;

    $allowedtags = array(
    'a' => array(
    'href' => array (),
    'title' => array ()),
    'blockquote' => array(
    'cite' => array ()),
    'cite' => array (),
    'code' => array(),
    'em' => array(),
    'strong' => array(),
    'pre' => array(
    'class' => array()),
    'p' => array(
    'style' => array()),
    'span' => array(
    'style' => array()),
    'sup' => array(),
    'sub' => array()
    );
    }

    add_action('init', 'my_allowed_html_tags_in_comments', 10);

    Hope it’s helpful to someone πŸ™‚

    #123040
    Lynq
    Participant

    I am not sure of any plugins, but you could create one.

    You could use the post_publish action – https://codex.wordpress.org/Plugin_API/Action_Reference/publish_post

    And then check the post type using https://codex.wordpress.org/Function_Reference/is_singular and then the email after grabbing the contents of the topic that was just posted.

    Good luck! πŸ™‚

    #123038
    Stephen Edgar
    Keymaster

    Wrap the code in <pre><code></code></pre>

Viewing 25 results - 14,976 through 15,000 (of 32,581 total)
Skip to toolbar