Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 12,201 through 12,225 (of 32,504 total)
  • Author
    Search Results
  • Robin W
    Moderator

    glad to have someone else looking !

    My ajax is hopeless !

    Your solution is valid, but digging for it produced some code issue

    we have several issues here

    firstly the filter call is wrong in the code ie

    bbpress/includes/topics/template.php has two errors

    function bbp_get_topic_subscription_link( $args = array() ) {
    ......Parse the arguments......
    		), 'get_forum_subscribe_link' );

    so the function is ‘get_topic_subscription’ but the parse argument reverts to ‘get_forum_subscribe

    whilst it doesn’t affect this issue the error is repeated for favorites in the same file

    function bbp_get_topic_favorite_link( $args = array() ) {
    ..........), 'get_forum_favorite_link' );
    

    needs changing to ‘get_topic_favorite_link’`

    This doesn’t affect the issue as such, other than the filters above are wrong.

    But filtering bbp_get_topic_subscription_link is totally pointless, as it immediately calls
    ‘get_user_subscribe_link’ which them resets the |, so whilst the filter seems to correct it once, any click just resets it.

    So your filter to get_user_subscribe_link is the correct one, but for the wrong reason.

    Really the code needs to have the filter in one place only (suspect user)

    Anyway the solution for @majid436 is as you suggest

    function hide_before3 ($args = array() ) {
    $args['before'] = '';
    return $args;
    }
    add_filter ('bbp_before_get_user_subscribe_link_parse_args','hide_before3');
    
    #144713
    Equisbono
    Participant

    Hello,

    I have looked everywhere and could not find an answer.

    I found other things like putting the link in a menu item.

    But, what I wanna do is redirect the user profile page. I do not want to use bbPressยด.

    So, to be specific. I am using UPME, a premium wordpress theme from Codecanyon.

    And the profile link for this plugin (User Profiles Made Easy) is:

    http://codeboy.co/profile/username

    So I want to get rid of the bbPress user profile that appears in the forums and when a user creates a debate/post it will automatically link there, link:

    http://codeboy.co/forums/users/Codeboy/

    I want it to link here instead:

    http://codeboy.co/profile/username

    So from plain view it looks like I would just need to change this link in some php file of bbPress, yet I have not had any luck after many hours of headaches.

    Could somebody please help me?

    Thanks!

    #144712

    In reply to: Tags

    batmanfan
    Participant

    I tried here… bbpress/includes/common/shortcodes.php

    though I entered ‘smallest’ => 11, and ‘largest’ => 20,

    the font size only show 11 on all โ€“ same size. Did I do something wrong? I thought it would randomly display 11 to 20?

    tharsheblows
    Participant

    I think this is going to be less than helpful for you, I’m sorry.

    I’m not sure but it doesn’t look like / I can’t find where bbp_notify_forum_subscribers (the function that sends emails to subscribers) is hooked into the admin topic post save. What I mean is, you’re right, the subscriptions don’t seem to sent if you create a new topic in admin. (I could be completely wrong about this and just missed something though.)

    Anyway, I’m just going to write down where I would start if that is the case because I hope that I can come back to this in a bit or someone else will and otherwise I’ll forget (I’m off on holiday tomorrow). I would say to hook it into save_post but I’m not sure that you can do that because bbp_notify_forum_subscribers doesn’t check post type so would run on any post type save.

    So something like this: https://codex.wordpress.org/Plugin_API/Action_Reference/save_post#Custom_Post_Type:_.27book.27 I mean the write a function that checks for post type bit and call bbp_notify_forum_subscribers.

    And do the same thing with the reply post type, too (but with bbp_notify_subscribers).

    If this gets moved to trac, it would be easier to change those two functions to check for post type first thing and hook them both directly into save_post rather than the way above.

    Again, I might just be missing where it’s hooked in. I hope that I’m missing something obvious and it’s an easy fix! ๐Ÿ™‚

    tharsheblows
    Participant

    I think it’s the ajax call that’s doing it. So you would need to filter the bbp_get_user_subscribe_likelink like this – this also includes the bits to change your subscribe and unsubscribe links:

    function hide_before2 ($args = array() ) {
    $args['before'] = '&nbsp';
    $args['subscribe'] = 'Click to receive an email notification when a member responds below';  
    $args['unsubscribe'] = 'Unsubscribe'; // or whatever
     
     return $args;
    } 
    
    add_filter('bbp_before_get_user_subscribe_link_parse_args', 'hide_before2');
    #144683
    Stephen Edgar
    Keymaster

    Thanks, I created ticket #2580 and we’ll take a look.

    As I stated in that ticket they are stored as a serialized array in wp_options.wp_user_roles

    #144680
    Stephen Edgar
    Keymaster

    I am writing something to add a one-click unsubscribe link for the subscription emails, so need them to be unique for each recipient in that respect.

    Ok, I follow you now, cool idea ๐Ÿ™‚ If you ‘hack’ core it will break when you upgrade bbPress. ๐Ÿ™

    I presume you want the individual email so each link is unique and the user does not have to be logged in to unsubscribe?

    So maybe create a ticket on Trac with a patch to have bbp_notify_subscribers fire after the redirect.

    #144678
    Stephen Edgar
    Keymaster

    I suppose that would work, though with the updates of the above code in bbPress 2.6 the performance cost of creating a separate email for each individually subscribed user has been removed and the impact of this before or after the redirect would be minimal.

    Your original post:

    I am working on a one-click unsubscribe link that will need to use the old way of sending the emails individually.

    Essentially by doing this you will reintroduce the bottle neck that we just removed :/

    Why do you need to create the emails individually?

    Creating a single email with the recipients BCC’d gets the email to every subscriber from the ‘list of topic subscribers’ with only a single email and is far more efficient than creating an individual email for every subscriber.

    #144677
    tharsheblows
    Participant

    Oh no, I know that – I am doing a somewhat bad thing and suggesting that I add in a hook to line 447 (ish – after line 446 at any rate and before the current line 448) eg — I want the mail send to happen *after* the page redirects:

    do_action( 'bbp_after_new_reply', $reply_id, $topic_id, $forum_id, $anonymous_data, $reply_author, false, $reply_to );

    then in bbp-functions (or something like this)

    remove_action( 'bbp_new_reply',    'bbp_notify_subscribers',                 11, 5 );
    add_action( 'bbp_after_new_reply',    'bbp_notify_subscribers',                 11, 5 );
    #144676
    Stephen Edgar
    Keymaster

    It already is…

    bbp_new_reply_handler as linked above line #426 -> do_action( 'bbp_new_reply'...

    /includes/core/actions.php#L229

    
    229	add_action( 'bbp_new_reply',    'bbp_notify_subscribers',                 11, 5 );
    230	add_action( 'bbp_new_topic',    'bbp_notify_forum_subscribers',           11, 4 );
    
    #144670
    Stephen Edgar
    Keymaster

    @tharsheblows I think your looking at bbp_edit_reply_handler rather than bbp_new_reply_handler, you should be looking here (I think, if I’m following you correctly) scroll up to /includes/replies/functions.php#L426

    #144663
    Stephen Edgar
    Keymaster

    Checkout bbPress’ ‘Conditional Tags’ https://codex.bbpress.org/bbpress-conditional-tags/

    I think they are pretty straight forwardly named so then checkout WordPress’ page and this specific sidebar example:
    https://codex.wordpress.org/Conditional_Tags#Variable_Sidebar_Content

    #144659
    nirgalo
    Participant

    Thanks Stephen. So I managed to get about same design for the forum’s home page, that is forums in a widget on the leftside bar, and recent topics in the page space (using the shortcode). I used a page template in a child theme for this. Now when I open a forum, I want to have forum content as the page (will use bbp-single-forum shortcode), and forum info as the widget in sidebar. But how can I set up thing so a specific sidebar appears when a forum content is being displayed?

    #144650
    Robin W
    Moderator

    Phew ! I read the first post and thought oh dear, then your second came through, glad it’s working.

    I’ll add a settings page to the code so that you can set which page it goes to for future users.

    #144643
    Magic-Komplex
    Participant

    Ok now, I installed your plugin and after spending some time removing another wordpress error I can say it works great, there’s just one problem for me.
    I’m using buddypress login and signup and cannot change to bbpress version of this, cause I’m also using super socializer plugin, which is written for buddypress.
    So now I’m getting a 404 error when I’m not logged in and try to enter one of my forums. I tried to change the permalink of my registration page to “sign-up”, as described in your doc, that didn’t work. I guess this is because I’m using buddypress sign up instead of bbpress.
    About changing the code in the php file, I’m not sure what to change. I tried adding the url of my registration page in line 103, that didn’t work as well.
    Do you have an idea how to fix this?

    #144640
    Robin W
    Moderator

    1. if you need these adding to bbpress roles, then as per previous:

    “what capabilities do you need for the other role?

    see

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

    Itโ€™s quite east to add, just let me know what you need.”
    come back, and I’ll do a quick plugin.

    2. On your rank thing, can you specify

    the rank names you want
    what levels you want them at eg 50 posts
    what counts as a post – ie topic or topics and replies

    and I’ll tinker with the posts plugin to display this instead as a one off, and maybe cut it into a more general plugin later

    lasmanis
    Participant

    Hi all,

    I have a function tied to the filter bbp_theme_before_reply_form_submit_wrapper and I noticed that this function was called twice every time I refreshed the topic page. This happens only when pretty permalinks are on (/%postname%/) and only on FireFox.

    After investigating bbpress and WordPress source code I found out that the template_include filter (found in wp-includes/template-loader.php) is applied twice.

    It only happens on bbpress pages, only on FireFox, only with pretty permalinks on.

    I’m using WordPress 3.8 and bbpress 2.5.3

    I’m using a custom theme but I already tested on TwentyThirteen and I experience the same problem.

    Any help would be appreciated!!!
    Thanks!!

    #144637
    jslom
    Participant

    @peterwsterling No problem, thank you. Will do!

    I could suggest you sell on some of the popular wordpress plugin sites, as the exposure is much greater..

    One of them
    http://codecanyon.net/category/wordpress

    #144624
    MartyWebb
    Participant

    Hello anyone who would like to help. I’d like some assistance, I have the plug-in to insert a chat into my site. In the /community/forums page, it shows the forum index AND the chat at the bottom. But when I go into a forum, it’s forums/forum/*id*, and the nav-tree keeps it in /forums/ not /community/forums. So regardless of that issue, is there a way to make it so each page, and or just the index page shows the forums as they are, and below insert the code for the Ajax-Chat?

    I hope that all made sense, have a great evening and weekend.

    Robin W
    Moderator

    ahh! that’s it

    difference between

    ‘bbp_before_get_topic_subscribe_link_parse_args’

    and

    bbp_before_get_topic_subscription_link_parse_args

    So

    function hide_before2 ($args = array() ) {
    $args['before'] = '';
    return $args;
    }
    add_filter ('bbp_before_get_topic_subscription_link_parse_args','hide_before2');
    

    will do it !

    Majijiboo
    Participant

    Thanks. I entered the below function and it did not fix the issue. Any idea why? Thx.

    
    function hide_before2 ($args = array() ) {
    $args['before'] = '';
    return $args;
    }
    add_filter ('bbp_before_get_topic_subscribe_link_parse_args','hide_before2');
    
    Stephen Edgar
    Keymaster

    Rather than the forum subscribe link we are actually in a topic ๐Ÿ˜‰

    bbPress has the two default links ‘Favorite’ and ‘Subscribe’ seperated by a |

    The default before args forbbp_get_topic_subscription_link is 'before' => ' | ', so the below fork of Robin’s code should do what you need.

    function hide_before ($args = array() ) {
    $args['before'] = '';
    return $args;
    }
    add_filter ('bbp_before_get_topic_subscribe_link_parse_args','hide_before')
    #144611
    Robin W
    Moderator

    what capabilities do you need for the other role?

    see

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

    It’s quite east to add, just let me know what you need.

    On ranking, you can have no. posts quite easily using

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

    #144610

    In reply to: PM button in posts

    Stephen Edgar
    Keymaster

    Do you have BuddyPress and the messaging component activated?

    Also depending on how you have modified your templates you need to make sure that your loop-single-reply.php template has the bbp_theme_after_reply_author_details hook still in place.

    Robin W
    Moderator

    I’ve had a look, but I can’t find what is doing this – must be buried deep

    If you keep toggling the | comes back, so my original code isn’t doing anything.

    The codes resolves as

    <span id=”subscription-toggle”>
    |
    <span id=”subscribe-2072″>
    Click to receive an email notification when a member responds below

    so it’s in the subscription part, but not part of the url.

Viewing 25 results - 12,201 through 12,225 (of 32,504 total)
Skip to toolbar