Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 14,751 through 14,775 (of 32,519 total)
  • Author
    Search Results
  • #125760
    zurdog
    Participant

    How do I call bbpress template tags inside of the wordpress theme files? For example, I’m in header.php of my wordpress theme, and would like to list the forums in the header. I found this code: bbp_list_forums(); but I’m not sure how to get it to work?

    I understand I can use widgets or use the admin with various slugs… but I’m wondering how to do this on the backend with code.

    #125751
    ckleiman
    Participant

    Problem Solved, I think. I noticed I was able to make some bold text using html. Then I made some italic text and it worked too. Finally, I tried making a link, again, and, as before, it didn’t show. Then I looked more closely at he link code and put some text between the last > and closing tag and it showed and working. So, much to my delight I can use this plugin with my Arras theme, which, I wasn’t prepared to sacrifice. Thank you for this plugin. I thinks its just what I wanted for my WordPress site. Simple without all the who needs it extras that come with other plugins and and accomplishes exactly what I need.

    gregfielding
    Participant

    I’m trying to make my forum look better on mobile devices. As it stands, if you look at a topic and it’s replies, the avatars of the authors take up about half of the screen and the text is all scrunched over to the right.

    I’ve switched the sizing to be 20% for the “bbp-reply-author” div and 80% for the bbp-reply-content div. (this is in loop-single-reply.php)

    Anyways, the percentage spacing works great except that the avatars aren’t responsive and don’t shrink.

    This is the line of code that controls it:

    ‘<?php bbp_reply_author_link( array( ‘sep’ => ‘<br />’, ‘show_role’ => true ) ); ?>’

    I can code a little, but this is beyond me. Any ideas on how to make the avatar responsive?

    Or, probably easier, anybody know how I can tweak the above code for use on mobile devices where it will call the avatar in a smaller size?

    Here is a link to a forum: http://www.bayarearealestatetrends.com/question/when-will-we-start-to-get-more-inventory/

    #125738
    pjv
    Participant

    I made a codex page describing what I learned so far. I don’t know if what I wrote is anything like a best practice, but it worked for me. It would be great if those more knowledgeable would correct and expand on it.

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

    #125736

    If it’s not, why not?

    The honest truth is that once most people learn what they need, they never go into the bbPress codex and make a page to share their knowledge.

    #125723
    pjv
    Participant

    The answer to my question about which template is being rendered (at least in my case) was `page.php`.

    That’s `page.php` from your theme.

    So if you, like me, want to do things to the main template in which the bbpress forums are housed, you can use `page.php`.

    If you, like me, want to do things to that template ONLY for bbpress stuff, but not for other “pages” in your site, you can use the php function `is_bbpress()` in that template to render conditional html based on whether it is a bbpress page or not.

    This seems like amazingly basic and obvious information that I was only able to discern by gritting my teeth and putting bbpress into the text editor and reading through A LOT of code. If this information is documented somewhere easy to find, please enlighten me so that i can perform the requisite face palm. If it’s not, why not?

    This is untested by me, but digging through some more code, it looks like you might be able to create a custom home-base template for your bbpress forum by copying the original `page.php` into a new file and naming it any of:”
    `’plugin-bbpress.php’,
    ‘bbpress.php’,
    ‘forums.php’,
    ‘forum.php’,
    ‘generic.php’`

    #125714
    pjv
    Participant

    I agree the lack of basic, getting started documentation for CURRENT bbpress is pretty frustrating. Just a basic roadmap of how the plugin works and which template and functions files are the key ones for making basic changes would be very helpful. A high-level technical overview of what is what and where.

    For example, does anyone know which template is being rendered when I go to my-site.com/forums? More importantly, can anyone give me the rosetta stone so that I could figure something like that out myself at a glance without having to read through a ton of code?

    #125690

    In reply to: Register for forums

    samoya22
    Participant

    I have a multisite install and this shortcode just kicks the user to the WordPress registration page after they enter their username and email address. Anyone else having this problem?

    #125672
    ckleiman
    Participant

    Recently installed this plugin. As admin it says Your account has the ability to post unrestricted HTML content, however, after saving the post the html content doesn’t appear. I’ve been trying to save a link in a post using the html code buttons. If I just enter the link without html it appears, however, I want to use html to have the link open in a new page. What to do? My site is and the link to the plug in is in the Main Menu called Tech Support

    #125655
    moebis
    Participant

    I just installed the latest trunk of both to continue my testing. I like a lot of the improvements, but I’ve been discovering some bugs here and there. Not sure if this is the place to post it, but here it goes.

    First off, the 2 work well together now, except when you try to mix the site-wide forums with group forums. If you click on a group and look at the forum tab, it shows posts from the next group-forum or site-wide forums. What I’m attempting to do is create groups, with a top-level forum for each group, and then sub-sitewide forums underneath, which I nest using the backend bbpress admin. These sub-forums don’t have a group all their own they just belong underneath and listed in forums top of the master group they are part of. It looks like this functionality is somewhat coded into the newest branch of buddypress 1.7 and bbpress 2.3, and if fixed it would be perfect. I know there is a plugin called buddypress group hierarchy or something, but it’s not really what I’m looking for, because it assumes I want full group buddypress functionality surrounding the sub-forums. I just want more granular control over the topics on each group.


    @johnjamesjacoby
    – hear our plea. Allow us to create sub-forums in bbpress for the top-level forum in buddypress groups. When you click on the group, the sub-forums that belong to it will show underneath. When posting to the group forum, maybe even an option to move the topic to the top level group forum or sub-forums for the user? Just a thought. Thanks for all the great work on this, it’s getting much better now.

    #125651
    Stephen Edgar
    Keymaster

    Stop using the SimplePress importer and start using the phpBB importer.

    If you import using the phpBB importer your users can login to WordPress/bbPress using their existing username and password.

    The only known issues with importing from phpBB are listed here (they are all very minor issues)
    https://codex.bbpress.org/import-forums/phpbb/

    If you have issues with the phpBB import then tell us what they are so we can fix them.

    #125626
    Giannis Giaou
    Participant

    Hello everyone.

    I would like to know if its possible to provide custom information with shortcodes.

    For example i made  a static homepage with [bbp-forum-index]  shortcode in there,

    is it possible to provide only the Topics & Posts counts and not the Freshness information?

    Thank you in advance.

     

    #125618
    weboozle
    Participant

    Clean wordpress, buddypress and bbpress install (again) and I still can’t get a ‘forums’ tab on the site.

    I know this is an extremely basic step, and I’ve spent hours and several re-installs to attempt the ‘forums’ or ‘forum’ or ‘board’ or anything tab to link to a sitewide forum.

    I’ve never understood the heirarchy of wordpress (obviously) but I seem to always manage. This one is really has me. I can directly navigate to it in the browser but all I can ever get is a blank page when any tab might appear.

    I’m also aware that this isn’t listed in the bbpress codex since I’m sure it’s on page 2 of beginning wordpress.

    Any help? Many thanks in advance.

    #125610

    In reply to: Register for forums

    Lynq
    Participant

    If you need to create a register page, then you can add a new page via wordpress and then put this shortcode inside it: [bbp-register] – this will allow people to register for the forum.

    #125601

    In reply to: Link Forum to WP Page

    Stephen Edgar
    Keymaster

    A couple of options:

    #125590
    Michael
    Participant

    Okay, I think I figured this out on my own, though I don’t quite have the list of usable html matching what the default TinyMCE editor offers.  I’ll have to play with that separately.

    What I did was add a function in my functions.php file that changed the allowed markup for all bbPress (and blog) posts to include what I think is a reasonable list AND is still safe. I’ve added the IMG tag as well — for my Forum that’s a useful feature, and I’ll just have to monitor what people post in terms of image links.

    Here’s the code I added to my functions.php file:

    add_action('init', 'my_html_tags_code', 10);
    function my_html_tags_code() {
            define('CUSTOM_TAGS', true);
            global $allowedposttags, $allowedtags;
            $allowedposttags = array(
                    'p' => array(
                            'style' => array()),
                    'strong' => array(),
                    'em' => array(),
                    'i' => array(),
                    'del' => array(),
                    'h1' => array(),
                    'h2' => array(),
                    'h3' => array(),
                    'h4' => array(),
                    'h5' => array(),
                    'hr' => array(),
                    'blockquote' => array(),
                    'q' => array(),
                    'pre' => array(),
                    'span' => array(
                            'style' => array()),
                    'div' => array(
                            'style' => array()),
                    'ul' => array (),
                    'ol' => array (
                            'start' => array()),
                    'li' => array (),
                    'a' => array(
                            'href' => array (),
                            'title' => array (),
                            'rel' => array()),
                    'img' => array (
                            'src' => array(),
                            'width' => array(),
                            'height' => array(),
                            'alt' => array())
            );
            $allowedtags = array(
                    'p' => array(
                            'style' => array()),
                    'strong' => array(),
                    'em' => array(),
                    'i' => array(),
                    'del' => array(),
                    'h1' => array(),
                    'h2' => array(),
                    'h3' => array(),
                    'h4' => array(),
                    'h5' => array(),
                    'hr' => array(),
                    'blockquote' => array(),
                    'q' => array(),
                    'pre' => array(),
                    'span' => array(
                            'style' => array()),
                    'div' => array(
                            'style' => array()),
                    'ul' => array (),
                    'ol' => array (
                            'start' => array()),
                    'li' => array (),
                    'a' => array(
                            'href' => array (),
                            'title' => array (),
                            'rel' => array()),
                    'img' => array (
                            'src' => array(),
                            'width' => array(),
                            'height' => array(),
                            'alt' => array())
    
            );
    }
    #125589
    Michael
    Participant

    I’ve noticed this problem as well.

    I’m running WP 3.5.1 and bbPress 2.2.4.  My bbPress area is here: http://www.dalluva.com/member-area/forums/

    When a non-Admin user attempts to post a Topic or Reply using the Visual mode (built-in TinyMCE support), they’re led to believe that they can use do things like create ordered/numbered lists, etc.

    The visual editor does show it, but when they Submit it, bbPress strips this out.

    No surprise there: while the visual Editor bar shows these editing capabilities, the little box below the editor that says “You may use these HTML tags and attributes:” doesn’t list ol, ul, li etc.  Doh!

    I noticed that posting to this bbPress site, it shows in the little box that I can use ol, ul, li, and it does work.

    QUESTION:  How can I expand the available HTML tags and attributes (ideally without hacking the bbPress code) to include other tags like ul, ol, li, br, hr, etc?

    Thanks.

    Michael

    #125579
    aberglas
    Participant

    I just want a simple list. I tried
    $forums = get_posts( array( ‘post_type’ => bbp_get_forum_post_type(), ‘numberposts’ => 99 ) );
    But that does not return private posts. (Digging into get_posts is a huge maze of code.)

    I was hoping just to use the Admin All Forums code as a guide, but I cannot find it! What in BB Press generates that form?

    Thanks,

    Anthony

    #125578
    Stephen Edgar
    Keymaster

    @jiapei100 From the codex docs https://codex.bbpress.org/import-forums/#getting-there

    • Log in to your WordPress Admin Dashboard
    • Select the ‘Tools’ tab select ‘Forums’ from the navigation menu
    • Select the ‘Import Forums’ tab at the top of the screen.

    You then need to follow the next steps in the docs linked above for your settings.

    Don’t forget to read the docs on Mingle and let us know any issues you find.
    https://codex.bbpress.org/import-forums/mingle/

    #125566

    In reply to: Vanilla 2 Converter

    brokentwig
    Participant

    Yeah, I think your right. I think we should just leave the `from_expression’ => ‘WHERE User.Deleted = 0′` out completely. It would just orpan items anyway. I pulled my notes from the doc. With all that said, I’ll download the Vanilla.php you posted in the codex and give her a run on my test server. I think she’s done.

    #125565

    In reply to: Vanilla 2 Converter

    Stephen Edgar
    Keymaster

    Thanks for adding that to the codex, I am not sure we should go that route though, I think we should not advise anyone to modify their existing forum directly with SQL. I think we are better off stating that all users including banned and deleted users are imported into WordPress and after importing you should manually delete these users through the WordPress Users admin panel.

    As to the correct code/syntax for the password, honestly I have no idea! Give me a code example and I can hack around and make stuff work but code from scratch I am at noob level 😉

    I started learning PHP when I started playing with bbPress not that long ago and along with WordPress they are my only PHP learning resources and a testament to @johnjamesjacoby coding with awesome inline docs.

    With all that said though I think it would probably be best if you want Facebook, Twitter, Google, Yahoo, OpenID etc etc logins for WordPress/bbPress it will be much easier to install one of the many WP plugins that offer this. Then have the end users link their existing user profile to Facebook, Twitter or whoever, otherwise there will be all sorts of values we are trying to migrate from Vanilla to support a vast array of different user plugin implementations that are available for WordPress.

    #125564

    In reply to: Vanilla 2 Converter

    brokentwig
    Participant

    Maybe it will work the way it is. Users who login via some other method still have thier username and email stored in the User table and are for all intents and purposes a “User”. Our converter will convert whatever is in the Password blob, but it won’t match thier 3rd party password (I tested it). These users will need to use the password reset in WP to fix this. I think either you can add this to your codex, or I can make a note at the bottom indicating some users will need to reset thier passwords, so maybe a mass email notifying users of the change will handle it. I don’t think there’s anything we can do with the converter to solve this.

    #125560

    In reply to: Vanilla 2 Converter

    brokentwig
    Participant

    I’m not 100% confident “Banned” are Role 1, and “Confirm Email” are Role 3 on all Vanilla databases. Due to the complexity, I think it should be left out. I posted my SQL queries in your codex codes under the “Notes” section. Feel free to tweak my comments to your style.

    Maybe you can help me with the password checker. It looks like I can reference the entire record row using the callback methods in the converter code. I just don’t know what to do if the password type isn’t a Vanilla password. What is the proper action here, and is this code/syntax correct?

    ` public function callback_cleanpass( $password, $row) {
    if ($row[‘HashMethod’] == ‘Vanilla’) {
    return $password;
    } else {
    return ?????;
    }
    }`

    #125556

    In reply to: Vanilla 2 Converter

    Stephen Edgar
    Keymaster

    The docs are now up also,


    @brokentwig
    Key changes from your great work getting this started

    • Topic tags are now included
    • Once bbPress core converter is updated we can filter the users imported
    • Added Topic Closed Status
    • Inline docs consistent with other importers
    • Whitespace and code formatting improved
    • Uses parser.php to convert HTML & Smilies
    • Reply status not needed, defaults are built into converter.php
    • Reply Order removed, this is calculated during the import

    The to do list:

    • Remove the `callback_savepass` & `authenticate_pass` as you rightly point out they are not needed and Vanilla uses the same hash as WordPress for passwords so this is too easy.

    If you see any bugs with the converter `Vanilla.php` please post these to the trac ticket here.

    If there is anything else that needs doing before or after the import that I have not already listed in the codex docs if you could add/update these that would be great.

    https://codex.bbpress.org/import-forums/vanilla
    (Use the same bbpress.org username and password to login)

    #125554

    In reply to: Vanilla 2 Converter

    Stephen Edgar
    Keymaster

    Introduce Forum Importer template for use with importing from Vanilla 2.0.18.1

    bbPress Core Trac Ticket: https://bbpress.trac.wordpress.org/ticket/2179

    Codex Docs: ​https://codex.bbpress.org/import-forums/vanilla/

Viewing 25 results - 14,751 through 14,775 (of 32,519 total)
Skip to toolbar