Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 27,351 through 27,375 (of 32,459 total)
  • Author
    Search Results
  • #65130
    Detective
    Member

    $bbdb->prefix is a string containing your installation db prefix.

    #65129
    Null
    Member

    HI,

    The installation file contains:

    $bbdb->prefix."privatemessages"

    What does this prefix. do? Or where does it stand for? Is prefix the bb_ in the database? I believe not since $bbdb doest this already, so what is it?

    Thanks

    #50096
    chrishajer
    Participant

    You need to add this to the top of your wp-config.php right after <?php:

    require_once('/path/to/bbpress/bb-config.php');

    I would use the full server path to the bb-config.php file, not a relative path like ./bbpress/bb-config.php (rumor is that full paths work better) and not a URL like http://www.example.com/bbpress/bb-config.php (URLs won’t work at all here).

    That’s it, just one step. Good luck.

    #65826
    chrishajer
    Participant

    What is the equivalent of mod_rewrite on IIS? I mean, what makes the URLs into permalinks rather than just topic.php?id=whatever?

    #65849
    chrishajer
    Participant

    Can you past that code into something like pastebin or pastie? The formatting is lost displaying it here.

    Thanks.

    http://pastebin.com/

    http://pastie.org/

    parthatel
    Member

    ok, so I added require_once('path/to/bbpress/bb-config.php'); to my wp-config.php file. I then added the bbpress discussions code:

    <table id="latest">

    <tr>

    <th><?php _e(‘Movie’); ?> — <?php new_topic(); ?></th>

    <th><?php _e(‘Posts’); ?></th>

    <th><?php _e(‘Last Poster’); ?></th>

    <th><?php _e(‘Freshness’); ?></th>

    </tr>

    <?php if ( $super_stickies ) : foreach ( $super_stickies as $topic ) : ?>

    <tr<?php topic_class(); ?>>

    <td><?php bb_topic_labels(); ?> <big>“><?php topic_title(); ?></big></td>

    <td class=”num”><?php topic_posts(); ?></td>

    <td class=”num”><?php topic_last_poster(); ?></td>

    <td class=”num”>“><?php topic_time(); ?></td>

    </tr>

    <?php endforeach; endif; // $super_stickies ?>

    <?php if ( $topics ) : foreach ( $topics as $topic ) : ?>

    <tr<?php topic_class(); ?>>

    <td><?php bb_topic_labels(); ?> “><?php topic_title(); ?></td>

    <td class=”num”><?php topic_posts(); ?></td>

    <td class=”num”><?php topic_last_poster(); ?></td>

    <td class=”num”>“><?php topic_time(); ?></td>

    </tr>

    <?php endforeach; endif; // $topics ?>

    </table>

    I added that code to my index.php file in my wordpress theme and this is what I get as the output in the browser:

    <table id="latest">

    <tr>

    <th>Movie — Add New »

    </th>

    <th>Posts</th>

    <th>Last Poster</th>

    <th>Freshness</th>

    </tr>

    </table>

    Obviously, there is something wrong. Does anyone know what?

    #65823
    chrishajer
    Participant

    Wow, that most certainly is a problem.

    Two thoughts.

    1. If I disable “meta redirects” in FF with the web developer toolbar, it does not keep redirecting, it just dies. Are you trying to redirect people from the bbPress profile page to the WordPress profile page, and somehow that is typed wrong? Like in journal/messageboard/profile.php there is a redirect that sends the browser to WordPress journal/wp-admin/profile.php and it’s not working for some reason?

    2. There is some weird test cookie stuff being sent, although I doubt it has any effect on this problem. Never know though.

    wordpress_test_cookie
    WP+Cookie+check
    www.louisecooper.com
    /journal/

     

    I suspect it’s something with a refresh bouncing the user back and forth.

    #3615
    744478
    Inactive

    For more than a week I am fighting with bbPress and the latest WordPress version.

    My problem is that user comments don’t appear. Well, I can see them in the Administration area in WP but not in the forum. Users already move away because they think I blocked their comments.

    I actually installed bbpress because I wanted users to discuss on my page but now no one can discuss anymore lol.

    My WP installation is at http://www.webserver.com and I installed bbpress on http://www.mywebserver/forum (example addresses)

    I installed the WP plugin “bbPress Post” and filled out all the details. Also I installed bbSync.

    At least when I write a new post the post title appears in the forum. So one good thing. But that’s all. How do users comment from my blog? I don’t want to put a link on every post “go to the forum and post there”.

    I do have a custom theme by the way.

    Actually I am not an idiot but now I’m just freaking out with bbPress because it’s so complicated and most of the how-to’s don’t work or are just bad explained. Here’s an example:

    “Want a link back to the blog post? ” it days in the bbSync settings.

    Well, what can I do there? There’s a field. Do I have to write YES or a special tag? :| Absolutely no explaination.

    #3614
    parthatel
    Member

    I managed to add the WordPress functions to bbPress, but I now need to know how I can add the bbPress functions to WordPress. I want to include the exact “Discussions” code in “front-page.php” of bbPress to the “index.php” in WordPress. I know there is a plugin for this, but it wasn’t what I wanted.

    I used this code to integrate WordPress into bbPress (added to the top of bb_config.php)

    define('WP_BB', true);

    if ( !defined('DB_NAME') ) {

    require_once( dirname(__FILE__) . '/../wp-config.php');

    if ( !defined(‘BB_PATH’) )

    define(‘BB_PATH’, dirname(__FILE__) . ‘/’ );

    require_once( BB_PATH . ‘bb-settings.php’ );

    I think all I need to do is require bb-config.php and then the bb-settings.php. Anyone know how to do this (following the php example above)?

    *I only wish I know php.

    #3612

    Topic: Where is

    in forum Troubleshooting
    724719
    Inactive

    how do i change the log out link to use the log out of file of wordpress instead of bbpress, which isnt working for some reason.

    im lookin in ‘kakumei’ logged-in.php file and it shows:

    <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>

    question is where is bb_logout_link(); so i can change the actual link? which file is that function located in.

    thanks

    #65838
    738576
    Inactive

    I found the answer here:

    https://bbpress.org/documentation/integration-with-wordpress/

    I guess that’ll learn me to read before posting. :)

    #65767
    724719
    Inactive

    my site is http://www.picbi.com, so do I add to wp-config and bb-config: –

    define('COOKIE_DOMAIN', 'http://www.picbi.com');
    define('COOKIEPATH', '/');

    sorry im not that familiar with cookies and how to work them

    ????????

    #65778
    chrishajer
    Participant

    swaymedia: the full path should not be a URL but a filesystem path, something like:

    /home/picbico/public_html/wp-blog-header.php

    I tried on my forum and a relative path works there, so I’m not sure that’s the issue.

    Be sure that’s the second line of bb-config.php – the first line should be <?php:

    <?php
    require_once('/home/picbico/public_html/wp-blog-header.php');

     

    PHP doesn’t think the file is where you say it is. Can you take a screenshot of the directory listing in an FTP program or command line, and post that? Something does not make sense.

    #65777
    724719
    Inactive

    i just read a post on another thread, and saw this checklist:-

    1. You are running latest versions of WordPress (2.5.1) and bbPress (0.9.0.2)

    ME – yeahs I am !

    2. You have matched SECRET_KEY in wp-config.php with BB_SECRET_KEY in bb-config.php

    ME – yeahs I have !

    3. You have matched WordPress "secret" database option with bbPress "secret" database setting

    ME – yeahs I have!

    4. You have setup compatible cookie domains and paths in config files (see instructions in bbPress admin)

    ME – I take its these two things i have to add to wp-config.php file: – define(‘COOKIE_DOMAIN’, ”); define(‘COOKIEPATH’, ‘/’);

    if so what do I change those parameters to, or do i leave them blank … im not that familiar with cookies .. :/ (my site is http://www.picbi.com and the forum is http://www.picbi.com/forum )

    5. You are successfully sharing user tables from WordPress with bbPress

    Me – Yeahs I am

    #65772
    chrishajer
    Participant

    WordPress functions are defined and available to WordPress.

    https://codex.wordpress.org/Function_Reference

    If you don’t need to use those functions, then don’t include WordPress. You don’t need to include WordPress like that to have integrated users.

    #65763
    724613
    Inactive

    I’m having the same problem! After integrating, I see how the “test user” I created shows up in both admin consoles. However, whether I login to wordpress or bbpress first, the login does not carry over to the other when navigating, which forces me to login twice. I followed all the steps, which also inlcuded adding the following to the wp-config.php file…

    define(‘COOKIE_DOMAIN’, ‘*******’);

    define(‘COOKIEPATH’, ‘/’);

    The only thing that comes to mind is a “minor error” that I received after walking through the “successful install” of bbPress…

    Duplicate key name ‘user_nicename’

    >>> User tables will already exist when performing a database integrated installation.

    I’m wondering if this is the problem. If so, I’m not sure how to fix it. : Can someone help?

    #65812

    In reply to: No user found

    725450
    Inactive

    “The only people who can fix the problem won’t be able to see it, as moderator or keymaster. :D

    Hehe. I can start to cry now right? :P

    #65811

    In reply to: No user found

    chrishajer
    Participant

    mdawaffe: that has no effect. I logged out of this chrishajer account, then logged in with a new account from today, hajii. I tried to change the password since it is the default emailed one. I get the error about the user being unable to be found when I try to access the profile page. (Screenshot above.)

    It might be new accounts: that hajii account is from today. And it appears to happen only on member accounts, so you might need to create member account and see if you experience the same thing.

    The only people who can fix the problem won’t be able to see it, as moderator or keymaster. :D

    #62198
    kehlers
    Member

    I had this same issue, and I really like having images, so I looked into the code. I am not very savvy about reg expressions, so but if I comment out line 29 ($text = preg_replace("|(.*?)|se", "'<code>' . encodeit('$1') . '</code>'", $text);) from the allow_images_encode_bad function of the plugin, everything seems to work.

    Does anyone know if I need that line for anything else? I don’t want to open my site up to hackers or some such thing.

    #51602

    In reply to: Google Adsense

    725431
    Inactive

    I did everything from earigrey’s post and it does nothing. My main concern is since he asks for it to be put in my-template folder how is the software supposed to know that those files are there. So i just replaced the topic file in the template directory. How do i reference the adsense code so the page knows to look there?

    #65755
    chrishajer
    Participant

    It’s great that you have shell access. You can backup all the files with something like rsync, and you can use a shell script to backup the database tables you want. Since there are no wildcards in mysqldump, you will need to explicitly name all the tables in your installation; just separate them with spaces.

    You can put something like this into a bash script and run it daily (or whenever) from cron:

    mysqldump --add-drop-table -h host -u user -p password dbname 
    ( bb_forums
    bb_meta
    bb_posts
    bb_tagged
    bb_tags
    bb_terms
    bb_term_relationships
    bb_term_taxonomy
    bb_topics
    bb_topicmeta
    bb_users
    bb_usermeta ) | bzip2 -c | bbpress.bak.sql.bz2

     

    You would have to consider putting the password into the script and hiding that from prying eyes. Alternatively, you could create a user with limited privileges and no password, and use that in the backup script.

    You should also verify the table prefix, and that those are all your bbPress tables. I think there are different tables for different bbPress versions.

    Good luck.

    #65770
    chrishajer
    Participant

    That line is supposed to allow you to use WordPress functions from inside a bbPress page. It looks like you just got the path to it wrong. Does the file wp-blog-header.php actually exist one directory level up from where the bb-config.php is right now?

    #3604
    #65734

    In reply to: wrong password

    chrishajer
    Participant

    With the plugin turned off, I received the password promptly and it worked. I would place a bet on that Approve Registration plugin causing the trouble.

    Also, the password message I received has some odd looking characters in it.

    Il tuo nome utente &egrave;: myusername
    La tua password &egrave;:

    The password email arrived with è in it twice, just like above.

    #65721
    Detective
    Member

    Why don’t you just make a sql query ? If you have both WP & BB in the same database it should be easy. Something like:

    $blog_posts = $bbdb->get_results("SELECT FROM wp_posts WHERE post_status = 'publish' ORDER BY post_date DESC LIMIT 10");
    echo '<ul>';
    foreach ($blog_posts as $post)
    printf('<li><a href="/?p=%i">%s</a></li>', $post->post_ID, $post->post_title);
    echo '</ul>';
    unset($blog_posts);

    Of course this has errors, i made it without looking ad the db fields. Also, is it get_results or get_rows? I forgot :p

Viewing 25 results - 27,351 through 27,375 (of 32,459 total)
Skip to toolbar