Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 7,651 through 7,675 (of 32,519 total)
  • Author
    Search Results
  • guillaumemolter
    Participant

    An even better solution is to use WordPress built-in return false shortcut, this way you don’t have to create a empty function each time.

    add_filter( 'bbp_get_single_forum_description', '__return_false' );
    add_filter( 'bbp_get_single_topic_description', '__return_false' );
    #167640
    DevynCJohnson
    Participant

    @Robkk , not necessarily. The “fix” is not 100% perfect because it removes “nofollow”s that I intend to keep for external domains/links. Also, if I were to write an article about nofollow, then any code examples I give will lose

    rel="nofollow"

    The fix I provided is a poor fix. True, it solves my problem at the cost of a much lesser evil (in my opinion). I still hope that someone can provide a real solution or explain where the nofollow is coming from. Until then, at least I have a fix which is better than no fix.

    Considering that I commented out those lines in the bbPress plugin, one would think that that would fix everything.

    Robkk
    Moderator

    Are you talking about running the purge previous import tool having an issue or really in the reset forums area.

    It is best to run the purge previous import after importing a forum and failing.

    Use this if an import failed and you want to remove that incomplete data.

    IF the reset forums tool does not do it, I guess you can try some SQL code in phpMyAdmin.

    You can try to see if @netwebs commment can help you

    https://bbpress.org/forums/topic/post-import-cleanup-help-needed/#post-133482

    Also if you regularly backup your site, you can just revert to a previous backup before you did the import. You should make regular backups if you are not doing so already too.

    Pascal Casier
    Moderator

    If it’s really not working anymore, you could delete directly forums, topics and replies from the DB and then run the reset again.

    USE WITH CAUTION

    DELETE a,b,c FROM wp_posts a
    LEFT JOIN wp_term_relationships b ON (a.ID=b.object_id)
    LEFT JOIN wp_postmeta c ON (a.ID=c.post_id)
    WHERE a.post_type IN ('forum', 'topic', 'reply')

    USE WITH CAUTION

    Pascal Casier
    Moderator

    First of all, a good database/site backup is always a starting point of course.
    Then I suppose you followed the steps for the data cleanup here: https://codex.bbpress.org/getting-started/installing-bbpress/deleting-bbpress/ ?

    Is your WordPress still working fine since the cleanup that ‘failed’ ?

    Pascal.

    #167618
    Robkk
    Moderator

    @phamdacloc

    Glad you found the solution to your issue. Sorry i wasn’t much help, it is hard to know every single function in the plugin. I am digging in the code more and more though.

    #167617
    Pascal Casier
    Moderator

    Hi,

    If it can help, check shortcodes. The 2nd one could be your starting point:
    [bbp-topic-tags] – Display a tag cloud of all topic tags.
    [bbp-single-tag id=$tag_id] – Display a list of all topics associated with a specific tag. eg. [bbp-single-tag id=64]

    See https://codex.bbpress.org/features/shortcodes/

    Pascal.

    #167614
    mica123
    Participant

    I don’t think this is the local caching problem because I tested it on both my laptop and netbook at home. I don’t have this problem when I test it on my site which I set up locally on my computer in xampp. This happens only on the live site.
    I don’t think this is related to your redirect code. So this is a huge unexpected setback – what a shame! It doesn’t seem there is an easy solution and that I have to battle it out with the webhost provider who may not be knowledgeable about this at all.

    #167613

    In reply to: Doubled title issue

    Pascal Casier
    Moderator

    Buongiorno Rendall,

    I quickly had a check in the sourcecode of the page and it seems the RT Theme is doubling the information. I also saw that your forum is cut on the right side of the screen.
    Any possibility to switch to a more standard theme to make sure the theme is not to blame ?

    How did you setup the forum ? Using a shortcut ? Any extra plugins concerning bbPress installed ?

    A presto,
    Pascal.

    #167608
    Robkk
    Moderator

    @mica123

    Just making sure. It just something a user may not know at first.

    I don’t think there is a caching problem during logins?? Maybe you just refreshed a page a few times and the cache recollected again.

    I don’t really have a cache plugin to recommend, I guess just make sure that they are popular and have great support for any issues that may come up, other than that make sure they fit your needs.

    It depends on your webhost really if you rather use their caching system, some hosts like WP engine strongly encourage users to use their system, and it is pretty good.

    If you really think my login redirect code I gave you is causing the issue, you can remove it while you are trying to find this cache issue.

    #167596
    Robkk
    Moderator

    I think bbPress just uses the code from WordPress since the topic tag clouds code is close to WordPress’s version for regular posts.

    You can see the tag cloud on hover displays the number of topics.

    https://bbpress.org/forums/

    I tried searching what it was, but couldn’t really pinpoint the exact function.

    #167592
    Robkk
    Moderator

    You can use this php Code function instead if you are not using BuddyPress. Make sure to place it in your child themes functions.php file or in a functionality plugin.

    What it does is redirect non-logged in users from see user profile pages to the default WordPress login page.

    You can change the page by editing

    site_url('wp-login.php');

    to something like this if you have a yoursite.com/login page instead.

    site_url('/login/');

    function rkk_restrict_bbp_user_pages() {
    
        if ( ! is_user_logged_in() ) {
    
           if ( bbp_is_single_user() ) {
    
                        $url = site_url('wp-login.php');
    
                            // Send them to the new URL
                        wp_redirect( $url );
    
                        exit;
    	}
        }
    }
    add_action( 'template_redirect', 'rkk_restrict_bbp_user_pages');
    #167589
    Robkk
    Moderator

    To enqueue files in your child theme use get_stylesheet_directory_uri.

    Put the custom login stylesheets into your child theme named style-login.css or whatever you want to call it, and in the function use get_stylesheet_directory_uri instead of template_directory.

    https://codex.wordpress.org/Function_Reference/get_stylesheet_directory_uri

    Will check out the other topic in a minute.

    #167582
    laberkopp
    Participant

    Thanks casiepa!

    I hoped for a solution without coding, but it seems I need to start digging into the fundaments of WP and bbpress.

    I will go for the @robin-w solution first, as from the other one I didn’t even get where to put the code and what kleo should be.

    So thanks again, I will get back here as soon as I have something to report.

    Best wishes,
    Sascha

    #167581
    Robkk
    Moderator

    Robkk, that plugin has not been update for a long while.

    Its just about a year old. It is an extremely small plugin that uses the bbPress hooks and filters and most of the code is for the options in the plugin. You can contact the plugin developer in the support forum if you have concerns about it.

    You can also go with what @tecca said and just do simple template edits. Just make sure you have copied the templates into your child theme.

    And you could just not use ads on the forums, there are other places you can put them.

    #167578
    DevynCJohnson
    Participant

    As a temporary (but poor fix) the below code can be added to “functions.php”.

    //Remove nofollow
    function rm_nofollow($txt){
        $txt=str_replace(' rel="nofollow"','',$txt);
        return $txt;
    }
    add_filter('bbp_get_topic_content','rm_nofollow',20);
    add_filter('bbp_get_reply_content','rm_nofollow',20);
    #167577
    Tecca
    Participant

    Does the plugin not work as intended @utahman1971, or you haven’t tried it because it hasn’t been updated for a while? From what I see, it probably hasn’t been updated because bbPress hasn’t changed enough to warrant the plugin being updated (ie, it stills works with the current version).

    If that’s not the case and it simply doesn’t work or has some sort of vulnerability, you could always ask which templates to paste your ad codes in. I prefer doing that over adding yet another plugin that might break during upgrades. With ad codes being touched so little, template edits seem appropriate enough for the job.

    #167575
    mica123
    Participant

    Actually,I may be getting somewhere. When I log in as admin, it gets me to the backend, then I type the address mysite.com/forums – then I see that I am not logged in. However, when I type in: mysite.com/forums/community – then I am logged in on that page.
    I wonder if it has anything to do with the redirect I have in functions:

    function rkk_login_redirect($redirect_to, $request, $user) {
        return (is_array($user->roles) && in_array('administrator', $user->roles)) ? admin_url() : site_url('/forums/');
    } 
    add_filter('login_redirect', 'rkk_login_redirect', 10, 3);

    You can see that discussion I had with @robkk here

    I’ll do more testing tomorrow.

    #167572
    DevynCJohnson
    Participant

    How can I prevent “nofollow” from being added to my internal links on bbPress posts? (I have the latest version of bbPress and WordPress)

    The “nofollow” attribute is being added to my internal links on my website (DCJTech.info). However, this issue only occurs on bbPress posts, but not WordPress pages. Here is an example of the problem (bbPress post) – http://dcjtech.info/topic/general-unixoid-topics/

    I have tried commenting out the below lines from ./includes/core/filters.php, but without success. I also cleared the cache (server and browser) and waited a minute before checking the page’s source code.

    add_filter( 'bbp_get_reply_content', 'bbp_rel_nofollow',   50   );
    add_filter( 'bbp_get_topic_content', 'bbp_rel_nofollow',   50   );

    I used ‘grep -r -e “follow” ./plugins‘ to find all code that may be inserting “nofollow”, and I also searched my theme and mu-plugins. In addition, I searched my SQL database (via phpMyAdmin) for “follow”. I did not find any plugin, setting, etc. that could be causing this problem. There were no “nofollow” attributes in the posts either. I also searched my plugins for “bbp_rel_nofollow”.

    I disabled “External Links” and commented out the previously mentioned bbPress code (and cleared the cache), but the “nofollow” attribute was still on my internal links.

    I thoroughly checked the WordPress codex website, forums (like https://bbpress.org/forums/topic/turning-no-follow-links-to-do-follow/ ), etc., but I cannot find a solution or cause.

    #167570
    xmastrspy
    Participant

    Hello total noob here. I am having an issue with implementing bbpress forums into WordPress. This is the first time (besides collage 20+ years ago) that I have messed around with websites. So please excuse my ignorance and incorrect terminology.

    versions:
    Wordpress 3.2.1
    bbPress 2.5.8
    Theme Tesseract 2
    Turnkey WordPress Vmware virtual appliance ip 192.168.1.230

    The problem I am having is:

    I created a page that would hold my forums called MOUSE (named it mouse to stop confusing myself) so 192.168.1.230/mouse. On that edit page for mouse, I added a row and inside that that row I have 2 virtual editors widgets. Inside one widget, I have the “bbPress Form list”. In the other widget I have added this bit of code. “[bbp-forum-index]”

    When I go to 192.168.1.230/mouse I see a page that has the Page Attributes, forums list, and formatted exactly how I want it. Its when I click a forum topic that everything changes. The URL changes to 192.168.1.230/forums/forums/theforumtopic and all formatting has been lost.

    Obviously this is not the behavior I want, but I have no idea how to ask to fix it or what is not working. I know I am not able to easily edit the 192.168.1.230/forum. And by edit I mean not able to add rows and widgets or able to change any page attributes. What I would like is when i go to 192.168.1.230/mouse/theforumtopic that it carry’s forward any type of formatting I did for the page /mouse

    No idea if that makes any since to you guys. If it does, can you offer any suggestions or something I could look up to fix the issue? I am not sure what the exact problem is so its really hard to search for an answer! lol 🙂

    Thanks

    #167568
    Pascal Casier
    Moderator

    Guten Abend laberkopp,

    @robin-w

    I checked your profile picture and I think I have seen you before 🙂

    bbPress profiles are open by default to all, so also users that are not logged in could see your profile. I know Robin has made a quick patch for a previous version (http://www.rewweb.co.uk/bbpress-making-profile-pages-private/) but I’m not sure if it’s still valid for the current version.

    Some other (untested!) snippets can be found here: http://seventhqueen.com/blog/code-snippets/restrict-guest-users-from-accessing-buddypress-or-bbpress-pages.html

    Regards, Pascal.

    #167564
    Pascal Casier
    Moderator

    Well, I have something that COULD help you. Let me see if I can extract it and put it somewhere on my site. It worked for me, but is pure database access ! So you will have to make a full backup of your site before and maybe review the code to make sure it works on your environment. So no guarantees !

    But I’m busy on another project now, so I might need some days/weeks, depending of how fast I go with the current one.

    Pascal.

    mvaneijgen
    Participant

    I want to show the forum name in my topic page title. I have searched up and down the googles, but with no luck. I use the Yoast SEO plugin and want %%title%% %%sep%% {{ forum-title }} %%sep%% %%sitename%%, but where do I find the {{ forum-title }} variables?

    #167550
    Robkk
    Moderator

    Can you assign topic tags in a regular forum?
    Can you assign topic tags in a group forum?
    Have you tried creating custom roles?
    Have you installed a user role editing plugin?
    Have you ran any repair tools in Tools > Forums yet, especially the Remap existing users to default forum roles one?

    Have you tried most of the basic troubleshooting steps already?

    Troubleshooting

    #167548
    tashmash
    Participant

    OK. I have now pasted the code into my child themes style.css but I still don’t have a border showing.

Viewing 25 results - 7,651 through 7,675 (of 32,519 total)
Skip to toolbar