Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 11,526 through 11,550 (of 32,521 total)
  • Author
    Search Results
  • #148328
    Stephen Edgar
    Keymaster

    Indeed bbPress does this too ๐Ÿ™‚

    Quick answer, copy the templates you need into your theme folder under /bbpress

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

    #148327
    Stephen Edgar
    Keymaster

    I’ve got nothing else at the moment…

    Let me think on it for a bit…

    I also presume you still have all your plugins except bbPress deactivated?

    Also what theme is it you are using?

    Have you any custom code in a functions.php file running?

    #148306
    Stephen Edgar
    Keymaster

    The string Keymaster is being translated to Super Administrator(here)

    If you login to http://translate.wordpress.org using your wordpress.org/bbpress.org username and password you can also suggest an updated translation and the Spanish translation team will review the translation and accept it or not.

    The first link above is for the ‘development’ version of bbPress, upcoming 2.6 release, you should also suggest any translation updates for the current bbPress v2.5 here.

    Once you have done the above you should let the Spanish translation team know:

    Contacto

    #148302
    HW
    Participant

    Hi Robin

    Thank you for the functions code you provided to create a custom role. I’ve implemented this and can see it and change the user to the new role – however it doesn’t save it so if i navigate away from the user page and go back it hasn’t kept the role it just defaults back to nothing until i post and then it puts me on participant (which I have enabled to set automatically for new posters). Would you know why that is happening?

    My initial setup was a template file called forum.php which bbpress automatically picked up as my forum page – I didn’t use override of existing bbpress templates within my theme, however when I made the bbpress-functions.php in my theme folder it made the forum stop using the bbpress styles (not sure why) – so i tried adding the overrides for bbpress in my theme folder and that made it not render any html at all just blank body – I’ve ended up copying the stylesheet to my theme folder and naming it something else.

    I’m looking for a user role half way between a participant and a moderator (I’ve called it a Junior Moderator) where they can moderate and flag things and get in touch with users who flagged inappropriate posts and inform them of the actions as well as receive emails or notifications from users flagging the inappropriate content- but they can’t delete or edit other people’s topics, replies and can’t delete forums or add new ones.

    Any help would be appreciated!

    Thanks

    #148299
    Robin W
    Moderator

    WHat can i do?

    you could post a link to a page that works ๐Ÿ™‚ I just get ‘this page cannot be displayed’

    But also have you read

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

    #148298
    Robin W
    Moderator

    Try adding this to your functions file, it may/should work – have never tried it in a different language !

    //This function changes the text wherever it is quoted
    function change_translate_text( $translated_text ) {
    	if ( $translated_text == 'super administrador' ) {
    	$translated_text = 'administrador';
    	}
    	return $translated_text;
    }
    add_filter( 'gettext', 'change_translate_text', 20 );
    #148296

    Topic: Hi

    in forum Themes
    itisix
    Participant

    I’ve been using wordpress for about 6 months now and I’m using the “luminescent lite” theme. I now decided it was time to move my old phpbb board over to bbpress and I’m struggling a bit with the design. So:

    1 – The theme is universal, so not much chance to change much without hard coding or a new theme

    2 – I use categories and forums and it’s messy. I get:

    Category
    Forum nยบ 1 (14,54) Forum nยบ 2 /1,445 4,754)

    Can I add a paragraph for each forum or even not show the forums at all (they would open on a click on the category).

    3 – No “unread topics” display (icon/different colour)

    Not all is bad. I’m using buddypress and I’m loving it. BBpress ported quite well from phpbb3 and I lost no data at all (except PM’s). Even BBcode is looking good. My users are giving me a hard time, but they are just idiots anyway… lol

    #148280
    Stephen Edgar
    Keymaster

    I’ve not looked at doing do that personally, I saw something recently on adding short codes to WordPress quicktags so you could explore that option (WordPress’ quicktags are the buttons you see here ‘b’, ‘i’ etc)

    Also take a look at the source of bbPress Shortcode Whitelist plugin to see their implementation, and see if you can adapt it for your own needs.

    #148279
    greenhoe
    Participant

    For example I created a shortcode called [card]Card Name[/card] and when you use that shortcode it shows a tooltip for that card, but would like my users to be able to use that in the actual forum.

    #148278
    greenhoe
    Participant

    Thanks Stephan, is there a way to whitelist them manually? I code all the shortcodes myself and I prefer to not use plugins when possible and this seems like something I could do with out a plugin.

    Thanks

    #148273
    Stephen Edgar
    Keymaster

    Try running all the following tools (one by one of course):

    Recalculate the parent topic for each post
    Recalculate the parent forum for each post
    Recalculate private and hidden forums
    Recalculate last activity in each topic and forum
    Recalculate the sticky relationship of each topic
    Recalculate the position of each reply
    Count topics in each forum
    Count replies in each forum
    Count replies in each topic
    Count voices in each topic
    Count spammed & trashed replies in each topic
    Count topics for each user
    Count replies for each user

    That said the topic ID you link to is 9313 and it’s forum ID is 9299 so typically by post ID order the topic is newer than the forum.

    What happens if you move the topic to the correct forum?

    Maybe try create a few test topics and replies in a test forum to see if you can determine exactly what is going on as from what I can see looking at the HTML source everything looks fine though you say it is not ๐Ÿ˜‰

    #148269
    Stephen Edgar
    Keymaster

    No, you cannot use shortcodes within bbPress.

    This is more of a security issue than a technical issue, you don’t want users adding login shortcodes and the like into the content.

    There is a ‘bbPress Shortcode Whitelist’ plugin (It’s in the wordpress.org plugins repo) that will allow you to ‘whitelist’ a list of short codes so you can use the ones you approve.

    greenhoe
    Participant

    I was wondering can I use my normal worpdress shortcodes in bbpress? So my users could take say a certain query shortcode and post in the forums and allow it to work?

    Robin W
    Moderator

    These are exactly the questions I was asking 6 months ago, so I sense your frustration !!

    I was expecting to write some stuff on filtering, but having had a quick look at ‘bbp_new_topic_handler’ this doesn’t have any real filtering capability, although it does have some url filters.

    Fuller than probably needed answer for the benefit of others !
    Ok so you can usually
    either filter a function either using bbp_parse_args where you want to change some paramters that are being passed to wp-query

    or filter the whole function – if it ends with ‘return apply_filters(..)’ then you can easily copy the whole function and alter it within your child theme, just rename it slightly and then add a filter
    so a fictional function called ‘add_name’ in bbpress ends with
    Return apply_filters (‘add_name’, $name) ;

    you simply copy the whole function and change ‘add_name’ to say ‘my_add_name’ then add a line
    add_filter (‘add_name’, ‘my_add_name’)

    and wordpress will use your function to replace the original.

    But for your function, there is a url filter near the edn but otherwise this is a function that does, so no neat parameters that are replaceable at the end !

    I searched bbpress for where this function is used, and in includes/core/actions.php it is added as an action to wherever bbp_post_request is used

    Searching for that gets me a bit confused, as I’m not familiar with what this does, and have limited time to chase it down.

    Now, having written all that as I was going along, if I were you I’d do one of two things

    1. Go further back and find what is calling the function, and then change that. If it is a template, you can alter that in a bbpress folder within your theme to call your function instead, and neither will get overwritten by upgrades.

    2. There is no problem in changing core bbpress files as long as a) you are happy you know what you’re doing and b) you make a note of the changed function.

    Then on each upgrade, you’ll need to look at whether any code in the function has changed, and if not just overwrite it again. If it has changed, then you’ll need to redo your amendment taking into account the new code. But you sometimes need to do that anyway for a child theme function where bbpress is dealing differently with it.

    Yes changing core is ‘frowned’ upon, but only because people do it and then get upset when it is overwritten and they can’t remember what they changed !! Do it with knowledge and you’ll be fine !

    After all it just some code that someone’s written, and any ‘rules’ are just made up and have no authority !

    Jerry
    Participant

    I have a general question. I am trying to modify the behavior of the function bbp_new_topic_handler, which is located in bbpress/includes/topics/functions.php. I use child themes extensively. I have not found a way to modify functions.php within my child theme. After reading the codex, and various searches, I THINK that I need to take the entire function, bbp_new_topic_handler, and re-declare it within bbpress-functions.php. I can’t declare a function twice, so that implies I need to remove it from functions.php within the above mentioned directory. Or perhaps I am on the wrong track?

    What I fear is making changes directly to functions.php and then having those changes wiped out in the next bbpress update. I can’t use filters because I intend to modify how the function works, not just the wording.

    So I suppose my question is as follows: How does one go about making changes to functions within a functions.php file, located in the includes directory? Does someone have a “best practice” recommendation for doing this?

    Thanks.

    #148250
    Stephen Edgar
    Keymaster

    Take a look in includes/forums/template.php around Line#676 at bbp_forum_get_subforums()

    #148247
    Stephen Edgar
    Keymaster

    This is a theme issue, your theme isn’t letting bbPress inject it’s template styles.

    Ceate a file in the root of your theme called bbpress.php and putting the following code into it

    
    <?php
    /**
     * bbPress wrapper template.
     */
    
    get_header(); ?>
    
    <?php while( have_posts() ): the_post(); ?>
    
    	<?php the_content(); ?>
    
    <?php endwhile; ?>
    
    <?php get_footer(); ?>
    
    #148246
    tharsheblows
    Participant

    @robinw – I just came across this too and thought exactly the same as you, that it needed that filter or something like that. I was trying to change the “Topic tags: ” (or something like that) bit of the tags archive pages.

    It was picking up the default taxonomy-topic-tags.php file. This must have been picked up from the plugin default theme, not mine – it’s in /extras in my theme folder but changing it there had no effect, I had to move it out of there to the root of the theme folder. This totally makes sense from a WordPress standpoint but was non-obvious because I was looking in the bbPress folder in my theme.

    ANYWAY it’s sorted now but if someone else comes across it, check for some hidden template. I couldn’t get that filter to work for anything. I tried very very hard to make it work. It didn’t.


    @saulmarq
    – what you can do is make a new page and make the permalink your forum root. So my forum root (in settings) is forums and the page is at example.com/forums. Then use the [bbp-forum-index] shortcode. The gotcha is that this page will *only* use the bbPress template, I think – you can’t make a custom template for it. I might be misremembering that, but I do know you can’t change the default template. Someone tried to tell me this was a good thing, whatever.

    Doing it this way is nice because then you can write an intro like:

    Hi! Welcome to our forums. Dive right in. Post a lot, whoo!

    [bbp-forum-index]

    Stephen Edgar
    Keymaster

    Ha! I just found some replies in the spam queue ๐Ÿ˜‰ Unspammed, those words and abbreviations you used starting with a capital M are very common spam words, I’m not typing them either in case it flags me as spam, anyways, restored and sorry about that ๐Ÿ™‚

    #148207
    zxtonizx
    Participant

    I have a slight fear of updates but I need to just back up my files and get over it. Thanks for the code, worked a treat.

    #148206
    HansRuedi
    Participant

    Thanks Stephen! I will try to get a few lines of code in the BuddyPress forum …

    #148186
    Stephen Edgar
    Keymaster

    Tell them to set WP_DEBUG to false in their wp-config.php define('WP_DEBUG', false); and troubleshoot what the other plugin and/or theme is causing this issue, this is not a bbPress issue per se, it is another theme or plugin doing_it_wrong.

    #148184
    Stephen Edgar
    Keymaster

    Firstly, you should update WordPress to v3.9.1, if you have some reason you must remain using the 3.7.x version upgrade to 3.7.3.

    That said line #1198 of your style.css has the following:

    
    .hentry {
    border-bottom: 2px solid #f7f7f8;
    margin-left: 120px;
    padding-bottom: 15px;
    position: relative;
    }

    You will need to override that for your bbPress forums with a custom entry in a child themes CSS.

    eg.

    
    #bbpress-forums .hentry {
    margin-left: 0px;
    }
    
    #148166
    obinyc
    Participant

    So it looks like I was finally able to get the sidebar to display properly by using the original code for displaying dynamic sidebars.

    <?php if (!function_exists('dynamic_sidebar') || !dynamic_sidebar('Page Sidebar')): endif; ?>

    Once I used this, then the homepage sidebar stopped displaying and the forum-specific sidebar showed up(which I only need to allow people to login).

    What do you think, Robin?

    And thanks for the help!

    #148163
    Robin W
    Moderator

    Getting bbpress to work with the many very clever (too clever!) themes is not always easy

    Ok, we could spend a lot of time getting a forum specific sidebar for your theme, but maybe easiest to get your sidebar working to display in bbpress

    so install widget logic

    https://wordpress.org/plugins/widget-logic/

    Then set up whatever sidebar is being displayed on the bbpress page for all the widgets that you want it to display, both for the homepage and bbpress

    Then you’ll see each widget now has a widget logic condition.

    For items you want to display only on bbpress add the logic

    is_bbpress()
    

    For items say only on a home page add

    is_home()
    

    for items you want on all pages apart from bbpress use

    !is_bbpress()
    

    Come back if anything is not clear

Viewing 25 results - 11,526 through 11,550 (of 32,521 total)
Skip to toolbar