Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 23,376 through 23,400 (of 32,468 total)
  • Author
    Search Results
  • #78252
    suzkaw
    Member

    Can you open the slide.js that comes with the theme and replace all the contents with this:

    jQuery.noConflict();

    jQuery(document).ready(function($){

    // Expand Panel
    $("#open").click(function(){
    $("div#panel").slideDown("slow");

    });

    // Collapse Panel
    $("#close").click(function(){
    $("div#panel").slideUp("slow");
    });

    // Switch buttons from "Log In | Register" to "Close Panel" on click
    $("#toggle a").click(function () {
    $("#toggle a").toggle();
    });

    });

    #79530
    InvTrdr
    Member

    Where do I find the sidebar.php file/code for bbPress and the includes?

    Thank you.

    #31826
    angelamaria
    Member

    Hello,

    I’m planning to using bbPress on a WP site/blog I am currently working on, on my local. WordPress is up and running already, a relatively clean install save for a couple of themes, and some entries. No plugins yet. I download bbPress, upload it underneath my WP root directory (where the blog is), change config to match WP config (for my local it’s just changing out the database name; I have a username/password account set up already for each of test installs), and try to install. I get:

    DB Error: cannot select

    …on all pages. I’ve looked at both bb-config and wp-config and the database values are identical, except for the suffix variable naturally. I’ve checked the database, only wp_* tables are there. I am using a fresh bbPress download.

    Just for completeness’ sake (comments removed for brevity):

    bb-config.php excerpt:

    /** The name of the database for bbPress */

    define('DB_NAME', 'pugad-lawin');

    /** MySQL database username */

    define( ‘BBDB_USER’, ‘username’ );

    /** MySQL database password */

    define( ‘BBDB_PASSWORD’, ‘password’ );

    /** MySQL hostname */

    define( ‘BBDB_HOST’, ‘localhost’ );

    /** Database Charset to use in creating database tables. */

    define( ‘BBDB_CHARSET’, ‘utf8’ );

    /** The Database Collate type. Don’t change this if in doubt. */

    define( ‘BBDB_COLLATE’, ” );

    /** snip snip **/

    /**

    * bbPress Database Table prefix.

    *

    * You can have multiple installations in one database if you give each a unique

    * prefix. Only numbers, letters, and underscores please!

    */

    $bb_table_prefix = ‘bb_’;

    wp-config.php excerpt:

    /** The name of the database for WordPress */

    define('DB_NAME', 'pugad-lawin');

    /** MySQL database username */

    define(‘DB_USER’, ‘username’);

    /** MySQL database password */

    define(‘DB_PASSWORD’, ‘password’);

    /** MySQL hostname */

    define(‘DB_HOST’, ‘localhost’);

    /** Database Charset to use in creating database tables. */

    define(‘DB_CHARSET’, ‘utf8’);

    /** The Database Collate type. Don’t change this if in doubt. */

    define(‘DB_COLLATE’, ”);

    /** snip snip **/

    /**

    * WordPress Database Table prefix.

    *

    * You can have multiple installations in one database if you give each a unique

    * prefix. Only numbers, letters, and underscores please!

    */

    $table_prefix = ‘wp_’;

    Again, I have a username/password user setup on my local MySQL database for testing purposes, so yes, it is expected that those will be staying the same.

    Any info on this would be great. Thanks!

    #31825
    johnhiler
    Member

    Ashfame tracked down this post that mentions our fearless leader:

    What is the future of bbPress? Through the grapevine, I’ve discovered that Sam Bauers no longer works for Automattic but he is still involved with the bbPress project. How much he is involved I don’t know. It’s interesting to me because I’ve always attributed bbPress as Sam’s project but in reality, Matt Mullenweg wrote bbPress in the time span of a weekend and then handed off the project to someone else to maintain.

    So if Sam is not the lead project developer, who is?

    http://www.wptavern.com/forum/bbpress/860-future-bbpress-undecided.html

    The clincher is that Sam is no longer listed on the automattic team page (although earlier versions of that page on archive.org show him there) : http://automattic.com/about/

    So for whatever reason, it sounds like Sam has possibly moved on professionally?

    Sam, if that’s the case – I just want to thank you for all of your hard work! You’ve been a real gift to the bbPress community, and we greatly appreciate your hard work and dedication.

    If that’s not the case, I hope you’re having a relaxing few weeks off. :-)

    #79537

    One has to manage it by getting page_topics from the meta table and then manipulate your php code.

    @Kawauso

    I think using $wpdb & $bbdb should sanitize by them self but reading the page on codex it looks like that we need to do that explicitly. I am a lil confused. Can you please clarify?

    Thanks ! I forgot that I should check out the codex for that.

    #79536

    ah.. found it page_topics under bb_meta

    #79478
    kirpiit
    Member

    Nope, Kawauso.

    <?php bb_get_profile_link(post_author()); ?>

    just renders the poster name, without any link.

    #79439

    In reply to: bbPress Codex – lolz

    #79527
    johnhiler
    Member

    Ah ok, yah mini-stats is a great dashboard plugin which lets you know how many users you have… how many posts and topics they’re creating… and other key metrics like that.

    I check it almost every day, and couldn’t run my sites without it… I find it to be one of the most useful plugins out there, if you’re managing a site for growth. :-)

    #79526
    chrishajer
    Participant

    If you’re unsure of what PHPINFO is, put this into a file called info.php on your web server, then access it with a browser at http://www.example.com/info.php and paste the info somewhere where we can see it.

    <?php
    phpinfo();
    ?>

    #79451
    chrishajer
    Participant

    Can you post your code?

    #79521
    chrishajer
    Participant

    I think you first need to determine how long bbPress is actually taking to generate a page, and how long it takes to generate the other pages on the site. You can start with _ck_’s mini-stats plugin for bbPress.

    https://bbpress.org/plugins/topic/mini-stats/

    [edit: see johnhiler’s link below to the bb-benchmark plugin]

    And, on the other part of your site, what is running that? Is it WordPress or just static HTML? If it’s WordPress, you can get a plugin as well to point out performance bottlenecks.

    Regardless of what type of software a site (your site) is running, there are lots of tools you can run in your browser to find performance bottlenecks.

    Firefox (you need that to run most of these add-ons)

    Firebug (all around awesome tool)

    Y Slow from Yahoo!

    Google Page Speed

    There are tons and tons of performance add-ons for Firefox but these will get the job done.

    Also, what host are you on, and can you post the URL here so others may see the performance first hand?

    #79395
    infected
    Participant

    Thank you Kawauso! This works perfectly! Problem solved ;-)

    #79438

    In reply to: bbPress Codex – lolz

    Any chance bbPress will get a codex proper then?

    #79394

    In your theme’s topic.php, change bb_topic_admin(); to bb_topic_admin( array( 'before' => '', 'after' => '' ) ); or to use <li> instead, put bb_topic_admin( array( 'before' => '<li>', 'after' => '</li>' ) ); and put <ul> and </ul> around the <?php tags

    #31821
    InvTrdr
    Member

    Is it possible to add a sidebar in a theme that comes without one? Need a sidebar for navigation and/or ads. I am using the “Structure” theme. If it can be added can I get the code for it probably going into the sidebar.php?

    Thank you.

    $wpdb and $bbdb have nice sanitizing functions and caching of results if I remember correctly

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

    They can also be used to retrieve table names for the respective package

    #78750
    chrishajer
    Participant

    You can also explicitly set the link text like this as well, by coding the full anchor link:

    GO TO GOOGLE

    To achieve that, I typed this:

    <a href="http://google.com/">GO TO GOOGLE</a>

    #78749
    chrishajer
    Participant

    QuickD – if you type a URL, bbPress automatically converts that to a clickable link. I will type just www.google.com and below it will be a link to google with the text http://www.google.com

    http://www.google.com

    It’s actually harder to have bbPress NOT make links out of URLs.

    #79476

    You shouldn’t need the separate <a> tag, that function should be returning a complete <a> tag with the text passed to it (or using the ID number if one is given)

    #79475
    kirpiit
    Member

    Yes, this seems to do the trick

    <a href="http://www.example.com/forum/profile/<?php bb_get_profile_link(post_author()); ?>">
    <?php bb_get_profile_link(post_author()); ?>
    </a>

    Hardcoding the path is not nice, but at least it works.

    :-)

    Thank you!

    #79473
    kirpiit
    Member

    So, if I now understand right, I cannot use any piece of it.

    :-(

    Would it really be that hard to get the poster name and link it to his/her profile page, quite simply?

    I cannot find how.

    #79472

    It’s generated by the template logged-in.php, which in Kakumei looks like:

    <p class="login">
    <?php printf(__('Welcome, %1$s'), bb_get_profile_link(bb_get_current_user_info( 'name' )));?>
    <?php bb_admin_link( 'before= | ' );?>
    | <?php bb_logout_link(); ?>
    </p>

    So you’d want bb_get_profile_link(bb_get_current_user_info( 'name' ))

Viewing 25 results - 23,376 through 23,400 (of 32,468 total)
Skip to toolbar