Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 6,026 through 6,050 (of 32,519 total)
  • Author
    Search Results
  • #177452
    epretorious
    Participant

    > Thanks, Pascal: That worked perfectly!

    One, very important correction: If visitors to the site aren’t logged in, they see nothingnot even the warning that “You must be logged in to…” πŸ™

    There must be an easy way to do away with that “Oh bother!…” bit of text without leaving visitors in the dark. πŸ™

    Maybe I should just manually change the source:

    [root@cp bbpress]# grep -r bother *
    languages/bbpress.pot:msgid "Oh bother! No forums were found here!"
    languages/bbpress.pot:msgid "Oh bother! No replies were found here!"
    languages/bbpress.pot:msgid "Oh bother! No search results were found here!"
    languages/bbpress.pot:msgid "Oh bother! No topics were found here!"
    templates/default/bbpress/feedback-no-topics.php:	<p><?php _e( 'Oh bother! No topics were found here!', 'bbpress' ); ?></p>
    templates/default/bbpress/feedback-no-replies.php:	<p><?php _e( 'Oh bother! No replies were found here!', 'bbpress' ); ?></p>
    templates/default/bbpress/feedback-no-search.php:	<p><?php _e( 'Oh bother! No search results were found here!', 'bbpress' ); ?></p>
    templates/default/bbpress/feedback-no-forums.php:	<p><?php _e( 'Oh bother! No forums were found here!', 'bbpress' ); ?></p>

    Eric Pretorious
    Portland, OR

    #177451
    epretorious
    Participant

    I’m really surprised to see that bbPress warns visitors to the forums that “You must be logged in to create new topics.” but does not provide a link to the login page. e.g.,

    <a href='/login.php'>Login</a> to create new topics and/or to reply to topics.

    Is there some way to correct that?

    TIA,
    Eric Pretorious
    Portland, OR

    epretorious
    Participant

    Robin:

    Originally: I hid the top primary menu by adding a bit of CSS to the child theme:

    .primary-navigation {
            display: none;
    }

    …but I have since enabled the top primary menu.

    HTH,
    Eric Pretorious
    Portland, OR

    #177429
    Robkk
    Moderator

    Creating a new view template will help with the layout of how you want it. And yes you can still show that view with a shortcode.

    #177428
    MalMac
    Participant

    Apologies for being unclear,

    The shortcode I posted worked, just wondering if I create a new view template if I will be able to call it in a shortcode?

    Thanks!

    #177427
    Robkk
    Moderator

    The shortcode that you posted seemed alright with the code you posted, so you had the right ID and everything, only thing I would possibly say is if those quotes don’t work use single quotes.

    '

    #177425
    MalMac
    Participant

    Thats a great help, Thanks! Would it be possible to call this new view in a shortcode?

    #177423

    In reply to: Dynamic Profile Link

    Robkk
    Moderator

    The toolbar on this site is sort of absolutely positioned, it has this CSS used. Its not really that great if you want a good mobile site.

    #wpadminbar {
      top: 81px;
    }
    #177419
    Robkk
    Moderator

    If you want a specific view to have images, you would need to create a custom view template called either single-view-recent-with-topic-image.php or view-recent-with-topic-image.php and most of the code would be based on the single-view.php template in the extras folder in the bbPress plugin, you would have to make it custom enough to include the featured image code, and I guess however your users will be able to select a featured image during topic creation.

    #177418

    In reply to: Site Role

    Robkk
    Moderator

    Well I don’t entirely understand where you are getting at, but I mean its possible for a user to have 3 different roles.

    For example.

    Site Role – Subscriber – Default WordPress role
    Forum Role – Participant – Default bbPress role
    Membership Role – Premium Member – Some paid membership framework plugins role

    If you want 1 custom site role with different capabilities that other roles might have, consider creating a custom user role. But be aware of what each capability does, so that you will not give your users permissions that you do not exactly want them to have.

    Creating a custom bbPress role guide.

    https://codex.bbpress.org/custom-capabilities/

    bbPress user roles and capabilities

    https://codex.bbpress.org/getting-started/before-installing/bbpress-user-roles-and-capabilities/

    WordPress roles and capabilities

    https://codex.wordpress.org/Roles_and_Capabilities

    And a plugin I would recommend to create a custom user role with custom capabilities would be a plugin called Members by Justin Tadlock.

    MalMac
    Participant

    Hello All,

    This is what I have so far:

    in my functions.php file:
    bbp_register_view( 'recent-with-topic-image', __( 'Recent With Topic Image' ), array(false ,'author' => 0, 'show_stickies' => false, 'order' => 'DESC', 'post_parent' => 'any', 'posts_per_page' => 8 ), false );

    corresponding short code
    [bbp-single-view id="recent-with-topic-image"]

    What can I add to array to show the featured image from the topic that the post is in?

    Thanks, Malcolm

    #177416
    Robkk
    Moderator

    I think other moderators thought this was spam.

    I can see that it is hard to tell unless you go digging in your sites source code to tell if you are using bbPress.

    I knew one day with all these users basically using bbPress as a blog, that a designer one day would customize and create custom templates for bbPress enough to just make it look like a blog.

    Interesting and very unique stuff!!

    You don’t even have to worry about waiting for bbPress replies for blog posts, because your whole site is mainly using bbPress.

    Interesting as hell to see bbPress turn into a news site.

    #177415

    In reply to: Dynamic Profile Link

    Robkk
    Moderator

    Its the WordPress toolbar, a bit customized, but its definitely the default WordPress toolbar.

    https://codex.wordpress.org/Toolbar

    Joe Greenwood
    Participant

    I have already posted this question, but has not been approved by moderators. Please approve, has been entire day already, thank you.

    I have issue where bbPress HTML code is being written above the <doctype> declaration in my page, but this only happens when not logged in / signed in to WordPress. This is for Forums and Topics pages, and none others. When logged in, then HTML code is written in its proper place. I will attach a screenshot showing both instances, the top being when not signed in (HTML is out of place, before <doctype>), the bottom when signed in (HTML is correctly placed in body, and <doctype> comes first as it should).

    screenshot

    Any ideas on where this HTML might be called differently, depending on whether or not user is logged in? I have tried disabling plugins. Perhaps it is something with my theme. My site can be viewed at http://www.lexiconleep.com/forums/forum/leep-questions-answers/ … I wonder if it has something to do with assigning a forum role to anonymous users..? Perhaps anonymous (not logged in) users need to have a forum role … I will look into this. Thanks!

    #177396
    Robin W
    Moderator

    have you followed

    Step by step guide to setting up a bbPress forum – Part 1

    and what have you got for step 3?

    #177388
    Stephen Edgar
    Keymaster

    The dashes β€”β€”β€”β€” usually indicate that the database connection has been lost, sadly this one bug I’ve not been able to nail down with the importer to fix and give a decent warning/error message.

    Basically a workaround is to open another tab in your browser to the dashboard page and refresh it every hour so and by doing so WordPress doesn’t “lose” the database connection

    #177378
    Robkk
    Moderator

    @lnangel well for IPs specifically, if you put her IP into the comment blacklist she will be blocked from posting in your forums.

    There are also cases where people don’t know that plugins can hook into the comment blacklist with their own custom list, like I have seen issues where a Mojo Marketplace plugin would cause this same error. So if she would use profanity that might be in a custom blacklist for the comment blacklist, she would be blocked.

    You can know if it was this, if she sees the error notice listed in the guide.

    She could go over the link limit settings in Settings > Disscussion too

    From there her actual posts would be set as pending I think.

    https://codex.bbpress.org/moderation-and-blacklisting/

    Other things could be spam plugins like Akismet that work with bbPress possibly being too aggressive.

    #177377
    Robkk
    Moderator

    So you are trying to configure BuddyPress with its own inbuilt bbPress v1 forums? I think the bbPress v1 in BuddyPress (BP Forums) has issues in the last few major version of BuddyPress.

    Why not look into just using the latest version of bbPress v2 and BuddyPress and use BuddyPress’ groups feature with bbPress.

    https://codex.buddypress.org/getting-started/installing-group-and-sitewide-forums/

    #177374
    thegarnet
    Participant

    I found the excellent article by Tanner Moushey on how to create groups programmaticaly: https://tannermoushey.com/2014/08/create-groups-buddypress/

    However I also need to create a forum for each group, and I can’t get his suggestion of using groups_new_group_forum to work. I read other posts of getting function doesnt exist error for bp_forums_new_forum (which groups_new_group_forum calls), but I believe I found the right requires to get that function, and everything it depends on, but now I am getting an error about null several layers down within bb code.

    Here is my code so far:

    <?php
    /* Show the errors in browser */

    error_reporting(E_ALL);
    ini_set('display_errors', 1);

    /** Load WordPress Bootstrap */
    require_once( dirname( __FILE__ ) . '/../admin.php' );

    /** Load WordPress dashboard API */
    require_once(ABSPATH . 'wp-admin/includes/dashboard.php');

    wp_dashboard_setup();

    do_action('bbpress_init');

    ?>

    <H1>Add Groups</H1>

    <?php

    $args = array(
    'group_id' => 0,
    'creator_id' => 0,
    'name' => 'California',
    'description' => 'For people located in California',
    'slug' => 'california',
    'status' => 'public',
    'enable_forum' => 1,
    'date_created' => bp_core_current_time()
    );

    ?>

    <p>Creating group '<?php echo $args[name] ?>'</p>

    <?php

    $newgroupid = groups_create_group($args);

    ?>

    <?php

    ////////////////////////////
    // Now creating a new forum

    // Not needed for get groups_create_group - this already got included
    // require_once(ABSPATH . 'wp-content/plugins/buddypress/bp-groups/bp-groups-forums.php');

    // For bp_forums_new_forum
    require_once(ABSPATH . 'wp-content/plugins/buddypress/bp-forums/bp-forums-functions.php');

    // For bb_new_forum
    require_once(ABSPATH . 'wp-content/plugins/buddypress/bp-forums/bbpress/bb-includes/class.bb-walker.php');
    require_once(ABSPATH . 'wp-content/plugins/buddypress/bp-forums/bbpress/bb-admin/includes/functions.bb-admin.php');

    // For bb_current_user_can
    require_once(ABSPATH . 'wp-content/plugins/buddypress/bp-forums/bbpress/bb-includes/functions.bb-capabilities.php');

    // Example from: http://buddypress.wp-a2z.org/oik_api/groups_new_group_forum/
    $newforumid = groups_new_group_forum($newgroupid,'California','For people located in California');

    ?>

    <table>
    <tr><td>Newly created group id:</td><td><?php echo $newgroupid ?></td><td>Groups</td>
    </tr>
    <tr><td>Newly created forum id:</td><td><?php echo $newforumid ?></td><td>Forums</td>
    </tr>

    </table>

    It throws this error:

    Fatal error: Uncaught Error: Call to a member function get_var() on null in /Users/eyespider/projects/justiceserved/local/wp-content/plugins/buddypress/bp-forums/bbpress/bb-admin/includes/functions.bb-admin.php:992 Stack trace:
    #0 /Users/eyespider/projects/justiceserved/local/wp-content/plugins/buddypress/bp-forums/bp-forums-functions.php(123): bb_new_forum(Array)
    #1 /Users/eyespider/projects/justiceserved/local/wp-content/plugins/buddypress/bp-groups/bp-groups-forums.php(47): bp_forums_new_forum(Array)
    #2 /Users/eyespider/projects/justiceserved/local/wp-admin/custom/add-groups2.php(67): groups_new_group_forum(38, 'California', 'For people loca...')
    #3 {main} thrown in /Users/eyespider/projects/justiceserved/local/wp-content/plugins/buddypress/bp-forums/bbpress/bb-admin/includes/functions.bb-admin.php on line 992

    #177373
    Robkk
    Moderator

    Do you only have bbPress activated, or do you have some bbPress image upload plugins activated as well?
    You can try some plugin troubleshooting if you haven’t yet.

    https://codex.bbpress.org/getting-started/troubleshooting/#plugins

    You can also reinstall bbPress and see if that fixes anything too.

    #177372
    Robkk
    Moderator
    #177371
    Robkk
    Moderator

    Instead of going through each template and possibly changing this, you can also use a php code function listed int this topic.

    https://bbpress.org/forums/topic/resizing-avatars/#post-148625

    The original source of their code seems to be from this guide.

    https://schaltgetriebe.wordpress.com/2014/04/06/increase-avatar-size-in-bbpress/

    #177370
    Robkk
    Moderator

    Are you just talking about the HTML tag like <video> </video>? And not some new taxonomy added to your site, possibly through plugin.

    If its the HTML tag you will need to use a php function like this.

    https://gist.github.com/ntwb/7797990

    You can download and edit Stephens plugin and just add your HTML tag like so.

    http://htmldog.com/references/html/tags/video/

                    // Images
    		'img'        => array(
    			'class'    => true,
    			'src'      => true,
    			'border'   => true,
    			'alt'      => true,
    			'height'   => true,
    			'width'    => true,
    		),
                
                    //Videos 
                    'video'        => array(
    			'autoplay'    => true,
    			'src'      => true,
    			'controls'   => true,
    			'loop'      => true,
    			'height'   => true,
    			'width'    => true,
                            'muted'    => true,
                            'poster'    => true,
                            'preload'    => true,
    		),
    
    		// Tables
    #177366
    Robkk
    Moderator

    Is this a site you created? It looks pretty darn good and it seems to try to not stay with bbPress’ default design, and everything is unique, which I very much like to see designers do.

    As for what you asked in this topic, you can do this with the help of some jquery, and a conditional whether the user is logged in or not.

    This will have links to basic code for a show/hide toggle for a simple div. Just remember to use the topic forms container ID in any code you are going to use.

    http://www.w3schools.com/jquery/jquery_hide_show.asp

    This is a possible recommendation of a conditional you should use in a function you would create with whatever modal login plugin you are using.

    if (!jQuery(this).hasClass('active') && !jQuery('body').hasClass('logged-in')) {

    #177365
    sfmPascal
    Participant

    Hi, here is what I did for my site:

    1. Installed Allow PHP Execute
    2. Create a page, for example “forum profile”
    3. Add this code:

    
    <?php
    if (!is_user_logged_in()) {
      header('Location: /my-account/');
    } else {
      $current_user = wp_get_current_user();
      $user=$current_user->user_nicename;
      $newURL = '/forums/users/' . $user;
      header('Location: '.$newURL);
    }
    ?>
    

    4. Now when you go to this page, which you now can add to any menu location supported by your theme, if not logged in, will redirect to your login page, otherwise redirect to their form profile link.

    Jarrod

Viewing 25 results - 6,026 through 6,050 (of 32,519 total)
Skip to toolbar