Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 10,501 through 10,525 (of 32,504 total)
  • Author
    Search Results
  • #152778
    Robin W
    Moderator

    forums is a virtual page – ie it doesn’t exist (not that pages really exist anyway!), and is not a ‘post ‘ in the wordpress sense of post

    Rather than use the forums widget, why not just use a text widget, just put this in the content

    <a href= "http://harveylakeland.com/forums">Community Forums </a>

    #152777

    In reply to: Full Width Forum Pages

    Robin W
    Moderator

    ok, just looked and all the pages look fine now except the forum page – is that correct?

    bbpress should use the bbpress template for all the pages, so you can’t really css the individuals (or not without tons of code).

    How are you going to the initial forum ? is it method 1 or 2 from the following

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

    and whichever try the other !

    Once you are consistently wrong on all pages, you can make it consistently right !

    #152766
    Stephen Edgar
    Keymaster

    Download the plugin I have here, unzip it and upload it to your site and activate. šŸ™‚

    Edit: Users will then be able to use HTML table tags, e.g. <table>, <td>, <tr> etc

    #152764
    Stephen Edgar
    Keymaster

    @bepyland If you set the bbPress import rows to 50,000 that would be one single query, it would not work though unless you had one amazing MySQL installation. šŸ˜‰

    What the “rows” value means is how many topics or replies for each single query should be imported at a time, the default is 100, so when the importer is running each single query will import 100 topics at a time.

    WordPress itself, and then bbPress also make queries along the way so just counting only bbPress import is not the only calculation needed.

    Your best bet is to create a test site to test the import before migrating this to your “live” site:
    https://codex.bbpress.org/creating-a-test-site/

    #152763
    Robkk
    Moderator

    i think its really like making a plugin for wordress except you use bbpress’s hooks
    but i havent gone in too deep in knowing how to create a plugin.

    this plugin helps on finding all of bbpress’s hooks
    https://wordpress.org/plugins/bbpress-visual-hooks/

    and im sure information in documentation will help.

    Codex

    heres some information that i found real quick that i think could help.

    Plugins

    Step by step guide to setting up a bbPress forum – part 4

    Step by step guide to setting up a bbPress forum – part 5

    if you need anymore help create a new topic titled “Need Help on bbpress plugin development”

    and maybe robin or stephen can help from there.

    robin already has tons of plugins made for bbpress
    and stephen is one of the core developers

    #152762

    In reply to: Full Width Forum Pages

    bertusschoeman
    Participant

    Hey Robin, thanks so much! The code you supplied me with alters the main forum page a bit (the page that we do not want to chage, but use as a model for the topic and discussion pages) and leaves the topic (http://secularsociety.co.za/forum/forum/sass-general) and discussion pages (http://secularsociety.co.za/forum/topic/sass-vision-statement/) aligned to the left. I have been playing around with your code as well as a bunch of other CSS, but I can not seem get the topic and discussion pages to look like the original main forum page :/ I think that we will need to address each page’s CSS instruction individually. Trying to change the CSS in one go seems to have different results on each of these pages. Any further assistance would be greatly appreciated.

    #152761
    JBBoY
    Participant

    Thank you Robkk, where can I find a tutorial or howto create a plugin for bbpress? I found the bbpress files that I need to edit and I can put my code in, but I think this is not the clean way to do it.

    #152744
    arno8
    Participant

    you put the add filter code into your child themes functions.php or if you have a functionality plugin put it there.

    This worked perfectly.

    if you got it to work send a link to the post so i can check it out.

    i dont get it work šŸ™

    #152734
    Robkk
    Moderator

    you put the add filter code into your child themes functions.php or if you have a functionality plugin put it there.

    and well i havent really tested that css code before so i didnt know if it really did work.
    i just tried it a while ago and i cant get it to work at all.

    if you got it to work send a link to the post so i can check it out.

    #152732

    In reply to: Which need I use?

    Icaroferreira
    Participant

    I have “WordPress”, forum “bbPress”, plugin “UserPro” … And I want to give points, rewards for users of my website, when they share articles, make comments, create forum topic, etc and has appears in his profile for everybody to see (points and medals).

    So what should I use ?

    Plugin mycred? Plugin WPAchievements codecanyon? or what?

    Help me please.

    #152731
    Robkk
    Moderator

    I want to make sure that there is not an existing alternative before start writing code (I’m not very familiar at writing code for bbpress).

    ok alright , some other users want this functionality so it will be great for someone to make it šŸ™‚

    #152726
    JBBoY
    Participant

    Thank you again for your response! yes, that’s exactly what I want. But I can’t believe there is not a plugin to do this kind of moderation on bbpress.

    I want to make sure that there is not an existing alternative before start writing code (I’m not very familiar at writing code for bbpress).

    #152722
    arno8
    Participant

    And where would I add the add_filter code please?

    #152710
    selenii
    Participant
    <?php
    	if ( bbp_has_topics( array( 'author' => 0, 'show_stickies' => false, 'order' => 'DESC', 'post_parent' => 'any', 'posts_per_page' => 10 ) ) )
    		bbp_get_template_part( 'bbpress/loop', 'topics' );
    	?>

    I had put this code to my template. But how can I change the post_parent Parameter automatik, that the plugin know in wich forum he is and show me the right topics.

    Thx

    #152709
    Stephen Edgar
    Keymaster

    See the code I just posted here, add’s the CSS classes without template modifications šŸ™‚

    Topic background color depending on role

    Also going to close this, rather than others bumping it in the future šŸ˜‰

    #152707

    In reply to: Which need I use?

    Stephen Edgar
    Keymaster

    For #3 the user topic and reply counts underneath their role in each topic/reply will be in the next release of bbPress.

    And images based on forum roles can be achieved using the same code I just posted here by inserting the image using CSS :before or :after pseudo elements .

    #152706
    Stephen Edgar
    Keymaster

    This should do the trick without any template modifications:

    
    add_filter('bbp_before_get_reply_author_role_parse_args', 'ntwb_bbpress_reply_css_role' );
    function ntwb_bbpress_reply_css_role() {
    
    	$role = strtolower( bbp_get_user_display_role( bbp_get_reply_author_id( $reply_id ) ) );
    	$args['class']  = 'bbp-author-role bbp-author-role-' . $role;
    	$args['before'] = '';
    	$args['after']  = '';
    
    	return $args;
    }
    
    add_filter('bbp_before_get_topic_author_role_parse_args', 'ntwb_bbpress_topic_css_role' );
    function ntwb_bbpress_topic_css_role() {
    
    	$role = strtolower( bbp_get_user_display_role( bbp_get_topic_author_id( $topic_id ) ) );
    	$args['class']  = 'bbp-author-role bbp-author-role-' . $role;
    	$args['before'] = '';
    	$args['after']  = '';
    
    	return $args;
    }
    

    It grabs the topic or reply author role and adds another CSS class with prefix bbp-role- so you now have a new set of CSS classes e.g. bbp-role-keymaster, bbp-role-moderator, bbp-role-participant etc that you can then add your custom CSS styles to.

    #152703
    Robkk
    Moderator

    well first i think you have to seperate the role from the author link and author avatar

    then to do add this you have to either add conditionals like if user is admin {

    or wrap the role in a class and add something like ($role)

    will post later when i feel like going into templates and fiddling with them again.

    #152702
    arno8
    Participant

    Thanks this did it man , could you help me with this to:

    im trying to add small images in front of the roles, every role has a different one, so im trying to add a class depending on the role, i know i gotta make edits in loop-single-reply.php

    right here somewhere

    
    	<div class="bbp-reply-author">
    
    		<?php do_action( 'bbp_theme_before_reply_author_details' ); ?>
    
    		<?php bbp_reply_author_link( array( 'sep' => '<br />', 'show_role' => true ) ); ?>
    
    		<?php if ( bbp_is_user_keymaster() ) : ?>
    
    			<?php do_action( 'bbp_theme_before_reply_author_admin_details' ); ?>

    You got any ideas?

    #152700

    In reply to: Which need I use?

    Robkk
    Moderator

    1. to get a full-width forums, you need to create a bbpress.php more information in this link

    https://codex.bbpress.org/theme-compatibility/getting-started-in-modifying-the-main-bbpress-template/

    after you create a bbpress.php from your page.php just delete the sidebar code that should say like
    <?php get_sidebar in the template.

    2. You can follow this tutorial on this website to replace the voice count with a views count.

    Adding Topics View Counter in BBPress

    there are other ways to display views in bbpress also like by using this plugin

    https://wordpress.org/plugins/bbpress-simple-view-counts/

    3. Are you talking about the layout of the reply author area on ip board where it shows an image based on user role and the total post count of the user??

    images based on forum role i cant find a solution just yet , might post solution later . Its most likey just going to include alot of conditionals based on forum role.

    total post count for users is easy, you can easily just use robins plugin

    https://wordpress.org/plugins/bbp-topic-count/

    #152699
    arno8
    Participant

    Still no clue where to add `$reply_id = bbp_get_reply_id( $reply_id );
    $abc_role = bbp_get_user_display_role( bbp_get_reply_author_id( $reply_id ) );`

    I tried on the location where u said, like this:

    <div id="post-<?php bbp_reply_id(); ?>" class="bbp-reply-header">
    $reply_id = bbp_get_reply_id( $reply_id );
    $abc_role = bbp_get_user_display_role( bbp_get_reply_author_id( $reply_id ) );
    	<div class="bbp-meta">
    
    		<span class="bbp-reply-post-date"><?php bbp_reply_post_date(); ?></span>
    
    		<?php if ( bbp_is_single_user_replies() ) : ?>
    
    			<span class="bbp-header">
    				<?php _e( 'in reply to: ', 'bbpress' ); ?>
    				<a class="bbp-topic-permalink" href="<?php bbp_topic_permalink( bbp_get_reply_topic_id() ); ?>"><?php bbp_topic_title( bbp_get_reply_topic_id() ); ?></a>
    			</span>
    
    		<?php endif; ?>
    
    		<a href="<?php bbp_reply_url(); ?>" class="bbp-reply-permalink">#<?php bbp_reply_id(); ?></a>
    
    		<?php do_action( 'bbp_theme_before_reply_admin_links' ); ?>
    
    		<?php bbp_reply_admin_links(); ?>
    
    		<?php do_action( 'bbp_theme_after_reply_admin_links' ); ?>
    
    	</div><!-- .bbp-meta -->
    
    </div><!-- #post-<?php bbp_reply_id();?>-->

    But this just shows the custom code on the website instead of running it.

    please help on this šŸ™‚

    #152695
    Robkk
    Moderator

    well a topic form should already be in content-single-forum.php

    its called with

    <?php bbp_get_template_part( 'form', 'topic' ); ?>

    #152694
    Robkk
    Moderator

    -well i have not tried this but to disable any link on a post appearing you can go to settings>disscussion and then change the number of links to 1. So that you arent totally stripping links and only trying to only allow approved links like youtube.com from appearing.

    Hold a comment in the queue if it contains [1] or more links. (A common characteristic of comment spam is a large number of hyperlinks.)

    yes i know this is usually for comments but ive read some of these settings are either working on bbpress now or in the future.

    -you can also just strip the links from either working by using this function.
    plop it into your child themes funcitons.php or a functionality plugin.

    add_filter( 'bbp_kses_allowed_tags', 'ntwb_bbpress_custom_kses_allowed_tags' );
     
    function ntwb_bbpress_custom_kses_allowed_tags() {
    	return array(
     
    		// Links
    		'a'          => array(
    			'class'    => false,
    			'href'     => false,
    			'title'    => false,
    			'rel'      => false,
    			'class'    => false,
    			'target'    => false,
    		),
     
    		// Quotes
    		'blockquote' => array(
    			'cite'     => true,
    		),
     
    		// Span
    		'span'             => array(
    			'class'     => true,
    		),
    		
    		// Code
    		'code'       => array(),
    		'pre'        => array(
    			'class'  => true,
    		),
     
    		// Formatting
    		'em'         => array(),
    		'strong'     => array(),
    		'del'        => array(
    			'datetime' => true,
    		),
     
    		// Lists
    		'ul'         => array(),
    		'ol'         => array(
    			'start'    => true,
    		),
    		'li'         => array(),
     
    		// Images
    		'img'        => array(
    			'class'    => true,
    			'src'      => true,
    			'border'   => true,
    			'alt'      => true,
    			'height'   => true,
    			'width'    => true,
    		),
     
    		// Tables
    		'table'      => array(
    			'align'    => true,
    			'bgcolor'  => true,
    			'border'   => true,
    		),
    		'tbody'      => array(
    			'align'    => true,
    			'valign'   => true,
    		),
    		'td'         => array(
    			'align'    => true,
    			'valign'   => true,
    		),
    		'tfoot'      => array(
    			'align'    => true,
    			'valign'   => true,
    		),
    		'th'         => array(
    			'align'    => true,
    			'valign'   => true,
    		),
    		'thead'      => array(
    			'align'    => true,
    			'valign'   => true,
    		),
    		'tr'         => array(
    			'align'    => true,
    			'valign'   => true,
    		)
    	);
    }

    you might just delete all of the code specified for the a tag too and you will be fine

    delete

    // Links
    		'a'          => array(
    			'class'    => false,
    			'href'     => false,
    			'title'    => false,
    			'rel'      => false,
    			'class'    => false,
    			'target'    => false,
    		),
    #152693
    Robkk
    Moderator

    well you can check out this topic and maybe it will help

    How to change Admin Reply

    when schmoos code has .user-id-1 well thats the id of the user

    go to user>all users search for all your sites keymasters.

    then click edit by each users avatar

    after that you are in the edit profile page for that particular user and in the url it says user_id=(number)

    get all the user id numbers and then you can stack them using commas in a css code like this

    .type-reply.user-id-1,.type-reply.user-id-2,.type-reply.user-id-3 { background: yellow; }

    Robkk
    Moderator

    i liked https://wordpress.org/plugins/oa-social-login/ before i went to another solution
    im not sure if it has integration with bbpress or not though.
    and this requires an account to their website.

    https://wordpress.org/plugins/loginradius-for-wordpress has bad support and i couldnt get the plugin to work well when i tried it.

    you can also find some paid social login plugins in codecanyon , im for sure there is one that offers social login and has compatibility with bbpress. I think it cost like 28 dollars or something close to that.

Viewing 25 results - 10,501 through 10,525 (of 32,504 total)
Skip to toolbar