Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 13,401 through 13,425 (of 32,503 total)
  • Author
    Search Results
  • #138986
    Juan Aldasoro
    Participant

    Well, 10 minutes after..I see there’s not much around. Went to the code and did a little tweak. I’m sharing this in case anybody need it:

    
    add_filter( 'is_bbpress', 'my_bbpress_page' );
    
    function my_bbpress_page( $retval = false ){
    	
    	if ( is_page_template( 'my-template.php' ) ) {
    		$retval = true;
    	}
    	
    	return $retval;
    }

    I’ll try and see if I have some time to make some docs around this. Having documentation is the key to have more things around this plugin.

    Best,
    Juan.

    #138983
    Juan Aldasoro
    Participant

    Hello,

    I’m using this function in order to enqueue some custom CSS when a forum related page is loaded.

    The problem is for example, the “New Topic” page – Part of bbPress – gives FALSE when I call is_bbpress()

    Is there any place where I can check about this function besides going through the core code? I’ve searched over the Documentation and couldn’t find anything.

    Thanks,
    Juan.

    #138982
    FreeWPress
    Participant

    I have download this theme (frontier) and opened function.php and i have this line at 344:

    $frontier_content = frontier_option('content_width', 610);

    But if the funtion.php was modified by you or others this line maybe incorrect!!

    #138981
    FreeWPress
    Participant

    you must use a software like phpdesigher to access in ftp and open function file…

    We cant help you if don’t paste here the code.. Sorry!!

    #138976
    williamyap
    Participant

    i did it via dashboard.
    and after i did it on dashboard and i couldn’t do anything about it anymore.
    can’t even go back into wp-admin page.
    is the coding problem.
    but i don’t know how to find the code to get it done. i edit the website full from the dashboard on the web browser.
    please help me robin
    thanks

    #138972
    Robin W
    Moderator

    ok, all you’ve got is some bad code in your functions.php file

    were you customising this file or another? or via the dashboard?

    If you can, post line 344 of the functions.php in your reply, it can be as easy as a comma or semicolon missed.

    #138969
    jsalomone
    Participant

    I had already done all the repairs too, even locked me out when I was remapping existing users to forum roles, got that back by editing in the db though using a backup.

    I have looked at the code and what it does in the end is return true or false in every case, resulting in the showing or not showing of the whole page, not forum elements. And disabling that code completely just skips the check, done that several times, but it didn’t make a difference.

    #138965
    Robin W
    Moderator

    ok, lets try doing a repair on the forums to see if they’ve lost the relationship somewhere
    Dashboard>tools>forums

    I’d work my way down the first 6 – maybe one at a time to ensure you don’t get hours of spinning discs.

    The code you provided to protect does have a section where it is working out whether to show a post, topic or reply, and the code for each is slightly different (starts at around line 40). I’m not good enough ton validate this code, but if you’re still stuck, always worth contacting the codes owner to see if they can help

    #138956

    In reply to: phpbb import hanging?

    Stephen Edgar
    Keymaster

    Do not check the following setting:

    Purge Previous Import Purge all information from a previously attempted import

    Do check the following setting:

    Start Over Start a fresh conversion from the beginning

    There is something weird going on with the above that ‘Purge Previous Import’ setting that I am looking into, it works for some and not others and is really bugging me 🙁

    In between imports if it doesn’t finish and you need to try again you will manually have to delete the imported users from the WordPress User admin panel and reset bbPress’ forums as per https://codex.bbpress.org/reset-forums/.

    #138954
    Stephen Edgar
    Keymaster

    @stagger-lee Thanks for taking another look at this, most appreciated. 🙂

    I have a couple of ideas that I will try tomorrow and that should also include the removal of the hard-coded jos_ prefix.

    Out of curiousity did you use Kunena2.php or Kunena3.php this time round?

    #138952
    jsalomone
    Participant

    I have gone through those steps a number of times already, including removing the membership plugin. This membership plugin is not specific to bbpress. It has no awareness of topics and users and such. It is to restrict access to wordpress pages and posts.

    The way the forum is protected is by this code: https://gist.github.com/strangerstudios/1633637
    What it basically does is determine if it is going to show forum content or not and then either not show it at all and redirect to another page (in my case the home page) or continue and show whatever the forum is showing. It does not discriminate between topics or replies or whatnot from what I can tell.

    Again, disabling that bit, or disabling the membership plugin as a whole does not make a difference.

    Walking through all forum roles: blocked shows a 404 page, all the others show the content except the first post (of type topic)

    Walking through all wordpress roles: only administrator will show the first post (of type topic)

    #138949
    Robin W
    Moderator

    There were some instructions here

    https://codex.bbpress.org/step-by-step-guide-to-creating-a-custom-bbpress-theme/

    But they are out of date

    Your forum link didn’t work, but if you post again, I’ll take a quick look to see if teher are any quick and easy changes you could make

    #138939
    bbp-fan
    Participant


    It’s only a small thing – basically. Nevertheless, since a few days I am on experiment, only to enlarge the font size of the links “forum-title” and “topic title”. 🙁 And only these two! (no other font-size in the forum) I’m not successful. Despite the use of Firebug I do not find the correct place in the CSS.

    I also do not understand what in this line
    # bbpress-forum div.bbp-forum-title h3,
    the “h3” is. My “h3” is much larger defined, but is not taken.
    Which “h3” is meant and where it is defined?

    Please help! I’ll go crazy 🙁

    #138936

    In reply to: BBPress – Post Count

    Robin W
    Moderator

    The issue is that in loop-single-reply the variable $user_id is not set. I’ve just written a plugin for this, which should work – it does on my site, but I am trying to work out why it doesn’t on another who also has buddypress.

    You installing it would help me determine if it is me !

    Download to your pc, and then upload to the plugins

    bbp topic count plugin

    or crack it open to see what code I used

    #138933
    Stagger Lee
    Participant

    No, absolutely same problem. Stuck at the same place.
    Plus error with that hard coded jos_ in PHP, but that one is easy to fix. I type my own database prefix.

    #138931

    In reply to: page templates

    Robin W
    Moderator
    #138930

    In reply to: Visual Editor

    Robin W
    Moderator

    presume you mean this is the piece of code you’ve tried?

    Enable Visual Editor

    have you tried this plugin

    https://wordpress.org/plugins/bbpress-enable-tinymce-visual-tab/

    #138926

    Topic: page templates

    in forum Showcase
    rmughal
    Participant

    Just want to know how does bbPress include page templates (/templates/extras/….) into the WordPress page template dropdown which are available when creating new pages. Just want to know where the code exists in the codebase

    #138920

    In reply to: Limit search on forum

    jodlajodla
    Participant

    I found out that I misunderstood your post. I downloaded plugin that you suggested and checked the code. I remembered that I used is_bbpress() somewhere and that was the solution for my problem. There’s the snippet of code that I used in my theme in file functions.php:

    /* Do not search pages, only posts and if there's a request from bbPress or Admin panel than ignore setting of post type */
    function search_filter($query) {
    	if ($query->is_search && !is_admin() && !is_bbpress()) {
    		$query->set('post_type', 'post');
    	}
    	return $query;
    }
    add_filter('pre_get_posts', 'search_filter');

    Thank you very much again! 🙂 🙂

    #138914

    Topic: Visual Editor

    in forum Plugins
    Asig
    Participant

    Hello
    I installed bbPress Version 2.4.1 into WordPress 3.7.1 with Atahualpa theme and set up the forums.
    I realized that editing is too limited to be useful. Some research showed that bbPress disabled the visual editor several versions back, but some people managed to activate it since then with some “code snippets”.

    The code snippet does not work. I get errors. As I am not a Techie and for the most part do not know what I am doing, does anyone have simple instructions on how to get the visual editor in bbPress to work again?

    Appreciate all help on this
    Andy

    #138903

    In reply to: Limit search on forum

    Robin W
    Moderator

    bbpress 2.4.1 comes with it’s own search function, which only searches forums.

    this post also describes forum only search boxes which might help

    http://vfbpro.com/2012/10/25/how-to-add-a-search-box-to-bbpress/

    and also a widget

    https://wordpress.org/plugins/bbpress-search-widget/

    that you could crack the code of

    sparkii
    Participant

    Hi Robin – thanks for replying.

    Initially, I couldn’t find what you were referencing…then I found it at the bottom of the user page.

    So every user has to initially be given a blog role when added? do you know of any plugins or code which which would reveal the forum roles when I initially add users?

    I still don’t understand why the forum roles appear in the role drop down after I deactivate bbpress…doesn’t seem logical or make sense to me…but at least I can now add people with forum roles. Thanks for your help

    #138896

    Topic: Limit search on forum

    in forum Themes
    jodlajodla
    Participant

    Hello!

    It is possible to limit search’s post type on forum and leave the one on the blog untouched? My current filter is like this:

    function search_filter($query) {
    	if ($query->bbp_is_search) {
    		$query->set('post_type', array('post', 'forum', 'topic', 'reply'));
    	} else if ($query->is_search) {
    		$query->set('post_type', 'post');
    	}
    	return $query;
    }
    add_filter('pre_get_posts', 'search_filter');

    But it doesn’t work… what do I have to change?

    Thank you! 🙂

    Stephen Edgar
    Keymaster

    Do you have the Akismet plugin activated and have a valid API key?
    https://codex.wordpress.org/Plugins/Akismet

    #138871

    In reply to: phpbb import hanging?

    Stephen Edgar
    Keymaster

    At what point do I give up and start again. Should it take over four hours?

    You should see it start and offer you some sort of notice that it has within seconds.

    Via FTP or your web host cPanel admin etc, open your phpBB config file /public_html/phpbbv3/config.php and make sure these are the values you are using on the bbPress importer screen.

    <?php
    // phpBB 3.0.x auto-generated configuration file
    // Do not change anything in this file!
    $dbms = 'mysqli';
    $dbhost = 'localhost';
    $dbport = '3306';
    $dbname = 'my_phpbb_database';
    $dbuser = 'my_user_name';
    $dbpasswd = 'abcdefgh';
    $table_prefix = 'phpbb_';
    

    (The $dbhost & $dbport may be blank as thats the default so use the settings I list above which are the default on the bbPress importer anyway)

Viewing 25 results - 13,401 through 13,425 (of 32,503 total)
Skip to toolbar