Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 10,176 through 10,200 (of 32,519 total)
  • Author
    Search Results
  • Robin W
    Moderator

    sorry, there is a very minor error, a missing _

    add_filter( 'bbp_get_dynamic_roles', 'add_new roles', 1 );
    

    should read

    add_filter( 'bbp_get_dynamic_roles', 'add_new_roles', 1 );

    I’ll update the codex!

    Preston
    Participant

    I’m just using the code copied right off the page at the moment: http://pastebin.com/qVFx300V

    Originally, I edited it to suit my needs, but I thought the error came about because of my editing.

    #154419
    Robin W
    Moderator

    The template you choose in the page only applies to that page, you need to set up the file as bbpress.php to get it used throughout (I don’t write bbpress so can’t tell you why!)

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

    Robin W
    Moderator

    functions file should be fine.

    Can you post the exact code you put in the file.

    #154412
    Preston
    Participant

    One last follow up for anyone who comes across this later on.

    For the select drop downs on the edit page, I decided to “cheat” with jQuery to make sure the correct value is still selected.

    This is the code in my functions.php file that creates the select input:

    $play_os = get_post_meta( $topic_id, 'bbp_app_character_playos', true);
    echo '<br><label for="bbp_app_character_playos">Select Input Label</label><br>';
    echo '<select id="bbp_app_character_playos" name="bbp_app_character_playos" data-value="' . $play_os . '">
        <option value="Yes" class="os-yes">Yes</option>
        <option value="No" class="os-no">No</option>
    </select>';

    I’m displaying the current value in the data-value attribute so I can use it in the jQuery below:

    function appEditValues(){
        var playOsVal = jQuery('.topic-edit #bbp_app_character_playos').attr('data-value');
        if(playOsVal == "Yes"){
            jQuery('.topic-edit #bbp_app_character_playos').find('.os-yes').attr('selected','selected');
        } else if (playOsVal == "No"){
            jQuery('.topic-edit #bbp_app_character_playos').find('.os-no').attr('selected','selected');
        }
    }

    The jQuery code adds the “selected” attribute to the appropriate option on the edit page, which of course causes that value to be selected and save correctly again when you finish editing.

    Preston
    Participant

    I think that might get me to where I want to be. Assuming if I remove the “spectate” ability they can’t view any topics, but still post a topic.

    When I implement the second set of code (for Creating New Roles) from this page: https://codex.bbpress.org/custom-capabilities/. I get the following error in the admin area:
    Warning: call_user_func_array() expects parameter 1 to be a valid callback, function ‘add_new roles’ not found or invalid function name in /wp-includes/plugin.php on line 214

    I thought it might be a conflict with the plugins I had installed, but disabling them didn’t solve anything. I assume the code is supposed to go into my functions.php file? That’s where I tried it anyway.

    Thanks for the help.

    #154406
    roysmyth
    Participant

    bbPress forums play an important part in an outdoor recreation club site I administer. Members make heavy use of notification emails to be informed of changes in scheduled events.

    Html entities in notification emails annoy the members. The members are non-technical. They don’t understand why characters such as & ‘ and – are replaced with strange codes in email.

    The fix is trivial, apply html_entity_decode() to the subject and message body before sending. I don’t see any security risk in this. (Someone please let me know if there is a risk; I’m using this fix on the site.)

    Can this be added to bbPress?

    #154404
    Robkk
    Moderator

    Perhaps it is related to the toolbar in bbPress?

    what do you mean??

    the toolbar just puts out basic html, i dont have an idea why it would be causing the problem.

    if you think adding a bbcode plugin will make that bbpress quicktags toolbar use the bbcode instead that wont happen you need some custom functions.

    and just in case you didnt know to use the bbcode you have to manually write something like this

    [youtube] https://www.youtube.com/watch?v=lwW_WrAk4Kk [/youtube]

    #154399
    readwriteandedit
    Participant

    I’m trying to format the background and the border for the lead topic, just as you’ve done here in the bbPress forum. I used Firebug to see your code, which is

    #bbpress-forums ul.bbp-lead-topic li.bbp-body {
        border: 1px solid #dd6;
    }
    #bbpress-forums ul.bbp-lead-topic li.bbp-body div.topic {
        background-color: #0099FF;
    }

    But when I add this to my child theme’s CSS (where I’ve successfully made other bbPress changes), nothing changes.

    I don’t know if something else I’ve changed is preventing this from changing or maybe if you have something in the setup that I don’t have, something that allows you to style this in CSS when I can’t.

    Any suggestions? The forum is private, but I can get you in temporarily, if that would help. Or I could paste into a comment all the changes to bbPress I made in my CSS.

    (Note: I changed your color for testing purposes)

    Thanks for any help you can give me.

    Beth

    #154398
    Robkk
    Moderator

    @pilxy i can see on my mobile device but not really on desktop

    and you should just revert any changes you made that involves this issue ,and just wait until your theme author updates the theme.

    like i said the main problem is that the div class that they used for the reply link in the comments section is just .reply and to make sure it doesnt have conflicts with bbPress it should be just like .comment-reply or any other class besides .reply .

    And when they use .reply a they could have just used .comment-reply-link since thats the a class

    there is some css that needs to be fixed that uses .reply , in the style.css and some in the rtl.css

    and there is also probably some css in the mobile stylesheet

    there is a function that uses .reply a and .reply a:hover in the custom-styles.php file.

    all these things and probably more if i missed something need to be changed

    #154392

    In reply to: Split page?

    dxlwebs
    Participant

    thank you so much for your support with that link in the end i ported the code from an original wp theme(stock with the install) into a file called bbpress.php and inserted that file into the custom theme im using, i also removed the edit function from the original code as its not required on that page.

    my next question if i can is that that page shows its name in the tab as kixeyeunion.uk/forums instead of saying Forums is there anyway to change that?

    Robin W
    Moderator

    see

    https://codex.bbpress.org/bbpress-user-roles-and-capabilities/

    and

    Custom Capabilities

    you need to play with setting up some new roles probably one that has topic capabilities but not reply capabilities, and setting that to the default.

    #154385
    Preston
    Participant

    Thanks, I got it figured out as far as text fields keeping content when editing.

    I changed the start of my bbp_applications_fields to the following (in case anyone comes accross this thread):

    function bbp_application_fields() {
    	$forum_id = bbp_get_forum_id();
    	$application_forum_id = 34;
    	$topic_id = bbp_get_topic_id();
    	$topic_edit_id = bbp_get_topic_forum_id( $topic_id );
    	if( $forum_id == $application_forum_id || $topic_edit_id == $application_forum_id ) {

    My select fields still don’t retain their content when editing, but I suspect that’s due to some jQuery I’m using to show/hide certain options based on other select boxes.

    **EDIT**
    It looks like none of the select fields come back with their saved value, just whatever the starter value is. I’ll keep playing around with it.

    #154382

    In reply to: Forum Page Not Found

    aniaorome
    Participant

    Solved it!

    For future reference, try commenting everything in your custom theme functions.php file.

    In my case, the problem came from a custom pre_get_posts action hook.

    Good luck!

    #154359

    In reply to: Split page?

    Robkk
    Moderator
    #154358
    Robkk
    Moderator

    ok on this you have to contact your theme author and tell them to change this in your theme in its next update.

    in file style.css on line 1475 change .reply a {

    to a.comment-reply-link {

    in the file custom-styles.php in parabola/includes/custom-styles.php
    on line 212 and 213 change

    .reply a { to a.comment-reply-link {

    and .reply a:hover { to a.comment-reply-link:hover {

    they should also change the .reply div class to something else maybe like .comment-reply

    because bbPress has a .reply for all of its replies

    #154351
    Robkk
    Moderator

    @pilxy

    you need to change this css code to make sure its only shows in the comments/replies content.

    im not so sure on how to do this one.

    contact your theme author

    i just checked and they use bbPress for their support forums.

    im sure they would help more than i can right now.

    #154349
    Robkk
    Moderator

    whatever thats in your css that starts with

    .reply a

    is causing the problem.

    #154348

    In reply to: Quicktags out of line

    Robkk
    Moderator

    I’ve also noticed my ‘Submit’ button is way further down the page and out of line with the ‘Tags’ input box, any ideas here too?

    thats normal , you can see it is aligned on bbpress.org because thats something custom.

    bbpress.org uses this css …i guess you can go off of it as an example.
    but it causes an issue on smaller device sizes this will make it collide with the tags input.
    you will need additional media query css to make it look better on smaller devices.

    #bbpress-forums .bbp-reply-form fieldset.bbp-form button {
    float: right;
    margin-top: -120px;
    }

    I can’t also seem to make the quicktags bar the correct width, always seems to over-run the width despite me trying lots of different styles etc.

    you can fiddle with the padding but the below css will not make it over-run.

    #bbpress-forums div.bbp-the-content-wrapper div.quicktags-toolbar {
    padding: 5px 0;
    min-height: 30px;
    width: 100%;
    float: left;
    }

    I’ve still not found how to deal with the strange ‘e’ character,

    i asked if you edited any templates , i didnt really get an answer but if you did,

    it could be an edited reply-form.php and a topic-form.php .

    so if you already copied these files to your child theme, check them out and see if you left a stray character somewhere.

    other than that i guess make a bbpress.php if you havent sometimes if users dont it adds some additional stuff that are only suppose to be on blog posts.

    more info about creating a bbpress.php

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

    #154346
    Robkk
    Moderator

    easy way i think would be to just install this and choose the dark color.

    https://wordpress.org/plugins/bbpress-new-ui/

    you can also use this below css and copy it where ever you can put custom css

    jetpack css module
    custom css plugin
    you can find the exact css in bbpress.css and just replace it with the one im posting.

    you can of course change inherit to and other color like black or its hex #000 for example.

    if im missing something please reply back

    /* header and footer that says AUTHOR , POSTS , VOICES, TOPICS , FORUMS */
    
    #bbpress-forums li.bbp-header, 
    #bbpress-forums li.bbp-footer {
    background: inherit!important;
    border-top: 1px solid #eee;
    font-weight: bold;
    padding: 8px;
    text-align: center;
    }
    
    /* this is the background of the forums and topics that display the title, the freshness stats and so on. */
    
    #bbpress-forums li.bbp-body ul.forum, 
    #bbpress-forums li.bbp-body ul.topic {
    border-top: 1px solid #eee;
    overflow: hidden;
    padding: 8px;
    background: inherit;
    }
    
    /* this is the header that shows the post date and post ID */
    
    #bbpress-forums div.bbp-forum-header, 
    #bbpress-forums div.bbp-topic-header, 
    #bbpress-forums div.bbp-reply-header {
    background-color: inherit;
    }
    
    /* try to make these two different types of dark shades if you care about having an AB color pattern of replies/topics/forums. */
    
    #bbpress-forums div.odd, 
    #bbpress-forums ul.odd {
    background-color: inherit;
    }
    
    #bbpress-forums div.even, 
    #bbpress-forums ul.even {
    background-color: inherit;
    }
    #154339
    wookey
    Participant

    I managed to implement a custom function to search by $forum_id and it’s all working and great, and it was done using the instructions from this page.

    What I need is a way to search by user. Here’s what the search by forum function looks like:

    function my_bbp_filter_search_results( $r ){
    	//Get the submitted forum ID (from the hidden field added in step 2)
    	$forum_id = sanitize_title_for_query( $_GET['bbp_search_forum_id'] );
    	//If the forum ID exits, filter the query
    	if( $forum_id && is_numeric( $forum_id ) ){
    		$r['meta_query'] = array(
    			array(
    				'key' => '_bbp_forum_id',
    				'value' => $forum_id,
    				'compare' => '=',
    			)
    		);
    	}
    	return $r;
    }
    add_filter( 'bbp_after_has_search_results_parse_args' , 'my_bbp_filter_search_results' );

    I tried changing all instances of the word “forum” to the word “user”, but no dice. I tried doing searches like this:
    http://mysite.com/search/?bbp_search=testword&bbp_search_user_id=123

    But nothing I does works and I’ve spent many hours tearing my hair out trying to get it working. I would hugely appreciate any assistance making it happen.
    Thanks

    #154337
    Robkk
    Moderator

    Why would some one pay for support on a non working plugin lol

    its works for other users

    I dont have caching but with all plugins deactivated other then the ones needed for forums its not working

    again im just trying to bring up possible conflicts that might be causing the issue.

    or just give up on having bbCode.

    well i guess you just tell your users that your site has oembed and it can be used in the forums as long as you have Auto-embed Links checked in the forum settings.

    and that any youtube/vimeo video link will automatically embed
    imgur/flickr will automatically embed and so on.

    images from other sources can use the img button in the quicktags toolbar

    and options like bold/italicize/link/block-quote can be used from the quicktags toolbar.

    we have been using block-quote button back and forth so to replace quotes you can do that too.

    list of available oembed providers

    https://codex.wordpress.org/Embeds

    more on forum settings

    https://codex.bbpress.org/forum-settings/

    #154333
    atfpodcast
    Participant

    probably , the guy does have a separate support forum just for premium plugin users

    he might just be busy and more concentrated over there more since the plugin provides income for him

    Why would some one pay for support on a non working plugin lol

    i tested the plugin in the latest firefox and chrome , not IE though.

    it could be a cache system/plugin or a minify plugin minifying the direct quotes plugins javascript wrong but im just guessing right now.

    I dont have caching but with all plugins deactivated other then the ones needed for forums its not working

    i would say contact as much people as you can to help solve the issue.

    or just give up on having bbCode.

    #154331
    Robin W
    Moderator

    1) just use the

    [bbp-single-forum id=$forum_id] – Display a single forums topics. eg. [bbp-single-forum id=32]
    

    shortcode on the page to do that

    2) That can all be done using coding, but would require a lot of code and expertise both within bbpress/wordpress and to link it to a payment product to take the money, and you’ll lose a lot of revenue in commission on 75p payments on say payal, who take a 20p a transaction charge as well as 3.4% commission.

    Ballpark say £100-£200 for a coder to write that all for you (without looking that’s the sort of figure I’d expect to charge to write that, but it could be a lot more)

    You would do better to look at a ‘membership’ site plugin, and take a payment per say ten ‘ads’, and use something like ‘bbp notify’ to know when they’ve posted, and a simple excel spreadsheet which you manually update. Then suspend membership or block posting when they have used up their limit.

    #154329
    Robin W
    Moderator

    At a guess (and I haven’t checked) I’d say that

    bbp_get_forum_id() 
    

    works for a new topic, but returns a null when editing, hense your ‘==’ is never fulfilled.

    Since you should have $topic_id set in either case, maybe try something like

    $forum_id = bbp_get_topic_forum_id( $topic_id );
    

    to get the forum or just use that if editing?

    Have a play and see if that fixes.

Viewing 25 results - 10,176 through 10,200 (of 32,519 total)
Skip to toolbar