Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 10,451 through 10,475 (of 32,521 total)
  • Author
    Search Results
  • Robin W
    Moderator

    I want the forum menu link to be visible but nothing else, no forum titles/topics etc simply a login panel and a message explaining that the forum is for members only.

    ok, put the following in your functions file

    //Stop non-logged in user seeing the forums and show forum login page instead

    function lab_logged_in_bbptopics($have_posts){
    	if (!is_user_logged_in()){
    		header("Location: /forum-login/");
    		exit ;
    		}
    return $have_posts;
    }
    add_filter('bbp_has_topics', 'lab_logged_in_bbptopics');
    add_filter('bbp_has_forums', 'lab_logged_in_bbptopics');
    add_filter('bbp_has_replies', 'lab_logged_in_bbptopics');
    

    The create a page called ‘forum login’ and ensure the permalink is set to ‘forum-login’. You can actually use any name or permalinl, but the permalink has to match the one in line 3 above.

    into that page you can put something like

    You must be both registered AND a member of the club to use the forums.
    
    If you are not a member, why not <a href="/join-us/"> Join the club </a>
    
    Otherwise please login in
    
    [bbp-login]
    
    

    Then create a ‘join-us’ page that they can go to.

    If I disable the toolbar in this way, will I need a plugin to allow users to make basic changes to their profile in an environment that is consistent with the front end of the website?

    There are several ways to get an edit profile – this one adds it to your custom menu if they are logged in

    Layout and functionality – Examples you can use

    #153122

    Hey guys,

    Sry if the title is confusing. What i mean is that when i click on a specific forum it shows all of the topics in the entire forum, instead of just showing the topics of the clicked on forum.

    here’s my site. ull see what i mean wen u click on a specific forum – http://loser2winner.com/forums/

    is there any setting or code to fix this problem?

    please help!

    #153120
    chero123
    Participant

    write code in wp-content/themes/your_theme/functions.php

    #153119
    everykid
    Participant

    Started by disabling all pludgins…no change

    Dumb luck…I went into Settings: Format and unchecked “Add Toolbars and buttons to text area to help with HTML formatting”
    Now I can see a border around the box intended for entering descriptor of the box. …a step toward solving this.

    I don’t care if users have toolbar or formatting for this box but I expect I will for other boxes so still would like a fix.

    I believe the change has to be in file bbpress/templates/default/bbpress/form-topic.php.

    I am totally uncomfortable at messing around much at this level but think I need to edit this file and add some code to add a box title like “Topic Description (manditory)”

    below I include the part of that original file from bbpress where it would need to be but not sure what it should look like or where to put it. I expect this is a simple thing for someone who knows what they are doing but for me…not so much! The actual code and where to copy and paste it would save me hours of trial and error. (if some code could also be added to allow the rechecking of the ‘Post Formtting’ box without loosing the border that would be a real bonus.)

    From file form-topic.php

    div>

    <?php bbp_get_template_part( ‘form’, ‘anonymous’ ); ?>

    <?php do_action( ‘bbp_theme_before_topic_form_title’ ); ?>

    <p>
    <label for=”bbp_topic_title”><?php printf( __( ‘Topic Title (Maximum Length: %d):’, ‘bbpress’ ), bbp_get_title_max_length() ); ?></label><br />
    <input type=”text” id=”bbp_topic_title” value=”<?php bbp_form_topic_title(); ?>” tabindex=”<?php bbp_tab_index(); ?>” size=”40″ name=”bbp_topic_title” maxlength=”<?php bbp_title_max_length(); ?>” />
    </p>

    <?php do_action( ‘bbp_theme_after_topic_form_title’ ); ?>

    <?php do_action( ‘bbp_theme_before_topic_form_content’ ); ?>

    <?php bbp_the_content( array( ‘context’ => ‘topic’ ) ); ?>

    <?php do_action( ‘bbp_theme_after_topic_form_content’ ); ?>

    <?php if ( ! ( bbp_use_wp_editor() || current_user_can( ‘unfiltered_html’ ) ) ) : ?>

    <p class=”form-allowed-tags”>
    <label><?php _e( ‘You may use these <abbr title=”HyperText Markup Language”>HTML</abbr> tags and attributes:’,’bbpress’ ); ?></label><br />
    <?php bbp_allowed_tags(); ?>
    </p>

    <?php endif; ?>

    <?php if ( bbp_allow_topic_tags() && current_user_can( ‘assign_topic_tags’ ) ) : ?>

    <?php do_action( ‘bbp_theme_before_topic_form_tags’ ); ?>

    <p>
    <label for=”bbp_topic_tags”><?php _e( ‘Topic Tags:’, ‘bbpress’ ); ?></label><br />
    <input type=”text” value=”<?php bbp_form_topic_tags(); ?>” tabindex=”<?php bbp_tab_index(); ?>” size=”40″ name=”bbp_topic_tags” id=”bbp_topic_tags” <?php disabled( bbp_is_topic_spam() ); ?> />
    </p>

    <?php do_action( ‘bbp_theme_after_topic_form_tags’ ); ?>

    <?php endif; ?>

    #153116
    ntrabue
    Participant

    Hello, our company is on a google apps domain. While I prefer gmail, most of my co-workers prefer outlook.

    I hadn’t noticed this while putting the site together, however, it appears that email notifications don’t seem to appear as links by default in outlook 2010 or 2013 the URLs just appear as plain text. I figured it was something I could probably fix so I started looking around. I stumbled on this in includes/common/functions.php

    	// Strip tags from text and setup mail data
    	$topic_title   = strip_tags( bbp_get_topic_title( $topic_id ) );
    	$reply_content = strip_tags( bbp_get_reply_content( $reply_id ) );
    	$reply_url     = bbp_get_reply_url( $reply_id );
    	$blog_name     = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES );
    	$do_not_reply  = '<noreply@' . ltrim( get_home_url(), '^(http|https)://' ) . '>';
    
    	// For plugins to filter messages per reply/topic/user
    	$message = sprintf( __( '%1$s wrote:
    
    %2$s
    
    Post Link: %3$s
    
    -----------
    
    You are receiving this email because you subscribed to a forum topic.
    
    Login and visit the topic to unsubscribe from these emails.', 'bbpress' ),
    
    		$reply_author_name,
    		$reply_content,
    		$reply_url
    	);

    if I’m reading this correctly, it does indeed simply output the string of the URL. What would be the best way to go about making sure this is recognized in outlook as a link?

    Thank you in advance for your help.

    #153114

    In reply to: Custom Query Loop

    brettlewis
    Participant

    Here is a start to the code. I got some help on a differnt forum:

    <?php if ( bbp_has_topics(array( 'posts_per_page' => 3, 'max_num_pages' => 1, 'order' => 'DESC','meta_key' => '_bbp_voice_count', 'orderby' => 'meta_value_num' )) ) : ?>

    How would I add time as “since x number of days” to this query. I only want it showing the most popular voice count that are fresh within the last week or so. Any clues?

    #153110
    arno8
    Participant

    Bump, got this working

    Now looking for a way to add icons in front of my Sub forums , tried this code:

    add_post_type_support('forum_sub_forums', array('thumbnail'));
    
    function ks_forum_icons() {
    	if ( 'forum_sub_forums' == get_post_type() ) {
    		global $post;
    	    if ( has_post_thumbnail($post->ID) )
    	    	echo get_the_post_thumbnail($post->ID,'thumbnail',array('class' => 'alignleft forum-icon'));
    	 }
    }
    add_action('bbp_theme_before_forum_sub_forums_title','ks_forum_icons');

    but that didnt do anything.

    #153098
    mag07
    Participant

    Thank you for taking the time to reply. Was away for a couple of days.

    Anyhow, the same topic in the smf install is here: http://frostmourne.co.uk/index.php?topic=16.0 – you should be able to view page source.

    It’s just using bbcodes for formatting, not sure how SMF handles this from the backend.

    [b]Frostmourne[/b] is (...)
    
    Apply [url=http://frostmourne.co.uk/index.php?action=form;n=2]HERE[/url].
    
    If you have any questions or concerns, please feel free to contact any of our staff members.
    [hr]
    
    GM
    [list]
    	[li][url=http://frostmourne.co.uk/index.php?action=profile;u=16]Mafist[/url][/li]
    [/list]Officers
    [list]
    	[li][url=http://frostmourne.co.uk/index.php?action=profile;u=33]Shadowk[/url], [/li]
    	[li][url=http://frostmourne.co.uk/index.php?action=profile;u=43]Krybaybee (kirstykins)[/url],[/li]
    	[li][url=http://frostmourne.co.uk/index.php?action=profile;u=19]Auraguardian (Taichihamsta)[/url],[/li]
    	[li][url=http://frostmourne.co.uk/index.php?action=profile;u=27]Moondo[/url],[/li]
    	[li][url=http://frostmourne.co.uk/index.php?action=profile;u=27]Tranquilrage[/url][/li]
    [/list]
    [hr]
    Forum Admins
    [list]
    	[li][url=http://frostmourne.co.uk/index.php?action=profile;u=27]Moondo[/url],[/li]
    	[li][url=http://frostmourne.co.uk/index.php?action=profile;u=27]Tranquilrage[/url], [/li]
    	[li][url=http://frostmourne.co.uk/index.php?action=profile;u=71]Starwatcher (Worganic)[/url][/li]
    [/list]

    Thanks again, appreciate your help 🙂

    #153097

    In reply to: Forum not showing up

    gtmotor
    Participant

    I don’t modify any code.
    I just put the link into a new page.

    #153089
    arno8
    Participant

    I’m trying to add information to my subforum so it displays under the title.
    But its not showing anything when I save it. Any ideas?

    See it here

    https://www.primeknights.com/forums/

    Tried to add <span><?php the_content(); ?><span>

    Above <?php do_action( 'bbp_theme_after_forum_sub_forums' ); ?>

    in single-loop-forum but, it still doesnt show the content and it positions quite wrong if i enter text manually in the developer console from chrome.

    Thnx in advance

    #153086

    In reply to: SMF Import to bbPress

    Stephen Edgar
    Keymaster

    @tehred Go to SMF’s website to find details on how to install SMF, you probably want to install the same version that the database backup is from (if you know it).

    You should have a MySQL database backup, typically these are named filename.sql, filename.sql.zip or filename.gz, this is an actual export of the database data rather than the actual files used as part of the website.

    You should be able to import (once you find it) that file into MySQL as a new database, then you point bbPress’ import to that database name in the import settings along with username and password and table prefix (most likely smf_).

    Once you start running the import it copies the data from your old SMF database into the WordPress database you are using with bbPress, your original SMF database is not altered in anyway, it is still best practice to make sure you have backups of your SMF and WordPress database all the same.

    #153085

    In reply to: SMF Import to bbPress

    Stephen Edgar
    Keymaster

    @bestru Your database table name is bestru_smf and that looks correct, your table prefix does not look correct, in the screenshot you are using _smf, I think you will find it should be smf_, see this screenshot showing the table names inside my import_smf database https://cloudup.com/cTo5XoXDEBn

    #153083
    brettlewis
    Participant

    I’m creating a custom topic query for a section of my website that hooks into the default loop template. In the template I use
    <?php if ( bbp_has_topics(array( 'posts_per_page' => 7, 'max_num_pages' => 1, 'bbp_voice_count' => 'DESC', order => 'DESC' )) ) : ?>

    What I’m trying to achieve is a query the shows 7 topics that have the most participants over the last few days. I went with order as the time query but clearly making sure it only shows topics that have BOTH a large amount of users AND are currently active is what I’m trying to achieve.

    Any hints or different args to use to achieve this?

    sidenote: I doesn’t seem bbp_voice_count works?

    #153081
    Virtualtopia
    Participant

    @ everykid

    I had that problem initially, but got around it by making that field a WYSIWYG editor (same as making blog post) and then it became obvious not to mention familiar for users who expect a toolbar and some formatting options. I had a look through my plugin list and cannot see a plugin that helped me achieve this. So I must have put in some code somewhere. If you are interested, I could locate that code and advise.

    chero123
    Participant

    hello, i have one doubt

    I want to show on the forum index

    topics by freshness and index forums

    on the same page, first: topics by freshness and after forums…

    I do not have much experience with bbpress and little knowledge … I have 3 days to install and I am configuring

    #153062

    In reply to: Forum not showing up

    Robin W
    Moderator

    can you post the exact code you’re putting into your page

    #153060
    blackjak231
    Participant

    Thanks for the tip but i actually ended up adding the following at the top of the pages i needed it on :

    $args = array(
    	'post_parent' => 0,
    );

    Not very DRY as it is repeated (i could have done a function though…) but it does the job perfectly.
    HOWEVER, since every loop resets the $args array, i think it only works for me because my dropdown menu with the forums is before any other loop on the page.

    Here is the code i added in the pages i needed to show the dropdown (bootstrap):

    
    <?php if ( bbp_has_forums($args) ) : ?>
    	<?php while ( bbp_forums() ) : bbp_the_forum(); ?>
    		<li><a id="textdropdown" class="bbp-forum-title" href="<?php bbp_forum_permalink(); ?>"><?php bbp_forum_title(); ?></a></li>
    	<?php endwhile; ?>
    <?php else : ?>
    	<?php bbp_get_template_part( 'feedback', 'no-forums' ); ?>
    <?php endif; ?>
    

    I hope this helps you @selenii and anybody else who was trying to do this. I would however recommend Robkk’s way as it uses clean code from bbPress. Haven’t tried it though.

    Good luck and thank you!

    #153058
    Robkk
    Moderator

    this is kind of odd…

    i did find a way to see it on IE 11 , i changed the style of the bbp-form fieldset using the inspector tools in IE 11.

    here is some custom css that might help

    put it wherever you can put custom css

    child theme style sheet
    jetpack custom css module
    other custom css plugin

    fieldset.bbp-form {
    display:block;
    min-width:inherit;
    clear:left;
    }

    if that doesnt work add !important like this

    fieldset.bbp-form {
    display:block!important;
    min-width:inherit;
    clear:left;
    }
    Robkk
    Moderator

    if you really want the replies and topics to be on the products page.

    this would require custom development

    http://jobs.wordpress.net/

    #1 outsourcing service for WordPress

    if you want bbpress/woocommerce integration

    i think there is some plugins that would help, cant think of them right at the moment.

    #153052

    In reply to: Hi sorry i'm new here

    Robkk
    Moderator

    buddypress and bbpress are plugins for wordpress, so they need wordpress to work.

    bbpress does have an older standalone version of itself, it can work by itself.
    Using it with newer versions of wordpress might cause issues.

    About

    About bbPress

    bbPress is forum software, made the WordPress way.

    Have you ever been frustrated with forum or bulletin board software that was slow, bloated, and always got your server hacked? bbPress is focused on ease of integration, ease of use, web standards, and speed.

    We’re keeping things as small and light as possible while still allowing for great add-on features through WordPress’s extensive plugin system. What does all that mean? bbPress is lean, mean, and ready to take on any job you throw at it.

    Philosophy

    Now that bbPress is all grown up, we’re certain of a few things:

    Open Source, always and forever
    Less (code) is more
    Code is poetry
    Simplicity is a feature
    Speed & security are paramount to a great user experience
    Every line of code is written with these principles in mind, and if that sounds good to you get involved!

    About

    About buddyPress

    BuddyPress is a powerful plugin that takes your WordPress.org powered site beyond the blog with social-network features like user profiles, activity streams, user groups, and more. Some fantastic uses might be:

    A campus wide social network for your university, school or college.
    An internal communication tool for your company.
    A niche social network for your interest topic.
    A focused social network for your new product.
    If you’re using BuddyPress in a unique or interesting way, be sure to let people know on the forums; we’re always interested!

    BuddyPress is not “all or nothing”

    BuddyPress comes with several components that integrate directly with your site, with each other, and even with other plugins (check out bbPress for support forums.) If you only want to use a few features, BuddyPress will automatically adapt, showing only the menu items, pages and buttons for the features you have enabled.

    BuddyPress.org

    This site is built on WordPress and BuddyPress (we believe in the software we build!). Please consider registering and becoming part of the BuddyPress community. By doing this you’ll be able to contribute to the documentation, ask questions in the forum as well as build your BuddyPress profile so other BuddyPress developers and contributors can keep in touch with you.

    #153051
    Robkk
    Moderator

    its not a shortcode but i think you need one of these

    bbp_reply_content()
    bbp_get_reply_content()
    bbp_reply_excerpt()
    bbp_get_reply_excerpt()

    #153047

    In reply to: Forum Icons?

    Hector
    Participant

    @robin-w LOL X’D

    had understood that was to assign the image by code, almost like vbulletin, apology hahah works perfect the code

    sorry… 😀

    #153042

    In reply to: Forum Icons?

    Robin W
    Moderator

    @zick123 – didn’t quite understand your post.

    you just out the code into your functions file and then use the ‘featured image’ part of the forum to add whatever image you wish ie

    Dashboard>forums>all forums and edit the forum, on the right ahdn side you’ll see ‘featured image’ and just add whichever one there.

    #153041

    In reply to: Forum Icons?

    Hector
    Participant

    I have the same problem, I can not make it work

    put pictures in library forum name I put eg 1525.png

    1525 is the ID of the forum

    I dont know the direction, as images/idforum.png

    do not quite understand where or how do… help 🙁

    #153038
    Hector
    Participant

    hi @giantqtipz, in wp-content/plugins/bbpress/templates/default/css/bbpress.css

    search line 121:

    #bbpress-forums .bbp-forums-list li {
    display: inline ;
    font-size: 11px;
    }

    Changing the display: inline to display: list-item

    regards 😉

Viewing 25 results - 10,451 through 10,475 (of 32,521 total)
Skip to toolbar