Search Results for 'code'
-
Search Results
-
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?
Topic: Where are the user comments?
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.
Topic: Where is
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
I have successfully merged bbpress with my website and it works fine sharing user data and logging in/out… very almost.
When a user first moves to the forum it shows them as not logged in, though if they click a forum link or refresh the page they are then shown as logged in.
I only modified pluggable.php a little to make the cookie easier to handle and I’ve tried adding a function (below) in index.php and template header. Very crude , checking a cookie is set and calling the login function, but it’s just a test:
if (isset($_COOKIE[bbpres...]) && isset($_COOKIE[IHuser...]) && isset($_COOKIE[IHpass...])){
$login = decode($_COOKIE[IHuser...]);
$password = decode($_COOKIE[IHpass...]);
bb_login($login, $password, $remember = false);
}Really I’m looking for where bbpress first checks to see if a user is logged in and sets headers but so far I’m out of luck. Where do I need to put my function so a user will be shown as logged in as soon as the navigate to the forum?
P.S. I will build a more solid function so a users password isn’t in a cookie, like I say – just a test!
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.