Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for '"wordpress'

Viewing 25 results - 25,776 through 25,800 (of 26,836 total)
  • Author
    Search Results
  • Griffology
    Member

    OK here’s my file

    <?php
    /*
    Plugin Name: HFFIB
    Plugin URI:
    Description: Helper function for integrating bbPress into your theme.
    Version: 0
    Author: fel64
    Author URI: http://www.loinhead.net/
    */

    function felblogtotopicid( $felpostID ) {
    global $table_prefix, $wpdb;
    $posts_table = $table_prefix . "bbpress_post_posts";
    $topic_id = $wpdb->get_var("SELECT topic_id FROM '$posts_table' WHERE 'post_id' = $felpostID LIMIT 1;");
    return $topic_id;
    }

    function forumreplylink() {
    //must be called from within the loop yadda yadda
    global $post;
    if( $post ) {
    $rl = get_option( 'wpbb_path' ) . '/topic.php?id=';
    $tid = felblogtotopicid( $post->ID );
    echo '<a href="' . $rl . $tid . '">Reply!</a>' . "n";
    } else {
    echo 'ouch!';
    }
    }
    ?>

    I am running a custom theme, but it’s called in the spot as the original wordpress comments were and those worked fine. Here’s how I’m calling the function:

    <div class="details">
    <a>"><?php comments_number('No Comments','1 comment','% comments'); ?></a>
    <span class="tool">Category: <?php the_category(', '); ?></span>
    <span class="tool"><?php akst_share_link(); ?></span>
    <span class="tool"><?php forumreplylink(); ?></span>
    </div>

    Still getting the error, and no ‘ouch’ anywhere… I do have bbpress_post plugin running, is it supposed to or does this replace it? I’m thinking it has to be running, I’m just trying to elimate a stupid easy mistake I’ve made. :)

    fel64
    Member

    That’s strange, it works for me. At a guess the root of it is that $post doesn’t exist, or that $post->ID is nonexistant.

    Can you replace function forumreplylink() { ... } with:

    function forumreplylink() {
    //must be called from within the loop yadda yadda
    global $post;
    if( $post ) {
    $rl = get_option( 'wpbb_path' ) . '/topic.php?id=';
    $tid = felblogtotopicid( $post->ID );
    echo '<a href="' . $rl . $tid . '">Reply!</a>' . "n";
    } else {
    echo 'ouch!';
    }
    }

    If it outputs ouch we’ll know that a missing global $post is indeed the problem. You are using it inside The Loop, aren’t you?

    Griffology
    Member

    Thanks fel64. I’m looking to do away with the wordpress comments completely, just shut them off. However the bbpress post plugin posts the “discus in forms(0)” link at the end of the post. I have a bar at the bottom of each post and would like to format it in there. I’ve opened bbpress_post.php and saw the output of the post gets thrown into 1 variable. I would like to call a function in my wordpress php files, for example index.php, that calls the function from bbpress_post.php to display the “discuss in form” link.

    Hope that makes sense, but after read the thread you linked I don’t think it’s quite what i’m looking for. I’ll read it again thought as I’m tired. :)

    Thanks again.

    #57412
    Vili
    Participant

    The way I have integrated the two over at http://akirakurosawa.info/ is by editing the bbPress template so that it calls the WordPress headers instead of the bbPress ones.

    I presume that you have installed both WordPress and bbPress, and that you have integrated their user databases and installed the required plug-ins as outlined at https://bbpress.org/documentation/integration-with-wordpress/ .

    So, if you now go through the template files for your bbPress installation, you will need to replace all instances of “<?php bb_get_header(); ?>” with the WordPress command “<?php get_header(); ?>”. The same thing goes for the footers, so you change all instances of “<?php bb_get_footer(); ?>” to “<?php get_footer(); ?>”.

    However, in order to get that to work properly, I have also edited my WordPress template so that the (WordPress) header and footer files contain everything except for the actual content that is going to be shown on the page. In other words, all the “container” DIV-elements and such are opened in the header and closed in the footer. While this is perhaps not absolutely necessary, it makes your life easier.

    Finally, I use a boolean check in the WordPress header to see whether I am serving a bbPress page, and modify the header information accordingly. While I currently set the boolean myself by including

    <?php global $forumpage;
    $forumpage = TRUE; ?>

    at the very beginning of each relevant bbPress template page (i.e. those pages that call the header files), fel64 has pointed out that one could simply use a variable that bbPress uses anyway, for example $bbdb.

    I use these checks to modify the title:

    <?php if ($forumpage == TRUE) {
    bb_title();
    echo " :.: AKN&amp;I";
    } else ...

    to add the forum feed:

    <?php if ($forumpage == TRUE) bb_feed_head(); ?>

    as well as do some other things (disable Ultimate Tag Warrior’s meta tags for the page, etc.).

    So, it takes a little bit of playing around with your templates, but in the end it is doable without any actual hackery.

    fel64
    Member

    There are a few things you can do. This WP plugin will, using also the bbPress Post plugin, show replies from the appropriate thread in your forum under your newspost, plus links to the thread to reply to it. You can also transfer existing comments; you need to be careful to only do it once, but that can also be found in that thread. It hasn’t yet been successfully made so that you can reply to the forum from the wordpress part of the site, as far as I know, but I’m sure it’s possible and will be done.

    So it’s perhaps 2/3rds of the way there. :)

    #55363
    serimu
    Member

    +1

    I did also all the things(at least three or more times, and even I create a mirror template for bbpress to match with my wordpress template when I was tired of trying the same things to make permalinks to work),. So, for those people who uses Godaddy;

    It is not working with Godaddy. (Correction: It works for me, read below)

    But it only took a couple of hours to update my wordpress, install and integrate bbpress with wordpress (even, partially, templates). For now, I will not move to another hosting company for permalink option. But it is a bit annoying because rewrite rules are working on Godaddy. I have installed wordpress(10 or more different websites), and drupal(3 or more websites), and no problem with permalinks. When you create your htaccess file for the first time, you need to wait for a couple of hours (in avarage 2-3 hours). After that first initialization, every change in htaccess are applied instantly. Namely you just need to wait only for the first time.

    I also tried a simple redirect to check my htaccess file in forum root directory. And it was working.

    So as the creator team of bbpress is the same for wordpress. And as wordpress is ok with godaddy. The team may suggest an alternative way for rewrite rules. I dont know much about rewrite rules. And I believe the file (bb-admin/rewrite-rules. php) creates correct rules for the most of the servers.

    SOLUTION:

    I wrote all the above information and then I think to add my config.php file to here. So I find out something, that I dont use akismet, so I add // to beginning of that line, namely:

    //$bb->akismet_key = ''; // Example: '0123456789ab'

    and it is working now :)

    #57411
    Trent Adams
    Member

    Most of the *seemless* integration is really done by creating a template in bbPress that looks the same as wordpress using the existing theme and modifying the CSS style sheet to be the same as your wordpress theme. There are people that have managed to get bbPress inside their wordpress theme, but I only know of those that have failed and will wait for them to tell you how they did it.

    If you copy your /bb-templates/kakumei/ folder to your desktop and then play around with changing the theme. Most people edit the style.css, header.php, footer.php, front-page.php for starters. Then just create a new folder on your server root of /my-templates/ and then upload the files to a new folder /my-templates/mytheme/ or whatever. Then activate that theme in your admin area.

    The way bbPress works is that it will use the files from your new template and the original theme files if it doesn’t exist. That way, if you make a drastic change to any file and you want to start over, just delete that file from your template folder and it will use the original again.

    There are a few threads in this forum where people have gone further into detail, but that is how this site is created and others like mine with http://trentadams.ca and http://onvertigo.com looking the same even though they are on different servers.

    Hope that helps.

    Trent

    #1823
    fabtest
    Member

    Hiya all,

    My question is this. How do I integrate bbpress into wordpress so that it all looks like the same site? Eg. Just like here on bbpress.org there is a “Forums” tab and the forum is opened seemlessly into wp like any other page (but without all the sidebars).

    Thanks!

    fab

    p.s. I need to do the same trick to zenphoto gallery. Would it also work?

    #57392
    fel64
    Member

    That’s because you’re using a left-hand margin on your sidebar and your main div to push them to the right.

    <div id="main">
    <div id="discussions">

    <div id="secondary">

    That’s roughly your HTML structure. Main is the full width of the central white bar, so there’s no way you can get Secondary next to it. Discussions is a sub-part of Main, and it’s pushed over to the right by a large margin on the left.

    Secondary is not part of Main, and pushed over to the far right because it has a humoungous 71% margin.

    Firstly you want to put Secondary into your Main div, otherwise there’s no way to do it. Then you need to put either one on the left; the way to do this would be to get rid of its giant margin. That should work.

    Otherwise, if you’re not doing it by the margin property, you could put Secondary into Main again, then give Secondary and Discussions a float: left; and a float: right; property (or the other way around). If there’s enough room, they should now be side by side – otherwise make them narrower.

    You can also get rid of the wrapper‘s border properties, that’s what’s giving you the double-width line.

    That’s a nice theme you made, though. :)

    #1820
    bozzy
    Member

    I’ve got the header and footer to load correctly, but the sidebar is pushed to the bottom… I think this is a CSS problem… but what do I need to change to fix this?

    Thanks!!!

    http://forums.bozzysworld.com/

    #57390
    chrishajer
    Participant

    From the looks of your site, it worked. :D

    #57389
    soggybag
    Member

    Thanks a lot this seemed to do the trick.

    fel64
    Member

    I think require_once (or require, include or include_once for that matter) need a path to the file rather than a URL. A path would be like the addresses you get when you’re browsing folders on your computer. I can’t say what your path would be, but mine is /home/username/public_html/wordpress/wp-config.php. Ask your hosting provider if you don’t know what to use. :)

    It might be easier to recreate the theme anyway, if I remember rightly a fair few folks come here with problems when trying to stick bb into the WP theme like that.

    csl749
    Member

    Hi folks,

    I have WP and BB running off the same DB, integrating users etc as far as I can tell, and each working perfectly. But, following the instructions on the docs page on how to integrate WP functions so they can be called in BB, I get errors.

    I put the require_once('www.mywebsite.com/wp-blog-header.php'); at the top of the BB config.php, in the hope that the WP functions would be discovered, but each time I try to add, say, a line to front-page.php like get_header or get_footer, to visually sandwich BB inside my WP header/footer, I get an error:

    Fatal error: Call to undefined function: get_header() in /home/csleary/public_html/forum/my-templates/lemodie/front-page.php on line 1

    I’m very much a novice with all this, so I’m just following instructions at the moment hoping things will work. But as far as I can tell I’ve done everything correctly – please may someone offer some ideas as to what’s going wrong? While searching other integration threads, I came across one that said to make sure WP was loaded first, so BB could then load the functions, but I don’t know how to ensure this. BB is currently in siteroot/forum, and wordpress is in the root dir itself.

    Any help would be fantastic, thanks.

    #57388
    chrishajer
    Participant

    There are a couple of tricks you could use (I have no idea how it’s done officially.)

    In your site, all you would need to do is insert this into the template that contains the page navigation you have now (Home, About and Contact all appear to be pages):

    <li class="page_item"><a href="<?php bloginfo('url'); ?>/forum/" title="Visit the forum">Forum</a></li>

    HTH

    Chris

    #1819
    soggybag
    Member

    I want to add a link to my bbpress forum in my wordpress site. Preferably the link would sit along side the page links.

    How can I do this? It seems that adding a page only allows you to add a page. Rather than a link to a page that already exists.

    #57351
    midnightsun
    Member

    yeah, i saw the problem! thanks for the help

    #57350
    fel64
    Member

    Does that work? It should have been:

    <?php if( bb_current_user_can('administrate) ) {
    $wp_admin = 'wordpress/wp-admin/';
    echo '<a href="'.$wpadmin.'">Wordpress Admin</a>'; } ?>

    Sorry! :/

    #57349
    midnightsun
    Member

    hey,

    it doesn’t seem to be working! i’ve edited it a little

    <?php if( bb_current_user_can('administrate') {
    $wpadmin = 'wordpress/wp-admin/';
    echo '<a href="'.$wpadmin.'">Wordpress Admin</a>'; } ?>)

    #57348
    fel64
    Member

    Sure. Paste this in your HTML code somewhere:

    <?php if( bb_current_user_can('administrate) {
    $wp_admin = 'http://link.to.your/wordpress/wp-admin/';
    echo '<a href="'.$wpadmin.'">Wordpress Admin</a>'; } ?>

    #1812
    #56257
    jessiebirks
    Member

    Thanks Trent!

    I tested the change on one user, and I was able to edit his ID number to match the number from the old PHPBB. As hoped, his posts in the transferred Forum are now correctly attributed.

    However, I ran ino a quirk. When I change the ID in WordPress, the user gets bumped in the User Role list. He went from “Subscriber” to “No role for this blog.” I manually promoted him to Author from the wp-admin/users panel.

    What field in the wp-db controls the user roles? Can I avoid this quirk on future ID edits?

    #56255
    jessiebirks
    Member

    I’m running into a similar, if not “same” problem.

    I had a PHPBB with approx 20 active users. The same users will be participating in a new page which is pre-launch.

    That page is a WordPress installation with integrated BBPress. There are only 3 users in the WP/BB install. I imported the posts and forums from PHPBB using the PHPBBtoWordpress hack.

    Since I’d already integrated the BBPress install, copying the data did not create the Users in the database, because they began with wp_ and it was looking for bb_. Now, most of the posts are either attributed to “anonymous” or they’re attributed to the wrong username. I don’t want to do the data retrieval over, because the PHPBB users are riddled with spambot entries, and this was an easy way to get rid of them.

    Will it be safe to create my new WordPress users, then edit their ID number to match the IDs from the old PHPBB data? And will this change correctly attribute the posts in the BBPress forums? Also, if I change these ID numbers in the WordPress database… will their posts in WordPress become incorrectly attributed?

    #57264
    850
    Member

    I’ll try that. I wish it were easier to turn on/off plugins. I have to delete the plugin folder and also the files associated with them elsewhere. Some other files… mostly template files.. have been modified with some of the plugins.

    BB Press needs a plugin system like WordPress where they can be turned on/off from the Admin area.

    #56963
    Vili
    Participant

    Indeed, would save some work. :)

Viewing 25 results - 25,776 through 25,800 (of 26,836 total)
Skip to toolbar