Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 14,926 through 14,950 (of 32,506 total)
  • Author
    Search Results
  • #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>

    #123037
    Hansaplastique
    Participant

    If anyone can tell me how to properly post code I’ll try again. πŸ™

    #123036
    Hansaplastique
    Participant

    Sorry that the code looks a little messy, the code-tag didn’t do a very good job at keeping the indentation and there is no edit button …. hmmm.
    I’ll just give it another try.


    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 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,'image');

    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');
    }

    #123035
    Hansaplastique
    Participant

    I’ve used the following code to remove some buttons for non-admins.
    This will keep your normal editor in the admin pages as they should stay, yet visitors of my bbPress forum can only use a few buttons.
    You can find a list of “standard” buttons in tinyMCE here.

    Place this code in the functions.php file of your theme.
    (ps. I’m no expert and pretty new to bbPress – but this worked like a charm for me)

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

    // *********************** CUSTOMIZE TINYMCE BUTTONS FOR BBPRESS *****************************
    if (!is_super_admin()) // remove buttons for non admins
    {
    function add_tinymce_buttons($buttons)
    {
    $arr_size=count($buttons);
    // remove blockquote, kitchen-sink, full-screen and the more-button
    $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]);
    }
    }

    // add the "image" button
    array_push($buttons,'image');

    return $buttons;
    }

    // Erase the entire 2nd button bar
    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');
    }

    #123034
    Hansaplastique
    Participant

    I’m no expert (and pretty new to bbPress), but this is how I forced tinyMCE for bbPress 2.2.3 to use my stylesheet for content.

    You’ll need a CCS file with your preferences of course, and add the following code to functions.php found in the root of your theme – in my case I’m using the CSS of my theme.
    This will also apply the selected CSS to the editor in your admin pages (for Posts etc).

    function tinymce_other_css_for_content( $init ) {
    $init['content_css'] = get_bloginfo('stylesheet_url');
    return $init;
    }

    add_filter('tiny_mce_before_init', 'tinymce_other_css_for_content');

    #123019
    rewindcaz
    Participant

    In any theme file (preferably header.php), how can I check if the current page is a bbp-user-page, the pages that show info regarding the bbp-user. Using bbp_is_user_home() I can see if the current user is on his user-page, but I need to check if the user-page is current regardless of who is viewing it. Anyone know how? Thanks

    AllenPayne
    Participant

    @John James Jacoby

    Ultimate TinyMCE buttons show up now after using your code but they don’t work.

    I just created a new bbpress post and used the Ultimate TinyMCE’s buttons to make some text bold, change the font size, color, underline, etc.. and when i submitted the post only the bold text remained unchanged. All my other formatting (font size, color, underline) was not preserved and was lost after submission.

    Please help.

Viewing 25 results - 14,926 through 14,950 (of 32,506 total)
Skip to toolbar