Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 12,376 through 12,400 (of 32,521 total)
  • Author
    Search Results
  • #144047

    In reply to: Forum Question

    Robin W
    Moderator

    no, this site doesn’t have a private message capability – your problem may well be someone else’s as well, so public answers help others !

    ‘When I went to one of our private forums, logged in as a tutor with the “tutor role”, it still let me post something. ‘ I’d try that again, and make sure you have logged out of the forum first in all your browser windows. If it still doesn’t work, come back and I’ll cut the code into a plugin.

    As to your desired set-up, this is getting complicated from a technical perspective.

    In essence you want
    Group a to have full permissions to participate across the site – the admins – no problem
    Group b to have spectator rights to some forums, but participation rights to others – ow!
    Public to see none of this – that is easy – forums set to private

    Is that correct? and if so I’ll have another think.

    #144044

    In reply to: Forum Question

    kdumas123
    Participant

    Hi Robin,

    I was able to edit the functions file with your code. Thank you very much. I figured out how to change a role of a user to “tutor”.

    I’m a little confused as to how I can achieve everything now.

    Our first thing is that we want a private forum where our administrator can populate information for the tutors. This is the forum where we want our tutors to be able to view but we don’t want them to be able to add topics or reply. It’s an informational only forum.

    The second thing is that we would like to have other forums where we would like the tutors to be able to interact with each other and with our admins.

    Is this possible?

    When I went to one of our private forums, logged in as a tutor with the “tutor role”, it still let me post something.

    Do you want me to set you up with 2 different roles (an admin and a tutor) for you to see how it works. Not sure if you have a way for me to private message you with this.

    Thanks!

    Kim

    #144017

    In reply to: main page customize

    Stephen Edgar
    Keymaster

    Start by checking out the docs in the codex.

    There are some good examples of what you need to do to achieve this.

    First you need to customize your bbPress templates per:

    https://codex.bbpress.org/theme-compatibility/

    The https://pl.forums.wordpress.org/ site is a custom page named page-forums.php with snippets of the code from various bbPress templates.

    So start digging around the codex and as bbPress is made ‘the WordPress way’ to customize bbPress templates is the same ideology as customizing a WordPress theme.

    Mycelus
    Participant

    Nope, it remained the same, and btw, I’d be more than happy to beta test. I finished the HTML and CSS courses on Codecademy and am moving onto PHP. I won’t be able to help code really, but I can definitely test and report bugs.

    Stephen Edgar
    Keymaster

    @mycelus Can you test the following for me to see if it fixes the isssue

    In your themes folder `/wp-content/themes/yourtheme/bbpress/loop-single-forum.php’

    The current code is:

    
    <li class="bbp-forum-topic-count">
    	<div class="topic-reply-counts">Topics: <?php bbp_forum_topic_count(); ?></div>
    	<div class="topic-reply-counts">Posts: <?php bbp_show_lead_topic() ? bbp_forum_reply_count() : bbp_forum_post_count(); ?></div>
    </li>
    

    Can you change it to:

    
    <li class="bbp-forum-topic-count"><?php bbp_forum_topic_count(); ?></li>
    
    <li class="bbp-forum-reply-count"><?php bbp_show_lead_topic() ? bbp_forum_reply_count() : bbp_forum_post_count(); ?></li>
    

    Does that look better now?

    (I don’t have the time to fully test these ‘style’ updates, I am mainly adding the functionality for forum subscriptions)

    #144001
    Stephen Edgar
    Keymaster

    I am new to bbPress and I’m pretty astounded by how incomplete out of the box this thing is. I’m really trying to love it but at every turn I’m experiencing a disconnect… : (

    What do you mean exactly?
    I’ll add this for starters, making bbPress templates compatible with every WordPress theme in existence is not possible ‘out of the box’ we do try to do our best though 🙂

    I have just had a quick look at the theme authors site and there is very little publicly accessible info available so I can’t link you to that. It would also be worth looking at their support forums to see if any others have had issues and/or fixes when using bbPress

    Support

    1. How do new users login/find password? I’ve already created pages with the short code and added it to the widgets. Doesn’t work.

    For this you will need to make sure bbPress is using a template from your theme that includes a sidebar. If you look in your theme folder you will probably find a file named page-sidebar.php, make a copy of that file and rename it to bbpress.php and now bbPress will use template for all your bbPress pages like forums, topics etc

    Once the sidebar is present that will also fix the login issue as you have the login widget set for your sidebar.

    #143997
    Stephen Edgar
    Keymaster

    This will be more of a WordPress issue than bbPress.

    See this doc to help you get it sorted https://codex.wordpress.org/Moving_WordPress

    If you have more issues with this part (i.e. Not bbPress) post in the WP Support forums https://wordpress.org/support/

    Stephen Edgar
    Keymaster

    When you send out a link to a topic on the forum, you get “No Results Found” if you aren’t logged in. This is big usability issue. People are going to assume there is something wrong with the link rather than realize that they just need to sign-in.

    For the record bbPress is specifically designed this way to 404 unless the user is logged in.

    In case you go down the 404 route here is the code you need based on your above code:

    
    <p>
    <?php esc_html_e('The page you requested could not be found or could not be displayed. If you are a parishioner and you are trying to access a forum page, it may be that you ','Chameleon'); ?> <a href="http://www.url-here/">need to log in</a><?php esc_html_e('. You can do so on the forum page in the right sidebar. Otherwise, try refining your search, or use the navigation above to locate the post.','Chameleon'); ?></p>
    #143992
    alaskatoargentina
    Participant

    Hello all,

    I am new to bbPress and I’m pretty astounded by how incomplete out of the box this thing is. I’m really trying to love it but at every turn I’m experiencing a disconnect… : (

    URL: http://www.landscapephotographysf.com/forums/forum/landscape-photography-sf-forum/

    I’m wondering if someone may be able to assist me through these pretty easy problems, as I can’t find any recent answers on these questions.

    1. How do new users login/find password? I’ve already created pages with the short code and added it to the widgets. Doesn’t work.

    Notice how although the widget is created, it doesn’t appear on the forum:

    Am I missing something here?

    Graham

    Robin W
    Moderator

    ok, yes I can probably fix your code above, and if you want to continue down that road, I’ll do some digging when I get a moment – just come back and let me know.

    However having looked at a solution for doing this at forum level I’ve sorted a different way to do this which works at topic level and seems much neater for the user, but will require a very small amount of discipline when posting a topic, but which solves both issues above.

    It takes a little setting up, and apologies that I sent you down the 404 route before I found this maybe (or maybe not) better way !

    So this solution requires that
    You have users set at wordpress to subscriber (or above) and at bbpress as participant (or above)
    that you have a separate menu item for your private forum – as users don’t see the private forum on the index when not logged in, and that this url is used in messages rather than the direct forum id (logged in users will have both choices – menu item and forum index!)

    If that’s ok, then set the forum up as follows – looks long, but is quite easy

    This solution

      uses the restrict content plugin to create a login prompt if the user is not logged on
      sets the forums to private so that they are not seen on the main index
      creates a page just for that forum, which the restrict content plugin can then use to display the need to be logged in message and login boxes
      Any topics created in the forum that need specific urls in newsletters etc. are set to subscriber – 30 seconds additional work!)

    1.Install “restrict content” plugin
    Dashboard>plugins>add new
    search for “Restrict Content” and it’s then one called just that
    Install and activate
    2. go into dashboard>settings>restrict content and add the following text (you can tailor it to say what you want) to all the options
    Sorry, you need to be a member to see this area. Login if need be [bbp-login]
    3. Go into Dashboard>forums>whichever forum and change to visibility ‘private’. This will stop this forum being seen in the main index unless logged in, so we’ll need to add a menu item later on so not logged in users can see it
    4. Find out the ID of the forum you have set to private
    This link shows you how
    http://www.authorcode.com/forums/topic/how-to-get-forum-id-in-bbpress/
    5. Create a new page called whatever eg “free speech forum”
    and put the following code into it
    [bbp-single-forum id=2922] where the id number is the number that you found out in 4. above
    6. Within this page you’ll also see below the main text you’ve just entered a new box called “restrict content” set this to subscriber (or higher is you’re really restricting).
    7. add this page to your menu’s if need be

    ALL THE ABOVE ONLY NEEDS TO BE DONE ONCE !

    If a user is logged in, and selects the menu item, they’ll just go straight into the forum.
    If they are not logged in and select the menu item, they’ll get the message you set up in 2. above together with the login boxes and having logged in will see the forum

    For topics :

    where you want a logon prompt to appear – presumably only topics in the newsletter (as it is only these that people will be entering a direct url for) – you need to go into Dashboard>topics and underneath the text you’ll see the restrict content box, change this to subscriber and they’ll get the prompt if not logged on !

    give it a go, or come back and say you want to carry down the 404 route and I’ll try and help you further on that !

    #143984
    Robin W
    Moderator

    ok, quick solution for you

    This solution

      uses the restrict content plugin to create a login prompt if the user is not logged in
      sets the forums to private so that they are not seen on the main index
      creates a page just for that private forum, which the restrict content plugin can then use to display the need to be logged in message and login boxes

    It does rely on you setting your users to at least wordpress subscriber level – as the plugin only works on wordpress levels, but that should be fine for most uses.

    1.Install “restrict content” plugin
    Dashboard>plugins>add new
    search for “Restrict Content” and it’s then one called just that
    Install and activate
    2. go into dashboard>settings>restrict content and add the following text (you can tailor it to say what you want) to all the options
    Sorry, you need to be a member to see this area. Login if needbe [bbp-login]
    3. Go into Dashboard>forums>whichever forum and change to visibility ‘private’. This will stop thisn forum being seen in the main index unless logged in, so we’ll need to add a menu item later on so not logged in users can see it
    4. Find out the ID of the forum you have set to private
    This link shows you how
    http://www.authorcode.com/forums/topic/how-to-get-forum-id-in-bbpress/
    5. Create a new page called whatever eg “free speech forum”
    and put the following code into it
    [bbp-single-forum id=2922] where the id number is the number that you found out in 4. above
    6. Within this page you’ll also see below the main text you’ve just entered a new box called “restrict content” set this to subscriber (or higher if you’re really restricting).
    7. add this page to your menu’s if need be

    If a user is logged in, and sleects the menu item, they’ll just go straight into the forum.

    If they are not logged in and select the menu item, they’ll get the message you set up in 2. above together with the login boxes and having logged in will see the forum

    give it a go, and come back if anything is not clear

    #143983
    Robin W
    Moderator

    @palmdoc – can’t see anything wrong with teppom’s code and just double checked by loading it.

    Check that you have added it correctly to your functions file.

    #143972
    Stephen Edgar
    Keymaster

    To fix the ‘subscribe’ link add this to your themes functions.php file or your bbpress-functions.php file in your theme directory.

    To change from Home › Forums › My ForumSubscribe
    To change to Home › Forums › My Forum (Subscribe)

    function ntwb_forum_subscription_link( $args ) {
        $args['before'] = '&nbsp;(';
        $args['after']  = ')';
     
        return $args;
    }
     
    add_filter( 'bbp_before_get_forum_subscribe_link_parse_args', 'ntwb_forum_subscription_link' );

    If you don’t want to add it manually add it to your functions.php file grab the entire file here and add it as a standalone plugin to your WordPress install.

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

    I’m not sure/clear what you mean for your ‘freshness’ issue, can you post a screenshot or link to your site please 🙂

    #143968
    Stephen Edgar
    Keymaster

    That actually appearing from your themes template and not bbPress’ templates.

    If you open up your page.php template of your theme (Or whatever the primary temmplate is) you will see something similar to this code:

    
    <div class="entry-author-meta">
      <p class="author-name">Published by 
      <span class="author vcard"><a class="url fn n" href="#" title="#">#</a></span>
      </p>
      <p class="author-description">
      </p>
    </div>
    

    Now make a copy of your page.php template (or again the main template your theme uses) and rename the this to bbpress.php open up the bbpress.php in a text editor and remove the section of code that I listed above.

    bbPress will now use this template rather that your themes default template.

    #143964
    Stephen Edgar
    Keymaster

    Nothing in particular except to say that if Phorum has weird/custom BBCode that they won’t be converted standard BBCodes like [b], [url], [img] etc will be converted.

    Also I don’t think the passwords will be converted so it is just a matter of the user requesting a password reset to get up and running after the conversion.

    I’d also suggest you do this on a test server (local or remote) to get used to the process before you try this on your live server, that way any bugs issues etc will be sorted out first.

    Are you talking thousands, tens of thousands, hundreds of thousands, millions of posts?

    #143956
    TeppoM
    Participant

    Thanks for the thread. Based on this I managed to develop a solution that does not require hassling with the template files. Just add this to function.php in your theme:

    /**
    * Add @mentionname after bbpress forum author details
    */
    
    add_action( 'bbp_theme_after_reply_author_details', 'mentionname_to_bbpress' );
    function mentionname_to_bbpress () {
    $user = get_userdata( bbp_get_reply_author_id() );
    if ( !empty( $user->user_nicename ) ) {
    $user_nicename = $user->user_nicename;
    echo "@".$user_nicename;
    }
    }
    
    #143953
    beinar
    Participant

    I have created a child theme to my Twenty Eleven theme and it is active. But when I want to do changes by inserting code right under the code sector that ends with:
    ……

    @import
    url(“../twentyeleven/style.css”);

    it does not take action.

    For instance, I want to change the font size in a bbPress forum by putting in:

    #bbpress-forums .bbp-forum-info .bbp-forum-content,
    #bbpress-forums p.bbp-topic-meta {
    font-size: 18px;
    margin: 5px 0 5px;
    padding: 0;
    word-wrap: break-word;
    }

    but nothing happens.
    What is wrong?

    Robin W
    Moderator

    forum descriptions do not show on the forums index page.

    I’ll try and come up with some code to do this sometime next week

    if I fail, post a further response to remind me !

    Magic-Komplex
    Participant

    Hi,
    I’m quite new to bbpress and trying to set up a forum. Now there’s a problem, the forum description is only shown at the single forum pages (after I edited the code using the bbpress documentation), but it’s not shown on the main forum index page, although the documentation says it has to be.
    Look for yourself, but please be nice, it’s still under construction and looks like a mess:

    http://www.thespiritualpath.de

    Could anyone help me please? I’m able to alter code if I have a template, but I’m not a programmer, so please try to explain what to do for beginners. 😉
    I forgot to mention, category descriptions are shown, but not forum descriptions.
    Thanks in advance.

    #143941

    In reply to: Delete Topic Function

    gjwarez
    Participant

    Hey Robin,

    I add the line in this php file location
    wp-content/plugins/bbpress/includes/core/capabilities.php

    
    		// Participant/Default
    		case bbp_get_participant_role() :
    		default :
    			$caps = array(
    
    				// Primary caps
    				'spectate'              => true,
    				'participate'           => true,
    
    				// Forum caps
    				'read_private_forums'   => true,
    
    				// Topic caps
    				'publish_topics'        => true,
    				'delete_topics'         => true,
    				'edit_topics'           => true, 
    				
    				// Reply caps
    				'publish_replies'       => true,
    				'edit_replies'          => true,
    				
    				// Topic tag caps
    				'assign_topic_tags'     => true,
    			);
    
    			break;
    	}
    
    

    In this case the delete_topic does not work,
    if i put delete_others_topics there it will work for all users.

    #143935
    Robin W
    Moderator

    I think you need to seriously consider taking some anger management classes.

    bbPress is free, it costs you nothing, is developed and maintained by a bunch of nice guys who do this for free, and is supported on this site by more nice guys who again do it for free.

    If you cared to read to documentation instead of just hurling abuse at us, you’d find fixes or tools that would let you alter what you are complaining about for instance the inline list is discussed in

    Layout and functionality – Examples you can use


    and turning off the counts in

    Layout and functionality – Examples you can use

    Because bbPress is flexible and all of what is displayed can be altered with either a little php or in many cases a plugin.

    However in your case I’d simply suggest that you find different forum software and annoy someone else, rather than whinging on this support forum.

    #143933
    Robin W
    Moderator

    ok, without me spending hours digging into this, let’s see if we can sort it.

    and yes you can cut the code into a functions file by renaming it, but we’ll fix that later.

    For the moment, where are you registering the new sidebar? In a main theme for a child theme?

    If in a child theme, they won’t register as sidebars have already been loaded. So you need to unload and reload them all in one go (no idea why, it’s just what I learnt when I tried to add a sidebar in my child theme.)

    so what my child theme functions file starts with is

    remove_action( 'widgets_init', 'twentyten_widgets_init' ); //necessary to replace parent theme's code which is a twentyten theme
    function twentytenchild_widgets_init() {
    	// Area 1, located at the top of the sidebar.
    	register_sidebar( array(
    		'name' => __( 'Primary Widget Area', 'twentytenchild' ),
    		'id' => 'primary-widget-area',
    		'description' => __( 'The primary widget area', 'twentytenchild' ),
    		'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
    		'after_widget' => '</li>',
    		'before_title' => '<h3 class="widget-title">',
    		'after_title' => '</h3>',
    	) );

    so it starts by removing the twentyten sidebar’s and then adds them straight back – my child theme for the twentyten main theme is excitingly called “twentytenchild”!. I have just shown the first widget from the parent theme, all are just copied from the parent theme. Several others follow
    Then on the end you add your new sidebar.

    Then after that you complete and register them viz :

    	//** Register sidebars by running twentyten_widgets_init() on the widgets_init hook. */
    add_action( 'widgets_init', 'twentytenchild_widgets_init' );
    

    by the by in your after title you need to change the a/ to /a

    Give that a go, and come back if it works, and we’ll then talk about taking the widget into a custom one.

    forwardslashdesigns
    Participant

    Hi,

    Title says it all really. I am trying to customise the recent topics widget; using it to display topics from a specific forum; and I would like the title to link to the forum from which the topics are from.

    I have registered a sidebar for this in my functions.php file and I’ve tried the following code, but it doesnt work as its not adding the URL into the title:

    register_sidebar(
    		array(
    			'id' => 'forumcontent',
    			'name' => __( 'Forum Home Content - Colleges', 'textdomain' ),
    			'description' => __( 'A short description of the sidebar.', 'textdomain' ),
    			'before_widget' => '<div id="%1$s" class="widget-topic-list %2$s">',
    			'after_widget' => '</div>',
    			'before_title' => '' . apply_filters( 'bbp_get_forum_permalink', get_permalink( $forum_id ) ) . '<h3 class="widget-title">',
    			'after_title' => '</h3><a/> <br class="clear"/>'
    		)
    	);

    I am trying to create something similar to this: http://postimg.org/image/55qwbgoe3/

    I am currently editing the the bbpress/includes/common/widgets.php file directly which I know is a BIG NO NO! and I should create a custom widget for this, but I am not really sure how to!

    I am currently using WordPress v3.6 and Bbpress v2.5.3

    Thanks

    #143923
    Stephen Edgar
    Keymaster

    Wow! On the front page of bbpress.org and everywhere we mention bbPress:

    "bbPress is forum software, made the WordPress way."

    bbPress is not like all other forums, it was not made to be like other forums, it was made the WordPress way allowing for customized functionality by plugins and/or themes.

    So maybe you should post on http://jobs.wordpress.net/

    #143919
    Robmcclel
    Participant

    Robin,

    Thanks for getting back to me, I’m sorry I was less clear.

    The WP page is real and live, and it does work. The issue is, the Index page is still there — I can’t seem to replace it with the WP Page. Breadcrumbs become meaningless, as the forum source will be the Index Page not the WP Page.

    The shortcodes allow me to organize the forums but still keep the sub (Genre) and sub-sub (subgenre) forums visible. For example, the “Mysteries, Suspense, Thrillers” genre has the sub-genre “Detectives”. On the WP/Shortcode page you can see that. On the Index Page you can’t.

    To change the Index Page takes considerable effort, if it can even be done at all (we have yet to be able to do so, though we can make it better looking). The WP/Shortcode Page, however, is exactly how we want it. The problem is that page competes and cross-connects to the Index Page.

    I want to get rid of the Index Page — for real, or for practical purpsoes — so that it is never seen, linked to, or interacted with by a user. Period. ever.

    Failing the ability to remove the Index Page from the equation, I would like to modify it so that it looks and acts very similar to the set-up the WP/Shortcode Page provides.

    Bottom Line: I want the various descriptions, genres, and subgenres visible to the user from the main forum page they would see and interact with, without any confusion or conflict by any other page or index.

Viewing 25 results - 12,376 through 12,400 (of 32,521 total)
Skip to toolbar