Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 15,276 through 15,300 (of 32,503 total)
  • Author
    Search Results
  • #119262
    Gary3000
    Participant

    I can’t seem to find it on CodeCanyon. Do you remember the name or have a link to it?

    #119261
    gabrielstuff
    Participant

    Hey there, please find my little code that I’ve put into function.php :

    function ela_signup_redirect($redirect_to){
      $return_url = "";
    
    if (defined('ICL_LANGUAGE_CODE')) {
        switch (ICL_LANGUAGE_CODE) {
            case 'fr':
                $return_url = "http://xxx/merci/";
              break;
            case 'en':
                  $return_url = "http://xxx/forum/sinscrire/";
              break;
            default:
                  $return_url = 'langue non configurée';
              break;
        }
    }
    error_log("message : " . $return_url);
    return $return_url;
    }
    add_filter("bbp_user_register_redirect_to", "ela_signup_redirect");
    

    I’ve been trying to debug everywhere and hunt when the redirect happen, but I still get redirected to the admin panel.

    Any help would be appreciated.

    #119258
    Phill
    Participant

    Hi Lynq, thank you for this code! I would have never figured this out on my own.

    I have a question. I’ve pasted these functions into my bbpress-functions.php and called the custom forum list function in my single-loop-forum.php file but for some reason I keep getting a parse error telling me that there was an unexpected T_Public. Do you know how I would fix this? Is there a certain place in the bbpress-functions.php file I’m supposed to paste that code?

    Thanks for the help!

    ouyagamingsource
    Participant

    Update- I deleted and reinstalled the child theme and copied back over the bbp-twentyten files into the child folder as according to these directions: https://codex.bbpress.org/legacy/step-by-step-guide-to-creating-a-custom-bbpress-theme/ however I’m still having issues with the theme working with bbP… for some reason my password field turned white on all my pages from an original dark theme setting (though the login field stayed the same), and I can’t figure out how to format the colors and background to my forum page to stay with the original theme settings: http://ouyagamingsource.com/forums/ including maintaining the tables, sidebars and colors of the other pages. I’m wondering if it can be done by bypassing some of the twenty-ten commands on the bbpress-functions.php file I copied to the child? I’m not much of a PHP expert so this is a little complicated.

    #119249

    In reply to: page.php as template

    Phill
    Participant

    Thank you Shmoo! That has helped me out tremendously. I only have one question. I’ve copied over the archive-forum.php template and then replaced the code with the original page.php template and removed a few things but I still end up with the sidebar (no sidebar specific code in the original page.php) However, I’ve noticed that the line is associated with placing the sidebar. How do I get around this? Thanks!

    • This reply was modified 13 years, 3 months ago by Phill.
    #119247

    In reply to: page.php as template

    Shmoo
    Participant

    If you use the bbp-theme-compat theme you can copy some template files from the plugin directory to your theme directory.

    This way bbPress can get updates in the future while your custom edits will not disappear because of the updates to the plugin.

    https://codex.bbpress.org/theme-compatibility/
    (read the last part.)

    Only thing is, there is a template file that’s named like this: page-front-forums.php everybody thinks this is the default template that will be shown when you have an url like this.
    http://example.com/forums/

    But that’s not true, this template is only used when you use bbPress (the forum index page) as a homepage for your WordPress site.
    If you use the forums (index) page as a separated page like my ‘example.com’ url above bbPress uses the archive-forum.php template.

    What you can do very easy is copy-/paste the archive-forum.php template from the wp-content > plugins > bbpress > bbp-theme-compat > extras > directory to your theme’s directory.
    wp-content > themes > your-theme-name > and edit that template file.

    Now bbPress wil not use page.php but the archive-forum.php template instead and you can edit this page to all your needs.

    ouyagamingsource
    Participant

    Hello BBP Forum,

    I got nearly everything set up with the BuddyPress and bbPress forum plugins, however there’s a few tweaks I need to finish it off and I’m trying to figure out which files I need to adjust the html settings to match my custom theme of my other pages.

    Going from these directions: http://codex.bbpress.org/legacy/step-by-step-guide-to-creating-a-custom-bbpress-theme/ I created a child from my Alyeska theme and copied the Default bbPress Theme to the child theme folder. This helped get the forum page a little closer to my custom theme style, but still not there yet; the sidebars are missing, the forum BG is white, amongst a few other issues, but it’s getting closer. I’m just not sure where the CSS master file for this page is, I tried editing the two files in the child_theme/bbp/CSS folder but it didn’t make any change: http://ouyagamingsource.com/forums/, any ideas?

    Thanks ahead of time!

    –Bryan

    Gary3000
    Participant

    Just as the title says, I’m curious to know how the current main page at bbpress.org/forums/ is set up. Ideally, I’d like to have my forums main page set up in exactly the same fashion.

    Am I correct in assumming that it’s done as a Page (“forums” being the slug) with the bbPress shortcode “[bbp-topic-index]” as its content?

    I notice for Latest Topics it lists 28 topics, however in the bbPress Codex listing of shortcodes, it says that particular shortcode only lists 15 of the most recent topics. How does one go about configuring it to show more (or less) than the default of 15?

    The other thing I’m curious about is how one gets the nicer “Forums” sidebar widget. The one on bbpress.org/forums/ is styled with a header containing “Forum” and “Topics” column headers, and then a striped list of the Forums with the associated topic counts. In the current public version of bbPress (2.1.2), the “Forums” widget only shows a straight, plain list of the Forums — no header/columns, and no topic counts. Is the widget used on bbpress.org/forums/ from the current SVN of bbPress, or was it customized specifically for bbPress?

    #119235

    In reply to: No bb-load in download

    Stephen Edgar
    Keymaster

    Have you looked at these two docs to help get you started?

    https://codex.bbpress.org/theme-compatibility/ and https://codex.bbpress.org/shortcodes/

    (The thread that you linked to above is out of date as it is only relevenet to the old stand alone bbPress and not the current plugin bbPress 2.x )

    #119233
    ffadler
    Participant

    Specialty question, piggybacked onto this topic. 🙂 Mr. Jacoby’s answer got me thinking.

    Is there a special function that I can use that will redirect the link associated with

    $args['root_text'] = 'Forums';
    

    to another location on my site. Preferable an existing WordPress page. Comes back to the link of that breadcrumb goes to an archive page. I would rather it go to an index…or a WP page which is acting as an index. Thanks.

    ffadler
    Participant

    MTPrower

    You stated my exact problem which I am currently having. I am a noob. But I can usually google search my way out of any problem. (Which led me here, but with no answer) I see that the “forums base” archive slug field is used in the breadcrumb for bbPress. When I click on the link in the breadcrumb, it takes me to the archive page….not what I want my users to be able to do at all. I want them to be able to get back to a forum index from anywhere inside bbPress.


    I setup a WP page and used the bbPress shortcodes to give me a Forum index; which is the main portal to all of the topics and posts on my site.

    However, once a forum/topic is selected by a user, the bbPress *.php takes over and the pages are dynamically generated ( i guess ). How do I send people back to the forum index WP page from anywhere inside bbPress? I would prefer the breadcrumb worked or at least could be redirected to the WP page. Linking me to an archive page does NOTHING for any user, when trying to get back to an index.

    Hope that was descriptive enough to workout a solution. Thank you.

    http://www.sailhavasu.com/event-forum/ <- WP Page with bbPress short codes creating a forum "index"

    http:www.//sailhavasu.com/bbpress/forum/hpcc-2013/ <- bbPress page where the breadcrumb "Forums" links to an archive page. Would rather it linked to an index; either a WP page or a dynamically created bbPress page with an actual index. (Note: "bbpress" is what I named the Forums base Archive Slug; another issue that appears weird to a noob.)

    #119224

    In reply to: page.php as template

    Phill
    Participant

    With the bbpress.php would I just paste the page.php code into it and then adjust it from there? I’m too having sidebar issues.

    #119222

    Look inside the bbp_author_link() function; there’s a great bunch of documentation in there on how to get that information out.

    To say the code “isn’t very clean” is kind of silly; the best thing bbPress has going for it is how clean the code is to read and follow.

    #119221
    Shmoo
    Participant

    Hello, i didn’t know a better title but i’ll try to explain what i meant to say.

    I don’t understand why it’s very easy to get all info that you need from the Topic Starter and when you need the same info from the last person who has replied on a topic it’s very difficult.

    Look at my screenshot and you’ll see what i’m trying to say.
    http://i48.tinypic.com/33op6wz.png

    Everything on this picture is done by CSS the only images you’ll see are the Gravatars,
    At the left side it’s the Gravatar of the Topic Starter with a Hover effect when i took the screenshot.

    I didn’t use the default PHP code that bbPress provided because it wasn’t very clean so i searched around and found a few simple and easy to understand PHP tags who could help me build my custom lay-out.


    php bbp_topic_author_url(); = provides a clean url

    php bbp_topic_author_display_name(); = provides clean text without url

    php bbp_topic_author_avatar( $topic_id = 0, $size = 60 ); = provides a gravatar with url

    I love those simple codes because i can add and wrap HTML around it and position everything i need on every corner of the website if i would like so..

    But when i try to make the same Gravatar at the right side it’s getting difficult because there aren’t a few simple tags i can use to get the same clean code from the last person who has posted inside a topic.


    php bbp_author_link( array( 'post_id' => bbp_get_topic_last_active_id(), 'type' => 'avatar', 'size' => 60 ) ); = provides a gravatar with url okay

    php bbp_author_link( array( 'post_id' => bbp_get_topic_last_active_id(), 'type' => 'name' ) ); = this doesn't provide clean text but a name + url

    It’s a huge bummer because i can’t make the Hover effect on the Gravatar without clean code tags.

    #119214
    Shmoo
    Participant

    Search on the Codecanyon website inside the WordPress plugins there is a guy who has made a plugin that works with bbPress.

    #119213
    Shmoo
    Participant

    Thanks,

    I’ve been searching inside the ‘includes’ folder to see if i could understand whats possible with some tags.

    #119198
    Stephen Edgar
    Keymaster

    Follow the steps outlined here https://codex.bbpress.org/theme-compatibility/ for the files you want to customize by copying them to your theme directory.

    fuzzybee
    Participant

    I am using BuddyPress 1.6.1, bbPress 2.1.2 and WordPress 3.4.2

    I follow the guide here.

    In the end, I did the trick pointed out by Sarah Gooding because mywebsite.com/forums was blank right after the above installation

    • Created a page called “Forums” with permalink mywebsite.com/forums
    • Insert bbPress shortcode [bbp-forum-index] into “Forums” page

    My questions are

    1) How do I customise page templates for the forum e.g. Forum page, topic page etc.

    My current theme is a child theme of twentyeleven and it has the following structure

    > themes/bp-twentyeleven/

    >

    > /activity/

    >

    > /blogs/

    >

    > /forums/

    >

    > index.php

    >

    > forums-loop.php

    >

    > /groups/

    >

    > /members/

    >

    > /registration/

    >

    > header.php

    >

    > sidebar.php

    >

    > style.css

    Notes

    • Apparently, bp-twentyevelen/forums/index.php is being ignored.
    • The reason for this set up is that I need the site to looks like TwentyEleven and has BuddyPress’ functionality at the same time

    2) How do I make sure that bbPress functions will work for my site e.g. do I copy and past all the functions in functions.php of bbPress’ default theme over my theme’s functions.php?

    3) How do I ensure that whatever I will get from 1) and 2) (probably from bbPress experts somewhere) will not conflict with BuddyPress’ functionality or my theme?

    BuddyPress setting screenshots are here and here.

    bbPress settings screenshot is here.

    #119188

    In reply to: Editing a shortcode

    zaerl
    Participant

    It’s in wp-content/plugins/bbpress/bbp-includes/bbp-core-shortcodes.php. Don’t edit a core file. Use a filter.

    #119187
    zaerl
    Participant

    The function doesn’t accept an array. See get_avatar: https://core.trac.wordpress.org/browser/tags/3.4.2/wp-includes/pluggable.php#L1583

    bbp_topic_author_avatar(0, 80);

    #119182
    concon3
    Participant

    I would like to have a form like the shortcode forms, [bbp-topic-form] is what I need but without the drop down box for choosing a forum but rather a forum already been chosen.

    From looking at the short codes the following looks exactly like what I need:

    [bbp-xxx-xxx id=$forum_id]** – Display the ‘New Topic Form’ for a specific forum ID.

    However I don’t believe this has been added. Is there any way to achieve this? Or any plugins that can do this?

    Any help is greatly appreciated.

    #119180
    concon3
    Participant

    I would like to have a form like the shortcode forms, [bbp-topic-form] is what I need but without the drop down box for choosing a forum but rather a forum already been chosen.

    From looking at the short codes the following looks exactly like what I need:

    [bbp-xxx-xxx id=$forum_id]** – Display the ‘New Topic Form’ for a specific forum ID.

    However I don’t believe this has been added. Is there any way to achieve this? Or any plugins that can do this?

    Any help is greatly appreciated.

    #119178
    elpix
    Participant

    Hi all,

    I ask your help beacause I’ve already tried everything that I knew before to make a query work in few seconds

    I’m on BP 1.5.5/

    Before, everything was working well, but one day, access to our forum became very very long (170 s average).
    After many tests, I think that it’s a cache problem.

    Here is two queries that make me think that :

    SELECT t.*, g.id AS object_id, g.name AS object_name, g.slug AS object_slug
    FROM wp_bb_topics AS t
    INNER JOIN wp_bb_posts p ON p.topic_id=t.topic_id AND p.post_time=t.topic_start_time
    JOIN wp_bp_groups AS g
    LEFT JOIN wp_bp_groups_groupmeta AS gm ON g.id = gm.group_id
    WHERE (gm.meta_key = 'forum_id' AND gm.meta_value = t.forum_id) AND g.STATUS = 'public' AND t.topic_status = '0'
    ORDER BY t.topic_time
    LIMIT 20

    And the same without the “LIMIT”

    SELECT t.*, g.id AS object_id, g.name AS object_name, g.slug AS object_slug
    FROM wp_bb_topics AS t
    INNER JOIN wp_bb_posts p ON p.topic_id=t.topic_id AND p.post_time=t.topic_start_time
    JOIN wp_bp_groups AS g
    LEFT JOIN wp_bp_groups_groupmeta AS gm ON g.id = gm.group_id
    WHERE (gm.meta_key = 'forum_id' AND gm.meta_value = t.forum_id) AND g.STATUS = 'public' AND t.topic_status = '0'
    ORDER BY t.topic_time

    The first (with LIMIT) take 150 secondes (At the beginning, it was working well).
    But the second (without LIMIT) takes 1.5 secones !!!!

    When I’m in PHPmyADMIN, the “show full processlist” tell “copy to tmp table” during the 150 secondes.

    So my question is :
    Is there a cache limit I’ve reache with my DB (20.000 topics) ?
    Where I’ve to modified (I think in my.cnf), and what is the value to put (I’ve make a lot of test, without good results)?

    Thank you very much !

    Bye

    #119176
    Shmoo
    Participant

    Sorry this forum doesn’t except the starting and closing PHP tags.

    bbp_topic_author_avatar( array( ‘size’ => ’80’ ));

    and

    bbp_topic_author_avatar( array( ‘size’ => 80 ));

    Both don’t work..

    #119175
    Shmoo
    Participant

    I’m just curious because i would like to edit the author’s gravatar and how it’s showed in the source to get more CSS options.

    bbp_topic_author_avatar

    bbp_get_topic_author_avatar

    When i use the bbp_topic_author_avatar() version inside the loop-single-topic.php file it shows a perfect 40 pixels gravatar like explained on the website with all possible bbPress code tags.
    Great but when i try to make this gravatar 80 pixels instead of the default 40 there is something wrong because the code doesn’t accept my array when i try do this.

     '80' )); ?&gt;
    

    Even when i do this it doesn’t work.

     80 )); ?&gt;
    
Viewing 25 results - 15,276 through 15,300 (of 32,503 total)
Skip to toolbar